diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..2fc2d43 --- /dev/null +++ b/.classpath @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f6bff92 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/bin/ +/build/ +/**/desktop.ini \ No newline at end of file diff --git a/.gradle/2.2.1/taskArtifacts/cache.properties b/.gradle/2.2.1/taskArtifacts/cache.properties new file mode 100644 index 0000000..2bb036d --- /dev/null +++ b/.gradle/2.2.1/taskArtifacts/cache.properties @@ -0,0 +1 @@ +#Wed Nov 11 14:38:35 KST 2015 diff --git a/.gradle/2.2.1/taskArtifacts/cache.properties.lock b/.gradle/2.2.1/taskArtifacts/cache.properties.lock new file mode 100644 index 0000000..c635a1e Binary files /dev/null and b/.gradle/2.2.1/taskArtifacts/cache.properties.lock differ diff --git a/.gradle/2.2.1/taskArtifacts/fileHashes.bin b/.gradle/2.2.1/taskArtifacts/fileHashes.bin new file mode 100644 index 0000000..bd9b5d3 Binary files /dev/null and b/.gradle/2.2.1/taskArtifacts/fileHashes.bin differ diff --git a/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin b/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin new file mode 100644 index 0000000..7014676 Binary files /dev/null and b/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin differ diff --git a/.gradle/2.2.1/taskArtifacts/outputFileStates.bin b/.gradle/2.2.1/taskArtifacts/outputFileStates.bin new file mode 100644 index 0000000..8f13070 Binary files /dev/null and b/.gradle/2.2.1/taskArtifacts/outputFileStates.bin differ diff --git a/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin b/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin new file mode 100644 index 0000000..092d186 Binary files /dev/null and b/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin differ diff --git a/.project b/.project new file mode 100644 index 0000000..0f08240 --- /dev/null +++ b/.project @@ -0,0 +1,37 @@ + + + spring4-mvc-gradle-xml + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.springframework.ide.eclipse.core.springbuilder + + + + + + org.springframework.ide.eclipse.core.springnature + org.springsource.ide.eclipse.gradle.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jem.workbench.JavaEMFNature + + diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope new file mode 100644 index 0000000..099c525 --- /dev/null +++ b/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.settings/gradle/org.springsource.ide.eclipse.gradle.core.prefs b/.settings/gradle/org.springsource.ide.eclipse.gradle.core.prefs new file mode 100644 index 0000000..9cd748d --- /dev/null +++ b/.settings/gradle/org.springsource.ide.eclipse.gradle.core.prefs @@ -0,0 +1,7 @@ +#org.springsource.ide.eclipse.gradle.core.preferences.GradleProjectPreferences +#Wed Nov 11 15:05:55 KST 2015 +build.family.org.gradle.tooling.model.eclipse.HierarchicalEclipseProject=; +org.springsource.ide.eclipse.gradle.classname.enableSorting=false +org.springsource.ide.eclipse.gradle.classpath.enableSorting=true +org.springsource.ide.eclipse.gradle.linkedresources= +org.springsource.ide.eclipse.gradle.rootprojectloc= diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..778a21d --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding//src/main/webapp/WEB-INF/miplatform/jsp/base_code_sel.jsp=euc-kr diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..8248893 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,13 @@ +# +#Fri Nov 13 18:33:11 KST 2015 +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error diff --git a/.settings/org.eclipse.jst.j2ee.ejb.annotations.xdoclet.prefs b/.settings/org.eclipse.jst.j2ee.ejb.annotations.xdoclet.prefs new file mode 100644 index 0000000..af099af --- /dev/null +++ b/.settings/org.eclipse.jst.j2ee.ejb.annotations.xdoclet.prefs @@ -0,0 +1,5 @@ +XDOCLETBUILDERACTIVE=true +XDOCLETHOME= +XDOCLETUSEGLOBAL=true +XDOCLETVERSION=1.2.1 +eclipse.preferences.version=1 diff --git a/.settings/org.eclipse.ltk.core.refactoring.prefs b/.settings/org.eclipse.ltk.core.refactoring.prefs new file mode 100644 index 0000000..cfcd1d3 --- /dev/null +++ b/.settings/org.eclipse.ltk.core.refactoring.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000..7e83e24 --- /dev/null +++ b/.settings/org.eclipse.wst.common.component @@ -0,0 +1,188 @@ + + + + + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + + 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..0585110 --- /dev/null +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,5 @@ + + + + + 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.ws.service.policy.prefs b/.settings/org.eclipse.wst.ws.service.policy.prefs new file mode 100644 index 0000000..6da2f3d --- /dev/null +++ b/.settings/org.eclipse.wst.ws.service.policy.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.wst.ws.service.policy.projectEnabled=false diff --git a/.settings/org.eclipse.wst.xsl.core.prefs b/.settings/org.eclipse.wst.xsl.core.prefs new file mode 100644 index 0000000..437d548 --- /dev/null +++ b/.settings/org.eclipse.wst.xsl.core.prefs @@ -0,0 +1,11 @@ +CHECK_CALL_TEMPLATES=2 +CHECK_XPATHS=2 +CIRCULAR_REF=2 +DUPLICATE_PARAMETER=2 +EMPTY_PARAM=1 +MISSING_INCLUDE=2 +MISSING_PARAM=1 +NAME_ATTRIBUTE_EMPTY=2 +NAME_ATTRIBUTE_MISSING=2 +TEMPLATE_CONFLICT=2 +eclipse.preferences.version=1 diff --git a/.settings/org.springframework.ide.eclipse.beans.core.prefs b/.settings/org.springframework.ide.eclipse.beans.core.prefs new file mode 100644 index 0000000..e0c1124 --- /dev/null +++ b/.settings/org.springframework.ide.eclipse.beans.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.springframework.ide.eclipse.beans.core.ignoreMissingNamespaceHandler=false diff --git a/.settings/org.springframework.ide.eclipse.core.prefs b/.settings/org.springframework.ide.eclipse.core.prefs new file mode 100644 index 0000000..5167a9a --- /dev/null +++ b/.settings/org.springframework.ide.eclipse.core.prefs @@ -0,0 +1,54 @@ +eclipse.preferences.version=1 +org.springframework.ide.eclipse.core.builders.enable.aopreferencemodelbuilder=true +org.springframework.ide.eclipse.core.builders.enable.beanmetadatabuilder=true +org.springframework.ide.eclipse.core.enable.project.preferences=false +org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.bestpractices.beansvalidator=false +org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.boot.bootvalidator=true +org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.core.springvalidator=false +org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.data.core.datavalidator=true +org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.autowire.autowire-org.springframework.ide.eclipse.beans.core.beansvalidator=false +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanAlias-org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanClass-org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanConstructorArgument-org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinition-org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinitionHolder-org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanFactory-org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanInitDestroyMethod-org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanReference-org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.methodOverride-org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.parsingProblems-org.springframework.ide.eclipse.beans.core.beansvalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.requiredProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=false +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.toolAnnotation-org.springframework.ide.eclipse.beans.core.beansvalidator=false +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.com.springsource.sts.bestpractices.AvoidDriverManagerDataSource-org.springframework.ide.eclipse.bestpractices.beansvalidator=false +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.com.springsource.sts.bestpractices.ImportElementsAtTopRulee-org.springframework.ide.eclipse.bestpractices.beansvalidator=false +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.com.springsource.sts.bestpractices.ParentBeanSpecifiesAbstractClassRule-org.springframework.ide.eclipse.bestpractices.beansvalidator=false +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.com.springsource.sts.bestpractices.RefElementRule-org.springframework.ide.eclipse.bestpractices.beansvalidator=false +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.com.springsource.sts.bestpractices.TooManyBeansInFileRule-org.springframework.ide.eclipse.bestpractices.beansvalidator=false +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.com.springsource.sts.bestpractices.UnnecessaryValueElementRule-org.springframework.ide.eclipse.bestpractices.beansvalidator=false +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.com.springsource.sts.bestpractices.UseBeanInheritance-org.springframework.ide.eclipse.bestpractices.beansvalidator=false +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.bestpractices.legacyxmlusage.jndiobjectfactory-org.springframework.ide.eclipse.bestpractices.beansvalidator=false +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.boot.missingConfigurationProcessor-org.springframework.ide.eclipse.boot.bootvalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.core.springClasspath-org.springframework.ide.eclipse.core.springvalidator=false +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.data.core.invalidDerivedQuery-org.springframework.ide.eclipse.data.core.datavalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.data.core.invalidParameterType-org.springframework.ide.eclipse.data.core.datavalidator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.action-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.actionstate-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attribute-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attributemapper-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.beanaction-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationaction-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationresult-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.exceptionhandler-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.import-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.inputattribute-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.mapping-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.outputattribute-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.set-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.state-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.subflowstate-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.transition-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.variable-org.springframework.ide.eclipse.webflow.core.validator=true +org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.webflowstate-org.springframework.ide.eclipse.webflow.core.validator=true diff --git a/.springBeans b/.springBeans new file mode 100644 index 0000000..93efcf9 --- /dev/null +++ b/.springBeans @@ -0,0 +1,32 @@ + + + 1 + + + + + + + src/main/webapp/WEB-INF/context/context-board2.xml + + + src/main/webapp/WEB-INF/Member/servlet/servlet-Member.xml + src/main/webapp/WEB-INF/context/context-scott-orcl.xml + src/main/webapp/WEB-INF/defult/servlet/servlet-defult.xml + src/main/webapp/WEB-INF/scott/servlet/servlet-scott.xml + src/main/webapp/WEB-INF/context/context-aspect.xml + src/main/webapp/WEB-INF/miplatform/servlet/servlet-defult.xml + src/main/webapp/WEB-INF/daumeditor/servlet/servlet-common.xml + src/main/webapp/WEB-INF/sample/servlet/servlet-sample.xml + src/main/webapp/WEB-INF/context/context-defult-orcl.xml + src/main/webapp/WEB-INF/spring-mvc-config.xml + src/main/webapp/WEB-INF/first/servlet/servlet-first.xml + src/main/webapp/WEB-INF/common/servlet/servlet-common.xml + src/main/webapp/WEB-INF/board/servlet/servlet-board.xml + src/main/webapp/WEB-INF/context/context-defult.xml + src/main/webapp/WEB-INF/board2/servlet/servlet-board2.xml + src/main/webapp/WEB-INF/context/context-page-egov.xml + + + + diff --git a/README.md b/README.md index 5e9f862..1de5077 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,30 @@ +나는 mysql 대신 오라클을 사용함 +============= +jdbc.properties 대신 +WEB-INF/context/context-defult-orcl.xml 사용함 +jdbc.properties 파일은 넣어놓기만 하고 불러오는 태그는 주석처리함 +어느족이 편한지는 상황에 따라 다르므로.. + +http://syaku.tistory.com/269 +======== +위 예제 따라하기 위한 브런치 + +=== === + +전자정부 프레임워크 따라하는중 + +=== === + +어떤 jar 파일이 누락 되었음 +뭔지는 모름 + +=== === +/spring4-mvc-gradle-xml-hello-world/src/main/webapp/WEB-INF/views/jsp/index.jsp +파일에서 +The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path +라는 오류가 뜨지만 잘 구동됨. +대체 왜..? + Gradle - Spring 4 MVC Hello World =============================== Template for Spring 4 MVC + JSP view + XML configuration, using Gradle build tool. diff --git a/build.gradle b/build.gradle index 982d50b..065566c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,47 +1,156 @@ apply plugin: 'java' apply plugin: 'war' -apply plugin: 'eclipse-wtp' -apply plugin: 'jetty' +apply plugin: 'eclipse-wtp' // WTP(Web Tools Platform) -> 웹 프로젝트로 인식하도록 +compileJava.options.encoding = 'UTF-8' // 지정하지 않으면 OS 기본 인코딩으로 간주 +version = '1.0' // JDK 7 -sourceCompatibility = 1.7 +sourceCompatibility = 1.7// 빌드시 해당 버전으로 자바 문법 검사 targetCompatibility = 1.7 repositories { mavenLocal() mavenCentral() + maven { + url "http://www.egovframe.go.kr/maven/" + } } -dependencies { - - compile 'ch.qos.logback:logback-classic:1.1.3' - compile 'org.springframework:spring-webmvc:4.1.6.RELEASE' +def version = [ +li:'latest.integration', //${ver.li}//최신 버전 베타 포함인듯 +lr:'latest.release', //${ver.lr}//릴리즈된것중 최신 +spring: '4.2.2.RELEASE', //${ver.spring} +aspectj:'1.8.7', //${ver.aspectj} +slf4j:'1.7.13' //${ver.slf4j} +] + +dependencies { + + + //${ver.spring}가 안먹힘.. 대체 왜? + compile 'org.springframework:spring-aop:4.2.2.RELEASE' + compile 'org.springframework:spring-beans:4.2.2.RELEASE' + compile 'org.springframework:spring-core:4.2.2.RELEASE' + compile 'org.springframework:spring-context:4.2.2.RELEASE' + compile 'org.springframework:spring-context-support:4.2.2.RELEASE' + compile 'org.springframework:spring-jdbc:4.2.2.RELEASE'//스프링 jdbc db연결을 위해 필요 + compile 'org.springframework:spring-orm:4.2.2.RELEASE' + compile 'org.springframework:spring-orm:3.2.5.RELEASE' + compile 'org.springframework:spring-test:4.2.2.RELEASE' + compile 'org.springframework:spring-tx:4.2.2.RELEASE' + compile 'org.springframework:spring-web:4.2.2.RELEASE' + compile 'org.springframework:spring-webmvc:4.2.2.RELEASE'//latest.release + compile 'javax.servlet:jstl:1.2' + compile 'javax.servlet:javax.servlet-api:3.0.1' + compile 'javax.servlet.jsp:jsp-api:2.2' -} + compile 'javax.inject:javax.inject:1' + + compile 'javax.annotation:jsr250-api:1.0' + + compile 'org.mybatis:mybatis:3.3.0' + compile 'org.mybatis:mybatis-spring:1.2.3'// Spring 에서 연동을 지원하는 myBatis + + compile 'org.aspectj:aspectjrt:1.8.7'//Aspectj 표현식,aop 관련 + compile 'org.aspectj:aspectjweaver:1.8.7'//Aspectj 표현식,aop 관련 + compile 'org.aspectj:aspectjtools:1.8.7'//Aspectj 표현식,aop 관련 + + compile 'cglib:cglib-nodep:2.2'//aop 사용시 스프링 3.1 이하는 이게 필요 + + compile 'aopalliance:aopalliance:1.0' + + compile 'hsqldb:hsqldb:1.8.0.10' + + compile 'org.apache.ibatis:ibatis-sqlmap:2.3.4.726' + + compile 'org.easymock:easymock:3.4'//전자정부에서 사용 + + compile 'org.slf4j:slf4j-api:1.7.13'//로깅 + compile 'org.slf4j:slf4j-jcl:1.7.13' + compile 'org.slf4j:slf4j-log4j12:1.7.13' + compile 'org.slf4j:log4j-over-slf4j:1.7.13' + compile 'org.slf4j:jcl-over-slf4j:1.7.13' + + compile 'org.lazyluke:log4jdbc-remix:0.2.7'//쿼리 로그 출력용 + + compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.13'//제이슨 + + compile 'com.fasterxml.jackson.core:jackson-core:2.6.3' + compile 'com.fasterxml.jackson.core:jackson-databind:2.6.3' + + compile 'ch.qos.logback:logback-classic:1.1.3' + compile 'ch.qos.logback:logback-access:1.1.3' + compile 'ch.qos.logback:logback-core:1.1.3' + + //compile 'log4j:log4j:1.2.17' + //compile 'xerces:xercesImpl:2.11.0'//로그 출력시 한글 오류 문제 해결 + + compile 'commons-beanutils:commons-beanutils:1.9.2' + compile 'commons-codec:commons-codec:1.10'//암호화를 위해 추가 + compile 'commons-collections:commons-collections:3.2.1' + compile 'commons-dbcp:commons-dbcp:1.4'//커넥션풀을 담당하는 Apache Commons DBCP + compile 'commons-fileupload:commons-fileupload:1.3.1'//파일 업로드용 + compile 'commons-io:commons-io:2.4'//파일 업로드용,FileUtils + compile 'commons-lang:commons-lang:2.6'//myBatis 연동과 관련은 없지만, 빈번하게 사용되는 문자열 라이브러리를 Aapche Commons Lang 로 통일함 + compile 'commons-logging:commons-logging:1.2' + compile 'commons-pool:commons-pool:1.6' -// Embeded Jetty for testing -jettyRun{ - contextPath = "spring4" - httpPort = 8080 -} -jettyRunWar{ - contextPath = "spring4" - httpPort = 8080 + + + + //compile 'commons-logging:commons-logging:1.2' + + compile 'com.navercorp.lucy:lucy-xss:1.6.3'//태그제거 라이브러리 + compile 'com.oracle:ojdbc14:10.2.0.4.0'//오라클 + + + compile 'egovframework.rte:egovframework.rte.ptl.mvc:3.5.0' + //compile ('egovframework.rte:egovframework.rte.ptl.mvc:3.5.0'){//전자정부 프레임워크 + // exclude group:'org.apache.logging.log4j', module:'log4j-core'//나는 로그백을 이용할것이므로 이 걸 제거 + // exclude group:'org.apache.logging.log4j', module:'log4j-slf4j-impl'//나는 로그백을 이용할것이므로 이 걸 제거 + // exclude group:'org.slf4j', module:'log4j-over-slf4j'//나는 로그백을 이용할것이므로 이 걸 제거 + //} + compile 'egovframework.rte:egovframework.rte.psl.dataaccess:3.5.0' + compile 'egovframework.rte:egovframework.rte.fdl.idgnr:3.5.0' + compile 'egovframework.rte:egovframework.rte.fdl.cmmn:3.5.0' + compile 'egovframework.rte:egovframework.rte.fdl.property:3.5.0' + + + testCompile 'junit:junit:${version.release}' } -//For Eclipse IDE only eclipse { - - wtp { - component { - - //define context path, default to project folder name - contextPath = 'spring4' - - } - + wtp { + facet { + facet name: 'jst.web', version: '3.0' // Servlet Spec Version 지정, 미 지정시 2.4 + facet name: 'jst.java', version: '1.7' // Java Version 지정 } + } + } + +// commons-logging, log4j, jul 의존성 제거 +configurations { + all.collect { configuration -> + //이걸 안넣으면 로그가 이중으로 출력됨. 그것도 정규식이 지정 안된 오리지날 형태로 + configuration.exclude group: 'commons-logging', module: 'commons-logging' + configuration.exclude group: 'log4j', module: 'log4j' + //configuration.exclude group: 'log4j', module: 'log4j-core' + //configuration.exclude group: 'log4j', module: 'log4j-slf4j-impl' + configuration.exclude group: 'org.slf4j', module: 'slf4j-log4j12' + configuration.exclude group: 'org.slf4j', module: 'slf4j-jcl' + configuration.exclude group: 'org.slf4j', module: 'slf4j-jdk14' + //configuration.exclude group: 'org.slf4j', module: 'log4j-over-slf4j' + } +} +//위방법이나 아래방법은 같음. 아래는 전자정부의 로깅 의존성 제거 +configurations { + //compile.exclude module: 'commons' // compile configuration에서 특정 모듈 제외 + //all*.exclude group: 'org.gradle.test.excludes', module: 'reports' // 모든 configuration에서 특정 모듈 제외 + all*.exclude group: 'org.apache.logging.log4j', module:'log4j-core'// 모든 configuration에서 특정 모듈 제외 + all*.exclude group: 'org.apache.logging.log4j', module:'log4j-slf4j-impl'// 모든 configuration에서 특정 모듈 제외 + all*.exclude group: 'org.slf4j', module:'log4j-over-slf4j'// 모든 configuration에서 특정 모듈 제외 +} \ No newline at end of file diff --git a/doc/board/create seq.sql b/doc/board/create seq.sql new file mode 100644 index 0000000..44b8c65 --- /dev/null +++ b/doc/board/create seq.sql @@ -0,0 +1,81 @@ +-- Sequence +CREATE SEQUENCE DEFULT.DEFULT_USER_SEQ +START WITH 1 + MAXVALUE 999999999999999999999999999 + MINVALUE 1 + NOCYCLE + CACHE 20 + NOORDER; + +-- Trigger +CREATE TRIGGER DEFULT.DEFULT_USER_TRG +BEFORE INSERT +ON DEFULT.DEFULT_USER +REFERENCING NEW AS New OLD AS Old +FOR EACH ROW +BEGIN +-- For Toad: Highlight column U_NO + :new.U_NO := DEFULT_USER_SEQ.nextval; +END DEFULT_USER_TRG; +/ +-- Sequence +CREATE SEQUENCE DEFULT.DEFULT_REPLY_SEQ +START WITH 1 + MAXVALUE 999999999999999999999999999 + MINVALUE 1 + NOCYCLE + CACHE 20 + NOORDER; + +-- Trigger +CREATE TRIGGER DEFULT.DEFULT_REPLY_TRG +BEFORE INSERT +ON DEFULT.DEFULT_REPLY +REFERENCING NEW AS New OLD AS Old +FOR EACH ROW +BEGIN +-- For Toad: Highlight column R_NO + :new.R_NO := DEFULT_REPLY_SEQ.nextval; +END DEFULT_REPLY_TRG; +/ +-- Sequence +CREATE SEQUENCE DEFULT.DEFULT_BOARD_SEQ +START WITH 1 + MAXVALUE 999999999999999999999999999 + MINVALUE 1 + NOCYCLE + CACHE 20 + NOORDER; + +-- Trigger +CREATE TRIGGER DEFULT.DEFULT_BOARD_TRG +BEFORE INSERT +ON DEFULT.DEFULT_BOARD +REFERENCING NEW AS New OLD AS Old +FOR EACH ROW +BEGIN +-- For Toad: Highlight column B_NO + :new.B_NO := DEFULT_BOARD_SEQ.nextval; +END DEFULT_BOARD_TRG; +/ + +-- Sequence +CREATE SEQUENCE DEFULT.DEFULT_FILE_SEQ +START WITH 1 + MAXVALUE 999999999999999999999999999 + MINVALUE 1 + NOCYCLE + CACHE 20 + NOORDER; + +-- Trigger +CREATE TRIGGER DEFULT.DEFULT_FILE_TRG +BEFORE INSERT +ON DEFULT.DEFULT_FILE +REFERENCING NEW AS New OLD AS Old +FOR EACH ROW +BEGIN +-- For Toad: Highlight column F_NO + :new.F_NO := DEFULT_FILE_SEQ.nextval; +END DEFULT_FILE_TRG; +/ diff --git a/doc/board/create table.sql b/doc/board/create table.sql new file mode 100644 index 0000000..1ff56a3 --- /dev/null +++ b/doc/board/create table.sql @@ -0,0 +1,123 @@ + +CREATE TABLE defult_board +( + b_no INTEGER NOT NULL , + b_title VARCHAR2(1000) NOT NULL , + b_content VARCHAR2(4000) NOT NULL , + b_indate DATE DEFAULT sysdate NOT NULL , + b_eddate DATE DEFAULT sysdate NOT NULL , + b_delete NUMBER(1) DEFAULT 0 NOT NULL , + u_no INTEGER NOT NULL +); + + + +CREATE UNIQUE INDEX XPK게시판 ON defult_board +(b_no ASC); + + + +ALTER TABLE defult_board + ADD CONSTRAINT XPK게시판 PRIMARY KEY (b_no); + + + +CREATE TABLE defult_reply +( + r_no INTEGER NOT NULL , + r_content VARCHAR2(1000) NOT NULL , + r_indate DATE DEFAULT sysdate NOT NULL , + r_eddate DATE DEFAULT sysdate NOT NULL , + r_delete NUMBER(1) DEFAULT 0 NOT NULL , + u_no INTEGER NOT NULL , + b_no INTEGER NOT NULL +); + + + +CREATE UNIQUE INDEX XPK덧글 ON defult_reply +(r_no ASC); + + + +ALTER TABLE defult_reply + ADD CONSTRAINT XPK덧글 PRIMARY KEY (r_no); + + + +CREATE TABLE defult_user +( + u_no INTEGER NOT NULL , + u_id VARCHAR2(20) NOT NULL , + u_pw VARCHAR2(100) NOT NULL , + u_nick VARCHAR2(20) NOT NULL , + u_indate DATE DEFAULT sysdate NOT NULL , + u_delete NUMBER(1) DEFAULT 0 NOT NULL , + u_eddate DATE DEFAULT sysdate NOT NULL +); + + + +CREATE UNIQUE INDEX XPK회원 ON defult_user +(u_no ASC); + + + +ALTER TABLE defult_user + ADD CONSTRAINT XPK회원 PRIMARY KEY (u_no); + + + +CREATE UNIQUE INDEX u_id_uK ON defult_user +(u_id ASC); + + + +ALTER TABLE defult_user +ADD CONSTRAINT u_id_uK UNIQUE (u_id); + + + +CREATE UNIQUE INDEX u_nick_uk ON defult_user +(u_nick ASC); + + + +ALTER TABLE defult_user +ADD CONSTRAINT u_nick_uk UNIQUE (u_nick); + + + +ALTER TABLE defult_board + ADD (CONSTRAINT R_5 FOREIGN KEY (u_no) REFERENCES defult_user (u_no)); + + + +ALTER TABLE defult_reply + ADD (CONSTRAINT R_6 FOREIGN KEY (u_no) REFERENCES defult_user (u_no)); + + + +ALTER TABLE defult_reply + ADD (CONSTRAINT R_7 FOREIGN KEY (b_no) REFERENCES defult_board (b_no)); + + +CREATE TABLE defult_file +( + b_no INTEGER NOT NULL , + f_no INTEGER NOT NULL , + f_onm VARCHAR2(260) NOT NULL , + f_rnm VARCHAR2(100) NOT NULL , + f_sz INTEGER NOT NULL , + f_indate DATE DEFAULT sysdate NOT NULL , + f_delete NUMBER(1) DEFAULT 0 NOT NULL +); + +CREATE UNIQUE INDEX XPK게시판_파일 ON defult_file +(f_no ASC); + +ALTER TABLE defult_file + ADD CONSTRAINT XPK게시판_파일 PRIMARY KEY (f_no); + + ALTER TABLE defult_file + ADD (CONSTRAINT R_8 FOREIGN KEY (b_no) REFERENCES defult_board (b_no)); \ No newline at end of file diff --git a/doc/board/sample data.sql b/doc/board/sample data.sql new file mode 100644 index 0000000..43a3cc3 --- /dev/null +++ b/doc/board/sample data.sql @@ -0,0 +1,30 @@ +/* Formatted on 2015-10-29 오후 12:26:31 (QP5 v5.227.12220.39754) */ +INSERT INTO defult_user (u_id, u_pw, u_nick) + VALUES ('test', 'test', 'test'); + +INSERT INTO defult_board (b_title, b_content, u_no) + VALUES ('test', 'test', 1); + +INSERT INTO defult_reply (r_content, b_no, u_no) + VALUES ('test', 1, 1); + +INSERT INTO defult_user (u_id, u_pw, u_nick) + VALUES ('test1', 'test1', 'test1'); + +INSERT INTO defult_board (b_title, b_content, u_no) + VALUES ('test1', 'test1', 2); + +INSERT INTO defult_reply (r_content, b_no, u_no) + VALUES ('test1', 2, 2); + +INSERT INTO defult_reply (r_content, b_no, u_no) + VALUES ('test1', 1, 2); + +INSERT INTO defult_reply (r_content, b_no, u_no) + VALUES ('test1', 2, 1); + +INSERT INTO defult_board (b_title, b_content, u_no,b_delete) + VALUES ('test', 'test', 1,1); + +INSERT INTO defult_reply (r_content, b_no, u_no,r_delete) + VALUES ('test1', 1, 1,1); \ No newline at end of file diff --git "a/doc/board/\354\203\230\355\224\214 \352\262\214\354\213\234\355\214\220 \355\205\214\354\235\264\353\270\224.erwin" "b/doc/board/\354\203\230\355\224\214 \352\262\214\354\213\234\355\214\220 \355\205\214\354\235\264\353\270\224.erwin" new file mode 100644 index 0000000..a46eb2f Binary files /dev/null and "b/doc/board/\354\203\230\355\224\214 \352\262\214\354\213\234\355\214\220 \355\205\214\354\235\264\353\270\224.erwin" differ diff --git a/doc/board2/INSERT INTO board02 sample.sql b/doc/board2/INSERT INTO board02 sample.sql new file mode 100644 index 0000000..0152336 --- /dev/null +++ b/doc/board2/INSERT INTO board02 sample.sql @@ -0,0 +1,3 @@ +INSERT INTO board02 values(SEQUENCE_COMMENT_SEQ.nextval,'오라클자바커뮤니티','1111','질문입니다','SQL을 배울 수 있는 과정이 뭐죠??',' ',sysdate,0,SEQUENCE_COMMENT_SEQ.currval,0,0); + +INSERT INTO board02 values(SEQUENCE_COMMENT_SEQ.nextval,'오라클자바커뮤니티2','1111','JAVA 질문입니다','JAVA을 배울 수 있는 과정이 뭐죠??',' ',sysdate,0,SEQUENCE_COMMENT_SEQ.currval,0,0); \ No newline at end of file diff --git a/doc/board2/create table board02.sql b/doc/board2/create table board02.sql new file mode 100644 index 0000000..41ed5a1 --- /dev/null +++ b/doc/board2/create table board02.sql @@ -0,0 +1,18 @@ +create table board02( + seq varchar2(1000), + name varchar2(20) not null, + passwd varchar2(20) not null, + title varchar2(500)not null, + content clob not null, + filename varchar2(100)not null, + regdate date default sysdate, + readcount number(10) default 0, + reply varchar2(1000) not null, + reply_step number(10) default 0, + reply_level number(10) default 0, + + constraint b_seq_pk primary key(seq) +); + +create sequence sequence_board_seq +start with 1 increment by 1; diff --git a/doc/board2/create table comment_t02.sql b/doc/board2/create table comment_t02.sql new file mode 100644 index 0000000..35ba43d --- /dev/null +++ b/doc/board2/create table comment_t02.sql @@ -0,0 +1,12 @@ +create table comment_t02( + comment_seq varchar2(1000), + comment_name varchar2(20) not null, + comment_comm varchar2(4000) not null, + seq varchar2(1000) not null, + + constraint comment_t_comment_seq_pk primary key(comment_seq), + constraint comment_t_seq_fk foreign key(seq) references board02(seq) +); + +create sequence sequence_comment_seq +start with 1 increment by 1; \ No newline at end of file diff --git a/doc/defult user create.sql b/doc/defult user create.sql new file mode 100644 index 0000000..f8552d5 --- /dev/null +++ b/doc/defult user create.sql @@ -0,0 +1,529 @@ +CREATE USER defult IDENTIFIED BY defult + DEFAULT TABLESPACE "USERS" + TEMPORARY TABLESPACE "TEMP" + PROFILE "DEFAULT" + QUOTA UNLIMITED ON "USERS"; + +GRANT ADMINISTER ANY SQL TUNING SET TO defult; + +GRANT ADMINISTER DATABASE TRIGGER TO defult; + +GRANT ADMINISTER SQL MANAGEMENT OBJECT TO defult; + +GRANT ADMINISTER SQL TUNING SET TO defult; + +GRANT ADVISOR TO defult; + +GRANT ALTER ANY ASSEMBLY TO defult; + +GRANT ALTER ANY CLUSTER TO defult; + +GRANT ALTER ANY CUBE TO defult; + +GRANT ALTER ANY CUBE DIMENSION TO defult; + +GRANT ALTER ANY DIMENSION TO defult; + +GRANT ALTER ANY EDITION TO defult; + +BEGIN +SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( + PRIVILEGE => SYS.DBMS_RULE_ADM.ALTER_ANY_EVALUATION_CONTEXT, + GRANTEE => 'defult', + GRANT_OPTION => FALSE); +END; +/ + +GRANT ALTER ANY INDEX TO defult; + +GRANT ALTER ANY INDEXTYPE TO defult; + +GRANT ALTER ANY LIBRARY TO defult; + +GRANT ALTER ANY MATERIALIZED VIEW TO defult; + +GRANT ALTER ANY MINING MODEL TO defult; + +GRANT ALTER ANY OPERATOR TO defult; + +GRANT ALTER ANY OUTLINE TO defult; + +GRANT ALTER ANY PROCEDURE TO defult; + +GRANT ALTER ANY ROLE TO defult; + +BEGIN +SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( + PRIVILEGE => SYS.DBMS_RULE_ADM.ALTER_ANY_RULE, + GRANTEE => 'defult', + GRANT_OPTION => FALSE); +END; +/ + +BEGIN +SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( + PRIVILEGE => SYS.DBMS_RULE_ADM.ALTER_ANY_RULE_SET, + GRANTEE => 'defult', + GRANT_OPTION => FALSE); +END; +/ + +GRANT ALTER ANY SEQUENCE TO defult; + +GRANT ALTER ANY SQL PROFILE TO defult; + +GRANT ALTER ANY TABLE TO defult; + +GRANT ALTER ANY TRIGGER TO defult; + +GRANT ALTER ANY TYPE TO defult; + +GRANT ALTER DATABASE TO defult; + +GRANT ALTER DATABASE LINK TO defult; + +GRANT ALTER PROFILE TO defult; + +GRANT ALTER PUBLIC DATABASE LINK TO defult; + +GRANT ALTER RESOURCE COST TO defult; + +GRANT ALTER ROLLBACK SEGMENT TO defult; + +GRANT ALTER SESSION TO defult; + +GRANT ALTER SYSTEM TO defult; + +GRANT ALTER TABLESPACE TO defult; + +GRANT ALTER USER TO defult; + +GRANT ANALYZE ANY TO defult; + +GRANT ANALYZE ANY DICTIONARY TO defult; + +GRANT AUDIT ANY TO defult; + +GRANT AUDIT SYSTEM TO defult; + +GRANT BACKUP ANY TABLE TO defult; + +GRANT BECOME USER TO defult; + +GRANT CHANGE NOTIFICATION TO defult; + +GRANT COMMENT ANY MINING MODEL TO defult; + +GRANT COMMENT ANY TABLE TO defult; + +GRANT CREATE ANY ASSEMBLY TO defult; + +GRANT CREATE ANY CLUSTER TO defult; + +GRANT CREATE ANY CONTEXT TO defult; + +GRANT CREATE ANY CUBE TO defult; + +GRANT CREATE ANY CUBE BUILD PROCESS TO defult; + +GRANT CREATE ANY CUBE DIMENSION TO defult; + +GRANT CREATE ANY DIMENSION TO defult; + +GRANT CREATE ANY DIRECTORY TO defult; + +GRANT CREATE ANY EDITION TO defult; + +BEGIN +SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( + PRIVILEGE => SYS.DBMS_RULE_ADM.CREATE_ANY_EVALUATION_CONTEXT, + GRANTEE => 'defult', + GRANT_OPTION => FALSE); +END; +/ + +GRANT CREATE ANY INDEX TO defult; + +GRANT CREATE ANY INDEXTYPE TO defult; + +GRANT CREATE ANY JOB TO defult; + +GRANT CREATE ANY LIBRARY TO defult; + +GRANT CREATE ANY MATERIALIZED VIEW TO defult; + +GRANT CREATE ANY MEASURE FOLDER TO defult; + +GRANT CREATE ANY MINING MODEL TO defult; + +GRANT CREATE ANY OPERATOR TO defult; + +GRANT CREATE ANY OUTLINE TO defult; + +GRANT CREATE ANY PROCEDURE TO defult; + +BEGIN +SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( + PRIVILEGE => SYS.DBMS_RULE_ADM.CREATE_ANY_RULE, + GRANTEE => 'defult', + GRANT_OPTION => FALSE); +END; +/ + +BEGIN +SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( + PRIVILEGE => SYS.DBMS_RULE_ADM.CREATE_ANY_RULE_SET, + GRANTEE => 'defult', + GRANT_OPTION => FALSE); +END; +/ + +GRANT CREATE ANY SEQUENCE TO defult; + +GRANT CREATE ANY SQL PROFILE TO defult; + +GRANT CREATE ANY SYNONYM TO defult; + +GRANT CREATE ANY TABLE TO defult; + +GRANT CREATE ANY TRIGGER TO defult; + +GRANT CREATE ANY TYPE TO defult; + +GRANT CREATE ANY VIEW TO defult; + +GRANT CREATE ASSEMBLY TO defult; + +GRANT CREATE CLUSTER TO defult; + +GRANT CREATE CUBE TO defult; + +GRANT CREATE CUBE BUILD PROCESS TO defult; + +GRANT CREATE CUBE DIMENSION TO defult; + +GRANT CREATE DATABASE LINK TO defult; + +GRANT CREATE DIMENSION TO defult; + +BEGIN +SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( + PRIVILEGE => SYS.DBMS_RULE_ADM.CREATE_EVALUATION_CONTEXT_OBJ, + GRANTEE => 'defult', + GRANT_OPTION => FALSE); +END; +/ + +GRANT CREATE EXTERNAL JOB TO defult; + +GRANT CREATE INDEXTYPE TO defult; + +GRANT CREATE JOB TO defult; + +GRANT CREATE LIBRARY TO defult; + +GRANT CREATE MATERIALIZED VIEW TO defult; + +GRANT CREATE MEASURE FOLDER TO defult; + +GRANT CREATE MINING MODEL TO defult; + +GRANT CREATE OPERATOR TO defult; + +GRANT CREATE PROCEDURE TO defult; + +GRANT CREATE PROFILE TO defult; + +GRANT CREATE PUBLIC DATABASE LINK TO defult; + +GRANT CREATE PUBLIC SYNONYM TO defult; + +GRANT CREATE ROLE TO defult; + +GRANT CREATE ROLLBACK SEGMENT TO defult; + +BEGIN +SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( + PRIVILEGE => SYS.DBMS_RULE_ADM.CREATE_RULE_OBJ, + GRANTEE => 'defult', + GRANT_OPTION => FALSE); +END; +/ + +BEGIN +SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( + PRIVILEGE => SYS.DBMS_RULE_ADM.CREATE_RULE_SET_OBJ, + GRANTEE => 'defult', + GRANT_OPTION => FALSE); +END; +/ + +GRANT CREATE SEQUENCE TO defult; + +GRANT CREATE SESSION TO defult; + +GRANT CREATE SYNONYM TO defult; + +GRANT CREATE TABLE TO defult; + +GRANT CREATE TABLESPACE TO defult; + +GRANT CREATE TRIGGER TO defult; + +GRANT CREATE TYPE TO defult; + +GRANT CREATE USER TO defult; + +GRANT CREATE VIEW TO defult; + +GRANT DEBUG ANY PROCEDURE TO defult; + +GRANT DEBUG CONNECT SESSION TO defult; + +GRANT DELETE ANY CUBE DIMENSION TO defult; + +GRANT DELETE ANY MEASURE FOLDER TO defult; + +GRANT DELETE ANY TABLE TO defult; + +BEGIN +SYS.DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE ( + PRIVILEGE => 'DEQUEUE_ANY', + GRANTEE => 'defult', + ADMIN_OPTION => FALSE); +END; +/ + +GRANT DROP ANY ASSEMBLY TO defult; + +GRANT DROP ANY CLUSTER TO defult; + +GRANT DROP ANY CONTEXT TO defult; + +GRANT DROP ANY CUBE TO defult; + +GRANT DROP ANY CUBE BUILD PROCESS TO defult; + +GRANT DROP ANY CUBE DIMENSION TO defult; + +GRANT DROP ANY DIMENSION TO defult; + +GRANT DROP ANY DIRECTORY TO defult; + +GRANT DROP ANY EDITION TO defult; + +BEGIN +SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( + PRIVILEGE => SYS.DBMS_RULE_ADM.DROP_ANY_EVALUATION_CONTEXT, + GRANTEE => 'defult', + GRANT_OPTION => FALSE); +END; +/ + +GRANT DROP ANY INDEX TO defult; + +GRANT DROP ANY INDEXTYPE TO defult; + +GRANT DROP ANY LIBRARY TO defult; + +GRANT DROP ANY MATERIALIZED VIEW TO defult; + +GRANT DROP ANY MEASURE FOLDER TO defult; + +GRANT DROP ANY MINING MODEL TO defult; + +GRANT DROP ANY OPERATOR TO defult; + +GRANT DROP ANY OUTLINE TO defult; + +GRANT DROP ANY PROCEDURE TO defult; + +GRANT DROP ANY ROLE TO defult; + +BEGIN +SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( + PRIVILEGE => SYS.DBMS_RULE_ADM.DROP_ANY_RULE, + GRANTEE => 'defult', + GRANT_OPTION => FALSE); +END; +/ + +BEGIN +SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( + PRIVILEGE => SYS.DBMS_RULE_ADM.DROP_ANY_RULE_SET, + GRANTEE => 'defult', + GRANT_OPTION => FALSE); +END; +/ + +GRANT DROP ANY SEQUENCE TO defult; + +GRANT DROP ANY SQL PROFILE TO defult; + +GRANT DROP ANY SYNONYM TO defult; + +GRANT DROP ANY TABLE TO defult; + +GRANT DROP ANY TRIGGER TO defult; + +GRANT DROP ANY TYPE TO defult; + +GRANT DROP ANY VIEW TO defult; + +GRANT DROP PROFILE TO defult; + +GRANT DROP PUBLIC DATABASE LINK TO defult; + +GRANT DROP PUBLIC SYNONYM TO defult; + +GRANT DROP ROLLBACK SEGMENT TO defult; + +GRANT DROP TABLESPACE TO defult; + +GRANT DROP USER TO defult; + +BEGIN +SYS.DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE ( + PRIVILEGE => 'ENQUEUE_ANY', + GRANTEE => 'defult', + ADMIN_OPTION => FALSE); +END; +/ + +GRANT EXECUTE ANY ASSEMBLY TO defult; + +GRANT EXECUTE ANY CLASS TO defult; + +BEGIN +SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( + PRIVILEGE => SYS.DBMS_RULE_ADM.EXECUTE_ANY_EVALUATION_CONTEXT, + GRANTEE => 'defult', + GRANT_OPTION => FALSE); +END; +/ + +GRANT EXECUTE ANY INDEXTYPE TO defult; + +GRANT EXECUTE ANY LIBRARY TO defult; + +GRANT EXECUTE ANY OPERATOR TO defult; + +GRANT EXECUTE ANY PROCEDURE TO defult; + +GRANT EXECUTE ANY PROGRAM TO defult; + +BEGIN +SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( + PRIVILEGE => SYS.DBMS_RULE_ADM.EXECUTE_ANY_RULE, + GRANTEE => 'defult', + GRANT_OPTION => FALSE); +END; +/ + +BEGIN +SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( + PRIVILEGE => SYS.DBMS_RULE_ADM.EXECUTE_ANY_RULE_SET, + GRANTEE => 'defult', + GRANT_OPTION => FALSE); +END; +/ + +GRANT EXECUTE ANY TYPE TO defult; + +GRANT EXECUTE ASSEMBLY TO defult; + +GRANT EXEMPT ACCESS POLICY TO defult; + +GRANT EXEMPT IDENTITY POLICY TO defult; + +GRANT EXPORT FULL DATABASE TO defult; + +GRANT FLASHBACK ANY TABLE TO defult; + +GRANT FLASHBACK ARCHIVE ADMINISTER TO defult; + +GRANT FORCE ANY TRANSACTION TO defult; + +GRANT FORCE TRANSACTION TO defult; + +GRANT GLOBAL QUERY REWRITE TO defult; + +GRANT GRANT ANY OBJECT PRIVILEGE TO defult; + +GRANT GRANT ANY PRIVILEGE TO defult; + +GRANT GRANT ANY ROLE TO defult; + +GRANT IMPORT FULL DATABASE TO defult; + +GRANT INSERT ANY CUBE DIMENSION TO defult; + +GRANT INSERT ANY MEASURE FOLDER TO defult; + +GRANT INSERT ANY TABLE TO defult; + +GRANT LOCK ANY TABLE TO defult; + +GRANT MANAGE ANY FILE GROUP TO defult; + +BEGIN +SYS.DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE ( + PRIVILEGE => 'MANAGE_ANY', + GRANTEE => 'defult', + ADMIN_OPTION => FALSE); +END; +/ + +GRANT MANAGE FILE GROUP TO defult; + +GRANT MANAGE SCHEDULER TO defult; + +GRANT MANAGE TABLESPACE TO defult; + +GRANT MERGE ANY VIEW TO defult; + +GRANT ON COMMIT REFRESH TO defult; + +GRANT QUERY REWRITE TO defult; + +GRANT READ ANY FILE GROUP TO defult; + +GRANT RESTRICTED SESSION TO defult; + +GRANT RESUMABLE TO defult; + +GRANT SELECT ANY CUBE TO defult; + +GRANT SELECT ANY CUBE DIMENSION TO defult; + +GRANT SELECT ANY DICTIONARY TO defult; + +GRANT SELECT ANY MINING MODEL TO defult; + +GRANT SELECT ANY SEQUENCE TO defult; + +GRANT SELECT ANY TABLE TO defult; + +GRANT SELECT ANY TRANSACTION TO defult; + +GRANT UNDER ANY TABLE TO defult; + +GRANT UNDER ANY TYPE TO defult; + +GRANT UNDER ANY VIEW TO defult; + +GRANT UNLIMITED TABLESPACE TO defult; + +GRANT UPDATE ANY CUBE TO defult; + +GRANT UPDATE ANY CUBE BUILD PROCESS TO defult; + +GRANT UPDATE ANY CUBE DIMENSION TO defult; + +GRANT UPDATE ANY TABLE TO defult; + + +GRANT "CONNECT" TO defult; +GRANT "RESOURCE" TO defult; +ALTER USER defult DEFAULT ROLE "CONNECT", "RESOURCE"; + diff --git a/doc/first/CREATE SEQUENCE SEQ_TB_BOARD_IDX.sql b/doc/first/CREATE SEQUENCE SEQ_TB_BOARD_IDX.sql new file mode 100644 index 0000000..b53be55 --- /dev/null +++ b/doc/first/CREATE SEQUENCE SEQ_TB_BOARD_IDX.sql @@ -0,0 +1,5 @@ +CREATE SEQUENCE SEQ_TB_BOARD_IDX +START WITH 1 +INCREMENT BY 1 +NOMAXVALUE +NOCACHE; \ No newline at end of file diff --git a/doc/first/CREATE SEQUENCE SEQ_TB_FILE_IDX.sql b/doc/first/CREATE SEQUENCE SEQ_TB_FILE_IDX.sql new file mode 100644 index 0000000..bc212ae --- /dev/null +++ b/doc/first/CREATE SEQUENCE SEQ_TB_FILE_IDX.sql @@ -0,0 +1,5 @@ +CREATE SEQUENCE SEQ_TB_FILE_IDX + START WITH 1 + INCREMENT BY 1 + NOMAXVALUE + NOCACHE; \ No newline at end of file diff --git a/doc/first/CREATE TABLE TB_BOARD.sql b/doc/first/CREATE TABLE TB_BOARD.sql new file mode 100644 index 0000000..ff34c80 --- /dev/null +++ b/doc/first/CREATE TABLE TB_BOARD.sql @@ -0,0 +1,23 @@ +--http://addio3305.tistory.com/72 + +CREATE TABLE TB_BOARD +( + IDX NUMBER PRIMARY KEY, + PARENT_IDX NUMBER, + TITLE VARCHAR2(100) NOT NULL, + CONTENTS VARCHAR2(4000) NOT NULL, + HIT_CNT NUMBER NOT NULL, + DEL_GB VARCHAR2(1) DEFAULT 'N' NOT NULL, + CREA_DTM DATE DEFAULT SYSDATE NOT NULL, + CREA_ID VARCHAR2(30) NOT NULL +); + +COMMENT ON TABLE TB_BOARD IS '게시판'; +COMMENT ON COLUMN TB_BOARD.IDX IS '인덱스'; +COMMENT ON COLUMN TB_BOARD.PARENT_IDX IS '부모글 인덱스'; +COMMENT ON COLUMN TB_BOARD.TITLE IS '제목'; +COMMENT ON COLUMN TB_BOARD.CONTENTS IS '내용'; +COMMENT ON COLUMN TB_BOARD.HIT_CNT IS '조회수'; +COMMENT ON COLUMN TB_BOARD.DEL_GB IS '삭제구분'; +COMMENT ON COLUMN TB_BOARD.CREA_DTM IS '생성일자'; +COMMENT ON COLUMN TB_BOARD.CREA_ID IS '생성자 ID'; \ No newline at end of file diff --git a/doc/first/CREATE TABLE TB_FILE.sql b/doc/first/CREATE TABLE TB_FILE.sql new file mode 100644 index 0000000..35ed195 --- /dev/null +++ b/doc/first/CREATE TABLE TB_FILE.sql @@ -0,0 +1,12 @@ +CREATE TABLE TB_FILE +( + IDX NUMBER, + BOARD_IDX NUMBER NOT NULL, + ORIGINAL_FILE_NAME VARCHAR2(260 BYTE) NOT NULL, + STORED_FILE_NAME VARCHAR2(40 BYTE) NOT NULL, + FILE_SIZE NUMBER, + CREA_DTM DATE DEFAULT SYSDATE NOT NULL, + CREA_ID VARCHAR2(30 BYTE) NOT NULL, + DEL_GB VARCHAR2(1 BYTE) DEFAULT 'N' NOT NULL, + PRIMARY KEY (IDX) +); \ No newline at end of file diff --git a/doc/first/FOR INSERT INTO TB_BOARD.sql b/doc/first/FOR INSERT INTO TB_BOARD.sql new file mode 100644 index 0000000..af653df --- /dev/null +++ b/doc/first/FOR INSERT INTO TB_BOARD.sql @@ -0,0 +1,6 @@ +BEGIN + FOR i IN 1..500 LOOP + INSERT INTO TB_BOARD(IDX, TITLE, CONTENTS, HIT_CNT, DEL_GB, CREA_DTM, CREA_ID) VALUES(SEQ_TB_BOARD_IDX.NEXTVAL, '제목 '||i, '내용 '||i, 0, 'N', SYSDATE, 'Admin'); + END LOOP; +END; +/ \ No newline at end of file diff --git a/doc/first/INSERT INTO TB_BOARD.sql b/doc/first/INSERT INTO TB_BOARD.sql new file mode 100644 index 0000000..75107f0 --- /dev/null +++ b/doc/first/INSERT INTO TB_BOARD.sql @@ -0,0 +1,20 @@ +INSERT INTO TB_BOARD +( + IDX, + TITLE, + CONTENTS, + HIT_CNT, + DEL_GB, + CREA_DTM, + CREA_ID +) +VALUES +( + SEQ_TB_BOARD_IDX.NEXTVAL, + '제목', + '내용', + 0, + 'N', + SYSDATE, + 'Admin' +); \ No newline at end of file diff --git a/doc/miplatform/.gitignore b/doc/miplatform/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/doc/miplatform/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/doc/miplatform/sample_data.sql b/doc/miplatform/sample_data.sql new file mode 100644 index 0000000..a26b9c7 --- /dev/null +++ b/doc/miplatform/sample_data.sql @@ -0,0 +1,196 @@ +insert into base_sawon_U +( + name, + sabun, + dept, + jikgup, + gender, + ipsa_date, + marry, + email, + smemo +) +values +( + 'sample', + 'AA001', + '01', + '01', + 'M', + '20060101', + '1', + 'sample@miplatform.com', + 'memo1' +) +; +insert into base_sawon_U +( + name, + sabun, + dept, + jikgup, + gender, + ipsa_date, + marry, + email, + smemo +) +values +( + 'sample1', + 'BB001', + '02', + '02', + 'W', + '20070101', + '0', + 'sample1@miplatform.com', + 'memo2' +) +; +insert into base_dept_U +( + code, value +) +values +( + '01', '인사부' +) +; +insert into base_dept_U +( + code, value +) +values +( + '02', '총무부' +) +; +insert into base_dept_U +( + code, value +) +values +( + '03', '연구소' +) +; +insert into base_dept_U +( + code, value +) +values +( + '04', '기술부' +) +; +insert into base_dept_U +( + code, value +) +values +( + '05', '교육부' +) +; +insert into base_dept_U +( + code, value +) +values +( + '06', '영업부' +) +; +insert into base_dept_U +( + code, value +) +values +( + '07', '경영' +) +; +insert into base_dept_U +( + code, value +) +values +( + '99', '기타' +) +; +insert into base_jikgup_U +( + code, value +) +values +( + '01', '대표이사' +) +; +insert into base_jikgup_U +( + code, value +) +values +( + '02', '이사' +) +; +insert into base_jikgup_U +( + code, value +) +values +( + '03', '부장' +) +; +insert into base_jikgup_U +( + code, value +) +values +( + '04', '차장' +) +; +insert into base_jikgup_U +( + code, value +) +values +( + '05', '과장' +) +; +insert into base_jikgup_U +( + code, value +) +values +( + '06', '대리' +) +; +insert into base_jikgup_U +( + code, value +) +values +( + '07', '사원' +) +; +insert into base_jikgup_U +( + code, value +) +values +( + '99', '기타' +) +; + + diff --git a/doc/miplatform/table.sql b/doc/miplatform/table.sql new file mode 100644 index 0000000..a11fff3 --- /dev/null +++ b/doc/miplatform/table.sql @@ -0,0 +1,26 @@ +create table base_sawon_U +( + name varchar(50) not null, + sabun varchar2(50), + dept varchar2(50), + jikgup varchar2(50), + gender varchar2(50), + ipsa_date varchar2(50), + marry varchar2(50), + email varchar2(50), + smemo varchar2(50) +) +; +create table base_dept_U +( + code varchar2(50) not null, + value varchar2(50) +) +; +create table base_jikgup_U +( + code varchar2(50) not null, + value varchar2(50) +) +; + diff --git a/doc/sample/.gitignore b/doc/sample/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/doc/sample/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/doc/sample/sample board table create.sql b/doc/sample/sample board table create.sql new file mode 100644 index 0000000..c6ae488 --- /dev/null +++ b/doc/sample/sample board table create.sql @@ -0,0 +1,44 @@ +CREATE TABLE SAMPLE_BOARD +( + B_NO NUMBER NOT NULL +, B_NICK VARCHAR2(20) NOT NULL +, B_PW VARCHAR2(64) NOT NULL +, B_TEXT VARCHAR2(4000) NOT NULL +, B_DATE DATE DEFAULT sysdate NOT NULL +, CONSTRAINT BOARD_PK PRIMARY KEY + ( + B_NO + ) + ENABLE +); + +COMMENT ON COLUMN SAMPLE_BOARD.B_NO IS '번호'; + +COMMENT ON COLUMN SAMPLE_BOARD.B_NICK IS '닉네임'; + +COMMENT ON COLUMN SAMPLE_BOARD.B_PW IS '비번'; + +COMMENT ON COLUMN SAMPLE_BOARD.B_TEXT IS '내용'; + +COMMENT ON COLUMN SAMPLE_BOARD.B_DATE IS '등록날자'; + +-- Sequence +CREATE SEQUENCE DEFULT.SAMPLE_BOARD_SEQ_NO +START WITH 1 + MAXVALUE 999999999999999999999999999 + MINVALUE 1 + NOCYCLE + CACHE 20 + NOORDER; + +-- Trigger +CREATE TRIGGER DEFULT.SAMPLE_BOARD_TRG_NO +BEFORE INSERT +ON DEFULT.SAMPLE_BOARD +REFERENCING NEW AS New OLD AS Old +FOR EACH ROW +BEGIN +-- For Toad: Highlight column B_NO + :new.B_NO := SAMPLE_BOARD_SEQ_NO.nextval; +END SAMPLE_BOARD_TRG_NO; +/ diff --git a/doc/syaku/CREATE SEQUENCE DEFULT.BBS_SEQ.sql b/doc/syaku/CREATE SEQUENCE DEFULT.BBS_SEQ.sql new file mode 100644 index 0000000..1396ec0 --- /dev/null +++ b/doc/syaku/CREATE SEQUENCE DEFULT.BBS_SEQ.sql @@ -0,0 +1,20 @@ +-- Sequence +CREATE SEQUENCE DEFULT.BBS_SEQ +START WITH 1 + MAXVALUE 999999999999999999999999999 + MINVALUE 1 + NOCYCLE + CACHE 20 + NOORDER; + +-- Trigger +CREATE TRIGGER DEFULT.BBS_TRG +BEFORE INSERT +ON DEFULT.BBS +REFERENCING NEW AS New OLD AS Old +FOR EACH ROW +BEGIN +-- For Toad: Highlight column IDX + :new.IDX := BBS_SEQ.nextval; +END BBS_TRG; +/ diff --git a/doc/syaku/mysql, CREATE TABLE `bbs`.sql b/doc/syaku/mysql, CREATE TABLE `bbs`.sql new file mode 100644 index 0000000..493f3dc --- /dev/null +++ b/doc/syaku/mysql, CREATE TABLE `bbs`.sql @@ -0,0 +1,8 @@ +CREATE TABLE `bbs` ( + `idx` bigint(20) NOT NULL AUTO_INCREMENT, + `user_name` varchar(50) DEFAULT NULL, + `subject` varchar(250) DEFAULT NULL, + `content` longtext, + `reg_datetime` char(14) DEFAULT NULL, + PRIMARY KEY (`idx`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 \ No newline at end of file diff --git a/doc/syaku/oracle, CREATE TABLE `bbs`.sql b/doc/syaku/oracle, CREATE TABLE `bbs`.sql new file mode 100644 index 0000000..8c7c386 --- /dev/null +++ b/doc/syaku/oracle, CREATE TABLE `bbs`.sql @@ -0,0 +1,17 @@ +CREATE TABLE BBS +( + IDX NUMBER(20) NOT NULL +, USER_NAME VARCHAR2(50) +, SUBJECT VARCHAR2(250) +, CONTENT VARCHAR2(4000) +, REG_DATETIME DATE DEFAULT sysdate +, CONSTRAINT BBS_PK PRIMARY KEY + ( + IDX + ) + USING INDEX + ( + CREATE UNIQUE INDEX BBS_PK1 ON BBS (IDX ASC) + ) + ENABLE +); diff --git "a/doc/\354\236\220\353\243\214/.gitignore" "b/doc/\354\236\220\353\243\214/.gitignore" new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ "b/doc/\354\236\220\353\243\214/.gitignore" @@ -0,0 +1 @@ +/desktop.ini diff --git "a/doc/\354\236\220\353\243\214/\354\212\244\355\224\204\353\247\201 \355\224\204\353\240\210\354\236\204\354\233\214\355\201\254(\353\247\210\354\235\264\353\260\224\355\213\260\354\212\244).doc" "b/doc/\354\236\220\353\243\214/\354\212\244\355\224\204\353\247\201 \355\224\204\353\240\210\354\236\204\354\233\214\355\201\254(\353\247\210\354\235\264\353\260\224\355\213\260\354\212\244).doc" new file mode 100644 index 0000000..42271db Binary files /dev/null and "b/doc/\354\236\220\353\243\214/\354\212\244\355\224\204\353\247\201 \355\224\204\353\240\210\354\236\204\354\233\214\355\201\254(\353\247\210\354\235\264\353\260\224\355\213\260\354\212\244).doc" differ diff --git "a/doc/\354\236\220\353\243\214/\355\214\214\354\235\274 \354\227\205\353\241\234\353\223\234(COS \353\235\274\354\235\264\353\270\214\353\237\254\353\246\254).doc" "b/doc/\354\236\220\353\243\214/\355\214\214\354\235\274 \354\227\205\353\241\234\353\223\234(COS \353\235\274\354\235\264\353\270\214\353\237\254\353\246\254).doc" new file mode 100644 index 0000000..d69a4c5 Binary files /dev/null and "b/doc/\354\236\220\353\243\214/\355\214\214\354\235\274 \354\227\205\353\241\234\353\223\234(COS \353\235\274\354\235\264\353\270\214\353\237\254\353\246\254).doc" differ diff --git a/src/main/java/Member/MemberController.java b/src/main/java/Member/MemberController.java new file mode 100644 index 0000000..75677cd --- /dev/null +++ b/src/main/java/Member/MemberController.java @@ -0,0 +1,27 @@ +package Member; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +@Controller +public class MemberController { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @RequestMapping(value = "/") + @ResponseBody + public String Member(Model md) { + md.addAttribute("test", "test"); + return "join"; + } + + @RequestMapping(value = "/join") + public String join(Model md) { + md.addAttribute("test", "test"); + return "join"; + } +} diff --git a/src/main/java/Member/MemberDAO.java b/src/main/java/Member/MemberDAO.java new file mode 100644 index 0000000..a833e48 --- /dev/null +++ b/src/main/java/Member/MemberDAO.java @@ -0,0 +1,5 @@ +package Member; + +public class MemberDAO { + +} diff --git a/src/main/java/Member/MemberService.java b/src/main/java/Member/MemberService.java new file mode 100644 index 0000000..9ef4361 --- /dev/null +++ b/src/main/java/Member/MemberService.java @@ -0,0 +1,5 @@ +package Member; + +public class MemberService { + +} diff --git a/src/main/java/Member/MemberVO.java b/src/main/java/Member/MemberVO.java new file mode 100644 index 0000000..ec14521 --- /dev/null +++ b/src/main/java/Member/MemberVO.java @@ -0,0 +1,5 @@ +package Member; + +public class MemberVO { + +} diff --git a/src/main/java/board/board/.gitignore b/src/main/java/board/board/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/java/board/board/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/java/board/board/BoardController.java b/src/main/java/board/board/BoardController.java new file mode 100644 index 0000000..ce541f8 --- /dev/null +++ b/src/main/java/board/board/BoardController.java @@ -0,0 +1,156 @@ +package board.board; + +import java.text.DateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +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 common.utill.UtilsPage; + +/** + * http://localhost:8080/defult/board/ + * Handles requests for the application home page. + */ +@Controller +public class BoardController { + + private static final Logger logger = LoggerFactory.getLogger(BoardController.class); + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @Autowired + // @Autowired(required=false)//필수가 아닌경우 빈으로 등록 안하게 설정 + // @Qualifier("CommonService1")//는 타입으로(by type) ?아줌. 똑같은 클래스가 있을경우 + // CommonService1 라는 구분값으로 ?음 + // @Resource(name="testDao") //는 이름으로(by name) ?아줌 + private BoardService svc; + + /** + * http://localhost:8080/defult/board/ + * 기본 경로 테스트 + * Simply selects the home view to render by returning its name. + */ + @RequestMapping(value = "/", method = RequestMethod.GET) + // @ResponseBody + public String board(Locale locale, Model model) { + logger.info("Welcome board! The client locale is {}.", locale); + + Date date = new Date(); + DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); + + String formattedDate = dateFormat.format(date); + + model.addAttribute("serverTime", formattedDate); + + return "board/boardMain"; + } + + /** + * 이 메소드 제거해야하는데.. boardListPage를 쓰삼 + * http://localhost:8080/defult/board/boardList + * + * @param model + * @param bvo + * @param pageNum + * @return + */ + @RequestMapping(value = "/boardList") + public String boardList( + Model model, + @RequestParam(value = "BoardVO", required = false) BoardVO bvo, + @RequestParam(value = "pageNum", defaultValue = "1") int pageNum) { + + log.debug("boardList"); + + Map map = new HashMap(); + + int totalRowCount = svc.boardListCount(map); + + UtilsPage pu = new UtilsPage(pageNum, totalRowCount, 10, 10); + + map.put("startNum", String.valueOf(pu.getStartRow())); + map.put("endNum", String.valueOf(pu.getEndRow())); + + List list = svc.boardList(map); + + model.addAttribute("list", list); + model.addAttribute("startPageNum", pu.getStartPageNum()); + model.addAttribute("endPageNum", pu.getEndPageNum()); + model.addAttribute("totalPageCount", pu.getTotalPageCount()); + model.addAttribute("pageNum", pageNum); + + return "board/boardList"; + } + + @RequestMapping(value = "/boardListPage") + public String boardListPage( + Model model, + @RequestParam(value = "pageNum", defaultValue = "1") int pageNum, + @RequestParam(value = "pageSize", defaultValue = "10") int pageSize, + @RequestParam(value = "shtype", required = false) String shtype, + @RequestParam(value = "shvalue", required = false) String shvalue + ) { + + log.debug("boardList"); + + Map map = new HashMap(); + + map.put(shtype, shvalue); + + int totalRowCount = svc.boardListCount(map); + + UtilsPage pu = new UtilsPage(pageNum, totalRowCount, pageSize, 10); + + map.put("startNum", String.valueOf(pu.getStartRow())); + map.put("endNum", String.valueOf(pu.getEndRow())); + + List list = svc.boardListPage(map); + + model.addAttribute("list", list); + + model.addAttribute("pageSize", pageSize); + model.addAttribute("totalRowCount", totalRowCount); +// model.addAttribute("startPageNum", pu.getStartPageNum()); +// model.addAttribute("endPageNum", pu.getEndPageNum()); +// model.addAttribute("totalPageCount", pu.getTotalPageCount()); + model.addAttribute("pageNum", pageNum); + + model.addAttribute("shtype", shtype); + model.addAttribute("shvalue", shvalue); + + return "board/boardList"; + } + + @RequestMapping(value = "/boardDetail") + public String boardDetail( + Model model, + @RequestParam(value = "BoardVO", required = false) BoardVO bvo, + @RequestParam(value = "pageNum", defaultValue = "1") int pageNum, + @RequestParam(value = "b_no") int b_no) { + + log.debug("boardDetail"); + + HashMap map = svc.boardDetail(b_no); + + // model객체에 값을 담으면 뷰페이지에서 출력가능(유효함) + model.addAttribute("vo", map.get("vo")); + model.addAttribute("prev", map.get("prev")); + model.addAttribute("next", map.get("next")); + + // BoardVO vo = svc.boardDetail(b_no); + // model.addAttribute("vo", vo); + + return "board/boardDetail"; + } + +} diff --git a/src/main/java/board/board/BoardDao.java b/src/main/java/board/board/BoardDao.java new file mode 100644 index 0000000..3888b79 --- /dev/null +++ b/src/main/java/board/board/BoardDao.java @@ -0,0 +1,108 @@ +package board.board; + +import java.util.List; +import java.util.Map; + +import org.mybatis.spring.SqlSessionTemplate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Repository; + +import sun.rmi.runtime.Log; + +@Repository +public class BoardDao { + + //protected Log log = //LogFactory.getLog(this.getClass()); + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + private final String nameSpace="board.board."; + + // @Autowired + @Autowired(required = false) // 필수가 아닌경우 등록 안하게 설정 + @Qualifier("defultTemplate") // 는 타입으로(by type) 찿아줌. 똑같은 클래스가 + // 있을경우CommonService1 라는 구분값으로 찿음 + // @Resource(name="testDao") //는 이름으로(by name) 찿아줌 + private SqlSessionTemplate sql; + + public List boardList(Map map) { + log.debug("boardList"); + // List list = sql.selectList("defult.boardList", map); + List list = sql.selectList(nameSpace+"List", map); + return list; + } + + + public int boardInsert(BoardVO vo) { + int result = sql.insert(nameSpace+"Insert", vo); + return result; + } + + + public int boardUpdate(BoardVO vo) { + int result = sql.update(nameSpace+"Update", vo); + return result; + } + + /** + * 전체글수 + * + * @param map + * @return + */ + public int boardListCount(Map map) { + // TODO Auto-generated method stub + log.debug("boardListCount"); + + int count = sql.selectOne(nameSpace+"ListCount", map); + return count; + } + + /** + * 목록에 출력할 페이지 + * + * @param map + * @return + */ + public List boardListPage(Map map) { + // TODO Auto-generated method stub + log.debug("boardListCount"); + + List list = sql.selectList(nameSpace+"ListPage", map); + return list; + } + + /** + * 살세글보기 + * + * @param b_no + * @return + */ + public BoardVO boardDetail(int b_no) { + // TODO Auto-generated method stub + BoardVO vo = sql.selectOne(nameSpace+"Detail", b_no); + return vo; + } + + /** + * 이전글 정보 반환 + * + * @param num + * @return + */ + public BoardVO getPrev(int num) { + return sql.selectOne(nameSpace+"getPrev", num); + } + + /** + * 다음글 정보 반환 + * + * @param num + * @return + */ + public BoardVO getNext(int num) { + return sql.selectOne(nameSpace+"getNext", num); + } +} diff --git a/src/main/java/board/board/BoardService.java b/src/main/java/board/board/BoardService.java new file mode 100644 index 0000000..9762b09 --- /dev/null +++ b/src/main/java/board/board/BoardService.java @@ -0,0 +1,56 @@ +package board.board; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class BoardService { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @Autowired + // @Qualifier("CommonDao1") + private BoardDao dao; + + public List boardList(Map map) { + // TODO Auto-generated method stub + log.debug("boardList"); + List list = dao.boardList(map); + return list; + } + + public List boardListPage(Map map) { + // TODO Auto-generated method stub + log.debug("boardListPage"); + List list = dao.boardListPage(map); + return list; + } + + public int boardListCount(Map map) { + // TODO Auto-generated method stub + log.debug("boardListCount"); + int count = dao.boardListCount(map); + return count; + } + + public HashMap boardDetail(int b_no) { + // TODO Auto-generated method stub + log.debug("boardDetail"); + + HashMap map = new HashMap(); + // BoardVO vo = dao.boardDetail(b_no); + map.put("vo", dao.boardDetail(b_no)); // 현재글에 대한 정보 + map.put("prev", dao.getPrev(b_no)); // 이전글에 대한 정보 + map.put("next", dao.getNext(b_no)); // 다음글에 대한 정보 + + // dao.addHit(num);// 조회수 증가 + + return map; + } +} diff --git a/src/main/java/board/board/BoardVO.java b/src/main/java/board/board/BoardVO.java new file mode 100644 index 0000000..021d2a0 --- /dev/null +++ b/src/main/java/board/board/BoardVO.java @@ -0,0 +1,126 @@ +package board.board; + +import org.apache.ibatis.type.Alias; + +@Alias("BoardVO") +public class BoardVO { + + private int b_no; + private String b_title; + private String b_content; + private String b_indate; + private String b_eddate; + private int b_delete; + private int u_no; + private String u_id; + private String u_pw; + private String u_nick; + private String u_indate; + private String u_eddate; + private int u_delete; + + + public int getB_no() { + return b_no; + } + + public void setB_no(int b_no) { + this.b_no = b_no; + } + + public String getB_title() { + return b_title; + } + + public void setB_title(String b_title) { + this.b_title = b_title; + } + + public String getB_content() { + return b_content; + } + + public void setB_content(String b_content) { + this.b_content = b_content; + } + + public String getB_indate() { + return b_indate; + } + + public void setB_indate(String b_indate) { + this.b_indate = b_indate; + } + + public String getB_eddate() { + return b_eddate; + } + + public void setB_eddate(String b_eddate) { + this.b_eddate = b_eddate; + } + + public int getU_no() { + return u_no; + } + + public void setU_no(int u_no) { + this.u_no = u_no; + } + + public int getB_delete() { + return b_delete; + } + + public void setB_delete(int b_delete) { + this.b_delete = b_delete; + } + + public String getU_id() { + return u_id; + } + + public void setU_id(String u_id) { + this.u_id = u_id; + } + + public String getU_nick() { + return u_nick; + } + + public void setU_nick(String u_nick) { + this.u_nick = u_nick; + } + + public int getU_delete() { + return u_delete; + } + + public void setU_delete(int u_delete) { + this.u_delete = u_delete; + } + + public String getU_pw() { + return u_pw; + } + + public void setU_pw(String u_pw) { + this.u_pw = u_pw; + } + + public String getU_indate() { + return u_indate; + } + + public void setU_indate(String u_indate) { + this.u_indate = u_indate; + } + + public String getU_eddate() { + return u_eddate; + } + + public void setU_eddate(String u_eddate) { + this.u_eddate = u_eddate; + } +} diff --git a/src/main/java/board/file/FileController.java b/src/main/java/board/file/FileController.java new file mode 100644 index 0000000..73b4292 --- /dev/null +++ b/src/main/java/board/file/FileController.java @@ -0,0 +1,84 @@ +package board.file; + +//FileController.java +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.servlet.ModelAndView; + +import sample.board.BoardController; + +/** + * http://gangzzang.tistory.com/125 + * + * @author Administrator + */ +@Controller +@RequestMapping(value = "/file/") +public class FileController { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @RequestMapping(value = "/") + // @ResponseBody + public String File(Model model) { + + log.info("File:" ); + + model.addAttribute("test", "test"); + + return "file/fileMain"; + } + + @RequestMapping(value = "/{jsp}") + // @ResponseBody + public String FileJsp(Model model, @PathVariable String jsp) { + + log.info("FileJsp:" + jsp); + + return "file/"+jsp; + } + + @RequestMapping(value = "/fileForm", method = RequestMethod.GET) +// public ModelAndView fileForm() { +// ModelAndView mv = new ModelAndView(); +// mv.setViewName("fileForm"); +// return mv; +// } + public String fileForm() { + return "file/fileForm"; + } + + @RequestMapping(value = "/fileForm", method = RequestMethod.POST) + public String fileSubmit(FileDTO dto) { + MultipartFile uploadfile = dto.getUploadfile(); + if (uploadfile != null) { + String fileName = uploadfile.getOriginalFilename(); + dto.setF_onm(fileName); + try { + // 1. FileOutputStream 사용 + // byte[] fileData = file.getBytes(); + // FileOutputStream output = new FileOutputStream("C:/images/" + + // fileName); + // output.write(fileData); + + // 2. File 사용 + File file = new File("C:/images/" + fileName); + uploadfile.transferTo(file); + } catch (IOException e) { + e.printStackTrace(); + } // try - catch + } // if + // 데이터 베이스 처리를 현재 위치에서 처리 + return "redirect:getBoardList.do"; // 리스트 요청으로 보내야하는데 일단 제외하고 구현 + } +} diff --git a/src/main/java/board/file/FileDTO.java b/src/main/java/board/file/FileDTO.java new file mode 100644 index 0000000..dad26ba --- /dev/null +++ b/src/main/java/board/file/FileDTO.java @@ -0,0 +1,78 @@ +package board.file; + +import org.springframework.web.multipart.MultipartFile; + +public class FileDTO { + private int b_no; + private int f_no; + private String f_onm; + private String f_rnm; + private int f_sz; + private String f_indate; + private int f_delete; + private MultipartFile uploadfile; + + public int getB_no() { + return b_no; + } + + public void setB_no(int b_no) { + this.b_no = b_no; + } + + public int getF_no() { + return f_no; + } + + public void setF_no(int f_no) { + this.f_no = f_no; + } + + public String getF_onm() { + return f_onm; + } + + public void setF_onm(String f_onm) { + this.f_onm = f_onm; + } + + public String getF_rnm() { + return f_rnm; + } + + public void setF_rnm(String f_rnm) { + this.f_rnm = f_rnm; + } + + public int getF_sz() { + return f_sz; + } + + public void setF_sz(int f_sz) { + this.f_sz = f_sz; + } + + public String getF_indate() { + return f_indate; + } + + public void setF_indate(String f_indate) { + this.f_indate = f_indate; + } + + public int getF_delete() { + return f_delete; + } + + public void setF_delete(int f_delete) { + this.f_delete = f_delete; + } + + public MultipartFile getUploadfile() { + return uploadfile; + } + + public void setUploadfile(MultipartFile uploadfile) { + this.uploadfile = uploadfile; + } +} diff --git a/src/main/java/board/reply/.gitignore b/src/main/java/board/reply/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/java/board/reply/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/java/board/reply/ReplyVO.java b/src/main/java/board/reply/ReplyVO.java new file mode 100644 index 0000000..e63b5a4 --- /dev/null +++ b/src/main/java/board/reply/ReplyVO.java @@ -0,0 +1,72 @@ +package board.reply; + +import org.apache.ibatis.type.Alias; + +@Alias("ReplyVO") +public class ReplyVO { + + private int r_no; + private String r_content; + private int b_no; + private int u_no; + private String r_indate; + private String r_eddate; + private int r_delete; + + public int getR_no() { + return r_no; + } + + public void setR_no(int r_no) { + this.r_no = r_no; + } + + public String getR_content() { + return r_content; + } + + public void setR_content(String r_content) { + this.r_content = r_content; + } + + public int getB_no() { + return b_no; + } + + public void setB_no(int b_no) { + this.b_no = b_no; + } + + public int getU_no() { + return u_no; + } + + public void setU_no(int u_no) { + this.u_no = u_no; + } + + public String getR_indate() { + return r_indate; + } + + public void setR_indate(String r_indate) { + this.r_indate = r_indate; + } + + public String getR_eddate() { + return r_eddate; + } + + public void setR_eddate(String r_eddate) { + this.r_eddate = r_eddate; + } + + public int getR_delete() { + return r_delete; + } + + public void setR_delete(int r_delete) { + this.r_delete = r_delete; + } + +} diff --git a/src/main/java/board/user/.gitignore b/src/main/java/board/user/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/java/board/user/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/java/board/user/UserController.java b/src/main/java/board/user/UserController.java new file mode 100644 index 0000000..f26bf24 --- /dev/null +++ b/src/main/java/board/user/UserController.java @@ -0,0 +1,142 @@ +package board.user; + +import java.text.DateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.PathVariable; +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 common.utill.UtilsPage; + +/** + * http://localhost:8080/defult/board/ + * Handles requests for the application home page. + */ +@RequestMapping(value = "/user/") // , method = RequestMethod.POST +@Controller +public class UserController { + + private static final Logger logger = LoggerFactory.getLogger(UserController.class); + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @Autowired + // @Autowired(required=false)//필수가 아닌경우 빈으로 등록 안하게 설정 + // @Qualifier("CommonService1")//는 타입으로(by type) ?아줌. 똑같은 클래스가 있을경우 + // CommonService1 라는 구분값으로 ?음 + // @Resource(name="testDao") //는 이름으로(by name) ?아줌 + private UserService svc; + + /** + * http://localhost:8080/defult/board/ + * 기본 경로 테스트 + * Simply selects the home view to render by returning its name. + */ + @RequestMapping(value = "/") + // @ResponseBody + public String user(Locale locale, Model model) { + logger.info("Welcome board! The client locale is {}.", locale); + + Date date = new Date(); + DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); + + String formattedDate = dateFormat.format(date); + + model.addAttribute("serverTime", formattedDate); + + return "user/userMain"; + } + + @RequestMapping(value = "/{jsp}") + // @ResponseBody + public String userAll(@PathVariable String jsp) { + log.debug("userAll:" + jsp); + return "user/" + jsp; + } + + @RequestMapping(value = "/userList") + public String userList( + Model model, + @RequestParam(value = "pageNum", defaultValue = "1") int pageNum, + @RequestParam(value = "pageSize", defaultValue = "10") int pageSize, + @RequestParam(value = "shtype", required = false) String shtype, + @RequestParam(value = "shvalue", required = false) String shvalue) { + + log.debug("userList"); + + Map map = new HashMap(); + + map.put(shtype, shvalue); + + int totalRowCount = svc.userListCount(map); + + UtilsPage pu = new UtilsPage(pageNum, totalRowCount, pageSize, 10); + + map.put("startNum", String.valueOf(pu.getStartRow())); + map.put("endNum", String.valueOf(pu.getEndRow())); + + List list = svc.userListPage(map); + + model.addAttribute("list", list); + + model.addAttribute("pageSize", pageSize); + model.addAttribute("totalRowCount", totalRowCount); + // model.addAttribute("startPageNum", pu.getStartPageNum()); + // model.addAttribute("endPageNum", pu.getEndPageNum()); + // model.addAttribute("totalPageCount", pu.getTotalPageCount()); + model.addAttribute("pageNum", pageNum); + + model.addAttribute("shtype", shtype); + model.addAttribute("shvalue", shvalue); + + return "user/userList"; + } + + @RequestMapping(value = "/userInsert") + // @ResponseBody + public String userInsert( + Model model, + @RequestParam(value = "p1", required = false) String p1, + @RequestParam(value = "p2", required = false) String p2, + @RequestParam(value = "id") String id, + @RequestParam(value = "pwd") String pwd, + @RequestParam(value = "rpwd") String rpwd, + @RequestParam(value = "nick") String nick) { + + log.debug(p1); + log.debug(p2); + log.debug(id); + log.debug(pwd); + log.debug(rpwd); + log.debug(nick); + + if (id == null + || pwd == null + || rpwd == null + || !(pwd.equals(rpwd)) + || nick == null + || id.equals("") + || pwd.equals("") + || rpwd.equals("") + || nick.equals("")) { + model.addAttribute("msg", "userInsert False"); + return "user/userInsertForm"; + // return "userInsert False"; + } + + model.addAttribute("msg", "userInsert ok"); + return "user/userInsertForm"; + // return "userInsert ok"; + } +} diff --git a/src/main/java/board/user/UserDao.java b/src/main/java/board/user/UserDao.java new file mode 100644 index 0000000..a8b6c7c --- /dev/null +++ b/src/main/java/board/user/UserDao.java @@ -0,0 +1,41 @@ +package board.user; + +import java.util.List; +import java.util.Map; + +import org.mybatis.spring.SqlSessionTemplate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Repository; + +@Repository +public class UserDao { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + private final String nameSpace="board.user."; + + // @Autowired + @Autowired(required = false) // 필수가 아닌경우 등록 안하게 설정 + @Qualifier("defultTemplate") // 는 타입으로(by type) 찿아줌. 똑같은 클래스가 + // 있을경우CommonService1 라는 구분값으로 찿음 + // @Resource(name="testDao") //는 이름으로(by name) 찿아줌 + private SqlSessionTemplate sql; + + public int userListCount(Map map) { + // TODO Auto-generated method stub + log.debug("userListCount"); + int count = sql.selectOne(nameSpace+"ListCount", map); + return count; + } + + public List userListPage(Map map) { + // TODO Auto-generated method stub + log.debug("userListPage"); + // List list = sql.selectList("defult.boardList", map); + List list = sql.selectList(nameSpace+"List", map); + return list; + } +} diff --git a/src/main/java/board/user/UserService.java b/src/main/java/board/user/UserService.java new file mode 100644 index 0000000..6be51b7 --- /dev/null +++ b/src/main/java/board/user/UserService.java @@ -0,0 +1,34 @@ +package board.user; + +import java.util.List; +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class UserService { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @Autowired + // @Qualifier("CommonDao1") + private UserDao dao; + + public int userListCount(Map map) { + // TODO Auto-generated method stub + log.debug("boardListCount"); + int count = dao.userListCount(map); + return count; + } + + public List userListPage(Map map) { + // TODO Auto-generated method stub + log.debug("boardListPage"); + List list = dao.userListPage(map); + return list; + } + +} diff --git a/src/main/java/board/user/UserVO.java b/src/main/java/board/user/UserVO.java new file mode 100644 index 0000000..734462d --- /dev/null +++ b/src/main/java/board/user/UserVO.java @@ -0,0 +1,62 @@ +package board.user; + +import org.apache.ibatis.type.Alias; + +@Alias("UserVO") +public class UserVO { + + private int u_no; + private String u_id; + private String u_pw; + private String u_nick; + private String u_indate; + private int u_delete; + + public int getU_no() { + return u_no; + } + + public void setU_no(int u_no) { + this.u_no = u_no; + } + + public String getU_id() { + return u_id; + } + + public void setU_id(String u_id) { + this.u_id = u_id; + } + + public String getU_pw() { + return u_pw; + } + + public void setU_pw(String u_pw) { + this.u_pw = u_pw; + } + + public String getU_nick() { + return u_nick; + } + + public void setU_nick(String u_nick) { + this.u_nick = u_nick; + } + + public String getU_indate() { + return u_indate; + } + + public void setU_indate(String u_indate) { + this.u_indate = u_indate; + } + + public int getU_delete() { + return u_delete; + } + + public void setU_delete(int u_delete) { + this.u_delete = u_delete; + } +} diff --git a/src/main/java/board2/BoardDAO.java b/src/main/java/board2/BoardDAO.java new file mode 100644 index 0000000..771ff95 --- /dev/null +++ b/src/main/java/board2/BoardDAO.java @@ -0,0 +1,14 @@ +package board2; + +import java.util.List; +import java.util.Map; + +import org.springframework.dao.DataAccessException; + +public interface BoardDAO { + // 전체 게시글 수 + public int boardCount(Map searchMap) throws DataAccessException; + + // 게시판 리스트 + public List boardList(Map searchMap) throws DataAccessException; +} \ No newline at end of file diff --git a/src/main/java/board2/BoardDAOImple.java b/src/main/java/board2/BoardDAOImple.java new file mode 100644 index 0000000..cf6b683 --- /dev/null +++ b/src/main/java/board2/BoardDAOImple.java @@ -0,0 +1,87 @@ +package board2; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; +import java.util.Map; + +import javax.sql.DataSource; + +import org.springframework.dao.DataAccessException; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.jdbc.core.RowMapper; + +public class BoardDAOImple implements BoardDAO { + + // 어노테이션 없이 쓰려니 죽겠네 + // @Resource(name="testDao") + private JdbcTemplate jdbaTemplate; + + public void setDataSource(DataSource dataSource) { + this.jdbaTemplate = new JdbcTemplate(dataSource); + } + + // 게시글 수 + public int boardCount(Map searchMap) throws DataAccessException { + + int count = 0; + String sql = ""; + if (searchMap.get("boardListSearchText") == null || searchMap.get("boardListSearchText").equals("")) { + sql = "select count(*) from board02"; + count = jdbaTemplate.queryForObject(sql, Integer.class); + + } else { + String boardListSelect = (String) searchMap.get("boardListSelect"); + String boardListSearchText = (String) searchMap.get("boardListSearchText"); + + sql = "select count(*) from board02 where " + boardListSelect + " like '%" + boardListSearchText + "%'"; + count = jdbaTemplate.queryForObject(sql, Integer.class); + + } + + return count; + } + + // 게시판 리스트 + public List boardList(Map searchMap) throws DataAccessException { + + List boardList = null; + String sql = ""; + Object[] obj; + + if (searchMap.get("boardListSearchText") == null || searchMap.get("boardListSearchText").equals("")) { + + sql = "select * from (" + + "select ROWNUM r,seq ,name,title ,TO_CHAR(regdate,'YYYY/MM/DD')as regdate, readcount," + + "reply, reply_step, reply_level " + "from " + "(select * from board02 " + + "order by reply desc, reply_step asc" + ")" + ")" + "where r BETWEEN ? AND ?"; + + obj = new Object[] { searchMap.get("startRow"), searchMap.get("endRow") }; + + } else { + String boardListSelect = (String) searchMap.get("boardListSelect"); + String boardListSearchText = (String) searchMap.get("boardListSearchText"); + + sql = "select * from (" + + "select ROWNUM r,seq ,name,title ,TO_CHAR(regdate,'YYYY/MM/DD')as regdate, readcount, " + + "reply, reply_step, reply_level " + "from " + "(select * from board02 " + "where " + " " + + boardListSelect + " like '%" + boardListSearchText + "%'" + "order by reply desc, reply_step asc" + + ")" + ")" + "where r BETWEEN ? AND ?"; + + obj = new Object[] { searchMap.get("startRow"), searchMap.get("endRow") }; + + } + + boardList = jdbaTemplate.query(sql, obj, new RowMapper() { + public BoardDTO mapRow(ResultSet rs, int rowNum) throws SQLException { + + BoardDTO boardDTO = new BoardDTO(rs.getString("seq"), rs.getString("name"), rs.getString("title"), + rs.getString("regdate"), rs.getInt("readcount"), rs.getInt("reply_step"), + rs.getInt("reply_level")); + return boardDTO; + } + }); + + return boardList; + } +} diff --git a/src/main/java/board2/BoardDTO.java b/src/main/java/board2/BoardDTO.java new file mode 100644 index 0000000..9e9cd23 --- /dev/null +++ b/src/main/java/board2/BoardDTO.java @@ -0,0 +1,118 @@ +package board2; + +public class BoardDTO { + private String seq; + private String name; + private String passwd; + private String title; + private String content; + private String filename; + private String regdate; + private int readcount; + private String reply; + private int reply_step; + private int reply_level; + + public BoardDTO() { + }; + + public BoardDTO(String seq, String name, String title, String regdate, int readcount, int reply_step, + int reply_level) { + super(); + this.seq = seq; + this.name = name; + this.title = title; + this.regdate = regdate; + this.readcount = readcount; + this.reply_step = reply_step; + this.reply_level = reply_level; + } + + public String getSeq() { + return seq; + } + + public void setSeq(String seq) { + this.seq = seq; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPasswd() { + return passwd; + } + + public void setPasswd(String passwd) { + this.passwd = passwd; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + public String getRegdate() { + return regdate; + } + + public void setRegdate(String regdate) { + this.regdate = regdate; + } + + public int getReadcount() { + return readcount; + } + + public void setReadcount(int readcount) { + this.readcount = readcount; + } + + public String getReply() { + return reply; + } + + public void setReply(String reply) { + this.reply = reply; + } + + public int getReply_step() { + return reply_step; + } + + public void setReply_step(int reply_step) { + this.reply_step = reply_step; + } + + public int getReply_level() { + return reply_level; + } + + public void setReply_level(int reply_level) { + this.reply_level = reply_level; + } +} \ No newline at end of file diff --git a/src/main/java/board2/BoardMultiController.java b/src/main/java/board2/BoardMultiController.java new file mode 100644 index 0000000..64654c5 --- /dev/null +++ b/src/main/java/board2/BoardMultiController.java @@ -0,0 +1,90 @@ +package board2; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.multiaction.MultiActionController; + +public class BoardMultiController extends MultiActionController { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + private BoardService boardService; + private PageHandler pageHandler; + + public void setBoardService(BoardService boardService) { + this.boardService = boardService; + } + + public void setPageHandler(PageHandler pageHandler) { + this.pageHandler = pageHandler; + } + + ModelAndView mav = null; + + // 게시판 리스트 + public ModelAndView list(HttpServletRequest request, HttpServletResponse response) throws Exception { + + log.debug("list"); + + mav = new ModelAndView(); + + List list = null; + // 검색select , 검색Text + String boardListSelect = request.getParameter("boardListSelect"); + String boardListSearchText = request.getParameter("boardListSearchText"); + + Map searchMap = new HashMap(); + + if (boardListSearchText != null) { + searchMap.put("boardListSearchText", EncodingHandler.toKor(boardListSearchText)); + searchMap.put("boardListSelect", boardListSelect); + + mav.addObject("boardListSearchText", EncodingHandler.toKor(boardListSearchText)); + mav.addObject("boardListSelect", boardListSelect); + } + String pageNumber = request.getParameter("pageNumber"); + int pageNum = 1; + if (pageNumber != null) { + pageNum = Integer.parseInt(pageNumber); + } + + // 게시글 수 + int totalCount = pageHandler.boardAllNumber(searchMap); + + // 페이지 갯수 + int totalPageCount = pageHandler.boardPageCount(searchMap); + + // startPage , endPage + int startPage = pageHandler.boardStartPage(pageNum); + int endPage = pageHandler.boardEndPage(pageNum, searchMap); + + // 처음, 마지막 rowNumber + List rowNumberList = new ArrayList(); + rowNumberList = pageHandler.boardSetPageNumber(pageNum); + searchMap.put("startRow", rowNumberList.get(0)); + searchMap.put("endRow", rowNumberList.get(1)); + + // 글 전체 출력 + list = boardService.boardList(searchMap); + + mav.addObject("pageNumber", pageNum); + mav.addObject("boardCount", totalCount); + mav.addObject("totalPageCount", totalPageCount); + mav.addObject("startPage", startPage); + mav.addObject("endPage", endPage); + mav.addObject("list", list); + + mav.setViewName("list"); + + return mav; + } +} \ No newline at end of file diff --git a/src/main/java/board2/BoardService.java b/src/main/java/board2/BoardService.java new file mode 100644 index 0000000..31168c5 --- /dev/null +++ b/src/main/java/board2/BoardService.java @@ -0,0 +1,12 @@ +package board2; + +import java.util.List; +import java.util.Map; + +public interface BoardService { + // 게시글 수 + public int boardCount(Map searchMap) throws Exception; + + // 게시판 리스트 + public List boardList(Map searchMap) throws Exception; +} \ No newline at end of file diff --git a/src/main/java/board2/BoardServiceImple.java b/src/main/java/board2/BoardServiceImple.java new file mode 100644 index 0000000..0f3e987 --- /dev/null +++ b/src/main/java/board2/BoardServiceImple.java @@ -0,0 +1,22 @@ +package board2; + +import java.util.List; +import java.util.Map; + +public class BoardServiceImple implements BoardService { + private BoardDAO boardDAO; + + public void setBoardDAO(BoardDAO boardDAO) { + this.boardDAO = boardDAO; + } + + // 게시글 수 + public int boardCount(Map searchMap) throws Exception { + return boardDAO.boardCount(searchMap); + } + + // 게시판 리스트 + public List boardList(Map searchMap) throws Exception { + return boardDAO.boardList(searchMap); + } +} \ No newline at end of file diff --git a/src/main/java/board2/EncodingHandler.java b/src/main/java/board2/EncodingHandler.java new file mode 100644 index 0000000..8174d1c --- /dev/null +++ b/src/main/java/board2/EncodingHandler.java @@ -0,0 +1,15 @@ +package board2; + +import java.io.UnsupportedEncodingException; + +public class EncodingHandler { + public static String toKor(String str) { + String s = null; + try { + s = new String(str.getBytes("8859_1"), "euc-kr"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + return s; + } +} \ No newline at end of file diff --git a/src/main/java/board2/PageHandler.java b/src/main/java/board2/PageHandler.java new file mode 100644 index 0000000..589aa67 --- /dev/null +++ b/src/main/java/board2/PageHandler.java @@ -0,0 +1,58 @@ +package board2; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class PageHandler { + + private BoardDAO boardDAO; + + public void setBoardDAO(BoardDAO boardDAO) { + this.boardDAO = boardDAO; + } + + // 페이지 사이즈, 페이지 그룹 + private final int PAGESIZE = 3; + private final int PAGEGROUP = 5; + + // 전체 게시글 수 + public int boardAllNumber(Map searchMap) throws Exception { + int count = boardDAO.boardCount(searchMap); + return count; + } + + // 페이지 갯수 + public int boardPageCount(Map searchMap) throws Exception { + int pageCount = boardAllNumber(searchMap) / PAGESIZE; + if (boardAllNumber(searchMap) % PAGESIZE != 0) { + pageCount++; + } + return pageCount; + } + + // startPage + public int boardStartPage(int pageNum) throws Exception { + int startPage = (pageNum - 1) / PAGEGROUP * PAGEGROUP + 1; + return startPage; + } + + // endPage + public int boardEndPage(int pageNum, Map searchMap) throws Exception { + int endPage = boardStartPage(pageNum) + (PAGEGROUP - 1); + if (endPage > boardPageCount(searchMap)) { + endPage = boardPageCount(searchMap); + } + return endPage; + } + + // 처음, 마지막 rowNumber + public List boardSetPageNumber(int pageNum) throws Exception { + List list = new ArrayList(); + int endRow = PAGESIZE * pageNum; + int startRow = endRow - PAGESIZE + 1; + list.add(startRow); + list.add(endRow); + return list; + } +} \ No newline at end of file diff --git a/src/main/java/com/syaku/bbs/ViewController.java b/src/main/java/com/syaku/bbs/ViewController.java new file mode 100644 index 0000000..0afd3b5 --- /dev/null +++ b/src/main/java/com/syaku/bbs/ViewController.java @@ -0,0 +1,103 @@ +package com.syaku.bbs; + +import java.util.List; + +import javax.annotation.Resource; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PathVariable; +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.servlet.mvc.support.RedirectAttributes; + +import com.syaku.bbs.dao.BbsDao; +import com.syaku.bbs.dao.BbsVo; + +@Controller(value = "viewController") +// @Controller +// 해당 클래스가 Controller 임을 나타내기 위한 어노테이션. +// appServlet/servlet-context.xml 의 의해 스캔된다. +// 컨트롤러 명을 정의하고 싶을 때는 @Controller(value = “컨트롤러명”) 하면된다. 정의하지 않으면 자동적으로 지정되며, +// 첫글자는 소문자로 치횐된다. 그래서 viewController 가 된다. +public class ViewController { + + private static final Logger logger = LoggerFactory.getLogger(ViewController.class); + + // Resource 어노테이션을 이용하여 BbsDao 선언. + @Resource(name = "bbsDao") + private BbsDao bbsDao; + + // 게시판 목록 + @RequestMapping(value = "/", method = RequestMethod.GET) + public String dispBbsList(Model model) { + logger.info("display view BBS list"); + + List list = this.bbsDao.getSelect(); + model.addAttribute("list", list); + + logger.info("totcal count" + list.size()); + + return "bbs.list"; + } + + // 게시판 상세보기 + // PathVariable 어노테이션을 이용하여 RESTful 방식 적용 + // bbs/1 -> id = 1; id = 게시물 번호로 인식함. + // 일반 적으로 (@ReuqstParam(value = "bbsVo", required = false, defaultValue = + // "0"), int idx, Model model) + @RequestMapping("/{idx}") + public String dispBbsView(@PathVariable int idx, Model model) { + logger.info("display view BBS view idx = {}", idx); + + BbsVo object = this.bbsDao.getSelectOne(idx); + + model.addAttribute("object", object); + + return "bbs.view"; + } + + // 게시판 쓰기 + @RequestMapping(value = "/write", method = RequestMethod.GET) + public String dispBbsWrite(@RequestParam(value = "idx", defaultValue = "0") int idx, Model model) { + logger.info("display view BBS write"); + + if (idx > 0) { + BbsVo object = this.bbsDao.getSelectOne(idx); + model.addAttribute("object", object); + } + + return "bbs.write"; + } + + @RequestMapping(value = "/write_ok", method = RequestMethod.POST) + public String procBbsWrite(@ModelAttribute("bbsVo") BbsVo bbsVo, RedirectAttributes redirectAttributes) { + logger.info("bbsVo.getContent:{}",bbsVo.getUser_name()); + logger.info("bbsVo.getContent:{}",bbsVo.getSubject()); + logger.info("bbsVo.getContent:{}",bbsVo.getContent()); + logger.info("bbsVo.getContent:{}",bbsVo.getIdx()); + Integer idx = bbsVo.getIdx(); + + if (idx == null || idx == 0) { + this.bbsDao.insert(bbsVo); + redirectAttributes.addFlashAttribute("message", "추가되었습니다."); + return "redirect:./"; + } else { + this.bbsDao.update(bbsVo); + redirectAttributes.addFlashAttribute("message", "수정되었습니다."); + //return "redirect:./write?idx=" + idx; + return "redirect:./" + idx; + } + } + + @RequestMapping(value = "/delete", method = RequestMethod.POST) + public String procBbsDelete(@RequestParam(value = "idx", required = false) int idx) { + this.bbsDao.delete(idx); + return "redirect:./"; + } +} diff --git a/src/main/java/com/syaku/bbs/dao/BbsDao.java b/src/main/java/com/syaku/bbs/dao/BbsDao.java new file mode 100644 index 0000000..40cb6d3 --- /dev/null +++ b/src/main/java/com/syaku/bbs/dao/BbsDao.java @@ -0,0 +1,33 @@ +package com.syaku.bbs.dao; + +import java.util.List; + +import javax.annotation.Resource; +import org.springframework.stereotype.Service; + +@Service(value = "bbsDao") +public class BbsDao { + + @Resource(name = "bbsMapper") + private BbsMapper bbsMapper; + + public List getSelect() { + return this.bbsMapper.select(); + } + + public BbsVo getSelectOne(int idx) { + return this.bbsMapper.selectOne(idx); + } + + public void insert(BbsVo bbsVo) { + this.bbsMapper.insert(bbsVo); + } + + public void update(BbsVo bbsVo) { + this.bbsMapper.update(bbsVo); + } + + public void delete(int idx) { + this.bbsMapper.delete(idx); + } +} diff --git a/src/main/java/com/syaku/bbs/dao/BbsMapper.java b/src/main/java/com/syaku/bbs/dao/BbsMapper.java new file mode 100644 index 0000000..14b5f17 --- /dev/null +++ b/src/main/java/com/syaku/bbs/dao/BbsMapper.java @@ -0,0 +1,14 @@ +package com.syaku.bbs.dao; + +import java.util.List; +import org.springframework.stereotype.Repository; + +@Repository(value = "bbsMapper") +public interface BbsMapper { + + List select(); + BbsVo selectOne(int idx); + void insert(BbsVo bbsVo); + void update(BbsVo bbsVo); + void delete(int idx); +} diff --git a/src/main/java/com/syaku/bbs/dao/BbsVo.java b/src/main/java/com/syaku/bbs/dao/BbsVo.java new file mode 100644 index 0000000..f5b26f1 --- /dev/null +++ b/src/main/java/com/syaku/bbs/dao/BbsVo.java @@ -0,0 +1,49 @@ +package com.syaku.bbs.dao; + +public class BbsVo { + private Integer idx; + private String user_name; + private String subject; + private String content; + private String reg_datetime; + + public Integer getIdx() { + return idx; + } + + public void setIdx(Integer idx) { + this.idx = idx; + } + + public String getUser_name() { + return user_name; + } + + public void setUser_name(String user_name) { + this.user_name = user_name; + } + + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getReg_datetime() { + return reg_datetime; + } + + public void setReg_datetime(String reg_datetime) { + this.reg_datetime = reg_datetime; + } +} diff --git a/src/main/java/com/syaku/test/TestController.java b/src/main/java/com/syaku/test/TestController.java new file mode 100644 index 0000000..871341f --- /dev/null +++ b/src/main/java/com/syaku/test/TestController.java @@ -0,0 +1,24 @@ +package com.syaku.test; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@Controller +public class TestController { + + private static final Logger logger = LoggerFactory.getLogger(TestController.class); + + @RequestMapping(value = "/test", method = RequestMethod.GET) + public String test(Model model) { + logger.info("test controller......."); + + model.addAttribute("data", "한글되니?"); + + return "test"; + } + +} diff --git a/src/main/java/common/CommonController.java b/src/main/java/common/CommonController.java new file mode 100644 index 0000000..ea1e9a5 --- /dev/null +++ b/src/main/java/common/CommonController.java @@ -0,0 +1,63 @@ +package common; + +import java.util.Map; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; + +import common.utill.UtilsFile; +import first.CommandMap; + +@Controller +@RequestMapping(value = "/common/") +public class CommonController { + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @Resource(name = "commonService") + private CommonService commonService; + + @Resource(name = "fileUtils") + private UtilsFile fileUtils; + + /** + * 다운로드를 파라메터값으로 받을경우 + * + * @param commandMap + * @param response + * @throws Exception + */ + @RequestMapping(value = "downloadFile") + public void downloadFile(CommandMap commandMap, HttpServletResponse response) throws Exception { + Map map = commonService.selectFileInfo(commandMap.getMap()); + String storedFileName = (String) map.get("STORED_FILE_NAME"); + String originalFileName = (String) map.get("ORIGINAL_FILE_NAME"); + + fileUtils.readFile(response, storedFileName, originalFileName); + } + + /** + * 주소창에 파일명을 쳤을경우 + * + * @param commandMap + * @param response + * @param file + * @throws Exception + */ + @RequestMapping(value = "downloadFile/{file:.+}") + public void downloadFile(CommandMap commandMap, HttpServletResponse response, @PathVariable String file) + throws Exception { + // Map map = + // commonService.selectFileInfo(commandMap.getMap()); + // String storedFileName = (String) map.get("STORED_FILE_NAME"); + // String originalFileName = (String) map.get("ORIGINAL_FILE_NAME"); + + fileUtils.readFile(response, file, file); + } + +} diff --git a/src/main/java/common/CommonDAO.java b/src/main/java/common/CommonDAO.java new file mode 100644 index 0000000..bba37d8 --- /dev/null +++ b/src/main/java/common/CommonDAO.java @@ -0,0 +1,15 @@ +package common; + +import java.util.Map; + +import org.springframework.stereotype.Repository; + +import first.AbstractDAO; + +@Repository("commonDAO") +public class CommonDAO extends AbstractDAO { + // @SuppressWarnings("unchecked") + public Map selectFileInfo(Map map) throws Exception { + return (Map) selectOne("common.selectFileInfo", map); + } +} diff --git a/src/main/java/common/CommonService.java b/src/main/java/common/CommonService.java new file mode 100644 index 0000000..c0272d4 --- /dev/null +++ b/src/main/java/common/CommonService.java @@ -0,0 +1,21 @@ +package common; + +import java.util.Map; + +import javax.annotation.Resource; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +@Service("commonService") +public class CommonService { + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @Resource(name="commonDAO") + private CommonDAO commonDAO; + + public Map selectFileInfo(Map map) throws Exception { + return commonDAO.selectFileInfo(map); + } +} \ No newline at end of file diff --git a/src/main/java/common/logger/CustomMapArgumentResolver.java b/src/main/java/common/logger/CustomMapArgumentResolver.java new file mode 100644 index 0000000..eb7e43d --- /dev/null +++ b/src/main/java/common/logger/CustomMapArgumentResolver.java @@ -0,0 +1,39 @@ +package common.logger; + +import java.util.Enumeration; + +import javax.servlet.http.HttpServletRequest; + +import org.springframework.core.MethodParameter; +import org.springframework.web.bind.support.WebDataBinderFactory; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.method.support.HandlerMethodArgumentResolver; +import org.springframework.web.method.support.ModelAndViewContainer; + +import first.CommandMap; + +public class CustomMapArgumentResolver implements HandlerMethodArgumentResolver{ + @Override + public boolean supportsParameter(MethodParameter parameter) { + return CommandMap.class.isAssignableFrom(parameter.getParameterType()); + } + + @Override + public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception { + CommandMap commandMap = new CommandMap(); + + HttpServletRequest request = (HttpServletRequest) webRequest.getNativeRequest(); + Enumeration enumeration = request.getParameterNames(); + + String key = null; + String[] values = null; + while(enumeration.hasMoreElements()){ + key = (String) enumeration.nextElement(); + values = request.getParameterValues(key); + if(values != null){ + commandMap.put(key, (values.length > 1) ? values:values[0] ); + } + } + return commandMap; + } +} \ No newline at end of file diff --git a/src/main/java/common/logger/LoggerAspect.java b/src/main/java/common/logger/LoggerAspect.java new file mode 100644 index 0000000..4d4cb42 --- /dev/null +++ b/src/main/java/common/logger/LoggerAspect.java @@ -0,0 +1,41 @@ +package common.logger; + +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@Aspect +public class LoggerAspect { + private final Logger log = LoggerFactory.getLogger(this.getClass()); + static String name = ""; + static String type = ""; + + /** + * 대상 객체의 메서드 실행 전, 후 또는 예외 발생 시점에 공통 기능을 실행 + * Around Advice를 구현한 메서드는 org.aspectj.lang.ProceedingJoinPoint를 반드시 첫 번째 + * 파리미터로 지정해야 함 -> 그렇지 않을 경우 예외 발생 + * http://snoopy81.tistory.com/292 + * + * @param joinPoint + * @return + * @throws Throwable + */ + @Around("execution(* first..*Controller.*(..)) or execution(* first..*Service.*(..)) or execution(* first..*DAO.*(..))") + public Object logPrint(ProceedingJoinPoint joinPoint) throws Throwable { + type = joinPoint.getSignature().getDeclaringTypeName(); + +// if (type.indexOf("Controller") > -1) { +// name = "Controller \t: "; +// } else if (type.indexOf("Service") > -1) { +// name = "ServiceImpl \t: "; +// } else if (type.indexOf("DAO") > -1) { +// name = "DAO \t\t: "; +// } + log.debug(name + type + "." + joinPoint.getSignature().getName() + "()"); + return joinPoint.proceed(); + } + + +} diff --git a/src/main/java/common/logger/LoggerInterceptor.java b/src/main/java/common/logger/LoggerInterceptor.java new file mode 100644 index 0000000..4315ab2 --- /dev/null +++ b/src/main/java/common/logger/LoggerInterceptor.java @@ -0,0 +1,30 @@ +package common.logger; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.ibatis.logging.Log; +import org.apache.ibatis.logging.LogFactory; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; + +public class LoggerInterceptor extends HandlerInterceptorAdapter { + protected Log log = LogFactory.getLog(LoggerInterceptor.class); + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + if (log.isDebugEnabled()) { + log.debug("====================================== START ======================================"); + log.debug("Request URI \t:" + request.getRequestURI()); + log.debug("Request Method \t:"+request.getMethod()); + } + return super.preHandle(request, response, handler); + } + + @Override + public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { + if (log.isDebugEnabled()) { + log.debug("====================================== END ======================================"); + } + } +} \ No newline at end of file diff --git a/src/main/java/common/security/LucyXss.java b/src/main/java/common/security/LucyXss.java new file mode 100644 index 0000000..89e8aaa --- /dev/null +++ b/src/main/java/common/security/LucyXss.java @@ -0,0 +1,72 @@ +package common.security; + +import java.util.regex.Pattern; + +import org.apache.ibatis.logging.Log; +import org.apache.ibatis.logging.LogFactory; + +import com.nhncorp.lucy.security.xss.XssFilter; + +import common.logger.LoggerInterceptor; + +public class LucyXss { + protected Log log = LogFactory.getLog(LoggerInterceptor.class); + + /** + * XssFilter를 쓰기 쉽게하기위해서 제작. 기본형. + * 앞의 주석은 제거되게끔 설정 + * + * @param str + * @param xmlFile + * @return + */ + public static String doFileSetNoComment(String str, String xmlFile) { + return XssFilter.getInstance(xmlFile, true).doFilter(str); + // XssFilter filter = XssFilter.getInstance(xmlFile); + // return filter.doFilter(str); + } + + /** + * 기본값 lucy-xss-superset.xml + * + * @param str + * @return + */ + public static String doDefultFileSetNoComment(String str) { + return XssFilter.getInstance(true).doFilter(str); + // XssFilter filter = XssFilter.getInstance(xmlFile); + // return filter.doFilter(str); + } + + /** + * XssFilter를 lucy-xss.xml 파일로 처리 + * + * @param str + * @return + */ + public static String doDefultFileSetNoComment1(String str) { + return doFileSetNoComment(str, "lucy-xss.xml"); + } + + // /** + // * XssFilter를 lucy-xss-superset.xml 파일로 처리 + // * + // * @param str + // * @return + // */ + // public static String doSuperset(String str) { + // return doFileSet(str, "lucy-xss-superset.xml"); + // } + + // /** + // * 주석 제거용 메서드 + // * + // * @param str + // * @return + // */ + // public static String doSubstring(String str) { + // return str.substring(str.indexOf("-->") + 3); + // } + + +} diff --git a/src/main/java/common/security/SCRFInterceptor.java b/src/main/java/common/security/SCRFInterceptor.java new file mode 100644 index 0000000..d5c56db --- /dev/null +++ b/src/main/java/common/security/SCRFInterceptor.java @@ -0,0 +1,54 @@ +package common.security; + +import java.util.Enumeration; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.ibatis.logging.Log; +import org.apache.ibatis.logging.LogFactory; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; + +import common.logger.LoggerInterceptor; + +public class SCRFInterceptor extends HandlerInterceptorAdapter { + protected Log log = LogFactory.getLog(LoggerInterceptor.class); + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) + throws Exception { + // TODO Auto-generated method stub + log.debug("preHandle"); + int check=0; + if(!request.getMethod().equalsIgnoreCase("post")){ + log.debug("not post"); + return true; + }else{ + if(request instanceof MultipartHttpServletRequest){ + Enumeration names=request.getParameterNames(); + while (names.hasMoreElements()) { + String ele = (String) names.nextElement(); + log.debug("ele:"+ele); + if ("csrf".equals(ele)) { + check=1; + String value=request.getParameter(ele); + if (value.equals(request.getSession().getAttribute("CSRF_TOKEN"))) { + log.debug("value:"+value); + return true; + } + } + } + log.debug("check:"+check); + if(check==0){ + log.debug("csrfError"); + request.getSession().setAttribute("csrfError", "true"); + response.sendRedirect("boardList"); + return false; + } + } + } + return true; + //return super.preHandle(request, response, handler); + } +} diff --git a/src/main/java/common/security/SecurityAES.java b/src/main/java/common/security/SecurityAES.java new file mode 100644 index 0000000..581d9f3 --- /dev/null +++ b/src/main/java/common/security/SecurityAES.java @@ -0,0 +1,147 @@ +package common.security; + +import java.io.UnsupportedEncodingException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Arrays; + +import javax.crypto.Cipher; +import javax.crypto.spec.SecretKeySpec; + +import org.apache.commons.codec.binary.Base64; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * AES 대칭키 암호/복호화 예제 + * + * @author Administrator + * http://aesencryption.net/#Java-aes-encryption-example + */ +class SecurityAES { + + private final static Logger log = LoggerFactory.getLogger(SecurityAES.class); + + private static SecretKeySpec secretKey; + private static byte[] key; + + private static String decryptedString; + private static String encryptedString; + + public static void setKey(String myKey) { + + MessageDigest sha = null; + try { + key = myKey.getBytes("UTF-8"); + System.out.println("key.length:" + key.length); + sha = MessageDigest.getInstance("SHA-1"); + key = sha.digest(key); + key = Arrays.copyOf(key, 16); // use only first 128 bit// 지우면 인코딩 안됨 + System.out.println("key.length:" + key.length); + System.out.println("key:" + new String(key, "UTF-8")); + secretKey = new SecretKeySpec(key, "AES"); + + } catch (NoSuchAlgorithmException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (UnsupportedEncodingException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + public static String getDecryptedString() { + return decryptedString; + } + + public static void setDecryptedString(String decryptedString) { + SecurityAES.decryptedString = decryptedString; + } + + public static String getEncryptedString() { + return encryptedString; + } + + public static void setEncryptedString(String encryptedString) { + SecurityAES.encryptedString = encryptedString; + } + + /** + * 암호화 + * + * @param strToEncrypt + * @return 실패시 널값 반환 + */ + public static String encrypt(String strToEncrypt) { + try { + Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); + + cipher.init(Cipher.ENCRYPT_MODE, secretKey); + + setEncryptedString(Base64.encodeBase64String(cipher.doFinal(strToEncrypt.getBytes("UTF-8")))); + return getEncryptedString(); + } catch (Exception e) { + + // e.printStackTrace(); + log.info("암호화 오류 : " + e.toString()); + setEncryptedString(null); + return null; + } + } + + /** + * 복호화 + * + * @param strToDecrypt + * @return 실패시 널값 반환 + */ + public static String decrypt(String strToDecrypt) { + try { + Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5PADDING"); + + cipher.init(Cipher.DECRYPT_MODE, secretKey); + setDecryptedString(new String(cipher.doFinal(Base64.decodeBase64(strToDecrypt)))); + return getDecryptedString(); + } catch (Exception e) { + + // e.printStackTrace(); + log.info("복호화 오류: " + e.toString()); + setDecryptedString(null); + return null; + } + } + + /** + * 실행 예제 + * + * @param args + */ + public static void main(String args[]) { + + final String strToEncrypt = "내용"; + final String strPssword = "암호"; + + SecurityAES.setKey(strPssword);// 암호키 + + SecurityAES.encrypt(strToEncrypt.trim());// 암호화할 내용 + + System.out.println("암호화할 내용: " + strToEncrypt); + System.out.println("암호화된 내용: " + SecurityAES.getEncryptedString()); + + final String strToDecrypt = SecurityAES.getEncryptedString();// 암호화된 내용 + // 저장 + SecurityAES.decrypt(strToDecrypt.trim());// 복호화 처리 + + System.out.println("복호화할 내용 : " + strToDecrypt); + System.out.println("복호화된 내용 : " + SecurityAES.getDecryptedString()); + + SecurityAES.setKey(strPssword + "ㅁ");// 틀린 암호키일 경우 + SecurityAES.decrypt(strToDecrypt.trim());// 복호화 처리 + + System.out.println("복호화할 내용 : " + strToDecrypt); + System.out.println("복호화된 내용 : " + SecurityAES.getDecryptedString()); + + } + +} diff --git a/src/main/java/common/security/SecuritySHA.java b/src/main/java/common/security/SecuritySHA.java new file mode 100644 index 0000000..56bfb4d --- /dev/null +++ b/src/main/java/common/security/SecuritySHA.java @@ -0,0 +1,328 @@ +package common.security; + +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.text.DateFormat; +import java.util.Date; +import java.util.Locale; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import common.utill.UtillsTimeChack; + +/** + * SHA 암호화 정리 + * b는 바이트 배열 + * s는 바이트 배열을 문자로 변환 + * 표시가 없는건 바이트 배열을 16비트값으로 표현 + * @author Administrator + */ +@Controller + +@RequestMapping(value = { + "/SecuritySHA/*" +}) // ,method = RequestMethod.POST +public class SecuritySHA { + + private final static Logger log = LoggerFactory.getLogger(SecuritySHA.class); + + /** + * 단일 암호화 샘플 + * http://localhost:8080/common/sample/sample/ + * http://localhost:8080/common/sample/ Simply selects the home view to + * render by returning its name. 스프링 프로젝터 생성시 기본 메소드 + */ + @RequestMapping(value = "/") + // @ResponseBody + public String SecuritySample(Locale locale, Model model) { + + log.info("SecuritySample"); + + String sha; + + sha = SHA256("SecuritySample").length() + ":" + SHA256("SecuritySample"); + log.debug(sha); + model.addAttribute("sha256", sha); + + sha = SHA512("SecuritySample").length() + ":" + SHA512("SecuritySample"); + log.debug(sha); + model.addAttribute("sha512", sha); + + sha = SHA512t("SecuritySample").length() + ":" + SHA512t("SecuritySample"); + log.debug(sha); + model.addAttribute("sha512t", sha); + + sha = SHA256s("SecuritySample").length() + ":" + SHA256s("SecuritySample"); + log.debug(sha); + model.addAttribute("sha256s", sha); + + sha = SHA512s("SecuritySample").length() + ":" + SHA512s("SecuritySample"); + log.debug(sha); + model.addAttribute("sha512s", sha); + + sha = SHA256b("SecuritySample").length + ":" + SHA256b("SecuritySample").toString(); + log.debug(sha); + model.addAttribute("sha256b", sha); + + sha = SHA512b("SecuritySample").length + ":" + SHA512b("SecuritySample").toString(); + log.debug(sha); + model.addAttribute("sha512b", sha); + + // logger.info("logger Welcome home! The client locale is."); + // log.info("Welcome home! The client locale is {}.", locale); + + Date date = new Date(); + DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); + + String formattedDate = dateFormat.format(date); + + model.addAttribute("serverTime", formattedDate); + + return "forward:/debug/debug.jsp"; + } + + /** + * 암호화 + * 32바이트*8비트=256비트 + * + * @param str + * @return + */ + @RequestMapping(value = { + "/SHA256/{str}" + }) // ,method = RequestMethod.POST + @ResponseBody + public final static String SHA256(@PathVariable String str) { + //log.debug("SHA256"); + String SHA = ""; + try { + MessageDigest sh = MessageDigest.getInstance("SHA-256"); + sh.update(str.getBytes()); + byte byteData[] = sh.digest(); + SHA = new String(byteData, 0, byteData.length); + // log.debug(byteData.length + ":" + SHA); + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < byteData.length; i++) { + sb.append(Integer.toString((byteData[i] & 0xff) + 0x100, 16).substring(1)); + // sb.append(Integer.toHexString(0xff & byteData[i]));//0은 처리 + // 안되는 문제가 있음 + } + SHA = sb.toString(); + + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + SHA = null; + } + return SHA; + } + + /** + * 단방향 암호화 + * 이건 쓰지 말기 + * + * @param str + * @return + */ + @RequestMapping(value = { + "/SHA256s/{str}" + }) // ,method = RequestMethod.POST + @ResponseBody + public final static String SHA256s(@PathVariable String str) { + log.debug("SHA256s"); + String SHA = ""; + try { + MessageDigest sh = MessageDigest.getInstance("SHA-256"); + sh.update(str.getBytes()); + byte byteData[] = sh.digest(); + SHA = new String(byteData, 0, byteData.length); + // log.debug(byteData.length + ":" + SHA); + // StringBuffer sb = new StringBuffer(); + // for (int i = 0; i < byteData.length; i++) { + // sb.append(Integer.toString((byteData[i] & 0xff) + 0x100, + // 16).substring(1)); + // sb.append(Integer.toHexString(0xff & byteData[i])); + // } + // SHA = sb.toString(); + + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + SHA = null; + } + return SHA; + } + + @RequestMapping(value = { + "/SHA256b/{str}" + }) // ,method = RequestMethod.POST + @ResponseBody + public final static byte[] SHA256b(@PathVariable String str) { + log.debug("SHA256b"); + // String SHA = ""; + try { + MessageDigest sh = MessageDigest.getInstance("SHA-256"); + sh.update(str.getBytes()); + // byte byteData[] = sh.digest(); + // SHA = new String(byteData, 0, byteData.length); + // log.debug(sh.digest().length + ":" + sh.digest()); + // StringBuffer sb = new StringBuffer(); + // for (int i = 0; i < byteData.length; i++) { + // sb.append(Integer.toString((byteData[i] & 0xff) + 0x100, + // 16).substring(1)); + // sb.append(Integer.toHexString(0xff & byteData[i])); + // } + // SHA = sb.toString(); + return sh.digest(); + + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException(e); + } + // return SHA; + } + + @RequestMapping(value = { + "/SHA512/{target}" + }) // ,method = RequestMethod.POST + @ResponseBody + public final static String SHA512(@PathVariable String target) { + //log.debug("SHA512"); + try { + MessageDigest sh = MessageDigest.getInstance("SHA-512"); + sh.update(target.getBytes()); + StringBuffer sb = new StringBuffer(); + for (byte b : sh.digest()) { + // sb.append(Integer.toHexString(0xff & b)); + sb.append(Integer.toString((b & 0xff) + 0x100, 16).substring(1)); + } + // log.debug(sb.length() + ":" + sb.toString()); + return sb.toString(); + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException(e); + } + } + /** + * 이방법 쓰지 말기 format 함수가 두배나 느림 + * @param target + * @return + */ + @RequestMapping(value = { + "/SHA512t/{target}" + }) // ,method = RequestMethod.POST + @ResponseBody + public final static String SHA512t(@PathVariable String target) { + //log.debug("SHA512t"); + try { + MessageDigest sh = MessageDigest.getInstance("SHA-512"); + sh.update(target.getBytes()); + + StringBuffer sb = new StringBuffer(); + for (byte b : sh.digest()) { + // sb.append(Integer.toHexString(0xff & b)); + sb.append(String.format("%02x", b&0xff));//이방법 느림 쓰지 말기 아래와 비교해서 두배나 느림 + //sb.append(Integer.toString((b & 0xff) + 0x100, 16).substring(1)); + } + // log.debug(sb.length() + ":" + sb.toString()); + return sb.toString(); + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException(e); + } + } + + /** + * 쓰지 말기 + * + * @param target + * @return + */ + @RequestMapping(value = { + "/SHA512s/{target}" + }) // ,method = RequestMethod.POST + @ResponseBody + public final static String SHA512s(@PathVariable String target) { + log.debug("SHA512s"); + try { + MessageDigest sh = MessageDigest.getInstance("SHA-512"); + sh.update(target.getBytes()); + byte byteData[] = sh.digest(); + String SHA = new String(byteData, 0, byteData.length); + // StringBuffer sb = new StringBuffer(); + // for (byte b : sh.digest()) { + // sb.append(Integer.toHexString(0xff & b)); + // sb.append(Integer.toString((b & 0xff) + 0x100, 16).substring(1)); + // } + // log.debug(sb.length() + ":" + sb.toString()); + // return sb.toString(); + // log.debug(byteData.length + ":" + SHA); + return SHA; + + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException(e); + } + } + + /** + * SHA512b 방식 단방향 암호화 + * 64바이트(*8비트)=512비트 + * + * @param target + * @return + */ + @RequestMapping(value = { + "/SHA512b/{target}" + }) // ,method = RequestMethod.POST + @ResponseBody + public final static byte[] SHA512b(@PathVariable String target) { + log.debug("SHA512b"); + try { + MessageDigest sh = MessageDigest.getInstance("SHA-512"); + sh.update(target.getBytes()); + // log.debug(sh.digest().length + ":" + sh.digest()); + // byte byteData[] = sh.digest(); + // String SHA = new String(byteData, 0, byteData.length); + // StringBuffer sb = new StringBuffer(); + // for (byte b : sh.digest()) { + // sb.append(Integer.toHexString(0xff & b)); + // sb.append(Integer.toString((b & 0xff) + 0x100, 16).substring(1)); + // } + // log.debug(sb.length() + ":" + sb.toString()); + // return sb.toString(); + // log.debug(sh.digest().length + ":" + sh.digest()); + return sh.digest(); + + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException(e); + } + } + + public static void main(String[] args) { + + UtillsTimeChack t1=new UtillsTimeChack(); + UtillsTimeChack t2=new UtillsTimeChack(); + + t1.setStart(); + log.debug("{}",t1.getStart()); + for (int i = 0; i < 10000; i++) { + SHA512("SecuritySample"); + } + t1.setEnd(); + log.debug("{}",t1.getEnd()); + + t2.setStart(); + log.debug("{}",t1.getStart()); + for (int i = 0; i < 10000; i++) { + SHA512t("SecuritySample"); + } + t2.setEnd(); + log.debug("{}",t1.getEnd()); + + log.debug("{}",t1.getTime()); + log.debug("{}",t2.getTime()); + + + } +} diff --git a/src/main/java/common/security/XSSFilter.java b/src/main/java/common/security/XSSFilter.java new file mode 100644 index 0000000..08bb9a1 --- /dev/null +++ b/src/main/java/common/security/XSSFilter.java @@ -0,0 +1,40 @@ +package common.security; + + +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 org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class XSSFilter implements Filter{ + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @Override + public void destroy() { + // TODO Auto-generated method stub + + } + + @Override + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + log.debug("doFilter 호출"); + chain.doFilter(new XSSRequestWrapper((HttpServletRequest) request),response); + } + + @Override + public void init(FilterConfig arg0) throws ServletException { + // TODO Auto-generated method stub + + } + +} diff --git a/src/main/java/common/security/XSSRequestWrapper.java b/src/main/java/common/security/XSSRequestWrapper.java new file mode 100644 index 0000000..a78afe0 --- /dev/null +++ b/src/main/java/common/security/XSSRequestWrapper.java @@ -0,0 +1,63 @@ +package common.security; + +import java.util.regex.Pattern; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletRequestWrapper; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class XSSRequestWrapper extends HttpServletRequestWrapper { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + private static Pattern[] patterns = new Pattern[] { + Pattern.compile("", Pattern.CASE_INSENSITIVE), + Pattern.compile("src[\r\n]*=[\r\n]*\\\'(.*?)\\\'", + Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL), + Pattern.compile("src[\r\n]*=[\r\n]*\\\"(.*?)\\\"", + Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL), + Pattern.compile("", Pattern.CASE_INSENSITIVE), + Pattern.compile("", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL), + Pattern.compile("eval\\((.*?)\\)", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL), + Pattern.compile("expression\\((.*?)\\)", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL), + Pattern.compile("javascript:", Pattern.CASE_INSENSITIVE), + Pattern.compile("vbscript:", Pattern.CASE_INSENSITIVE), + Pattern.compile("onload(.*?)=", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL) + }; + + public XSSRequestWrapper(HttpServletRequest req) { + super(req); + } + + public String getHeader(String name) { + log.debug("getHeader"); + String value = super.getHeader(name); + return stripXSS(value); + } + + public String getParameter(String para) { + log.debug("getParameter"); + String value = super.getParameter(para); + return stripXSS(value); + } + + private String stripXSS(String value) { + log.debug("stripXSS : value = " + value); + if (value != null) { + value = value.replaceAll("\0", ""); + + // Remove all sections that match a pattern + for (Pattern scriptPattern : patterns) { + if (scriptPattern.matcher(value).matches()) { + System.out.println("match....."); + value = value.replaceAll("<", "<").replaceAll(">", ">"); + } + } + } + log.debug("result : " + value); + return value; + } + +} diff --git a/src/main/java/common/utill/UtillsTimeChack.java b/src/main/java/common/utill/UtillsTimeChack.java new file mode 100644 index 0000000..3adbc2f --- /dev/null +++ b/src/main/java/common/utill/UtillsTimeChack.java @@ -0,0 +1,31 @@ +package common.utill; + +/** + * @author Administrator + * + * 소모시간 체크용 + */ +public class UtillsTimeChack { + long start; + long end; + + public long getStart() { + return start; + } + + public void setStart() { + this.start = System.currentTimeMillis(); + } + + public long getEnd() { + return end; + } + + public void setEnd() { + this.end = System.currentTimeMillis(); // 종료시간 + } + + public long getTime() { + return end - start; + } +} diff --git a/src/main/java/common/utill/UtilsEmpty.java b/src/main/java/common/utill/UtilsEmpty.java new file mode 100644 index 0000000..e64a31f --- /dev/null +++ b/src/main/java/common/utill/UtilsEmpty.java @@ -0,0 +1,38 @@ +package common.utill; + +import java.util.List; +import java.util.Map; + +/** + * 오브젝트 내용의 존재 확인을 위해서 만듬 + * + * @author Administrator + * + */ +public class UtilsEmpty { + /** + * 내용이 없을경우 트루 반환 + * + * @param s + * @return + */ + public static boolean isEmpty(Object s) { + if (s == null) { + return true; + } + if ((s instanceof String) && (((String) s).trim().length() == 0)) { + return true; + } + if (s instanceof Map) { + return ((Map) s).isEmpty(); + } + if (s instanceof List) { + return ((List) s).isEmpty(); + } + if (s instanceof Object[]) { + return (((Object[]) s).length == 0); + } + return false; + } + +} diff --git a/src/main/java/common/utill/UtilsFile.java b/src/main/java/common/utill/UtilsFile.java new file mode 100644 index 0000000..c22e8e8 --- /dev/null +++ b/src/main/java/common/utill/UtilsFile.java @@ -0,0 +1,253 @@ +package common.utill; + +import java.io.File; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.io.FileUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; + +/** + * @author Administrator + * 파일 저장및 읽기 구현 + * http://addio3305.tistory.com/84 참고자료 + * 참고로 커먼에 있던 기능을 여기로 옮김. + */ +@Component("fileUtils") +public class UtilsFile { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + private String filePath = "d:\\file\\"; + + /** + * 파일 업로드 기능,크기 제한 없음, 다중 파일 처리 + * + * @param map + * @param request + * @return + * @throws Exception + */ + public Map>> parseInsertFileInfo( + Map map, + HttpServletRequest request) + throws Exception { + return parseInsertFileInfo(map, request, 0); + } + + /** + * 파일 업로드 기능, 업로드 크기 제한 가능, 다중 파일 처리 + * + * @param map + * @param request + * @param fileMaxSize + * 최대 크기 사이즈. 단위: 바이트. 기본값 :0=무한대 + * @return + * @throws Exception + */ + public Map>> parseInsertFileInfo( + Map map, + HttpServletRequest request, + long fileMaxSize) + throws Exception { + MultipartHttpServletRequest multipartHttpServletRequest = (MultipartHttpServletRequest) request; + Iterator iterator = multipartHttpServletRequest.getFileNames(); + + MultipartFile multipartFile = null; + String originalFileName = null; + String originalFileExtension = null; + String storedFileName = null; + + List> list = new ArrayList>(); + List> listFail = new ArrayList>(); + Map listMap = null; + + String boardIdx = (String) map.get("IDX"); + + File file = new File(filePath); + if (file.exists() == false) { + file.mkdirs(); + } + + while (iterator.hasNext()) { + + multipartFile = multipartHttpServletRequest.getFile(iterator.next()); + + if (multipartFile.isEmpty() == false) { + + log.debug("FILE_SIZE:" + multipartFile.getSize()); + originalFileName = multipartFile.getOriginalFilename(); + + // 파일 크기 확이 + if (fileMaxSize == 0 || multipartFile.getSize() < fileMaxSize) { + + originalFileExtension = originalFileName.substring(originalFileName.lastIndexOf(".")); + storedFileName = UtilsUUID.getRandomString() + originalFileExtension; + + file = new File(filePath + storedFileName); + multipartFile.transferTo(file); + + // 업로드 성공 리스트 작성 + listMap = new HashMap(); + listMap.put("BOARD_IDX", boardIdx); + listMap.put("ORIGINAL_FILE_NAME", originalFileName); + listMap.put("STORED_FILE_NAME", storedFileName); + listMap.put("FILE_SIZE", multipartFile.getSize()); + list.add(listMap); + } else { + // 업로드 실패 리스트 작성 + listMap = new HashMap(); + listMap.put("ORIGINAL_FILE_NAME", originalFileName); + listMap.put("FILE_SIZE", multipartFile.getSize()); + listFail.add(listMap); + } + } + } + Map>> mapReturn = new HashMap>>(); + mapReturn.put("list", list); + mapReturn.put("listFail", listFail); + return mapReturn; + } + + /** + * 파일 다운로드 기능 + * + * @param response + * @param storedFileName + * @param originalFileName + * @throws IOException + * @throws UnsupportedEncodingException + */ + public void readFile(HttpServletResponse response, String storedFileName, String originalFileName) + throws IOException, UnsupportedEncodingException { + byte fileByte[] = FileUtils.readFileToByteArray(new File(filePath + storedFileName)); + + response.setContentType("application/octet-stream"); + response.setContentLength(fileByte.length); + response.setHeader("Content-Disposition", + "attachment; fileName=\"" + URLEncoder.encode(originalFileName, "UTF-8") + "\";"); + response.setHeader("Content-Transfer-Encoding", "binary"); + response.getOutputStream().write(fileByte); + + response.getOutputStream().flush(); + response.getOutputStream().close(); + } + + /** + * 현재 업로드된 파일 내용 확인 + * + * @param request + */ + public void fileChack(HttpServletRequest request) { + MultipartHttpServletRequest multipartHttpServletRequest = (MultipartHttpServletRequest) request; + Iterator iterator = multipartHttpServletRequest.getFileNames(); + MultipartFile multipartFile = null; + while (iterator.hasNext()) { + multipartFile = multipartHttpServletRequest.getFile(iterator.next()); + if (multipartFile.isEmpty() == false) { + log.debug("------------- file start -------------"); + log.debug("name : " + multipartFile.getName()); + log.debug("filename : " + multipartFile.getOriginalFilename()); + log.debug("size : " + multipartFile.getSize()); + log.debug("-------------- file end --------------"); + } + } + } + + /** + * 단일 파일 업로드 예제 + * + * @param file + * @param request + * @return + * @throws IllegalStateException + * @throws IOException + */ + public String fileUpload(MultipartFile file, HttpServletRequest request) throws IllegalStateException, IOException { + + String real_name = null; + String org_name = file.getOriginalFilename(); + + if (org_name != null && (!org_name.equals(""))) { + real_name = "board_" + System.currentTimeMillis() + "_" + org_name; + // String docRoot = + // request.getSession().getServletContext().getRealPath("/uploadStorage"); + String docRoot = "d:/file"; + File fileDir = new File(docRoot); + if (!fileDir.exists()) { + fileDir.mkdir(); + } + File fileAdd = new File(docRoot + "/" + real_name); + log.info("---------------------***docRoot : " + docRoot); + file.transferTo(fileAdd); + } + return real_name; + } + + public List> parseUpdateFileInfo(Map map, HttpServletRequest request) + throws Exception { + + MultipartHttpServletRequest multipartHttpServletRequest = (MultipartHttpServletRequest) request; + Iterator iterator = multipartHttpServletRequest.getFileNames(); + + MultipartFile multipartFile = null; + String originalFileName = null; + String originalFileExtension = null; + String storedFileName = null; + + List> list = new ArrayList>(); + Map listMap = null; + + String boardIdx = (String) map.get("IDX"); + String requestName = null; + String idx = null; + + while (iterator.hasNext()) { + + multipartFile = multipartHttpServletRequest.getFile(iterator.next()); + + if (multipartFile.isEmpty() == false) { + // 첨부된 파일명에 내용이 있을경우. 새로 첨부된 파일 + originalFileName = multipartFile.getOriginalFilename(); + originalFileExtension = originalFileName.substring(originalFileName.lastIndexOf(".")); + storedFileName = UtilsUUID.getRandomString() + originalFileExtension; + + multipartFile.transferTo(new File(filePath + storedFileName)); + + listMap = new HashMap(); + listMap.put("IS_NEW", "Y"); + listMap.put("BOARD_IDX", boardIdx); + listMap.put("ORIGINAL_FILE_NAME", originalFileName); + listMap.put("STORED_FILE_NAME", storedFileName); + listMap.put("FILE_SIZE", multipartFile.getSize()); + list.add(listMap); + + } else { + // 첨부된 파일명에 내용이 없을경우. 기존 게시판에 있던 파일 + requestName = multipartFile.getName(); + idx = "IDX_" + requestName.substring(requestName.indexOf("_") + 1); + + if (map.containsKey(idx) == true && map.get(idx) != null) { + listMap = new HashMap(); + listMap.put("IS_NEW", "N"); + listMap.put("FILE_IDX", map.get(idx)); + list.add(listMap); + } + } + } + return list; + } +} diff --git a/src/main/java/common/utill/UtilsPage.java b/src/main/java/common/utill/UtilsPage.java new file mode 100644 index 0000000..f5de787 --- /dev/null +++ b/src/main/java/common/utill/UtilsPage.java @@ -0,0 +1,148 @@ +package common.utill; + +import org.springframework.ui.Model; + +public class UtilsPage { + + private int totalRowCount; // 전체글의 갯수 + private int pageNum; // 현재 페이지 번호 + private int startRow; // 시작행번호 + private int endRow; // 끝 행번호 + private int totalPageCount; // 전체페이지갯수 + private int startPageNum; // 시작페이지번호 + private int endPageNum; // 끝페이지번호 + private int rowBlockCount; // 보여줄 글의 행갯수 + private int pageBlockCount; // 한페이지에 보여줄 페이지 갯수 + + public UtilsPage() { + // TODO Auto-generated constructor stub + } + /** + * tlwkrgod + * @param pageNum + * 현재페이지번호 + * @param totalRowCount + * 전체글의 갯수 + * @param rowBlockCount + * 한페이지에 보여줄 글의 갯수 + * @param pageBlockCount + * 한페이지에 보여줄 페이지의 갯수 + * @param model + */ + public UtilsPage(int pageNum, int totalRowCount, int rowBlockCount, int pageBlockCount,Model model) { + // TODO Auto-generated constructor stub + this(pageNum, totalRowCount, rowBlockCount, pageBlockCount); + model.addAttribute("totalRowCount", totalRowCount); + model.addAttribute("pageNum", pageNum); + model.addAttribute("startRow", startRow); + model.addAttribute("endRow", endRow); + model.addAttribute("totalPageCount", totalPageCount); + model.addAttribute("startPageNum", startPageNum); + model.addAttribute("endPageNum", endPageNum); + model.addAttribute("rowBlockCount", rowBlockCount); + model.addAttribute("pageBlockCount", pageBlockCount); + } + + /** + * + * @param pageNum + * 현재페이지번호 + * @param totalRowCount + * 전체글의 갯수 + * @param rowBlockCount + * 한페이지에 보여줄 글의 갯수 + * @param pageBlockCount + * 한페이지에 보여줄 페이지의 갯수 + */ + public UtilsPage(int pageNum, int totalRowCount, int rowBlockCount, int pageBlockCount) { + this.pageNum = pageNum; + this.totalRowCount = totalRowCount; + this.rowBlockCount = rowBlockCount; + this.pageBlockCount = pageBlockCount; + // 시작행번호 구하기 + startRow = (pageNum - 1) * rowBlockCount + 1; + // 끝행번호 구하기 + endRow = startRow + rowBlockCount - 1; + // 전체 페이지 갯수 구하기 + totalPageCount = (int) Math.ceil(totalRowCount / (double) rowBlockCount); + // 시작페이지번호 구하기 + startPageNum = (pageNum - 1) / pageBlockCount * pageBlockCount + 1; + // 끝페이지번호 구하기 + endPageNum = startPageNum + pageBlockCount - 1; + if (totalPageCount < endPageNum) { + endPageNum = totalPageCount; + } + } + + public int getPageNum() { + return pageNum; + } + + public void setPageNum(int pageNum) { + this.pageNum = pageNum; + } + + public int getStartRow() { + return startRow; + } + + public void setStartRow(int startRow) { + this.startRow = startRow; + } + + public int getEndRow() { + return endRow; + } + + public void setEndRow(int endRow) { + this.endRow = endRow; + } + + public int getTotalPageCount() { + return totalPageCount; + } + + public void setTotalPageCount(int totalPageCount) { + this.totalPageCount = totalPageCount; + } + + public int getStartPageNum() { + return startPageNum; + } + + public void setStartPageNum(int startPageNum) { + this.startPageNum = startPageNum; + } + + public int getEndPageNum() { + return endPageNum; + } + + public void setEndPageNum(int endPageNum) { + this.endPageNum = endPageNum; + } + + public int getRowBlockCount() { + return rowBlockCount; + } + + public void setRowBlockCount(int rowBlockCount) { + this.rowBlockCount = rowBlockCount; + } + + public int getPageBlockCount() { + return pageBlockCount; + } + + public void setPageBlockCount(int pageBlockCount) { + this.pageBlockCount = pageBlockCount; + } + + public int getTotalRowCount() { + return totalRowCount; + } + + public void setTotalRowCount(int totalRowCount) { + this.totalRowCount = totalRowCount; + } +} diff --git a/src/main/java/common/utill/UtilsUUID.java b/src/main/java/common/utill/UtilsUUID.java new file mode 100644 index 0000000..1cdc4f2 --- /dev/null +++ b/src/main/java/common/utill/UtilsUUID.java @@ -0,0 +1,27 @@ +package common.utill; + +import java.util.UUID; + +public class UtilsUUID { + + public static String getRandomString() { + return UUID.randomUUID().toString();//.replaceAll("-", "") + } + + /** + * UUID 형식의 문자열을 UUID으로 변환시켜줌.. + * + * @param name + * @return + */ + public static UUID getFromString(String name) { + return UUID.fromString(name); + } + + public static void main(String[] args) { + System.out.println(UtilsUUID.getRandomString()); + System.out.println(UtilsUUID.getRandomString()); + System.out.println(UtilsUUID.getRandomString()); + + } +} diff --git a/src/main/java/defult/DefultController.java b/src/main/java/defult/DefultController.java new file mode 100644 index 0000000..d0ad235 --- /dev/null +++ b/src/main/java/defult/DefultController.java @@ -0,0 +1,48 @@ +package defult; + +import java.text.DateFormat; +import java.util.Date; +import java.util.Locale; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * Handles requests for the application home page. + */ +@Controller +public class DefultController { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + /** + * Simply selects the home view to render by returning its name. + */ + @RequestMapping(value = "/", method = RequestMethod.GET) + public String defult(Locale locale, Model model) { + log.info("Welcome home! The client locale is {}.", locale); + + Date date = new Date(); + DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); + + String formattedDate = dateFormat.format(date); + + model.addAttribute("serverTime", formattedDate ); + + return "defult"; + } + + @RequestMapping(value = "/{jsp}") + // @ResponseBody + public String defultJsp(Model model, @PathVariable String jsp) { + + log.info("defultJsp:" + jsp); + + return jsp; + } +} diff --git a/src/main/java/first/AbstractDAO.java b/src/main/java/first/AbstractDAO.java new file mode 100644 index 0000000..05f10b7 --- /dev/null +++ b/src/main/java/first/AbstractDAO.java @@ -0,0 +1,133 @@ +package first; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.mybatis.spring.SqlSessionTemplate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.util.StringUtils; + +import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; + +public class AbstractDAO { + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @Autowired + @Qualifier("firstTemplate") + private SqlSessionTemplate sqlSession; + + protected void printQueryId(String queryId) { + if (log.isDebugEnabled()) { + log.debug("QueryId \t: " + queryId); + } + } + + public Object insert(String queryId, Object params) { + printQueryId(queryId); + return sqlSession.insert(queryId, params); + } + + public Object update(String queryId, Object params) { + printQueryId(queryId); + return sqlSession.update(queryId, params); + } + + public Object delete(String queryId, Object params) { + printQueryId(queryId); + return sqlSession.delete(queryId, params); + } + + public Object selectOne(String queryId) { + printQueryId(queryId); + return sqlSession.selectOne(queryId); + } + + public Object selectOne(String queryId, Object params) { + printQueryId(queryId); + return sqlSession.selectOne(queryId, params); + } + + @SuppressWarnings("rawtypes") + public List selectList(String queryId) { + printQueryId(queryId); + return sqlSession.selectList(queryId); + } + + @SuppressWarnings("rawtypes") + public List selectList(String queryId, Object params) { + printQueryId(queryId); + return sqlSession.selectList(queryId, params); + } + + /** + * 페이징 처리용 + * + * @param queryId + * @param params + * @return + */ + @SuppressWarnings({ + "rawtypes", "unchecked" + }) + public Map selectPagingList(String queryId, Object params) { + printQueryId(queryId); + + Map map = (Map) params; + PaginationInfo paginationInfo = null; + + //현재 페이지 번호 처리 + if (map.containsKey("currentPageNo") == false || StringUtils.isEmpty(map.get("currentPageNo")) == true) + map.put("currentPageNo", "1"); + + if (log.isDebugEnabled()) { + log.debug("currentPageNo : {}",map.get("currentPageNo")); + } + + //전자정부 페이징 처리 + paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(Integer.parseInt(map.get("currentPageNo").toString())); + + //페이지당 표현 행수 + if (map.containsKey("PAGE_ROW") == false || StringUtils.isEmpty(map.get("PAGE_ROW")) == true) { + paginationInfo.setRecordCountPerPage(15); + } else { + paginationInfo.setRecordCountPerPage(Integer.parseInt(map.get("PAGE_ROW").toString())); + } + + //화면에 보여줄 페이지 갯수 + paginationInfo.setPageSize(10); + + //시작,끝 페이지 계산 + int start = paginationInfo.getFirstRecordIndex(); + int end = start + paginationInfo.getRecordCountPerPage(); + map.put("START", start + 1); + map.put("END", end); + + params = map; + + Map returnMap = new HashMap(); + List> list = sqlSession.selectList(queryId, params); + + if (list.size() == 0) { + map = new HashMap(); + map.put("TOTAL_COUNT", 0); + list.add(map); + + if (paginationInfo != null) { + paginationInfo.setTotalRecordCount(0); + returnMap.put("paginationInfo", paginationInfo); + } + } else { + if (paginationInfo != null) { + paginationInfo.setTotalRecordCount(Integer.parseInt(list.get(0).get("TOTAL_COUNT").toString())); + returnMap.put("paginationInfo", paginationInfo); + } + } + returnMap.put("result", list); + return returnMap; + } +} diff --git a/src/main/java/first/CommandMap.java b/src/main/java/first/CommandMap.java new file mode 100644 index 0000000..cae47f9 --- /dev/null +++ b/src/main/java/first/CommandMap.java @@ -0,0 +1,87 @@ +package first; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.servlet.mvc.support.RedirectAttributes; + +import java.util.Set; + +public class CommandMap { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + Map map = new HashMap(); + + public Object get(String key) { + return map.get(key); + } + + public void put(String key, Object value) { + map.put(key, value); + } + + public Object remove(String key) { + return map.remove(key); + } + + public boolean containsKey(String key) { + return map.containsKey(key); + } + + public boolean containsValue(Object value) { + return map.containsValue(value); + } + + public void clear() { + map.clear(); + } + + public Set> entrySet() { + return map.entrySet(); + } + + public Set keySet() { + return map.keySet(); + } + + public boolean isEmpty() { + return map.isEmpty(); + } + + public void putAll(Map m) { + map.putAll(m); + } + + public Map getMap() { + return map; + } + + /** + * 리다이랙트시 키갑을 그대로 넘겨줌 + * + * @param redirect + * @return + */ + public void redirect(RedirectAttributes redirect) { + for (String key : map.keySet()) { + redirect.addFlashAttribute(key, map.get(key)); + } + } + + public void mapPrint() { + if (log.isDebugEnabled()) { + if (map.isEmpty()) { + log.debug("Map is empty!"); + } else { + for (String key : map.keySet()) { + log.debug("key:{} \t value:{}", key, map.get(key)); + } + } + } + } +} diff --git a/src/main/java/first/FirstController.java b/src/main/java/first/FirstController.java new file mode 100644 index 0000000..cd9a0b4 --- /dev/null +++ b/src/main/java/first/FirstController.java @@ -0,0 +1,227 @@ +package first; + +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.support.RedirectAttributes; + +import common.utill.UtilsEmpty; +import common.utill.UtilsUUID; +import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; + +@Controller +public class FirstController { + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @Resource(name = "FirstService") + private FirstService service; + + /** + * http://localhost:8080/defult/first/openSampleBoardList + * 게시판 목록 + * + * @param commandMap + * @return + * @throws Exception + */ + @RequestMapping(value = { + "/openBoardList" + }) + public ModelAndView openBoardList(Map commandMap) throws Exception { + ModelAndView mv = new ModelAndView("boardList"); + + List> list = service.selectBoardList(commandMap); + mv.addObject("list", list); + + // commandMap.mapPrint(); + // Map resultMap = + // service.selectBoardList(commandMap.getMap()); + // + // if (log.isDebugEnabled()) { + // log.debug("paginationInfo" + + // resultMap.get("paginationInfo").toString()); + // log.debug("result" + resultMap.get("result").toString()); + // } + + // mv.addObject("paginationInfo", (PaginationInfo) + // resultMap.get("paginationInfo")); + // mv.addObject("list", resultMap.get("result")); + + return mv; + } + + @RequestMapping(value = { + "/openBoardListPaging", "/" + }) + public ModelAndView openBoardListPaging(CommandMap commandMap) throws Exception { + ModelAndView mv = new ModelAndView("boardList"); + + Map resultMap = service.selectBoardListPaging(commandMap.getMap()); + + mv.addObject("paginationInfo", (PaginationInfo) resultMap.get("paginationInfo")); + mv.addObject("list", resultMap.get("result")); + + return mv; + } + + /** + * http://localhost:8080/defult/first/testMapArgumentResolver?aaa=value1&bbb + * =value2 + * + * @param commandMap + * @return + * @throws Exception + */ + @RequestMapping(value = "/testMapArgumentResolver") + public ModelAndView testMapArgumentResolver(CommandMap commandMap) throws Exception { + log.debug("testMapArgumentResolver"); + + ModelAndView mv = new ModelAndView(""); + + if (commandMap.isEmpty() == false) { + Iterator> iterator = commandMap.getMap().entrySet().iterator(); + Entry entry = null; + while (iterator.hasNext()) { + entry = iterator.next(); + log.debug("key : " + entry.getKey() + ", value : " + entry.getValue()); + } + } + return mv; + } + + @RequestMapping(value = "/openBoardWrite") + public String openBoardWrite(CommandMap commandMap, HttpSession session) throws Exception { + log.debug("openBoardWrite"); + + session.setAttribute("CSRF_TOKEN", UtilsUUID.getRandomString()); + log.debug("CSRF_TOKEN:" + session.getAttribute("CSRF_TOKEN")); + + return "boardWrite"; + // ModelAndView mv = new ModelAndView("boardWrite"); + + // return mv; + + } + + /** + * 실제로 글쓴 내용을 디비에 저장 + * + * @param commandMap + * @param request + * @return + * @throws Exception + */ + @RequestMapping(value = "/insertBoard", method = RequestMethod.POST) + public String insertBoard( + CommandMap commandMap, + HttpServletRequest request, + HttpServletResponse response, + RedirectAttributes redirect) throws Exception { + // ModelAndView mv = new ModelAndView("redirect:openBoardList"); + + // log.debug("TITLE:"+commandMap.get("TITLE")); + + if (UtilsEmpty.isEmpty(commandMap.get("TITLE"))) { + // response.sendRedirect("boardList"); + // redirect.addFlashAttribute("CONTENTS", + // commandMap.get("CONTENTS")); + commandMap.redirect(redirect); + redirect.addFlashAttribute("msg", "TITLE 내용이 없습니다"); + return "redirect:openBoardWrite"; + } + if (UtilsEmpty.isEmpty(commandMap.get("CONTENTS"))) { + // response.sendRedirect("boardList"); + // redirect.addFlashAttribute("TITLE", commandMap.get("TITLE")); + commandMap.redirect(redirect); + redirect.addFlashAttribute("msg", "CONTENTS 내용이 없습니다"); + return "redirect:openBoardWrite"; + } + + List> faillist = service.insertBoard(commandMap.getMap(), request); + + log.debug("UtilsEmpty.isEmpty(faillist)" + UtilsEmpty.isEmpty(faillist)); + log.debug("faillist:" + faillist); + if (!UtilsEmpty.isEmpty(faillist)) { + // mv.addObject("failList", faillist); + redirect.addFlashAttribute("msg", faillist); + } + + return "redirect:openBoardList"; + } + + @RequestMapping(value = "/openBoardDetail") + public ModelAndView openBoardDetail(CommandMap commandMap) throws Exception { + ModelAndView mv = new ModelAndView("boardDetail"); + + Map map = service.selectBoardDetail(commandMap.getMap()); + mv.addObject("map", map.get("map"));// 기존 상세글 + // log.debug(map.get("list")==null); + // log.debug(map.get("list").equals("")); + log.debug("UtilsEmpty.isEmpty(map.get:" + UtilsEmpty.isEmpty(map.get("list"))); + + if (!UtilsEmpty.isEmpty(map.get("list"))) + mv.addObject("list", map.get("list"));// 첨부파일 목록 + + return mv; + } + + @RequestMapping(value = "/openBoardUpdate") + public ModelAndView openBoardUpdate(CommandMap commandMap) throws Exception { + + log.debug("openBoardUpdate"); + + ModelAndView mv = new ModelAndView("boardUpdate"); + + Map map = service.selectBoardDetail(commandMap.getMap()); + + mv.addObject("map", map.get("map")); + if (!UtilsEmpty.isEmpty(map.get("list"))) + mv.addObject("list", map.get("list")); + + return mv; + } + + @RequestMapping(value = "/updateBoard", method = RequestMethod.POST) + public ModelAndView updateBoard(CommandMap commandMap, HttpServletRequest request) throws Exception { + ModelAndView mv = new ModelAndView("redirect:openBoardDetail"); + + service.updateBoard(commandMap.getMap(), request); + + mv.addObject("IDX", commandMap.get("IDX")); + return mv; + } + + @RequestMapping(value = "/deleteBoard", method = RequestMethod.POST) + public ModelAndView deleteBoard(CommandMap commandMap) throws Exception { + ModelAndView mv = new ModelAndView("redirect:openBoardList"); + + service.deleteBoard(commandMap.getMap()); + + return mv; + } + + @RequestMapping(value = { + "/insertBoard", "/updateBoard", "/deleteBoard" + }) + public String BoardNotPost(CommandMap commandMap, HttpServletRequest request, RedirectAttributes redirect) + throws Exception { + // request.setAttribute("msg", "잘못된 요청 방법 입니다.");//리다이랙트로는 안넘어감 + redirect.addFlashAttribute("msg", "잘못된 요청 방법 입니다."); + // redirect.addFlashAttribute("param1", "나의파람"); + // redirect.addFlashAttribute("param2", "나의파람2"); + return "redirect:openBoardList"; + } +} diff --git a/src/main/java/first/FirstDAO.java b/src/main/java/first/FirstDAO.java new file mode 100644 index 0000000..46f35bb --- /dev/null +++ b/src/main/java/first/FirstDAO.java @@ -0,0 +1,58 @@ +package first; + +import java.util.List; +import java.util.Map; + +import org.springframework.stereotype.Repository; + +@Repository("FirstDAO") +public class FirstDAO extends AbstractDAO { + + //@SuppressWarnings("unchecked") + public List> selectBoardList(Map map) throws Exception { + return (List>)selectList("First.selectBoardList", map); + } + + public void insertBoard(Map map) { + // TODO Auto-generated method stub + insert("First.insertBoard", map); + } + + public void updateHitCnt(Map map) throws Exception { + update("First.updateHitCnt", map); + } + + // @SuppressWarnings("unchecked") + public Map selectBoardDetail(Map map) throws Exception { + return (Map) selectOne("First.selectBoardDetail", map); + } + + public void updateBoard(Map map) throws Exception { + update("First.updateBoard", map); + } + + public void deleteBoard(Map map) throws Exception { + update("First.deleteBoard", map); + } + + public void insertFile(Map map) throws Exception{ + insert("First.insertFile", map); + } + + //@SuppressWarnings("unchecked") + public List> selectFileList(Map map) throws Exception{ + return (List>)selectList("First.selectFileList", map); + } + + public void deleteFileList(Map map) throws Exception{ + update("First.deleteFileList", map); + } + + public void updateFile(Map map) throws Exception{ + update("First.updateFile", map); + } + + public Map selectBoardListPaging(Map map) throws Exception{ + return (Map)selectPagingList("First.selectBoardListPaging", map); + } +} diff --git a/src/main/java/first/FirstService.java b/src/main/java/first/FirstService.java new file mode 100644 index 0000000..fff385e --- /dev/null +++ b/src/main/java/first/FirstService.java @@ -0,0 +1,102 @@ +package first; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import common.utill.UtilsEmpty; +import common.utill.UtilsFile; + +@Service("FirstService") +public class FirstService { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @Resource(name = "fileUtils") + private UtilsFile fileUtils; + + @Resource(name = "FirstDAO") + private FirstDAO dao; + + public List> selectBoardList(Map map) throws Exception { + return dao.selectBoardList(map); + } + + public List> insertBoard(Map map, HttpServletRequest request) throws Exception { + dao.insertBoard(map); + + // 파일 들어온거 확인용 + fileUtils.fileChack(request); + + //파일 저장 처리 + Map>> listReturn = fileUtils.parseInsertFileInfo(map, request,1024*50); + List> list=listReturn.get("list"); + //파일저장된 정보를 db로 저장 + for (int i = 0, size = list.size(); i < size; i++) { + dao.insertFile(list.get(i)); + } + //실패한 리스트 반환 + return listReturn.get("listFail"); + } + + + + public Map selectBoardDetail(Map map) throws Exception { + // TODO Auto-generated method stub + dao.updateHitCnt(map); + + Map resultMap = new HashMap(); + + // 기존 상세글 + Map tempMap = dao.selectBoardDetail(map); + resultMap.put("map", tempMap); + + // 파일 리스트 + List> list = dao.selectFileList(map); + // log.debug(list); + // log.debug(list==null); + // log.debug(list.equals("")); + if (!UtilsEmpty.isEmpty(list)) + resultMap.put("list", list); + + return resultMap; + } + + public void updateBoard(Map map, HttpServletRequest request) throws Exception { + + dao.updateBoard(map);//게시판 내용 업데이트 + + dao.deleteFileList(map);//현재 등록됬던 파일들 DEL_GB = 'Y' 처리 + + //기존파일,새파일 분류 작업. 새파일은 저장. + List> list = fileUtils.parseUpdateFileInfo(map, request); + + Map tempMap = null; + + for(int i=0, size=list.size(); i map) throws Exception { + dao.deleteBoard(map); + } + + public Map selectBoardListPaging(Map map) throws Exception{ + // TODO Auto-generated method stub + return dao.selectBoardListPaging(map); + } +} diff --git a/src/main/java/miplatform/.gitignore b/src/main/java/miplatform/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/java/miplatform/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/java/miplatform/MiplatformController.java b/src/main/java/miplatform/MiplatformController.java new file mode 100644 index 0000000..0062ea6 --- /dev/null +++ b/src/main/java/miplatform/MiplatformController.java @@ -0,0 +1,48 @@ +package miplatform; + +import java.text.DateFormat; +import java.util.Date; +import java.util.Locale; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * Handles requests for the application home page. + */ +@Controller +public class MiplatformController { + + private static final Logger logger = LoggerFactory.getLogger(MiplatformController.class); + + /** + * Simply selects the home view to render by returning its name. + */ + @RequestMapping(value = "/", method = RequestMethod.GET) + public String miplatform(Locale locale, Model model) { + logger.info("Welcome miplatform! The client locale is {}.", locale); + + Date date = new Date(); + DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); + + String formattedDate = dateFormat.format(date); + + model.addAttribute("serverTime", formattedDate); + + return "defult"; + } + + @RequestMapping(value = "/{jsp}") + // @ResponseBody + public String miplatformJsp(Model model, @PathVariable String jsp) { + + logger.info("miplatform:" + jsp); + + return jsp; + } +} diff --git a/src/main/java/miplatform/SqlMapDeptDao.java b/src/main/java/miplatform/SqlMapDeptDao.java new file mode 100644 index 0000000..999c23b --- /dev/null +++ b/src/main/java/miplatform/SqlMapDeptDao.java @@ -0,0 +1,17 @@ +package miplatform; + +import java.util.List; + +import org.mybatis.spring.support.SqlSessionDaoSupport; +import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport; + +import scott.DeptVO; + +public class SqlMapDeptDao extends SqlMapClientDaoSupport { + + public List getDeptList() { + return getSqlMapClientTemplate().queryForList(""); + + } + +} diff --git a/src/main/java/miplatform/deptController.java b/src/main/java/miplatform/deptController.java new file mode 100644 index 0000000..2ed3726 --- /dev/null +++ b/src/main/java/miplatform/deptController.java @@ -0,0 +1,12 @@ +package miplatform; + +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.multiaction.MultiActionController; + +public class deptController extends MultiActionController { + + public ModelAndView name() { + return null; + + } +} diff --git a/src/main/java/sample/SampleController.java b/src/main/java/sample/SampleController.java new file mode 100644 index 0000000..ab7a462 --- /dev/null +++ b/src/main/java/sample/SampleController.java @@ -0,0 +1,171 @@ +package sample; + +import java.text.DateFormat; +import java.util.Date; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpRequest; +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.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import common.security.LucyXss; + +/** + * Handles requests for the application home page. + */ +@Controller +public class SampleController { + + private static final Logger logger = LoggerFactory.getLogger(SampleController.class); + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @Autowired + // @Autowired(required=false)//필수가 아닌경우 빈으로 등록 안하게 설정 + // @Qualifier("CommonService1")//는 타입으로(by type) ?아줌. 똑같은 클래스가 있을경우 + // CommonService1 라는 구분값으로 ?음 + // @Resource(name="testDao") //는 이름으로(by name) ?아줌 + private SampleService svc; + + /** + * 기본 경로 테스트 + * Simply selects the home view to render by returning its name. + */ + @RequestMapping(value = "/", method = RequestMethod.GET) + // @ResponseBody + public String sample(Locale locale, Model model) { + logger.info("Welcome home! The client locale is {}.", locale); + + Date date = new Date(); + DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); + + String formattedDate = dateFormat.format(date); + + model.addAttribute("serverTime", formattedDate); + + return "sample"; + } + + /** + * mvc 테스트 + * + * @param locale + * @param model + * @return + */ + @RequestMapping(value = "/sampleController", method = RequestMethod.GET) + @ResponseBody + public String sampleController(Locale locale, Model model) { + + logger.info("sampleController"); + + return svc.sampleService(locale, model); + } + + /** + * ResponseBody 테스트 + * + * @param locale + * @param model + * @return + */ + @RequestMapping(value = "/sampleResponseBody", method = RequestMethod.GET) + @ResponseBody + public String sampleResponseBody(Locale locale, Model model) { + + logger.info("sampleResponseBody"); + + return "sampleResponseBody"; + } + + /** + * ResponseBody 테스트 + * + * @param locale + * @param model + * @return + */ + @RequestMapping(value = "/sampleResponseBodyList", method = RequestMethod.GET) + @ResponseBody + public List sampleResponseBodyList(Locale locale, Model model) { + + logger.info("sampleResponseBodyList"); + + return svc.sampleList(locale, model); + } + + /** + * @param locale + * @param model + * @return + */ + @RequestMapping(value = "/sampleResponseBodyMap", method = RequestMethod.GET) + @ResponseBody + public Map sampleResponseBodyMap(Locale locale, Model model) { + + logger.info("sampleResponseBodyMap"); + + return svc.sampleMap(locale, model); + } + + /** + * 예제는 아래 파일로 + * /defult/src/main/webapp/test/xss_main.jsp + * + * @param locale + * @param model + * @param request + * @return + */ + @RequestMapping(value = "/xss_test") + public String xss_test(Locale locale, Model model, HttpServletRequest request) { + + logger.info("sampleResponseBodyMap"); + + // StringBuffer sb=new StringBuffer(); + // sb.append(request.getParameter("data")); + String data = request.getParameter("data"); + // log.debug(sb.toString()); + log.debug(data); + + data = LucyXss.doDefultFileSetNoComment1(data); + + log.debug(data); + + model.addAttribute("result", data); + + return "forward:/test/xss_result.jsp"; + } + + /** + * http://localhost:8080/defult/sample/xsstest + * + * @param req + * @param md + * @return + */ + @RequestMapping(value = "/xsstest") + public ModelAndView xsstest(HttpServletRequest req, Model md) { + + String data = req.getParameter("data"); + log.debug(data); + + // md.addAttribute("resultData", data); + // return "xsstest"; + + ModelAndView mv = new ModelAndView(); + mv.addObject("resultData", data); + mv.setViewName("/xsstest"); + return mv; + } +} diff --git a/src/main/java/sample/SampleDao.java b/src/main/java/sample/SampleDao.java new file mode 100644 index 0000000..fb2eabd --- /dev/null +++ b/src/main/java/sample/SampleDao.java @@ -0,0 +1,30 @@ +package sample; + +import org.mybatis.spring.SqlSessionTemplate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Repository; + +@Repository +// @Repository("CommonDao1") +public class SampleDao { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + // @Autowired + @Autowired(required = false) // 필수가 아닌경우 등록 안하게 설정 + @Qualifier("Template") // 는 타입으로(by type) 찿아줌. 똑같은 클래스가 + // 있을경우CommonService1 라는 구분값으로 찿음 + // @Resource(name="testDao") //는 이름으로(by name) 찿아줌 + private SqlSessionTemplate sql; + + public String sampleDAO() { + // TODO Auto-generated method stub + log.debug("sampleDAO"); + + return "sample MVC test"; + } + +} diff --git a/src/main/java/sample/SampleService.java b/src/main/java/sample/SampleService.java new file mode 100644 index 0000000..ca39d2a --- /dev/null +++ b/src/main/java/sample/SampleService.java @@ -0,0 +1,59 @@ +package sample; + +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.ui.Model; + +@Service +// @Service("CommonService1") +public class SampleService { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @Autowired + // @Qualifier("CommonDao1") + private SampleDao dao; + + public String sampleService(Locale locale, Model model) { + + log.debug("sampleService"); + + Date date = new Date(); + DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); + + String formattedDate = dateFormat.format(date); + + model.addAttribute("serverTime", formattedDate); + + return dao.sampleDAO(); + } + + public List sampleList(Locale locale, Model model) { + // TODO Auto-generated method stub + List list = new ArrayList(); + for (int i = 0; i < 9; i++) { + list.add("list" + i); + } + return list; + } + + public Map sampleMap(Locale locale, Model model) { + // TODO Auto-generated method stub + Map map=new HashMap(); + for (int i = 0; i < 9; i++) { + map.put("key"+i, "value"+i); + } + return map; + } + +} diff --git a/src/main/java/sample/SampleVO.java b/src/main/java/sample/SampleVO.java new file mode 100644 index 0000000..1426691 --- /dev/null +++ b/src/main/java/sample/SampleVO.java @@ -0,0 +1,23 @@ +package sample; + +public class SampleVO { + String id; + String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + +} diff --git a/src/main/java/sample/board/BoardController.java b/src/main/java/sample/board/BoardController.java new file mode 100644 index 0000000..8237b6d --- /dev/null +++ b/src/main/java/sample/board/BoardController.java @@ -0,0 +1,78 @@ +package sample.board; + +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * Handles requests for the application home page. + */ +@Controller +@RequestMapping(value = "/Board/*") +public class BoardController { + + private static final Logger logger = LoggerFactory.getLogger(BoardController.class); + + @Autowired + // @Autowired(required=false)//필수가 아닌경우 빈으로 등록 안하게 설정 + // @Qualifier("CommonService1")//는 타입으로(by type) ?아줌. 똑같은 클래스가 있을경우 + // CommonService1 라는 구분값으로 ?음 + // @Resource(name="testDao") //는 이름으로(by name) ?아줌 + private BoardService svc; + + @RequestMapping(value = "/{jsp}") + // @ResponseBody + public String Board(Model model, @PathVariable String jsp) { + + logger.info("Board:" + jsp); + + return jsp; + } + + /** + * http://localhost:8080/defult/sample/Board/BoardList + * mvc 테스트 + * + * @param locale + * @param model + * @return + */ + @RequestMapping(value = "/BoardList") + // @ResponseBody + public String BoardList(Model model) { + + logger.info("BoardList"); + + List list = svc.boardList(); + + model.addAttribute("BoardList", list); + + return "BoardList"; + } + + @RequestMapping(value = "/BoardInsert", method = RequestMethod.POST) + // @ResponseBody + public String BoardInsert(Model model, @ModelAttribute("BoardVO") BoardVO vo) { + + logger.info("BoardInsert"); + + int result = svc.BoardInsert(vo); + + model.addAttribute("result", result); + + BoardList(model); + + return "BoardList"; + // return "redirect:BoardList"; + // return "forward:BoardList"; + } + +} diff --git a/src/main/java/sample/board/BoardDao.java b/src/main/java/sample/board/BoardDao.java new file mode 100644 index 0000000..e25e9e3 --- /dev/null +++ b/src/main/java/sample/board/BoardDao.java @@ -0,0 +1,43 @@ +package sample.board; + +import java.util.List; + +import org.mybatis.spring.SqlSessionTemplate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Repository; + +@Repository +// @Repository("CommonDao1") +public class BoardDao { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + // @Autowired + @Autowired(required = false) // 필수가 아닌경우 등록 안하게 설정 + @Qualifier("defultTemplate") + // 는 타입으로(by type) 찿아줌. 똑같은 클래스가 있을경우boardTemplate 라는 구분값으로 찿음 + // @Resource(name="testDao") //는 이름으로(by name) 찿아줌 + private SqlSessionTemplate sql; + + public List boardList() { + // TODO Auto-generated method stub + + // 조회 테스트용 + // List list=sql.selectList("board.testboardSelect"); + + List list = sql.selectList("board.boardList"); + + return list; + } + + public int BoardInsert(BoardVO vo) { + // TODO Auto-generated method stub + int result=sql.insert("board.boardInsert",vo); + + return result; + } + +} diff --git a/src/main/java/sample/board/BoardService.java b/src/main/java/sample/board/BoardService.java new file mode 100644 index 0000000..f052893 --- /dev/null +++ b/src/main/java/sample/board/BoardService.java @@ -0,0 +1,36 @@ +package sample.board; + +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +// @Service("CommonService1") +public class BoardService { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @Autowired + // @Qualifier("CommonDao1") + private BoardDao dao; + + public List boardList() { + // TODO Auto-generated method stub + log.debug("boardList"); + + List list=dao.boardList(); + + return list; + } + + public int BoardInsert(BoardVO vo) { + // TODO Auto-generated method stub + int result=dao.BoardInsert(vo); + + return result; + } + +} diff --git a/src/main/java/sample/board/BoardVO.java b/src/main/java/sample/board/BoardVO.java new file mode 100644 index 0000000..b3eb5d7 --- /dev/null +++ b/src/main/java/sample/board/BoardVO.java @@ -0,0 +1,61 @@ +package sample.board; + +public class BoardVO { + + /* + * SELECT + * b_no, + * b_nick, + * b_pw, + * b_text, + * b_date + * FROM SAMPLE_BOARD + */ + + private int b_no; + private String b_nick; + private String b_pw; + private String b_text; + private String b_date; + + public int getB_no() { + return b_no; + } + + public void setB_no(int b_no) { + this.b_no = b_no; + } + + public String getB_nick() { + return b_nick; + } + + public void setB_nick(String b_nick) { + this.b_nick = b_nick; + } + + public String getB_pw() { + return b_pw; + } + + public void setB_pw(String b_pw) { + this.b_pw = b_pw; + } + + public String getB_text() { + return b_text; + } + + public void setB_text(String b_text) { + this.b_text = b_text; + } + + public String getB_date() { + return b_date; + } + + public void setB_date(String b_date) { + this.b_date = b_date; + } + +} diff --git a/src/main/java/scott/DeptController.java b/src/main/java/scott/DeptController.java new file mode 100644 index 0000000..ec27bd5 --- /dev/null +++ b/src/main/java/scott/DeptController.java @@ -0,0 +1,148 @@ +package scott; + +import java.io.IOException; +import java.util.HashMap; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +@Controller // 너는 C-M-V 중에 컨트롤러 계층이야. +@RequestMapping(value = "/dept/") +public class DeptController { + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + ///hy_spring4/WebContent/WEB-INF/spring-service.xml + @Autowired + public DeptLogic deptLogic = null; + + @RequestMapping(value = "/") + @ResponseBody + public String test() { + return "test"; + } + + @RequestMapping(value = "getDeptList.hy") + public String getDeptList(ModelMap model, @ModelAttribute("deptVO") DeptVO dvo, HttpServletRequest req) { + log.info("getDeptList 호출 성공"); + List dList = null; + dList = deptLogic.getDeptList(dvo); + // logger.info("dList.size()"+dList.size()); + // req.setAttribute("dList", dList);//POJO F/W + model.addAttribute("dList", dList);// spring + return "getDeptList"; +// return "forward:getDeptList.jsp"; + // String을 반환타입으로 하면 forward와 sendRedirect를 사용. + // forward를 사용하여 모델맵을 사용하면 모델을 넘길 수 있다. + } + + // 리턴타입이 ModelAndView인 경우. + /* + * 리턴타인이 String이냐, ModelAndView이냐에 따라 + * 응답페이지의 위치가 달라진다. + * == 배치를 다르게 해야한다.. + */ + @RequestMapping(value = "getDeptList2.hy") + public ModelAndView getDeptList2(@ModelAttribute("deptVO") DeptVO dvo, HttpServletRequest req) { + log.info("getDeptList 호출 성공"); + List dList = null; + dList = deptLogic.getDeptList2(dvo); + log.info("dList.size()" + dList.size()); + // req.setAttribute("dList", dList); + ModelAndView mav = new ModelAndView();// 인스턴스화 + mav.setViewName("getDeptList2");// setViewName은 응답페이지를 따라가게 되어있다. + // /WEB-INF/jsp/dept/xxxx.jsp 이라면 + // WEB-INF/jsp/dept/getDeptList2.jsp 를 가리키는 것이다. + // spring-servlet.xml을 보면 prefix,suffix로 해당내용을 의미하게 URL을 완성할 수 있다. + + /* 배치하는 이유 */ + // WebContents 안에 jsp는 서버에서 직접접근 가능하지만, + // WEB-INF는 보안상 직접접근 불가능(보안을 위해서라면 WEB-INF에 배치해야한다)->리턴타입을 모델 앤 뷰를 + // 사용해야한다. + mav.addObject("dList", dList);// req.setAttribute("dList", dList); 대체 + return mav; + } + + @RequestMapping(value = "deptInsert.hy") + public void deptInsert(HttpServletRequest req, HttpServletResponse res) { + log.info("deptInsert 호출 성공"); + String deptno = req.getParameter("deptno"); + String dname = req.getParameter("dname"); + String loc = req.getParameter("loc"); + DeptVO pdvo = new DeptVO(); + pdvo.setDeptno(Integer.parseInt(deptno)); + pdvo.setDname(dname); + pdvo.setLoc(loc); + int result = deptLogic.deptInsert(pdvo); + if (result == 1) {// 입력성공 + try { + res.sendRedirect("deptInsertOK.jsp"); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } else { + try { + res.sendRedirect("deptInsertFail.jsp"); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + log.info("result : " + result); + } + + @RequestMapping(value = "deptInsert2.hy") + public String deptInsert2(@ModelAttribute("deptVO") DeptVO dvo, HttpServletResponse res) throws IOException { + log.info("deptInsert 호출 성공"); + int result = deptLogic.deptInsert(dvo); + log.info("result : " + result); + if (result == 1) {// 입력성공 + return "forward:getDeptList.hy"; + } else { + return "forward:deptInsertFail.jsp"; + } + } + + @RequestMapping(value = "deptUpdate.hy") + public String deptUpdate(@ModelAttribute("deptVO") DeptVO dvo) throws IOException { + log.info("deptUpdate 호출 성공"); + int result = deptLogic.deptUpdate(dvo); + log.info("result : " + result); + if (result == 1) {// 입력성공 + return "forward:getDeptList.hy"; + } else { + return "forward:deptInsertFail.jsp"; + } + } + + @RequestMapping(value = "deptDelete.hy") + public String deptDelete(@ModelAttribute("deptVO") DeptVO dvo) throws IOException { + log.info("deptDelete 호출 성공"); + int result = deptLogic.deptDelete(dvo); + log.info("result : " + result); + if (result == 1) {// 입력성공 + return "forward:getDeptList.hy"; + } else { + return "forward:deptInsertFail.jsp"; + } + } + + @RequestMapping(value = "cudDept.hy") + public String cudDept(@ModelAttribute("deptVO") DeptVO dvo) throws IOException { + log.info("cudDept 호출 성공"); + int result = 0; + result = deptLogic.cudDept(dvo); + return "redirect:getDeptList.hy"; + } +} diff --git a/src/main/java/scott/DeptLogic.java b/src/main/java/scott/DeptLogic.java new file mode 100644 index 0000000..046e86c --- /dev/null +++ b/src/main/java/scott/DeptLogic.java @@ -0,0 +1,65 @@ +package scott; + +import java.util.HashMap; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class DeptLogic { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + // @Resource(name="deptMapper") + // public DeptMapper deptMapper = null; + + @Autowired + private SqlDeptDao sqlDeptDao = null; + + public List getDeptList(DeptVO dvo) { + log.info("getDeptList 호출 성공"); + List dList = null; + dList = sqlDeptDao.getDeptList(dvo); + return dList; + } + + public List getDeptList2(DeptVO dvo) { + log.info("getDeptList2 호출 성공"); + List dList = null; + dList = sqlDeptDao.getDeptList2(dvo); + return dList; + } + + public int deptInsert(DeptVO pdvo) { + log.info("deptInsert 호출 성공"); + int result = 0; + result = sqlDeptDao.deptInsert(pdvo); + return result; + } + + public int deptUpdate(DeptVO pdvo) { + log.info("deptUpdate 호출 성공"); + int result = 0; + result = sqlDeptDao.deptUpdate(pdvo); + return result; + } + + public int deptDelete(DeptVO pdvo) { + log.info("deptDelete 호출 성공"); + int result = 0; + result = sqlDeptDao.deptDelete(pdvo); + return result; + } + + public int cudDept(DeptVO dvo) { + int result = 0; + log.info("cudDept 호출 성공"); + result = sqlDeptDao.deptInsert(dvo); + log.info("result : " + result); + return result; + } + +} diff --git a/src/main/java/scott/DeptMapper.java b/src/main/java/scott/DeptMapper.java new file mode 100644 index 0000000..a415392 --- /dev/null +++ b/src/main/java/scott/DeptMapper.java @@ -0,0 +1,15 @@ +package scott; + +import java.util.HashMap; +import java.util.List; + +import org.springframework.stereotype.Repository; + +@Repository(value="deptMapper") +public interface DeptMapper { + public List getDeptList(DeptVO dvo); + public List getDeptList2(DeptVO dvo); + public int deptInsert(DeptVO dvo); + public int deptUpdate(DeptVO dvo); + public int deptDelete(DeptVO dvo); +} diff --git a/src/main/java/scott/DeptVO.java b/src/main/java/scott/DeptVO.java new file mode 100644 index 0000000..66969b1 --- /dev/null +++ b/src/main/java/scott/DeptVO.java @@ -0,0 +1,26 @@ +package scott; + +public class DeptVO { + private int deptno = 0; + private String dname = null; + private String loc = null; + public int getDeptno() { + return deptno; + } + public void setDeptno(int deptno) { + this.deptno = deptno; + } + public String getDname() { + return dname; + } + public void setDname(String dname) { + this.dname = dname; + } + public String getLoc() { + return loc; + } + public void setLoc(String loc) { + this.loc = loc; + } + +} diff --git a/src/main/java/scott/HangulConversion.java b/src/main/java/scott/HangulConversion.java new file mode 100644 index 0000000..6befcb7 --- /dev/null +++ b/src/main/java/scott/HangulConversion.java @@ -0,0 +1,31 @@ +package scott; + +public class HangulConversion { + + //�ѱ� ���ڵ� Ÿ������ �о ���� ���ڵ� Ÿ������ ��ȯ + public static String toEng(String ko){ + if(ko == null) return null; + try { + return new String(ko.getBytes("KSC5601"),"8859_1"); + } catch (Exception e) { + return ko; + } + } + //���� ���ڵ� Ÿ������ �о �ѱ� ���ڵ� Ÿ������ ��ȯ + public static String toKor(String en){ + if(en == null) return null; + try { + return new String(en.getBytes("8859_1"),"KSC5601"); + } catch (Exception e) { + return en; + } + } + public static String toUTF(String en){ + if(en == null) return null; + try { + return new String(en.getBytes("8859_1"),"utf-8"); + } catch (Exception e) { + return en; + } + } +} diff --git a/src/main/java/scott/ScottController.java b/src/main/java/scott/ScottController.java new file mode 100644 index 0000000..fbe1502 --- /dev/null +++ b/src/main/java/scott/ScottController.java @@ -0,0 +1,111 @@ +package scott; + +import java.text.DateFormat; +import java.util.Date; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +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.ResponseBody; + +/** + * Handles requests for the application home page. + */ +@Controller +public class ScottController { + + private static final Logger logger = LoggerFactory.getLogger(ScottController.class); + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + //@Autowired + // @Autowired(required=false)//필수가 아닌경우 빈으로 등록 안하게 설정 + // @Qualifier("CommonService1")//는 타입으로(by type) ?아줌. 똑같은 클래스가 있을경우 + // CommonService1 라는 구분값으로 ?음 + // @Resource(name="testDao") //는 이름으로(by name) ?아줌 + //private ScottService svc; + + /** + * 기본 경로 테스트 + * Simply selects the home view to render by returning its name. + */ + @RequestMapping(value = "/", method = RequestMethod.GET) + //@ResponseBody + public String sample(Locale locale, Model model) { + logger.info("Welcome home! The client locale is {}.", locale); + + Date date = new Date(); + DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); + + String formattedDate = dateFormat.format(date); + + model.addAttribute("serverTime", formattedDate ); + + return "scott"; + } + + /** + * mvc 테스트 + * @param locale + * @param model + * @return + */ +/* @RequestMapping(value = "/sampleController", method = RequestMethod.GET) + @ResponseBody + public String sampleController(Locale locale, Model model) { + + logger.info("sampleController"); + + return svc.sampleService(locale,model); + } + */ + /** + * ResponseBody 테스트 + * @param locale + * @param model + * @return + */ + @RequestMapping(value = "/sampleResponseBody", method = RequestMethod.GET) + @ResponseBody + public String sampleResponseBody(Locale locale, Model model) { + + logger.info("sampleResponseBody"); + + return "sampleResponseBody"; + } + + /** + * ResponseBody 테스트 + * @param locale + * @param model + * @return + */ + /*@RequestMapping(value = "/sampleResponseBodyList", method = RequestMethod.GET) + @ResponseBody + public List sampleResponseBodyList(Locale locale, Model model) { + + logger.info("sampleResponseBodyList"); + + return svc.sampleList(locale,model); + }*/ + + /** + * @param locale + * @param model + * @return + */ + /*@RequestMapping(value = "/sampleResponseBodyMap", method = RequestMethod.GET) + @ResponseBody + public Map sampleResponseBodyMap(Locale locale, Model model) { + + logger.info("sampleResponseBodyMap"); + + return svc.sampleMap(locale,model); + }*/ +} diff --git a/src/main/java/scott/SqlDeptDao.java b/src/main/java/scott/SqlDeptDao.java new file mode 100644 index 0000000..8e4dce0 --- /dev/null +++ b/src/main/java/scott/SqlDeptDao.java @@ -0,0 +1,62 @@ +package scott; + +import java.util.HashMap; +import java.util.List; + +import org.mybatis.spring.SqlSessionTemplate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Repository; + +@Repository +public class SqlDeptDao implements DeptMapper { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + @Autowired + @Qualifier("scottTemplate") + public SqlSessionTemplate sqlSession = null; + + @Override + public List getDeptList(DeptVO dvo) { + log.info("getDeptList ȣ�� ����"); + List deptList = null; + deptList = sqlSession.selectList("getDeptList", dvo); + return deptList; + } + + public List getDeptList2(DeptVO dvo) {// �ӵ��� ���� ��뷮 �����ͺ��̽����� ��ȣ. + log.info("getDeptList2 ȣ�� ����"); + List deptList = null; + deptList = sqlSession.selectList("getDeptList2", dvo); + log.info("getDeptList2 ȣ�� ����"); + return deptList; + } + + @Override + public int deptInsert(DeptVO dvo) { + log.info("deptInsert ȣ�� ����"); + int result = 0; + result = sqlSession.insert("deptInsert", dvo); + return result; + } + + @Override + public int deptUpdate(DeptVO dvo) { + log.info("deptUpdate ȣ�� ����"); + int result = 0; + result = sqlSession.update("deptUpdate", dvo); + return result; + } + + @Override + public int deptDelete(DeptVO dvo) { + log.info("deptDelete ȣ�� ����"); + int result = 0; + result = sqlSession.delete("deptDelete", dvo); + return result; + } + +} diff --git a/src/main/resources/ibatis/SQLMap.XML.bak b/src/main/resources/ibatis/SQLMap.XML.bak new file mode 100644 index 0000000..d821a71 --- /dev/null +++ b/src/main/resources/ibatis/SQLMap.XML.bak @@ -0,0 +1,66 @@ + + + + + + + + + + + FROM items + WHERE parentid = #value# + + + + \ No newline at end of file diff --git a/src/main/resources/jdbc.properties b/src/main/resources/jdbc.properties new file mode 100644 index 0000000..3bea819 --- /dev/null +++ b/src/main/resources/jdbc.properties @@ -0,0 +1,4 @@ +jdbc.driver = com.mysql.jdbc.Driver +jdbc.url = jdbc:mysql://localhost:3306/spring?useUnicode=yes&characterEncoding=UTF8&autoReconnect=true&autoReconnectForPools=true +jdbc.username = spring +jdbc.password = spring \ No newline at end of file diff --git a/src/main/resources/log4j.xml.bak b/src/main/resources/log4j.xml.bak new file mode 100644 index 0000000..110ac07 --- /dev/null +++ b/src/main/resources/log4j.xml.bak @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index 2ceaad3..91d9f31 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -1,25 +1,147 @@ + - + - - %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n + %-5level %logger - %msg%n - - - - + + + + %-5level %logger - %msg%n + + + + + + + %msg%n + + + + + + + %msg%n + + + + + + + %msg%n + + + + + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/lucy-xss-superset.xml b/src/main/resources/lucy-xss-superset.xml new file mode 100644 index 0000000..383461f --- /dev/null +++ b/src/main/resources/lucy-xss-superset.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/lucy-xss.xml b/src/main/resources/lucy-xss.xml new file mode 100644 index 0000000..528b7fd --- /dev/null +++ b/src/main/resources/lucy-xss.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/syaku/bbs/BbsMapper.xml b/src/main/resources/syaku/bbs/BbsMapper.xml new file mode 100644 index 0000000..5f588e4 --- /dev/null +++ b/src/main/resources/syaku/bbs/BbsMapper.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + INSERT INTO bbs ( user_name, subject, content, reg_datetime ) VALUES ( + #{user_name} + , #{subject} + , #{content} + , #{reg_datetime} + ) + + + + UPDATE bbs SET + user_name = #{user_name}, + subject = #{subject}, + content = #{content}, + reg_datetime = #{reg_datetime} + WHERE idx = #{idx} LIMIT 1 + + + + DELETE FROM bbs WHERE idx = #{idx} + + + \ No newline at end of file diff --git a/src/main/resources/syaku/mybatis/mybatis-config-base.xml b/src/main/resources/syaku/mybatis/mybatis-config-base.xml new file mode 100644 index 0000000..dba5b0e --- /dev/null +++ b/src/main/resources/syaku/mybatis/mybatis-config-base.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/Member/jsp/join.jsp b/src/main/webapp/WEB-INF/Member/jsp/join.jsp new file mode 100644 index 0000000..960c9ce --- /dev/null +++ b/src/main/webapp/WEB-INF/Member/jsp/join.jsp @@ -0,0 +1,13 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> + + + + +join + + + +<%@ include file="/debug/debug.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/Member/servlet/servlet-Member.xml b/src/main/webapp/WEB-INF/Member/servlet/servlet-Member.xml new file mode 100644 index 0000000..f0f935a --- /dev/null +++ b/src/main/webapp/WEB-INF/Member/servlet/servlet-Member.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/board/jsp/board/.gitignore b/src/main/webapp/WEB-INF/board/jsp/board/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/WEB-INF/board/jsp/board/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/WEB-INF/board/jsp/board/boardDetail.jsp b/src/main/webapp/WEB-INF/board/jsp/board/boardDetail.jsp new file mode 100644 index 0000000..ad23958 --- /dev/null +++ b/src/main/webapp/WEB-INF/board/jsp/board/boardDetail.jsp @@ -0,0 +1,68 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + +boardList.jsp + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
۹ȣ${ vo.b_no }
ʳ${ vo.b_indate }
${ vo.b_delete }
ȸ${ vo.hit }
ȸȣ${ vo.u_no }
Ƶ
г
${ vo.u_delete }
${ prev.b_title }
${ next.b_title }
+ + <%@ include file="/debug/debug.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/board/jsp/board/boardList.jsp b/src/main/webapp/WEB-INF/board/jsp/board/boardList.jsp new file mode 100644 index 0000000..29f45d0 --- /dev/null +++ b/src/main/webapp/WEB-INF/board/jsp/board/boardList.jsp @@ -0,0 +1,105 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + +boardList.jsp + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + +
۹ȣȸȣ̵гŻ𿩺
${row.b_no}${row.b_title}${row.b_content}${row.b_delete}${row.u_no}${row.u_id}${row.u_nick}${row.u_delete}
+ + +
+ + +
+ + + + + + +
+
+
,selected:true">All
+
,selected:true">Id
+
,selected:true">Nick
+
,selected:true">Title
+
,selected:true">Content
+
+
+ + + + + + + + + <%@ include file="/debug/debug.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/board/jsp/board/boardMain.jsp b/src/main/webapp/WEB-INF/board/jsp/board/boardMain.jsp new file mode 100644 index 0000000..c1b4f73 --- /dev/null +++ b/src/main/webapp/WEB-INF/board/jsp/board/boardMain.jsp @@ -0,0 +1,18 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> + + + + + + + + + + <%@ include file="/debug/debug.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/board/jsp/board/boardWrite.jsp b/src/main/webapp/WEB-INF/board/jsp/board/boardWrite.jsp new file mode 100644 index 0000000..f3c38d7 --- /dev/null +++ b/src/main/webapp/WEB-INF/board/jsp/board/boardWrite.jsp @@ -0,0 +1,58 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +<%@ include file="../include/easyui.jsp"%> + + +
+ + + + + + + + + + + + + + + +
게시글 작성
제목
+

작성하기 목록으로 +
+<%-- <%@ include file="/WEB-INF/include/include-body.jspf"%> --%> + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/board/jsp/file/fileForm.jsp b/src/main/webapp/WEB-INF/board/jsp/file/fileForm.jsp new file mode 100644 index 0000000..8200d1e --- /dev/null +++ b/src/main/webapp/WEB-INF/board/jsp/file/fileForm.jsp @@ -0,0 +1,45 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +Insert title here + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
이름
비밀번호
파일
제목
내용
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/board/jsp/file/fileMain.jsp b/src/main/webapp/WEB-INF/board/jsp/file/fileMain.jsp new file mode 100644 index 0000000..6e768c1 --- /dev/null +++ b/src/main/webapp/WEB-INF/board/jsp/file/fileMain.jsp @@ -0,0 +1,14 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> + + + + +Insert title here + + + ڷ http://gangzzang.tistory.com/125 + ${test } + <%@ include file="/debug/debug.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/board/jsp/include/.gitignore b/src/main/webapp/WEB-INF/board/jsp/include/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/WEB-INF/board/jsp/include/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/WEB-INF/board/jsp/include/easyui.jsp b/src/main/webapp/WEB-INF/board/jsp/include/easyui.jsp new file mode 100644 index 0000000..80a7157 --- /dev/null +++ b/src/main/webapp/WEB-INF/board/jsp/include/easyui.jsp @@ -0,0 +1,10 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +"> +"> + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/board/jsp/user/.gitignore b/src/main/webapp/WEB-INF/board/jsp/user/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/WEB-INF/board/jsp/user/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/WEB-INF/board/jsp/user/userInsertForm.jsp b/src/main/webapp/WEB-INF/board/jsp/user/userInsertForm.jsp new file mode 100644 index 0000000..3227e10 --- /dev/null +++ b/src/main/webapp/WEB-INF/board/jsp/user/userInsertForm.jsp @@ -0,0 +1,155 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + +Insert title here + + + + + + + +
+
+ +
+ +
+ +
+
+ + +
+ +
+ +
+
+ +
+
+
	
+//==================================================
+$('#ff').form({
+    url:...,
+    onSubmit: function(){
+        // do some check
+        // return false to prevent submit;
+    },
+    success:function(data){
+        alert(data)
+    }
+});
+// submit the form
+$('#ff').submit();
+
+//==================================================
+// call 'submit' method of form plugin to submit the form
+$('#ff').form('submit', {
+    url:...,
+    onSubmit: function(){
+        // do some check
+        // return false to prevent submit;
+    },
+    success:function(data){
+        alert(data)
+    }
+});
+
+//==================================================
+$('#ff').form('submit', {
+    url:...,
+    onSubmit: function(param){
+        param.p1 = 'value1';
+        param.p2 = 'value2';
+    }
+});
+
+//==================================================
+{
+    "success": true,
+    "message": "Message sent successfully."
+}
+
+$('#ff').form('submit', {
+    success: function(data){
+        var data = eval('(' + data + ')');  // change the JSON string to javascript object
+        if (data.success){
+            alert(data.message)
+        }
+    }
+});
+
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/board/jsp/user/userList.jsp b/src/main/webapp/WEB-INF/board/jsp/user/userList.jsp new file mode 100644 index 0000000..4928b70 --- /dev/null +++ b/src/main/webapp/WEB-INF/board/jsp/user/userList.jsp @@ -0,0 +1,102 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + +userList.jsp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + <%-- --%> + <%-- --%> + + + + +
ȸȣ̵гԳŻ𿩺
${row.u_no}${row.u_id}${row.u_pw}${row.u_nick}${row.u_indate}${row.u_delete}${row.b_title}${row.b_content}${row.u_nick}
+ + +
+ + +
+ + + + + + +
+
+
,selected:true">All
+
,selected:true">Id
+
,selected:true">Nick
+
+
+ + + + + + + + + <%@ include file="/debug/debug.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/board/jsp/user/userLogin.jsp b/src/main/webapp/WEB-INF/board/jsp/user/userLogin.jsp new file mode 100644 index 0000000..09cb283 --- /dev/null +++ b/src/main/webapp/WEB-INF/board/jsp/user/userLogin.jsp @@ -0,0 +1,12 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> + + + + +Insert title here + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/board/jsp/user/userMain.jsp b/src/main/webapp/WEB-INF/board/jsp/user/userMain.jsp new file mode 100644 index 0000000..a3ba465 --- /dev/null +++ b/src/main/webapp/WEB-INF/board/jsp/user/userMain.jsp @@ -0,0 +1,17 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> + + + + + + + + + + <%@ include file="/debug/debug.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/board/servlet/servlet-board.xml b/src/main/webapp/WEB-INF/board/servlet/servlet-board.xml new file mode 100644 index 0000000..9ffe879 --- /dev/null +++ b/src/main/webapp/WEB-INF/board/servlet/servlet-board.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/board2/jsp/list.jsp b/src/main/webapp/WEB-INF/board2/jsp/list.jsp new file mode 100644 index 0000000..cd74029 --- /dev/null +++ b/src/main/webapp/WEB-INF/board2/jsp/list.jsp @@ -0,0 +1,94 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> + + + + + + + + +Insert title here + + +
+ + + + +
Խñ : + ${boardCount}
+ + + + + + + + + + + + + + + + + + + + + + + + +
ȣۼۼȸ
Խñ ϴ.
${list.seq}${list.title}${list.name}${list.regdate}${list.readcount}
+ + + + + + +
+ + + + + + ${i}  + + + + + ${i}  + + + + + + +
+
+ + + + + +
/ + +
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/board2/res/boardActionJs.js b/src/main/webapp/WEB-INF/board2/res/boardActionJs.js new file mode 100644 index 0000000..a446f7a --- /dev/null +++ b/src/main/webapp/WEB-INF/board2/res/boardActionJs.js @@ -0,0 +1,12 @@ +// 검색 +function boardListSearchGo(){ +document.listForm.action ="/board/list.html"; +document.listForm.submit(); +} + +// 검색Text입력 후 바로 엔터 가능하게 하는 이벤트 +function enterEvent(){ +if(window.event.keyCode == 13){ +boardListSearchGo(); +} +} \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/board2/res/boardCss.css b/src/main/webapp/WEB-INF/board2/res/boardCss.css new file mode 100644 index 0000000..03037e0 --- /dev/null +++ b/src/main/webapp/WEB-INF/board2/res/boardCss.css @@ -0,0 +1,11 @@ +@CHARSET "EUC-KR"; +td{text-align: center;} +th{text-align: center;} + +a:link{ text-decoration:none; color: #5D5D5D;} +a:visited{ text-decoration:none; color: #5D5D5D;} +a:active{ text-decoration:none; color: #47C83E;} +a:hover{ text-decoration:none; color: #47C83E;} +.listTable{width:600px;} +#boardListCount{text-align: right;} +#boardList_a{font-weight: bold; color:#8041D9;} \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/board2/servlet/servlet-board2.xml b/src/main/webapp/WEB-INF/board2/servlet/servlet-board2.xml new file mode 100644 index 0000000..6b8aae0 --- /dev/null +++ b/src/main/webapp/WEB-INF/board2/servlet/servlet-board2.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + list + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/common/servlet/servlet-common.xml b/src/main/webapp/WEB-INF/common/servlet/servlet-common.xml new file mode 100644 index 0000000..dbb1d49 --- /dev/null +++ b/src/main/webapp/WEB-INF/common/servlet/servlet-common.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/context/SqlMapConfig.xml.bak b/src/main/webapp/WEB-INF/context/SqlMapConfig.xml.bak new file mode 100644 index 0000000..2c4696e --- /dev/null +++ b/src/main/webapp/WEB-INF/context/SqlMapConfig.xml.bak @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/context/context-aspect.xml b/src/main/webapp/WEB-INF/context/context-aspect.xml new file mode 100644 index 0000000..49a3df3 --- /dev/null +++ b/src/main/webapp/WEB-INF/context/context-aspect.xml @@ -0,0 +1,20 @@ + + + + + + + diff --git a/src/main/webapp/WEB-INF/context/context-board2.xml b/src/main/webapp/WEB-INF/context/context-board2.xml new file mode 100644 index 0000000..f7e98bd --- /dev/null +++ b/src/main/webapp/WEB-INF/context/context-board2.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/context/context-defult-orcl.xml b/src/main/webapp/WEB-INF/context/context-defult-orcl.xml new file mode 100644 index 0000000..200b8c5 --- /dev/null +++ b/src/main/webapp/WEB-INF/context/context-defult-orcl.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + classpath*:/**/sql/**/sql-*.xml + /WEB-INF/**/sql/**/sql-*.xml + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/context/context-defult.xml b/src/main/webapp/WEB-INF/context/context-defult.xml new file mode 100644 index 0000000..f7a30f0 --- /dev/null +++ b/src/main/webapp/WEB-INF/context/context-defult.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/src/main/webapp/WEB-INF/context/context-first-orcl.xml b/src/main/webapp/WEB-INF/context/context-first-orcl.xml new file mode 100644 index 0000000..6d2a658 --- /dev/null +++ b/src/main/webapp/WEB-INF/context/context-first-orcl.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + classpath*:/sql/**/sql-*.xml + /WEB-INF/sql/**/sql-*.xml + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/context/context-page-egov.xml b/src/main/webapp/WEB-INF/context/context-page-egov.xml new file mode 100644 index 0000000..e934f0a --- /dev/null +++ b/src/main/webapp/WEB-INF/context/context-page-egov.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/context/context-scott-orcl.xml b/src/main/webapp/WEB-INF/context/context-scott-orcl.xml new file mode 100644 index 0000000..1d68028 --- /dev/null +++ b/src/main/webapp/WEB-INF/context/context-scott-orcl.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + classpath*:/sql/scott/**/sql-*.xml + /WEB-INF/sql/scott/**/sql-*.xml + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/context/context-syaku.xml b/src/main/webapp/WEB-INF/context/context-syaku.xml new file mode 100644 index 0000000..4d2ef0c --- /dev/null +++ b/src/main/webapp/WEB-INF/context/context-syaku.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/daumeditor/servlet/servlet-common.xml b/src/main/webapp/WEB-INF/daumeditor/servlet/servlet-common.xml new file mode 100644 index 0000000..56c8d4d --- /dev/null +++ b/src/main/webapp/WEB-INF/daumeditor/servlet/servlet-common.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/defult/jsp/defult.jsp b/src/main/webapp/WEB-INF/defult/jsp/defult.jsp new file mode 100644 index 0000000..06b25bc --- /dev/null +++ b/src/main/webapp/WEB-INF/defult/jsp/defult.jsp @@ -0,0 +1,17 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ page session="false" %> + + + defult + + +

+ Hello world! defult +

+ +

The time on the server is ${serverTime}.

+ +<%@ include file="/debug/debug.jsp" %> + + diff --git a/src/main/webapp/WEB-INF/defult/servlet/servlet-defult.xml b/src/main/webapp/WEB-INF/defult/servlet/servlet-defult.xml new file mode 100644 index 0000000..12ba816 --- /dev/null +++ b/src/main/webapp/WEB-INF/defult/servlet/servlet-defult.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/error/errorCommon.jsp b/src/main/webapp/WEB-INF/error/errorCommon.jsp new file mode 100644 index 0000000..0442bde --- /dev/null +++ b/src/main/webapp/WEB-INF/error/errorCommon.jsp @@ -0,0 +1,18 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + isErrorPage="true" pageEncoding="EUC-KR"%> +<% + response.setStatus(200); +%> + + + + + + + +

Դϴ

+

<%= exception.getMessage() %>

+ +<%@ include file="/debug/debug.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/first/include/include-body.jspf b/src/main/webapp/WEB-INF/first/include/include-body.jspf new file mode 100644 index 0000000..57448b6 --- /dev/null +++ b/src/main/webapp/WEB-INF/first/include/include-body.jspf @@ -0,0 +1,2 @@ +<%@ page pageEncoding="utf-8"%> +
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/first/include/include-header.jspf b/src/main/webapp/WEB-INF/first/include/include-header.jspf new file mode 100644 index 0000000..b3a76ea --- /dev/null +++ b/src/main/webapp/WEB-INF/first/include/include-header.jspf @@ -0,0 +1,20 @@ +<%@ page pageEncoding="utf-8"%> + + + +first + +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> + <%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/first/jsp/boardDetail.jsp b/src/main/webapp/WEB-INF/first/jsp/boardDetail.jsp new file mode 100644 index 0000000..3dc06fa --- /dev/null +++ b/src/main/webapp/WEB-INF/first/jsp/boardDetail.jsp @@ -0,0 +1,114 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +<%@ include file="../include/include-header.jspf"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
게시글 상세
글 번호${map.IDX }조회수${map.HIT_CNT }
작성자${map.CREA_ID }작성시간${map.CREA_DTM }
제목${map.TITLE }
${map.CONTENTS }
첨부파일 +

+ ${row.ORIGINAL_FILE_NAME } + (${row.FILE_SIZE }kb) +

+
+
+ + 목록으로 + 수정하기 + + <%@ include file="../include/include-body.jspf"%> + + <%@ include file="/debug/debug.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/first/jsp/boardList.jsp b/src/main/webapp/WEB-INF/first/jsp/boardList.jsp new file mode 100644 index 0000000..5d7efb4 --- /dev/null +++ b/src/main/webapp/WEB-INF/first/jsp/boardList.jsp @@ -0,0 +1,100 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +<%@ include file="../include/include-header.jspf"%> + + + +<%-- + + --%> + + +

게시판 목록

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
글번호제목조회수작성일
${row.IDX }${row.TITLE } + ${row.HIT_CNT }${row.CREA_DTM }
조회된 결과가 없습니다.
+ + + + + + +
+ 글쓰기 + + <%@ include file="../include/include-body.jspf"%> + + + <%@ include file="/debug/debug.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/first/jsp/boardUpdate.jsp b/src/main/webapp/WEB-INF/first/jsp/boardUpdate.jsp new file mode 100644 index 0000000..22be339 --- /dev/null +++ b/src/main/webapp/WEB-INF/first/jsp/boardUpdate.jsp @@ -0,0 +1,141 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +<%@ include file="../include/include-header.jspf"%> + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
게시글 상세
글 번호${map.IDX } + 조회수${map.HIT_CNT }
작성자${map.CREA_ID }작성시간${map.CREA_DTM }
제목
+
첨부파일 +
+ +

+ + ${row.ORIGINAL_FILE_NAME } + (${row.FILE_SIZE }kb) 삭제 +

+
+
+
+
+ + 파일 추가 + 목록으로 + 저장하기 + 삭제하기 + + <%@ include file="../include/include-body.jspf"%> + + + <%@ include file="/debug/debug.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/first/jsp/boardWrite.jsp b/src/main/webapp/WEB-INF/first/jsp/boardWrite.jsp new file mode 100644 index 0000000..e50cab4 --- /dev/null +++ b/src/main/webapp/WEB-INF/first/jsp/boardWrite.jsp @@ -0,0 +1,96 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +<%@ include file="../include/include-header.jspf"%> + + +
+ + + + + + + + + + + + + + + + +
게시글 작성
제목
+
+

+ 삭제 +

+
+

파일 추가 작성하기 목록으로 +
+ + <%@ include file="../include/include-body.jspf"%> + + + <%@ include file="/debug/debug.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/first/res/css/ui.css b/src/main/webapp/WEB-INF/first/res/css/ui.css new file mode 100644 index 0000000..dfe1fc8 --- /dev/null +++ b/src/main/webapp/WEB-INF/first/res/css/ui.css @@ -0,0 +1,22 @@ +@CHARSET "UTF-8"; +  +a:link, a:visited {text-decoration: none; color: #656565;} +  +.board_list {width:100%;border-top:2px solid #252525;border-bottom:1px solid #ccc} +.board_list thead th:first-child{background-image:none} +.board_list thead th {border-bottom:1px solid #ccc;padding:12px 0 13px 0;color:#3b3a3a;vertical-align:middle} +.board_list tbody td {border-top:1px solid #ccc;padding:10px 0;text-align:center;vertical-align:middle} +.board_list tbody tr:first-child td {border:none} +.board_list tbody td.title {text-align:left; padding-left:20px} +.board_list tbody td a {display:inline-block} +  +.board_view {width:50%;border-top:2px solid #252525;border-bottom:1px solid #ccc} +.board_view tbody th {text-align:left;background:#f7f7f7;color:#3b3a3a} +.board_view tbody th.list_tit {font-size:13px;color:#000;letter-spacing:0.1px} +.board_view tbody .no_line_b th, .board_view tbody .no_line_b td {border-bottom:none} +.board_view tbody th, .board_view tbody td {padding:15px 0 16px 16px;border-bottom:1px solid #ccc} +.board_view tbody td.view_text {border-top:1px solid #ccc; border-bottom:1px solid #ccc;padding:45px 18px 45px 18px} +.board_view tbody th.th_file {padding:0 0 0 15px; vertical-align:middle} +  +.wdp_90 {width:90%} +.btn {border-radius:3px;padding:5px 11px;color:#fff !important; display:inline-block; background-color:#6b9ab8; border:1px solid #56819d;vertical-align:middle} \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/first/res/js/common.js b/src/main/webapp/WEB-INF/first/res/js/common.js new file mode 100644 index 0000000..8e67402 --- /dev/null +++ b/src/main/webapp/WEB-INF/first/res/js/common.js @@ -0,0 +1,39 @@ +function gfn_isNull(str) { + if (str == null) return true; + if (str == "NaN") return true; + if (new String(str).valueOf() == "undefined") return true; + var chkStr = new String(str); + if( chkStr.valueOf() == "undefined" ) return true; + if (chkStr == null) return true; + if (chkStr.toString().length == 0 ) return true; + return false; +} + +function ComSubmit(opt_formId) { + this.formId = gfn_isNull(opt_formId) == true ? "commonForm" : opt_formId; + this.url = ""; + + if(this.formId == "commonForm"){ + $("#commonForm")[0].reset(); + } + + this.setUrl = function setUrl(url){ + this.url = url; + }; + + this.reset = function reset(){ + //alert($("#"+this.formId)) + $("#"+this.formId).empty(); + }; + + this.addParam = function addParam(key, value){ + $("#"+this.formId).append($("")); + }; + + this.submit = function submit(){ + var frm = $("#"+this.formId)[0]; + frm.action = this.url; + frm.method = "post"; + frm.submit(); + }; +} \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/first/servlet/servlet-first.xml b/src/main/webapp/WEB-INF/first/servlet/servlet-first.xml new file mode 100644 index 0000000..7c93d41 --- /dev/null +++ b/src/main/webapp/WEB-INF/first/servlet/servlet-first.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/lib/.gitignore b/src/main/webapp/WEB-INF/lib/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/WEB-INF/lib/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/WEB-INF/lib/miplatform-3.2.jar b/src/main/webapp/WEB-INF/lib/miplatform-3.2.jar new file mode 100644 index 0000000..79374ff Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/miplatform-3.2.jar differ diff --git a/src/main/webapp/WEB-INF/miplatform/.gitignore b/src/main/webapp/WEB-INF/miplatform/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/WEB-INF/miplatform/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/WEB-INF/miplatform/jsp/.gitignore b/src/main/webapp/WEB-INF/miplatform/jsp/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/WEB-INF/miplatform/jsp/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/WEB-INF/miplatform/jsp/base_code_sel.jsp b/src/main/webapp/WEB-INF/miplatform/jsp/base_code_sel.jsp new file mode 100644 index 0000000..8d18e9b --- /dev/null +++ b/src/main/webapp/WEB-INF/miplatform/jsp/base_code_sel.jsp @@ -0,0 +1,100 @@ +<%@ page import = "java.util.*" %> +<%@ page import = "java.sql.*" %> +<%@ page import = "com.tobesoft.platform.*" %> +<%@ page import="com.tobesoft.platform.data.*" %> +<%@ page import = "java.io.*" %> + +<%@ page contentType="text/xml; charset=utf-8" %> + +<%! +/*********** Լ *************/ +// ResultSet , , "null" "" +public String rsGet(ResultSet rs, String id) throws Exception +{ + if( rs.getString(id) == null ) + return ""; + else + return rs.getString(id); +} + +// ResultSet ==> Dataset +public void Rs2Ds(DatasetList dl, ResultSet rs, String ds_id) throws Exception +{ + int i; + int col_cnt; + String col_name; + Dataset ds = new Dataset(ds_id, "utf-8", false, false); + ResultSetMetaData rsmd = rs.getMetaData(); + + col_cnt = rsmd.getColumnCount(); + for( i = 1 ; i <= col_cnt ; i++ ) + { + col_name = rsmd.getColumnName(i).toUpperCase(); + ////// Column Typeȯ STRING ־ϴ. + ds.addColumn(col_name, ColumnInfo.CY_COLINFO_STRING, (short)rsmd.getColumnDisplaySize(i)); + } + while(rs.next()) + { + int row = ds.appendRow(); + for( i = 1 ; i <= col_cnt ; i++ ) + { + col_name = rsmd.getColumnName(i).toUpperCase(); + ds.setColumn(row, col_name, rsGet(rs, col_name)); + } + } + + dl.addDataset(ds); +} +%> + +<% +/****** Service API ʱȭ ******/ +VariableList vl = new VariableList(); +DatasetList dl = new DatasetList(); +%> + +<% +/******* JDBC Connection *******/ +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; + +Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); +conn = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DatabaseName=EDU","edu","edu"); +stmt = conn.createStatement(); + +try { +String SQL; + +/******* SQL ds_dept Dataset *************/ +SQL="select * from base_dept_U"; +rs = stmt.executeQuery(SQL); +Rs2Ds(dl,rs,"ds_dept"); + +/******* SQL ds_jikgup Dataset *************/ +SQL="select * from base_jikgup_U"; +rs = stmt.executeQuery(SQL); +Rs2Ds(dl,rs,"ds_jikgup"); + +/********* VariableList ߰ ************/ +vl.addStr("ErrorCode", "0"); +vl.addStr("ErrorMsg", "SUCC"); +} +catch(SQLException e) { +vl.addStr("ErrorCode", "-1"); +vl.addStr("ErrorMsg", e.getMessage()); +} +%> + +<% +/******** JDBC Close *******/ + if ( stmt != null ) try { stmt.close(); } catch (Exception e) {} + if ( conn != null ) try { conn.close(); } catch (Exception e) {} +%> + +<% +/******** XML Web Server ******/ + out.clearBuffer(); + PlatformResponse pRes = new PlatformResponse(response, PlatformRequest.XML, "utf-8"); + pRes.sendData(vl, dl); +%> diff --git a/src/main/webapp/WEB-INF/miplatform/jsp/base_sawon_sel.jsp b/src/main/webapp/WEB-INF/miplatform/jsp/base_sawon_sel.jsp new file mode 100644 index 0000000..7b0f98d --- /dev/null +++ b/src/main/webapp/WEB-INF/miplatform/jsp/base_sawon_sel.jsp @@ -0,0 +1,109 @@ +<%@ page import = "java.util.*" %> +<%@ page import = "java.sql.*" %> +<%@ page import = "com.tobesoft.platform.*" %> +<%@ page import="com.tobesoft.platform.data.*" %> +<%@ page import = "java.io.*" %> + +<%@ page contentType="text/xml; charset=utf-8" %> +<%! +/*********** Լ *************/ +// ResultSet , , "null" "" +public String rsGet(ResultSet rs, String id) throws Exception +{ + if( rs.getString(id) == null ) + return ""; + else + return rs.getString(id); +} + +// ѱ ȸ ó Լ +public static String EucToUni(String s) +{ + String result = ""; + + try { + result = new String(s.getBytes("8859_1"), "EUC-KR"); + } catch(Exception e) { + System.out.println(e); + } + + return result; +} +%> + +<% +/****** Service API ʱȭ ******/ +VariableList vl = new VariableList(); +DatasetList dl = new DatasetList(); +%> + +<% +/******* JDBC Connection *******/ +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); +conn = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DatabaseName=EDU","edu","edu"); +stmt = conn.createStatement(); + +try { +/******* SQL *************/ +String name = request.getParameter("name"); +String SQL; +if( name.equals("") == true ) + SQL="select * from base_sawon_U"; +else + SQL="select * from base_sawon_U where name like '" + EucToUni(name) + "%%'"; +rs = stmt.executeQuery(SQL); + +/********* Dataset ************/ +Dataset ds = new Dataset("ds_sawon"); +ds.addColumn("name",ColumnInfo.CY_COLINFO_STRING, 20); +ds.addColumn("sabun",ColumnInfo.CY_COLINFO_STRING, 5); +ds.addColumn("dept",ColumnInfo.CY_COLINFO_STRING, 20); +ds.addColumn("jikgup",ColumnInfo.CY_COLINFO_STRING, 20); +ds.addColumn("gender",ColumnInfo.CY_COLINFO_STRING, 20); +ds.addColumn("ipsa_date",ColumnInfo.CY_COLINFO_STRING, 20); +ds.addColumn("marry",ColumnInfo.CY_COLINFO_STRING, 20); +ds.addColumn("email",ColumnInfo.CY_COLINFO_STRING, 50); +ds.addColumn("smemo",ColumnInfo.CY_COLINFO_STRING, 100); +while(rs.next()) +{ + int row = ds.appendRow(); + ds.setColumn(row, "name", rsGet(rs, "name")); + ds.setColumn(row, "sabun", rsGet(rs, "sabun")); + ds.setColumn(row, "dept", rsGet(rs, "dept")); + ds.setColumn(row, "jikgup", rsGet(rs, "jikgup")); + ds.setColumn(row, "gender", rsGet(rs, "gender")); + ds.setColumn(row, "ipsa_date", rsGet(rs, "ipsa_date")); + ds.setColumn(row, "marry", rsGet(rs, "marry")); + ds.setColumn(row, "email", rsGet(rs, "email")); + ds.setColumn(row, "smemo", rsGet(rs, "smemo")); +} + +/********* Dataset DatasetList ߰ ************/ +dl.addDataset(ds); + +/********* VariableList ߰ ************/ +vl.addStr("ErrorCode", "0"); +vl.addStr("ErrorMsg", "SUCC"); +} +/********* Erroró ************/ +catch(SQLException e) { +vl.addStr("ErrorCode", "-1"); +vl.addStr("ErrorMsg", e.getMessage()); +} +%> + +<% +/******** JDBC Close *******/ + if ( stmt != null ) try { stmt.close(); } catch (Exception e) {} + if ( conn != null ) try { conn.close(); } catch (Exception e) {} +%> + +<% +/******** XML Web Server ******/ + out.clearBuffer(); + PlatformResponse pRes = new PlatformResponse(response, PlatformRequest.XML, "utf-8"); + pRes.sendData(vl, dl); +%> \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/miplatform/jsp/base_sawon_tr.jsp b/src/main/webapp/WEB-INF/miplatform/jsp/base_sawon_tr.jsp new file mode 100644 index 0000000..4f4ab5c --- /dev/null +++ b/src/main/webapp/WEB-INF/miplatform/jsp/base_sawon_tr.jsp @@ -0,0 +1,130 @@ +<%@ page import = "java.util.*" %> +<%@ page import="com.tobesoft.platform.*" %> +<%@ page import="com.tobesoft.platform.data.*" %> +<%@ page import = "java.sql.*" %> +<%@ page import="java.io.*" %> + +<%@ page contentType="text/xml; charset=utf-8" %> + +<%! +/*********** Լ *************/ +// DataSet , , "null" "" +public String dsGet(Dataset ds, int rowno, String id) throws Exception +{ + String value; + value = ds.getColumn(rowno,id).getString(); + if( value == null ) + return ""; + else + return value; +} +%> + +<% +/****** Service API ʱȭ ******/ +/** Input κ ʱȭ **/ +VariableList in_vl = new VariableList(); +DatasetList in_dl = new DatasetList(); +PlatformRequest pReq = new PlatformRequest(request, "utf-8"); + +/** Web Server XML Parsing **/ +pReq.receiveData(); + +/** List ȹ Dataset, ȹ **/ +in_vl = pReq.getVariableList(); +in_dl = pReq.getDatasetList(); +Dataset ds = in_dl.getDataset("input"); +String in_var1 = request.getParameter("in_var1"); +String in_var2 = in_vl.getValueAsString("in_var2"); + +/** Output κ ʱȭ **/ +VariableList out_vl = new VariableList(); +DatasetList out_dl = new DatasetList(); +%> + +<% +/******* JDBC Connection *******/ +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; + +Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); +conn = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DatabaseName=EDU","edu","edu"); +stmt = conn.createStatement(); + +String SQL = ""; +int i; +try { +/******** Dataset INSERT, UPDATEó ********/ +for(i=0;i + +<% +/******** XML Web Server ******/ +out.clearBuffer(); +PlatformResponse pRes = new PlatformResponse(response, PlatformRequest.XML, "utf-8"); +pRes.sendData(out_vl, out_dl); +%> diff --git a/src/main/webapp/WEB-INF/miplatform/jsp/defult.jsp b/src/main/webapp/WEB-INF/miplatform/jsp/defult.jsp new file mode 100644 index 0000000..06b25bc --- /dev/null +++ b/src/main/webapp/WEB-INF/miplatform/jsp/defult.jsp @@ -0,0 +1,17 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ page session="false" %> + + + defult + + +

+ Hello world! defult +

+ +

The time on the server is ${serverTime}.

+ +<%@ include file="/debug/debug.jsp" %> + + diff --git a/src/main/webapp/WEB-INF/miplatform/jsp/sample_paging_sel.jsp b/src/main/webapp/WEB-INF/miplatform/jsp/sample_paging_sel.jsp new file mode 100644 index 0000000..f16c61f --- /dev/null +++ b/src/main/webapp/WEB-INF/miplatform/jsp/sample_paging_sel.jsp @@ -0,0 +1,87 @@ +<%@ page import = "java.util.*" %> +<%@ page import = "java.sql.*" %> +<%@ page import = "com.tobesoft.platform.*" %> +<%@ page import="com.tobesoft.platform.data.*" %> +<%@ page import = "java.io.*" %> + +<%@ page contentType="text/xml; charset=utf-8" %> + +<%! +public String rsGet(ResultSet rs, String id) throws Exception +{ + if( rs.getString(id) == null ) + return ""; + else + return rs.getString(id); +} +%> + +<% +/****** Service API ʱȭ ******/ +VariableList vl = new VariableList(); +DatasetList dl = new DatasetList(); +String char_set = "utf-8"; +%> + +<% +/******* JDBC Connection *******/ +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); +conn = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;;DatabaseName=EDU","edu","edu"); +stmt = conn.createStatement(); + +try { +/******* SQL *************/ +String start_sel_rowno = request.getParameter("start_sel_rowno"); +String unit_sel_rownum = request.getParameter("unit_sel_rownum"); +String SQL = "select * from sample_book_list"; +SQL = SQL + " where rowno >= " + start_sel_rowno + " and rowno < (" + start_sel_rowno + " + " + unit_sel_rownum +" ) order by rowno asc"; +rs = stmt.executeQuery(SQL); + +/********* Dataset ************/ +Dataset ds = new Dataset("ds_book", char_set); +ds.addColumn("rowno",ColumnInfo.CY_COLINFO_INT, (short)5); +ds.addColumn("book_nm",ColumnInfo.CY_COLINFO_STRING, (short)500); +ds.addColumn("editor_nm",ColumnInfo.CY_COLINFO_STRING, (short)200); +ds.addColumn("press_nm",ColumnInfo.CY_COLINFO_STRING, (short)100); +ds.addColumn("price",ColumnInfo.CY_COLINFO_INT, (short)10); +int row = 0; +while(rs.next()) +{ + row = ds.appendRow(); + ds.setColumn(row, "rowno", new Variant(rsGet(rs, "rowno"))); + ds.setColumn(row, "book_nm", new Variant(rsGet(rs, "book_nm"))); + ds.setColumn(row, "editor_nm", new Variant(rsGet(rs, "editor_nm"))); + ds.setColumn(row, "press_nm", new Variant(rsGet(rs, "press_nm"))); + ds.setColumn(row, "price", new Variant(rsGet(rs, "price"))); +} + +/********* Dataset DatasetList ߰ ************/ +dl.addDataset("ds_book", ds); + +/********* VariableList ߰ ************/ +vl.addStr("ErrorCode", "0"); +vl.addStr("ErrorMsg", "SUCC"); +vl.addVariable("sel_rownum", row); +} +catch(SQLException e) { +vl.addStr("ErrorCode", "-1"); +vl.addStr("ErrorMsg", e.getMessage()); +vl.addVariable("sel_rownum", 0); +} +%> + +<% +/******** JDBC Close *******/ + if ( stmt != null ) try { stmt.close(); } catch (Exception e) {} + if ( conn != null ) try { conn.close(); } catch (Exception e) {} +%> + +<% +/******** XML Web Server ******/ + out.clearBuffer(); + PlatformResponse pRes = new PlatformResponse(response, PlatformRequest.XML, char_set); + pRes.sendData(vl, dl); +%> diff --git a/src/main/webapp/WEB-INF/miplatform/jsp/tip_adapter.jsp b/src/main/webapp/WEB-INF/miplatform/jsp/tip_adapter.jsp new file mode 100644 index 0000000..3760783 --- /dev/null +++ b/src/main/webapp/WEB-INF/miplatform/jsp/tip_adapter.jsp @@ -0,0 +1,31 @@ +<%@ page contentType="text/xml; charset=utf-8" %> + + + + + 0 + SUCC + + + + + + + + 1 + 2 + 3 + + + 4 + 5 + 6 + + + 7 + 8 + 9 + + + + diff --git a/src/main/webapp/WEB-INF/miplatform/jsp/tip_adapter1.jsp b/src/main/webapp/WEB-INF/miplatform/jsp/tip_adapter1.jsp new file mode 100644 index 0000000..4787015 --- /dev/null +++ b/src/main/webapp/WEB-INF/miplatform/jsp/tip_adapter1.jsp @@ -0,0 +1,36 @@ +<%@ page contentType="text/xml; charset=utf-8" %> + +<% + String in_var; + in_var = request.getParameter("in_var"); + if( in_var.equals("") == true ) + return; +%> + + + + 0 + SUCC + + + + + + + A + B + C + + + D + E + F + + + G + H + I + + + + diff --git a/src/main/webapp/WEB-INF/miplatform/jsp/tip_adapter_firstrow.jsp b/src/main/webapp/WEB-INF/miplatform/jsp/tip_adapter_firstrow.jsp new file mode 100644 index 0000000..b2d4e91 --- /dev/null +++ b/src/main/webapp/WEB-INF/miplatform/jsp/tip_adapter_firstrow.jsp @@ -0,0 +1,29 @@ +<%@ page import="java.util.*,java.text.*"%> +<% +int i, j; +String head = ""; + +head += "CSV:utf-8\n"; +head += "ErrorCode=0,ErrorMsg=SUCC\n"; +head += "Dataset:output\n"; +head += "col1:String(20),col2:String(20),col3:String(20)\n"; +out.write(head); + +String data = ""; +for( i = 0 ; i < 1000 ; i++ ) +{ + // Record + data = ""; + for( j = 1 ; j <= 3 ; j++ ) + data += "col" + j + "_" + i + ","; + data += "\n"; + + // 1 Record Write + out.write(data); +} +// Server Buffer Flush( ȭ Dataó Block ʹ ) +// WebServer Buffer Flush ó +out.flush(); + +out.close(); +%> \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/miplatform/jsp/tip_adapter_format.jsp b/src/main/webapp/WEB-INF/miplatform/jsp/tip_adapter_format.jsp new file mode 100644 index 0000000..f9798c8 --- /dev/null +++ b/src/main/webapp/WEB-INF/miplatform/jsp/tip_adapter_format.jsp @@ -0,0 +1,49 @@ +<%@ page import = "java.util.*" %> +<%@ page import = "java.sql.*" %> +<%@ page import = "com.tobesoft.platform.*" %> +<%@ page import="com.tobesoft.platform.data.*" %> +<%@ page import = "java.io.*" %> + +<%@ page contentType="text/xml; charset=utf-8" %> + +<% +/****** Service API ʱȭ ******/ +VariableList vl = new VariableList(); +DatasetList dl = new DatasetList(); +String char_set = "utf-8"; +PlatformResponse pRes; +%> + +<% +/********* Layout ************/ +Dataset ds = new Dataset("output", char_set); +ds.addColumn("col1",ColumnInfo.CY_COLINFO_STRING, (short)20); +ds.addColumn("col2",ColumnInfo.CY_COLINFO_STRING, (short)20); +ds.addColumn("col3",ColumnInfo.CY_COLINFO_STRING, (short)20); +int i, row; +for( i = 0 ; i < 2 ; i++ ) +{ + row = ds.appendRow(); + ds.setColumn(row, "col1", new Variant("col1_"+i)); + ds.setColumn(row, "col2", new Variant("col2_"+i)); + ds.setColumn(row, "col3", new Variant("col3_"+i)); +} +dl.addDataset("output", ds); + +vl.addStr("ErrorCode", "0"); +vl.addStr("ErrorMsg", "SUCC"); +%> + +<% +/******** Write ******/ +String format = request.getParameter("format"); +if( format.equals("XML") == true ) +{ + pRes = new PlatformResponse(response, PlatformRequest.XML , char_set); +} +else +{ + pRes = new PlatformResponse(response, PlatformRequest.ZLIB_COMP , char_set); +} +pRes.sendData(vl, dl); +%> diff --git a/src/main/webapp/WEB-INF/miplatform/jsp/tip_adapter_format_csv.jsp b/src/main/webapp/WEB-INF/miplatform/jsp/tip_adapter_format_csv.jsp new file mode 100644 index 0000000..292509d --- /dev/null +++ b/src/main/webapp/WEB-INF/miplatform/jsp/tip_adapter_format_csv.jsp @@ -0,0 +1,6 @@ +CSV:utf-8 +ErrorCode=0,ErrorMsg=SUCC +Dataset:output +col1:String(20),col2:String(20),col3:String(20) +col1_0,col2_0,col3_0 +col1_1,col2_1,col3_1 diff --git a/src/main/webapp/WEB-INF/miplatform/servlet/.gitignore b/src/main/webapp/WEB-INF/miplatform/servlet/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/WEB-INF/miplatform/servlet/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/WEB-INF/miplatform/servlet/servlet-defult.xml b/src/main/webapp/WEB-INF/miplatform/servlet/servlet-defult.xml new file mode 100644 index 0000000..8d06311 --- /dev/null +++ b/src/main/webapp/WEB-INF/miplatform/servlet/servlet-defult.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/mybatis/mybatis-config.xml b/src/main/webapp/WEB-INF/mybatis/mybatis-config.xml new file mode 100644 index 0000000..6a3ac74 --- /dev/null +++ b/src/main/webapp/WEB-INF/mybatis/mybatis-config.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/mybatis/scott/mybatis-config.xml b/src/main/webapp/WEB-INF/mybatis/scott/mybatis-config.xml new file mode 100644 index 0000000..c72310e --- /dev/null +++ b/src/main/webapp/WEB-INF/mybatis/scott/mybatis-config.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/sample/jsp/BoardInsertForm.jsp b/src/main/webapp/WEB-INF/sample/jsp/BoardInsertForm.jsp new file mode 100644 index 0000000..36016c5 --- /dev/null +++ b/src/main/webapp/WEB-INF/sample/jsp/BoardInsertForm.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> + + + + +BoardInsertForm.jsp + +<%@ include file="/include/ink_head.jsp"%> + + + +
+
+
+ + +
+ + <%@ include file="/debug/debug.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/sample/jsp/BoardList.jsp b/src/main/webapp/WEB-INF/sample/jsp/BoardList.jsp new file mode 100644 index 0000000..8e625d6 --- /dev/null +++ b/src/main/webapp/WEB-INF/sample/jsp/BoardList.jsp @@ -0,0 +1,214 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + +Insert title here + +<%@ include file="/include/ink_head.jsp"%> + + + + + + + +
+ + + + + + + +
+ + + +
+ +
+
${row.b_no }
+
${row.b_nick }
+
+ ϱ + ϱ + +
+
${row.b_date }
+
${row.b_text }
+
+
+
+ + + + <%-- + + + + + + + + + + + + + + + + + + +
NICK/NO/DATETEXT
${row.b_nick }
${row.b_no }
${row.b_date }
${row.b_pw }${row.b_text }${row.b_date }
--%> + + <%@ include file="/debug/debug.jsp"%> + + diff --git a/src/main/webapp/WEB-INF/sample/jsp/Reply.jsp b/src/main/webapp/WEB-INF/sample/jsp/Reply.jsp new file mode 100644 index 0000000..29fd134 --- /dev/null +++ b/src/main/webapp/WEB-INF/sample/jsp/Reply.jsp @@ -0,0 +1,44 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + +Insert title here + + + + + +
+ ${comment.name } ${comment.regdate } + + + | + + +

${comment.htmlMemo }

+ +
+
+ + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/sample/jsp/ink.jsp b/src/main/webapp/WEB-INF/sample/jsp/ink.jsp new file mode 100644 index 0000000..2622747 --- /dev/null +++ b/src/main/webapp/WEB-INF/sample/jsp/ink.jsp @@ -0,0 +1,26 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> + + + + +Insert title here + +<%@ include file="/include/ink_head.jsp"%> + + + + +
+

Screen size:

+
    +
  • TINY
  • +
  • SMALL
  • +
  • MEDIUM
  • +
  • LARGE
  • +
  • XLARGE
  • +
+
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/sample/jsp/sample.jsp b/src/main/webapp/WEB-INF/sample/jsp/sample.jsp new file mode 100644 index 0000000..15468e3 --- /dev/null +++ b/src/main/webapp/WEB-INF/sample/jsp/sample.jsp @@ -0,0 +1,82 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ page session="false"%> + + +sample + + + + + + + + + +

Hello world! sample

+ +

The time on the server is ${serverTime}.

+ + + +

link menu

+ + + +

jquery_menu

+ + + +

+ + <%@ include file="/debug/debug.jsp"%> + + diff --git a/src/main/webapp/WEB-INF/sample/jsp/xsstest.jsp b/src/main/webapp/WEB-INF/sample/jsp/xsstest.jsp new file mode 100644 index 0000000..3d117b2 --- /dev/null +++ b/src/main/webapp/WEB-INF/sample/jsp/xsstest.jsp @@ -0,0 +1,16 @@ +<%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> + + + + +xsstest + + + + + ${resultData} + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/sample/res/jquery-1.11.3.js b/src/main/webapp/WEB-INF/sample/res/jquery-1.11.3.js new file mode 100644 index 0000000..6feb110 --- /dev/null +++ b/src/main/webapp/WEB-INF/sample/res/jquery-1.11.3.js @@ -0,0 +1,10351 @@ +/*! + * jQuery JavaScript Library v1.11.3 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2015-04-28T16:19Z + */ + +(function( global, factory ) { + + if ( typeof module === "object" && typeof module.exports === "object" ) { + // For CommonJS and CommonJS-like environments where a proper window is present, + // execute the factory and get jQuery + // For environments that do not inherently posses a window with a document + // (such as Node.js), expose a jQuery-making factory as module.exports + // This accentuates the need for the creation of a real window + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +// + +var deletedIds = []; + +var slice = deletedIds.slice; + +var concat = deletedIds.concat; + +var push = deletedIds.push; + +var indexOf = deletedIds.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var support = {}; + + + +var + version = "1.11.3", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }, + + // Support: Android<4.1, IE<9 + // Make sure we trim BOM and NBSP + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num != null ? + + // Return just the one element from the set + ( num < 0 ? this[ num + this.length ] : this[ num ] ) : + + // Return all the elements in a clean array + slice.call( this ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: deletedIds.sort, + splice: deletedIds.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + /* jshint eqeqeq: false */ + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + // parseFloat NaNs numeric-cast false positives (null|true|false|"") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + // adding 1 corrects loss of precision from parseFloat (#15100) + return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0; + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + isPlainObject: function( obj ) { + var key; + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call(obj, "constructor") && + !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Support: IE<9 + // Handle iteration over inherited properties before own properties. + if ( support.ownLast ) { + for ( key in obj ) { + return hasOwn.call( obj, key ); + } + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + type: function( obj ) { + if ( obj == null ) { + return obj + ""; + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call(obj) ] || "object" : + typeof obj; + }, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Support: Android<4.1, IE<9 + trim: function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( indexOf ) { + return indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + while ( j < len ) { + first[ i++ ] = second[ j++ ]; + } + + // Support: IE<9 + // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) + if ( len !== len ) { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + now: function() { + return +( new Date() ); + }, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + + // Support: iOS 8.2 (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = "length" in obj && obj.length, + type = jQuery.type( obj ); + + if ( type === "function" || jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.2.0-pre + * http://sizzlejs.com/ + * + * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-12-16 + */ +(function( window ) { + +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // General-purpose constants + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf as it's faster than native + // http://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + characterEncoding + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + nodeType = context.nodeType; + + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + if ( !seed && documentIsHTML ) { + + // Try to shortcut find operations when possible (e.g., not under DocumentFragment) + if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document (jQuery #6963) + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType !== 1 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key + " " ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, parent, + doc = node ? node.ownerDocument || node : preferredDoc; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + parent = doc.defaultView; + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent !== parent.top ) { + // IE11 does not have attachEvent, so all must suffer + if ( parent.addEventListener ) { + parent.addEventListener( "unload", unloadHandler, false ); + } else if ( parent.attachEvent ) { + parent.attachEvent( "onunload", unloadHandler ); + } + } + + /* Support tests + ---------------------------------------------------------------------- */ + documentIsHTML = !isXML( doc ); + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( doc.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [ m ] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + docElem.appendChild( div ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( div.querySelectorAll("[msallowcapture^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+ + if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push("~="); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibing-combinator selector` fails + if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push(".#.+[+~]"); + } + }); + + assert(function( div ) { + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( div.querySelectorAll("[name=d]").length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return doc; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch (e) {} + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + while ( (node = elem[i++]) ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[6] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] ) { + match[2] = match[4] || match[5] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + // Don't keep the element (issue #299) + input[0] = null; + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( (tokens = []) ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (oldCache = outerCache[ dir ]) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return (newCache[ 2 ] = oldCache[ 2 ]); + } else { + // Reuse newcache so results back-propagate to previous elements + outerCache[ dir ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), + len = elems.length; + + if ( outermost ) { + outermostContext = context !== document && context; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( (selector = compiled.selector || selector) ); + + results = results || []; + + // Try to minimize operations if there is no seed and only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = ""; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = ""; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + null; + } + }); +} + +return Sizzle; + +})( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + + +var rneedsContext = jQuery.expr.match.needsContext; + +var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); + + + +var risSimple = /^.[^:#\[\.,]*$/; + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + }); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + }); + + } + + if ( typeof qualifier === "string" ) { + if ( risSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; + }); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + })); +}; + +jQuery.fn.extend({ + find: function( selector ) { + var i, + ret = [], + self = this, + len = self.length; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + filter: function( selector ) { + return this.pushStack( winnow(this, selector || [], false) ); + }, + not: function( selector ) { + return this.pushStack( winnow(this, selector || [], true) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +}); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // Use the correct document accordingly with window argument (sandbox) + document = window.document, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + init = jQuery.fn.init = function( selector, context ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return typeof rootjQuery.ready !== "undefined" ? + rootjQuery.ready( selector ) : + // Execute immediately if ready is not present + selector( jQuery ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.extend({ + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +jQuery.fn.extend({ + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { + // Always skip document fragments + if ( cur.nodeType < 11 && (pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) ) { + + matched.push( cur ); + break; + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.unique( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + if ( this.length > 1 ) { + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + ret = jQuery.unique( ret ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + } + + return this.pushStack( ret ); + }; +}); +var rnotwhite = (/\S+/g); + + + +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // First callback to fire (used internally by add and fireWith) + firingStart, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( values === progressValues ) { + deferred.notifyWith( contexts, values ); + + } else if ( !(--remaining) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); + + +// The deferred used on DOM ready +var readyList; + +jQuery.fn.ready = function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; +}; + +jQuery.extend({ + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.triggerHandler ) { + jQuery( document ).triggerHandler( "ready" ); + jQuery( document ).off( "ready" ); + } + } +}); + +/** + * Clean-up method for dom ready events + */ +function detach() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } +} + +/** + * The ready event handler and self cleanup method + */ +function completed() { + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { + detach(); + jQuery.ready(); + } +} + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + + // If IE event model is used + } else { + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch(e) {} + + if ( top && top.doScroll ) { + (function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch(e) { + return setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise( obj ); +}; + + +var strundefined = typeof undefined; + + + +// Support: IE<9 +// Iteration over object's inherited properties before its own +var i; +for ( i in jQuery( support ) ) { + break; +} +support.ownLast = i !== "0"; + +// Note: most support tests are defined in their respective modules. +// false until the test is run +support.inlineBlockNeedsLayout = false; + +// Execute ASAP in case we need to set body.style.zoom +jQuery(function() { + // Minified: var a,b,c,d + var val, div, body, container; + + body = document.getElementsByTagName( "body" )[ 0 ]; + if ( !body || !body.style ) { + // Return for frameset docs that don't have a body + return; + } + + // Setup + div = document.createElement( "div" ); + container = document.createElement( "div" ); + container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; + body.appendChild( container ).appendChild( div ); + + if ( typeof div.style.zoom !== strundefined ) { + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1"; + + support.inlineBlockNeedsLayout = val = div.offsetWidth === 3; + if ( val ) { + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); +}); + + + + +(function() { + var div = document.createElement( "div" ); + + // Execute the test only if not already executed in another module. + if (support.deleteExpando == null) { + // Support: IE<9 + support.deleteExpando = true; + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + } + + // Null elements to avoid leaks in IE. + div = null; +})(); + + +/** + * Determines whether an object can have data + */ +jQuery.acceptData = function( elem ) { + var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ], + nodeType = +elem.nodeType || 1; + + // Do not set data on non-element DOM nodes because it will not be cleared (#8335). + return nodeType !== 1 && nodeType !== 9 ? + false : + + // Nodes accept data unless otherwise specified; rejection can be conditional + !noData || noData !== true && elem.getAttribute("classid") === noData; +}; + + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /([A-Z])/g; + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + +function internalData( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var ret, thisCache, + internalKey = jQuery.expando, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + // Avoid exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( typeof name === "string" ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } else { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + i = name.length; + while ( i-- ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + /* jshint eqeqeq: false */ + } else if ( support.deleteExpando || cache != cache.window ) { + /* jshint eqeqeq: true */ + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } +} + +jQuery.extend({ + cache: {}, + + // The following elements (space-suffixed to avoid Object.prototype collisions) + // throw uncatchable exceptions if you attempt to set expando properties + noData: { + "applet ": true, + "embed ": true, + // ...but Flash objects (which have this classid) *can* handle expandos + "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var i, name, data, + elem = this[0], + attrs = elem && elem.attributes; + + // Special expections of .data basically thwart jQuery.access, + // so implement the relevant behavior ourselves + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE11+ + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.slice(5) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + return arguments.length > 1 ? + + // Sets one value + this.each(function() { + jQuery.data( this, key, value ); + }) : + + // Gets one value + // Try to fetch any internally stored data first + elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined; + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + + +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var isHidden = function( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); + }; + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; +}; +var rcheckableType = (/^(?:checkbox|radio)$/i); + + + +(function() { + // Minified: var a,b,c + var input = document.createElement( "input" ), + div = document.createElement( "div" ), + fragment = document.createDocumentFragment(); + + // Setup + div.innerHTML = "
a"; + + // IE strips leading whitespace when .innerHTML is used + support.leadingWhitespace = div.firstChild.nodeType === 3; + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + support.tbody = !div.getElementsByTagName( "tbody" ).length; + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + support.htmlSerialize = !!div.getElementsByTagName( "link" ).length; + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + support.html5Clone = + document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav>"; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + input.type = "checkbox"; + input.checked = true; + fragment.appendChild( input ); + support.appendChecked = input.checked; + + // Make sure textarea (and checkbox) defaultValue is properly cloned + // Support: IE6-IE11+ + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + + // #11217 - WebKit loses check when the name is after the checked attribute + fragment.appendChild( div ); + div.innerHTML = ""; + + // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 + // old WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Opera does not clone events (and typeof div.attachEvent === undefined). + // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() + support.noCloneEvent = true; + if ( div.attachEvent ) { + div.attachEvent( "onclick", function() { + support.noCloneEvent = false; + }); + + div.cloneNode( true ).click(); + } + + // Execute the test only if not already executed in another module. + if (support.deleteExpando == null) { + // Support: IE<9 + support.deleteExpando = true; + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + } +})(); + + +(function() { + var i, eventName, + div = document.createElement( "div" ); + + // Support: IE<9 (lack submit/change bubble), Firefox 23+ (lack focusin event) + for ( i in { submit: true, change: true, focusin: true }) { + eventName = "on" + i; + + if ( !(support[ i + "Bubbles" ] = eventName in window) ) { + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + div.setAttribute( eventName, "t" ); + support[ i + "Bubbles" ] = div.attributes[ eventName ].expando === false; + } + } + + // Null elements to avoid leaks in IE. + div = null; +})(); + + +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && jQuery.acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && + jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, ret, handleObj, matched, j, + handlerQueue = [], + args = slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var sel, handleObj, matches, i, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + /* jshint eqeqeq: false */ + for ( ; cur != this; cur = cur.parentNode || this ) { + /* jshint eqeqeq: true */ + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Chrome 23+, Safari? + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === strundefined ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + // Support: IE < 9, Android < 4.0 + src.returnValue === false ? + returnTrue : + returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + if ( !e ) { + return; + } + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && e.stopImmediatePropagation ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "submitBubbles" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "submitBubbles", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "changeBubbles", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + var doc = this.ownerDocument || this, + attaches = jQuery._data( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + jQuery._data( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this, + attaches = jQuery._data( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + jQuery._removeData( doc, fix ); + } else { + jQuery._data( doc, fix, attaches ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var type, origFn; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); + + +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
", "
" ], + area: [ 1, "", "" ], + param: [ 1, "", "" ], + thead: [ 1, "", "
" ], + tr: [ 2, "", "
" ], + col: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
", "
" ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + +// Used in buildFragment, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +// Support: IE<8 +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[1]; + } else { + elem.removeAttribute("type"); + } + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; (elem = elems[i]) != null; i++ ) { + jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); + } +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!support.noCloneEvent || !support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; (node = srcElements[i]) != null; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + fixCloneNodeIssues( node, destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; (node = srcElements[i]) != null; i++ ) { + cloneCopyEvent( node, destElements[i] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var j, elem, contains, + tmp, tag, tbody, wrap, + l = elems.length, + + // Ensure a safe fragment + safe = createSafeFragment( context ), + + nodes = [], + i = 0; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || safe.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = (rtagName.exec( elem ) || [ "", "" ])[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + + tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; + + // Descend through wrappers to the right content + j = wrap[0]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Manually add leading whitespace removed by IE + if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); + } + + // Remove IE's autoinserted from table fragments + if ( !support.tbody ) { + + // String was a , *may* have spurious + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare or + wrap[1] === "
" && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( typeof elem.removeAttribute !== strundefined ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + deletedIds.push( id ); + } + } + } + } + } +}); + +jQuery.fn.extend({ + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + append: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + remove: function( selector, keepData /* Internal Use Only */ ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map(function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var arg = arguments[ 0 ]; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + arg = this.parentNode; + + jQuery.cleanData( getAll( this ) ); + + if ( arg ) { + arg.replaceChild( elem, this ); + } + }); + + // Force removal if there was no new content (e.g., from empty arguments) + return arg && (arg.length || arg.nodeType) ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[0], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[0] = value.call( this, index, self.html() ); + } + self.domManip( args, callback ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( this[i], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl ) { + jQuery._evalUrl( node.src ); + } + } else { + jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return this; + } +}); + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone(true); + jQuery( insert[i] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + + +var iframe, + elemdisplay = {}; + +/** + * Retrieve the actual display of a element + * @param {String} name nodeName of the element + * @param {Object} doc Document object + */ +// Called only from within defaultDisplay +function actualDisplay( name, doc ) { + var style, + elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + + // getDefaultComputedStyle might be reliably used only on attached element + display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? + + // Use of this method is a temporary fix (more like optmization) until something better comes along, + // since it was removed from specification and supported only in FF + style.display : jQuery.css( elem[ 0 ], "display" ); + + // We don't have any data stored on the element, + // so use "detach" method as fast way to get rid of the element + elem.detach(); + + return display; +} + +/** + * Try to determine the default display value of an element + * @param {String} nodeName + */ +function defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + + // Use the already-created iframe if possible + iframe = (iframe || jQuery( " + +
+
+ +
+
+
+ +
+ + +
+
+ +
+
+
+ +
+
+ + + +
+
파일 첨부
+
+
+

+
+
0%

파일을 업로드하는 중입니다.

+ +
    +
    +
    +
    +
    + + + + + + + + + + +
    + + + + + +
    + + + + \ No newline at end of file diff --git a/src/main/webapp/daumeditor/editor.jsp b/src/main/webapp/daumeditor/editor.jsp new file mode 100644 index 0000000..899b198 --- /dev/null +++ b/src/main/webapp/daumeditor/editor.jsp @@ -0,0 +1,642 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" + pageEncoding="utf-8"%> + + + + + Daum 에디터 - 등록화면 예제 + + + + + + + +
    + + +
    + +
    + +
    +
    + + + + + +
    +
    + + + +
    + +
      +
    • +
      + 9pt +
      +
      +
    • +
    + + + + + + + + +
    + + +
    +
      +
    • +
      +
    • +
    + + + + + + + +
    + + + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    + + + +
    +
    파일 첨부
    +
    +
    +

    +
    +
    0%

    파일을 업로드하는 중입니다.

    + +
      +
      +
      +
      +
      + +
      + + +
      + + + + + +
      + + + + + +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/daumeditor/editor_multi.html b/src/main/webapp/daumeditor/editor_multi.html new file mode 100644 index 0000000..1f966dd --- /dev/null +++ b/src/main/webapp/daumeditor/editor_multi.html @@ -0,0 +1,1087 @@ + + + + + Daum 에디터 - 등록화면 예제 + + + + + + + +
      + + +
      + +
      + +
      +
      + + + + + +
      +
      + +
      +
      + +
        +
      • +
        + 9pt +
        +
        +
        +
      • +
      + + + + + + + + +
      +
      + +
      +
      +
        +
      • +
        +
        +
      • +
      + + + + +
      +
      + +
      +
      +
      + +
      +
      +
      + +
      +
      +
      + +
      +
      +
      + +
      +
      + +
      +
      +
      + +
      +
      +
      + +
      +
      +
      +
      + 파일 첨부 +
      +
      +
      +
      +

      +

      + +
      +
      +
      +
      + 0% +
      +

      + 파일을 업로드하는 중입니다. +

      +
      + +
        +
      +
      +
      +
      +
      + +
      + + +
      + + + + + +
      + +
      + 위는 에디터2, 아래는 에디터3 입니다.
      +
      + + +
      +
      + +
      + + +
      + +
      + +
      +
      + + + + + +
      +
      + +
      +
      + +
        +
      • +
        + 9pt +
        +
        +
        +
      • +
      + + + + + + + + +
      +
      + +
      +
      +
        +
      • +
        +
        +
      • +
      + + + + +
      +
      + +
      +
      +
      + +
      +
      +
      + +
      +
      +
      + +
      +
      +
      + +
      +
      + +
      +
      +
      + +
      +
      +
      + +
      +
      +
      +
      + 파일 첨부 +
      +
      +
      +
      +

      +

      + +
      +
      +
      +
      + 0% +
      +

      + 파일을 업로드하는 중입니다. +

      +
      + +
        +
      +
      +
      +
      +
      + +
      + + +
      + + + + + + + + + + diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_01.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_01.gif new file mode 100644 index 0000000..9c665df Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_01.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_02.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_02.gif new file mode 100644 index 0000000..fc4369d Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_02.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_03.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_03.gif new file mode 100644 index 0000000..2cd9fe5 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_03.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_04.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_04.gif new file mode 100644 index 0000000..fef8cdd Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_04.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_05.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_05.gif new file mode 100644 index 0000000..69dd016 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_05.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_06.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_06.gif new file mode 100644 index 0000000..bb4e75c Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_06.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_07.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_07.gif new file mode 100644 index 0000000..615b696 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_07.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_08.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_08.gif new file mode 100644 index 0000000..8845d8b Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_08.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_09.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_09.gif new file mode 100644 index 0000000..2fc7f4b Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_09.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_10.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_10.gif new file mode 100644 index 0000000..15c0979 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_10.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_11.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_11.gif new file mode 100644 index 0000000..aa8390a Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_11.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_12.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_12.gif new file mode 100644 index 0000000..d0a4ead Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_12.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_13.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_13.gif new file mode 100644 index 0000000..59e20c8 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_13.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_14.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_14.gif new file mode 100644 index 0000000..3ce4173 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_14.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_15.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_15.gif new file mode 100644 index 0000000..bfc66b0 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_15.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_16.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_16.gif new file mode 100644 index 0000000..52032f6 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_16.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_17.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_17.gif new file mode 100644 index 0000000..08c2bb4 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_17.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_18.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_18.gif new file mode 100644 index 0000000..0f859c0 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_18.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_19.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_19.gif new file mode 100644 index 0000000..ad8c111 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_19.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_20.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_20.gif new file mode 100644 index 0000000..5abb687 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_20.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_21.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_21.gif new file mode 100644 index 0000000..cb8d56e Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_21.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_22.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_22.gif new file mode 100644 index 0000000..eefdcc9 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_22.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_23.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_23.gif new file mode 100644 index 0000000..dad6456 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_23.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_24.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_24.gif new file mode 100644 index 0000000..dae5db8 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_24.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_25.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_25.gif new file mode 100644 index 0000000..b903571 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_25.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_26.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_26.gif new file mode 100644 index 0000000..23ac42c Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_26.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_27.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_27.gif new file mode 100644 index 0000000..b8f105a Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_27.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_28.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_28.gif new file mode 100644 index 0000000..af45b7f Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/ani_28.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_01.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_01.gif new file mode 100644 index 0000000..1b991ec Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_01.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_02.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_02.gif new file mode 100644 index 0000000..31cf9c0 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_02.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_03.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_03.gif new file mode 100644 index 0000000..739bcb9 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_03.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_04.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_04.gif new file mode 100644 index 0000000..42a5f5a Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_04.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_05.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_05.gif new file mode 100644 index 0000000..b11eb9a Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_05.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_06.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_06.gif new file mode 100644 index 0000000..001b49b Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_06.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_07.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_07.gif new file mode 100644 index 0000000..3c2e6a5 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_07.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_08.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_08.gif new file mode 100644 index 0000000..6c3a162 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_08.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_09.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_09.gif new file mode 100644 index 0000000..7e97e77 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_09.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_10.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_10.gif new file mode 100644 index 0000000..f98590d Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_10.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_11.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_11.gif new file mode 100644 index 0000000..e5d8f85 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_11.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_12.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_12.gif new file mode 100644 index 0000000..818e29b Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_12.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_13.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_13.gif new file mode 100644 index 0000000..864220a Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_13.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_14.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_14.gif new file mode 100644 index 0000000..5a7b530 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_14.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_15.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_15.gif new file mode 100644 index 0000000..9bcff7e Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_15.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_16.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_16.gif new file mode 100644 index 0000000..7bcb565 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_16.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_17.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_17.gif new file mode 100644 index 0000000..b2b9612 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_17.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_18.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_18.gif new file mode 100644 index 0000000..2ffeb4d Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_18.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_19.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_19.gif new file mode 100644 index 0000000..2ecc980 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_19.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_20.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_20.gif new file mode 100644 index 0000000..98bcf95 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_20.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_21.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_21.gif new file mode 100644 index 0000000..bd0530d Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_21.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_22.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_22.gif new file mode 100644 index 0000000..5570438 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_22.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_23.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_23.gif new file mode 100644 index 0000000..9b7b4f8 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_23.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_24.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_24.gif new file mode 100644 index 0000000..881dd75 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_24.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_25.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_25.gif new file mode 100644 index 0000000..0b51cae Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_25.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_26.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_26.gif new file mode 100644 index 0000000..5c319d9 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_26.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_27.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_27.gif new file mode 100644 index 0000000..e526d7b Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_27.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_28.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_28.gif new file mode 100644 index 0000000..225f2fe Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_28.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_29.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_29.gif new file mode 100644 index 0000000..a722892 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/etc_29.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_01.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_01.gif new file mode 100644 index 0000000..7d30528 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_01.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_02.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_02.gif new file mode 100644 index 0000000..9fb15bb Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_02.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_03.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_03.gif new file mode 100644 index 0000000..c4913d2 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_03.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_04.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_04.gif new file mode 100644 index 0000000..582a500 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_04.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_05.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_05.gif new file mode 100644 index 0000000..31efef0 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_05.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_06.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_06.gif new file mode 100644 index 0000000..f004590 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_06.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_07.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_07.gif new file mode 100644 index 0000000..62d8658 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_07.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_08.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_08.gif new file mode 100644 index 0000000..141f2f7 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_08.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_09.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_09.gif new file mode 100644 index 0000000..6b0fd2c Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_09.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_10.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_10.gif new file mode 100644 index 0000000..b5d1536 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_10.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_11.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_11.gif new file mode 100644 index 0000000..a166514 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_11.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_12.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_12.gif new file mode 100644 index 0000000..69ffeda Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_12.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_13.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_13.gif new file mode 100644 index 0000000..4df7026 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_13.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_14.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_14.gif new file mode 100644 index 0000000..e6c9ce8 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_14.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_15.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_15.gif new file mode 100644 index 0000000..f1f2d23 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_15.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_16.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_16.gif new file mode 100644 index 0000000..17b0c10 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_16.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_17.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_17.gif new file mode 100644 index 0000000..da315f9 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_17.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_18.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_18.gif new file mode 100644 index 0000000..6c17cf9 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_18.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_19.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_19.gif new file mode 100644 index 0000000..c6dc1e7 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_19.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_20.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_20.gif new file mode 100644 index 0000000..4ae076c Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_20.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_21.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_21.gif new file mode 100644 index 0000000..4ca2c3c Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_21.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_22.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_22.gif new file mode 100644 index 0000000..9c461b1 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_22.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_23.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_23.gif new file mode 100644 index 0000000..944d9db Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_23.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_24.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_24.gif new file mode 100644 index 0000000..4363acc Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_24.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_25.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_25.gif new file mode 100644 index 0000000..3c82a1e Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_25.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_26.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_26.gif new file mode 100644 index 0000000..69cc771 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_26.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_27.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_27.gif new file mode 100644 index 0000000..a140829 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_27.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_28.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_28.gif new file mode 100644 index 0000000..4f973b6 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_28.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_29.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_29.gif new file mode 100644 index 0000000..11c6f67 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/per_29.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_01.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_01.gif new file mode 100644 index 0000000..d0eedbc Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_01.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_02.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_02.gif new file mode 100644 index 0000000..edef1aa Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_02.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_03.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_03.gif new file mode 100644 index 0000000..a3dd76e Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_03.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_04.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_04.gif new file mode 100644 index 0000000..04b22ea Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_04.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_05.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_05.gif new file mode 100644 index 0000000..bd240cc Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_05.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_06.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_06.gif new file mode 100644 index 0000000..911cd67 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_06.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_07.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_07.gif new file mode 100644 index 0000000..ac281f2 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_07.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_08.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_08.gif new file mode 100644 index 0000000..e4299d4 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_08.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_09.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_09.gif new file mode 100644 index 0000000..c9771f7 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_09.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_10.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_10.gif new file mode 100644 index 0000000..657efe0 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_10.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_11.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_11.gif new file mode 100644 index 0000000..2f196b0 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_11.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_12.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_12.gif new file mode 100644 index 0000000..a2379d1 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_12.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_13.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_13.gif new file mode 100644 index 0000000..b6e089b Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_13.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_14.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_14.gif new file mode 100644 index 0000000..68ad75f Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_14.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_15.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_15.gif new file mode 100644 index 0000000..1636d7e Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_15.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_16.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_16.gif new file mode 100644 index 0000000..aa2dc47 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_16.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_17.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_17.gif new file mode 100644 index 0000000..6ecc83f Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_17.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_18.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_18.gif new file mode 100644 index 0000000..b6ce699 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_18.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_19.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_19.gif new file mode 100644 index 0000000..36f6b60 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_19.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_20.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_20.gif new file mode 100644 index 0000000..d4f3343 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_20.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_21.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_21.gif new file mode 100644 index 0000000..95a40df Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_21.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_22.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_22.gif new file mode 100644 index 0000000..90fcfdc Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_22.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_23.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_23.gif new file mode 100644 index 0000000..2cca4cf Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_23.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_24.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_24.gif new file mode 100644 index 0000000..cd04f14 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_24.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_25.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_25.gif new file mode 100644 index 0000000..d251ae5 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_25.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_26.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_26.gif new file mode 100644 index 0000000..d5a9877 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_26.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_27.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_27.gif new file mode 100644 index 0000000..1bfd2e9 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_27.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_28.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_28.gif new file mode 100644 index 0000000..9ec052a Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_28.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_29.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_29.gif new file mode 100644 index 0000000..11f0f6c Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_29.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_30.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_30.gif new file mode 100644 index 0000000..ee12ae6 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_30.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_31.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_31.gif new file mode 100644 index 0000000..474dac1 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_31.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_32.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_32.gif new file mode 100644 index 0000000..e6b4b32 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_32.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_33.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_33.gif new file mode 100644 index 0000000..3f493e2 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_33.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_34.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_34.gif new file mode 100644 index 0000000..82193ee Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_34.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_35.gif b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_35.gif new file mode 100644 index 0000000..23a99db Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/emoticon/things_35.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line01.gif b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line01.gif new file mode 100644 index 0000000..e96de86 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line01.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line02.gif b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line02.gif new file mode 100644 index 0000000..e30c7de Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line02.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line03.gif b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line03.gif new file mode 100644 index 0000000..1025f86 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line03.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line04.gif b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line04.gif new file mode 100644 index 0000000..bc3b37d Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line04.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line05.gif b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line05.gif new file mode 100644 index 0000000..8e147c0 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line05.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line06.gif b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line06.gif new file mode 100644 index 0000000..f8f6eba Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line06.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line07.gif b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line07.gif new file mode 100644 index 0000000..7618f11 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line07.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line08.gif b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line08.gif new file mode 100644 index 0000000..bd3fbbe Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/horizontalrule/line08.gif differ diff --git a/src/main/webapp/daumeditor/images/deco/contents/quote/titation01.gif b/src/main/webapp/daumeditor/images/deco/contents/quote/titation01.gif new file mode 100644 index 0000000..8914c58 Binary files /dev/null and b/src/main/webapp/daumeditor/images/deco/contents/quote/titation01.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/b_link.gif b/src/main/webapp/daumeditor/images/icon/editor/b_link.gif new file mode 100644 index 0000000..4a63531 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/b_link.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/bt_close.gif b/src/main/webapp/daumeditor/images/icon/editor/bt_close.gif new file mode 100644 index 0000000..cc44944 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/bt_close.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_a_close.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_a_close.gif new file mode 100644 index 0000000..8983025 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_a_close.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_a_delete.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_a_delete.gif new file mode 100644 index 0000000..5a9d5e9 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_a_delete.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_a_delete4.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_a_delete4.gif new file mode 100644 index 0000000..75c5bde Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_a_delete4.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_a_delete6.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_a_delete6.gif new file mode 100644 index 0000000..74f799c Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_a_delete6.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_a_fold.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_a_fold.gif new file mode 100644 index 0000000..74b4d50 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_a_fold.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_a_spread.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_a_spread.gif new file mode 100644 index 0000000..26fff2a Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_a_spread.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_a_upload.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_a_upload.gif new file mode 100644 index 0000000..785d7c8 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_a_upload.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_cancel.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_cancel.gif new file mode 100644 index 0000000..3ec6f39 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_cancel.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_cancel_s1.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_cancel_s1.gif new file mode 100644 index 0000000..6ff9c3d Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_cancel_s1.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_cb_spread.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_cb_spread.gif new file mode 100644 index 0000000..e0057b7 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_cb_spread.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_confirm.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_confirm.gif new file mode 100644 index 0000000..2faf6ae Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_confirm.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_confirm_s1.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_confirm_s1.gif new file mode 100644 index 0000000..8cd82ad Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_confirm_s1.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_deletefile.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_deletefile.gif new file mode 100644 index 0000000..61de169 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_deletefile.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_images_three.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_images_three.gif new file mode 100644 index 0000000..460b0f0 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_images_three.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_images_two.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_images_two.gif new file mode 100644 index 0000000..0dd6d74 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_images_two.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_l_cancel.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_l_cancel.gif new file mode 100644 index 0000000..204c6da Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_l_cancel.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_l_confirm.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_l_confirm.gif new file mode 100644 index 0000000..e6dad6a Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_l_confirm.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_l_input_1.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_l_input_1.gif new file mode 100644 index 0000000..8ecf0da Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_l_input_1.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_minus.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_minus.gif new file mode 100644 index 0000000..b22481b Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_minus.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_plus.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_plus.gif new file mode 100644 index 0000000..699a482 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_plus.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_remove.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_remove.gif new file mode 100644 index 0000000..9630aef Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_remove.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/btn_revert.gif b/src/main/webapp/daumeditor/images/icon/editor/btn_revert.gif new file mode 100644 index 0000000..56af3ed Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/btn_revert.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/editor_bi.png b/src/main/webapp/daumeditor/images/icon/editor/editor_bi.png new file mode 100644 index 0000000..6f9eff7 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/editor_bi.png differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/emoticon/emoticon_01.gif b/src/main/webapp/daumeditor/images/icon/editor/emoticon/emoticon_01.gif new file mode 100644 index 0000000..8bb98a8 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/emoticon/emoticon_01.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/emoticon/emoticon_02.gif b/src/main/webapp/daumeditor/images/icon/editor/emoticon/emoticon_02.gif new file mode 100644 index 0000000..20ee4c6 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/emoticon/emoticon_02.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/emoticon/emoticon_03.gif b/src/main/webapp/daumeditor/images/icon/editor/emoticon/emoticon_03.gif new file mode 100644 index 0000000..ba59294 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/emoticon/emoticon_03.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/emoticon/emoticon_04.gif b/src/main/webapp/daumeditor/images/icon/editor/emoticon/emoticon_04.gif new file mode 100644 index 0000000..9d6b03d Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/emoticon/emoticon_04.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/file/ico_stop.gif b/src/main/webapp/daumeditor/images/icon/editor/file/ico_stop.gif new file mode 100644 index 0000000..19ec22d Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/file/ico_stop.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line01.gif b/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line01.gif new file mode 100644 index 0000000..c894a20 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line01.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line02.gif b/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line02.gif new file mode 100644 index 0000000..ed06ad5 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line02.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line03.gif b/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line03.gif new file mode 100644 index 0000000..f75c3d8 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line03.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line04.gif b/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line04.gif new file mode 100644 index 0000000..4cddbdd Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line04.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line05.gif b/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line05.gif new file mode 100644 index 0000000..1fbc119 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line05.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line06.gif b/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line06.gif new file mode 100644 index 0000000..6934f9f Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line06.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line07.gif b/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line07.gif new file mode 100644 index 0000000..99059ba Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/horizontalrule/line07.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/ic_arrow02.gif b/src/main/webapp/daumeditor/images/icon/editor/ic_arrow02.gif new file mode 100644 index 0000000..46f5461 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/ic_arrow02.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/ic_col.gif b/src/main/webapp/daumeditor/images/icon/editor/ic_col.gif new file mode 100644 index 0000000..0760cfd Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/ic_col.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/ic_dot.gif b/src/main/webapp/daumeditor/images/icon/editor/ic_dot.gif new file mode 100644 index 0000000..3bf0ddb Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/ic_dot.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/ic_new.gif b/src/main/webapp/daumeditor/images/icon/editor/ic_new.gif new file mode 100644 index 0000000..e55bc67 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/ic_new.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/ic_pie.gif b/src/main/webapp/daumeditor/images/icon/editor/ic_pie.gif new file mode 100644 index 0000000..a02a1ab Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/ic_pie.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/ic_play01.gif b/src/main/webapp/daumeditor/images/icon/editor/ic_play01.gif new file mode 100644 index 0000000..18e4c7f Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/ic_play01.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/ic_row.gif b/src/main/webapp/daumeditor/images/icon/editor/ic_row.gif new file mode 100644 index 0000000..876035b Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/ic_row.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/img_color_w.png b/src/main/webapp/daumeditor/images/icon/editor/img_color_w.png new file mode 100644 index 0000000..b880171 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/img_color_w.png differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/img_colorbar_w.gif b/src/main/webapp/daumeditor/images/icon/editor/img_colorbar_w.gif new file mode 100644 index 0000000..5108f68 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/img_colorbar_w.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/img_multi_icon.gif b/src/main/webapp/daumeditor/images/icon/editor/img_multi_icon.gif new file mode 100644 index 0000000..cfe481e Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/img_multi_icon.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/img_multi_wmp.gif b/src/main/webapp/daumeditor/images/icon/editor/img_multi_wmp.gif new file mode 100644 index 0000000..b01e516 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/img_multi_wmp.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/index01.gif b/src/main/webapp/daumeditor/images/icon/editor/index01.gif new file mode 100644 index 0000000..78adca4 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/index01.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/index03.gif b/src/main/webapp/daumeditor/images/icon/editor/index03.gif new file mode 100644 index 0000000..ec2a259 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/index03.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/loading2.png b/src/main/webapp/daumeditor/images/icon/editor/loading2.png new file mode 100644 index 0000000..1af7818 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/loading2.png differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/menu_border_style.gif b/src/main/webapp/daumeditor/images/icon/editor/menu_border_style.gif new file mode 100644 index 0000000..b5a1a41 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/menu_border_style.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/menu_border_width.gif b/src/main/webapp/daumeditor/images/icon/editor/menu_border_width.gif new file mode 100644 index 0000000..32fda8e Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/menu_border_width.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_etc_s.gif b/src/main/webapp/daumeditor/images/icon/editor/p_etc_s.gif new file mode 100644 index 0000000..0f0bdc4 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_etc_s.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_gif_s.gif b/src/main/webapp/daumeditor/images/icon/editor/p_gif_s.gif new file mode 100644 index 0000000..c3c9fef Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_gif_s.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_html_s.gif b/src/main/webapp/daumeditor/images/icon/editor/p_html_s.gif new file mode 100644 index 0000000..8303502 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_html_s.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_hwp_s.gif b/src/main/webapp/daumeditor/images/icon/editor/p_hwp_s.gif new file mode 100644 index 0000000..78d836f Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_hwp_s.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_jpg_s.gif b/src/main/webapp/daumeditor/images/icon/editor/p_jpg_s.gif new file mode 100644 index 0000000..b6d22c4 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_jpg_s.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_movie_s.gif b/src/main/webapp/daumeditor/images/icon/editor/p_movie_s.gif new file mode 100644 index 0000000..db9b9e8 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_movie_s.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_mp3_s.gif b/src/main/webapp/daumeditor/images/icon/editor/p_mp3_s.gif new file mode 100644 index 0000000..894e0b7 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_mp3_s.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_pdf_s.gif b/src/main/webapp/daumeditor/images/icon/editor/p_pdf_s.gif new file mode 100644 index 0000000..45c6307 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_pdf_s.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_png_s.gif b/src/main/webapp/daumeditor/images/icon/editor/p_png_s.gif new file mode 100644 index 0000000..e0207ef Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_png_s.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_ppt_s.gif b/src/main/webapp/daumeditor/images/icon/editor/p_ppt_s.gif new file mode 100644 index 0000000..3f48022 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_ppt_s.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_swf_s.gif b/src/main/webapp/daumeditor/images/icon/editor/p_swf_s.gif new file mode 100644 index 0000000..79ba631 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_swf_s.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_txt_s.gif b/src/main/webapp/daumeditor/images/icon/editor/p_txt_s.gif new file mode 100644 index 0000000..2d11fe0 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_txt_s.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_word_s.gif b/src/main/webapp/daumeditor/images/icon/editor/p_word_s.gif new file mode 100644 index 0000000..ee98c62 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_word_s.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_xls.gif b/src/main/webapp/daumeditor/images/icon/editor/p_xls.gif new file mode 100644 index 0000000..016f1f1 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_xls.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_xls_s.gif b/src/main/webapp/daumeditor/images/icon/editor/p_xls_s.gif new file mode 100644 index 0000000..a64afb3 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_xls_s.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/p_zip_s.gif b/src/main/webapp/daumeditor/images/icon/editor/p_zip_s.gif new file mode 100644 index 0000000..9c86f01 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/p_zip_s.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_auction.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_auction.gif new file mode 100644 index 0000000..5fed4f4 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_auction.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_chart.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_chart.gif new file mode 100644 index 0000000..666730e Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_chart.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_etc.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_etc.gif new file mode 100644 index 0000000..86949c8 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_etc.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_html.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_html.gif new file mode 100644 index 0000000..1d6e856 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_html.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_hwp.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_hwp.gif new file mode 100644 index 0000000..c652eb6 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_hwp.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_map.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_map.gif new file mode 100644 index 0000000..c29f213 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_map.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_movie.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_movie.gif new file mode 100644 index 0000000..1d6e856 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_movie.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_mp3.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_mp3.gif new file mode 100644 index 0000000..11b0e69 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_mp3.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_music.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_music.gif new file mode 100644 index 0000000..3ec90f2 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_music.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_pdf.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_pdf.gif new file mode 100644 index 0000000..dcf86bf Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_pdf.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_photo.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_photo.gif new file mode 100644 index 0000000..5f01e66 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_photo.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_ppt.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_ppt.gif new file mode 100644 index 0000000..0903114 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_ppt.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_preview.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_preview.gif new file mode 100644 index 0000000..43db898 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_preview.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_swf.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_swf.gif new file mode 100644 index 0000000..47f496d Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_swf.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_txt.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_txt.gif new file mode 100644 index 0000000..a25ed14 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_txt.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_vote.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_vote.gif new file mode 100644 index 0000000..666730e Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_vote.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_word.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_word.gif new file mode 100644 index 0000000..02b9e16 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_word.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_xls.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_xls.gif new file mode 100644 index 0000000..444aaaf Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_xls.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pn_zip.gif b/src/main/webapp/daumeditor/images/icon/editor/pn_zip.gif new file mode 100644 index 0000000..7792e81 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pn_zip.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pop_footer_btn.gif b/src/main/webapp/daumeditor/images/icon/editor/pop_footer_btn.gif new file mode 100644 index 0000000..9c0f106 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pop_footer_btn.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/pop_header_bg.gif b/src/main/webapp/daumeditor/images/icon/editor/pop_header_bg.gif new file mode 100644 index 0000000..454e8e5 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/pop_header_bg.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/progress_01.gif b/src/main/webapp/daumeditor/images/icon/editor/progress_01.gif new file mode 100644 index 0000000..5cc2092 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/progress_01.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/quote/citation01.gif b/src/main/webapp/daumeditor/images/icon/editor/quote/citation01.gif new file mode 100644 index 0000000..40593f3 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/quote/citation01.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/quote/citation02.gif b/src/main/webapp/daumeditor/images/icon/editor/quote/citation02.gif new file mode 100644 index 0000000..ea73312 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/quote/citation02.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/quote/citation03.gif b/src/main/webapp/daumeditor/images/icon/editor/quote/citation03.gif new file mode 100644 index 0000000..2751df5 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/quote/citation03.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/quote/citation04.gif b/src/main/webapp/daumeditor/images/icon/editor/quote/citation04.gif new file mode 100644 index 0000000..9fb3ea9 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/quote/citation04.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/quote/citation05.gif b/src/main/webapp/daumeditor/images/icon/editor/quote/citation05.gif new file mode 100644 index 0000000..1afc0f4 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/quote/citation05.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/quote/citation06.gif b/src/main/webapp/daumeditor/images/icon/editor/quote/citation06.gif new file mode 100644 index 0000000..8384232 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/quote/citation06.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/skin/01/bot_bg.gif b/src/main/webapp/daumeditor/images/icon/editor/skin/01/bot_bg.gif new file mode 100644 index 0000000..ae84825 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/skin/01/bot_bg.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/skin/01/bot_left.gif b/src/main/webapp/daumeditor/images/icon/editor/skin/01/bot_left.gif new file mode 100644 index 0000000..2f7c0cc Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/skin/01/bot_left.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/skin/01/bot_right.gif b/src/main/webapp/daumeditor/images/icon/editor/skin/01/bot_right.gif new file mode 100644 index 0000000..88aacbc Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/skin/01/bot_right.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/skin/01/btn_drag01.gif b/src/main/webapp/daumeditor/images/icon/editor/skin/01/btn_drag01.gif new file mode 100644 index 0000000..409cba8 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/skin/01/btn_drag01.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/skin/01/btn_fold_box.gif b/src/main/webapp/daumeditor/images/icon/editor/skin/01/btn_fold_box.gif new file mode 100644 index 0000000..e519738 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/skin/01/btn_fold_box.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/skin/01/btn_spread_box.gif b/src/main/webapp/daumeditor/images/icon/editor/skin/01/btn_spread_box.gif new file mode 100644 index 0000000..02f6214 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/skin/01/btn_spread_box.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/skin/05/icon_add_table01.gif b/src/main/webapp/daumeditor/images/icon/editor/skin/05/icon_add_table01.gif new file mode 100644 index 0000000..d60a4df Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/skin/05/icon_add_table01.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/skin/05/icon_table_layer01.gif b/src/main/webapp/daumeditor/images/icon/editor/skin/05/icon_table_layer01.gif new file mode 100644 index 0000000..6f568f7 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/skin/05/icon_table_layer01.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/skin/05/icon_table_layer02.gif b/src/main/webapp/daumeditor/images/icon/editor/skin/05/icon_table_layer02.gif new file mode 100644 index 0000000..c32d19d Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/skin/05/icon_table_layer02.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/skin/05/tx_btn_01.gif b/src/main/webapp/daumeditor/images/icon/editor/skin/05/tx_btn_01.gif new file mode 100644 index 0000000..6ab50b6 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/skin/05/tx_btn_01.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/skin/06/tx_icon_20130320.gif b/src/main/webapp/daumeditor/images/icon/editor/skin/06/tx_icon_20130320.gif new file mode 100644 index 0000000..e069aeb Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/skin/06/tx_icon_20130320.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/skin/06/tx_text.gif b/src/main/webapp/daumeditor/images/icon/editor/skin/06/tx_text.gif new file mode 100644 index 0000000..4ff1f7c Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/skin/06/tx_text.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/skin/06/tx_text2.gif b/src/main/webapp/daumeditor/images/icon/editor/skin/06/tx_text2.gif new file mode 100644 index 0000000..025ff73 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/skin/06/tx_text2.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/spacer2.gif b/src/main/webapp/daumeditor/images/icon/editor/spacer2.gif new file mode 100644 index 0000000..043d5b2 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/spacer2.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/box1_left.gif b/src/main/webapp/daumeditor/images/icon/editor/table/box1_left.gif new file mode 100644 index 0000000..fd4e69f Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/box1_left.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/box1_right.gif b/src/main/webapp/daumeditor/images/icon/editor/table/box1_right.gif new file mode 100644 index 0000000..4a4e098 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/box1_right.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/box2_left.gif b/src/main/webapp/daumeditor/images/icon/editor/table/box2_left.gif new file mode 100644 index 0000000..65d6ced Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/box2_left.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/box2_right.gif b/src/main/webapp/daumeditor/images/icon/editor/table/box2_right.gif new file mode 100644 index 0000000..33d975b Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/box2_right.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/btn_direct_setting.gif b/src/main/webapp/daumeditor/images/icon/editor/table/btn_direct_setting.gif new file mode 100644 index 0000000..48da2bc Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/btn_direct_setting.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/btn_down.gif b/src/main/webapp/daumeditor/images/icon/editor/table/btn_down.gif new file mode 100644 index 0000000..e508dcd Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/btn_down.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/btn_form.gif b/src/main/webapp/daumeditor/images/icon/editor/table/btn_form.gif new file mode 100644 index 0000000..9b8deae Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/btn_form.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/btn_layout.gif b/src/main/webapp/daumeditor/images/icon/editor/table/btn_layout.gif new file mode 100644 index 0000000..76e7a0b Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/btn_layout.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/btn_tcancel.gif b/src/main/webapp/daumeditor/images/icon/editor/table/btn_tcancel.gif new file mode 100644 index 0000000..7cbcd58 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/btn_tcancel.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/btn_tselect.gif b/src/main/webapp/daumeditor/images/icon/editor/table/btn_tselect.gif new file mode 100644 index 0000000..8d9b57e Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/btn_tselect.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/btn_up.gif b/src/main/webapp/daumeditor/images/icon/editor/table/btn_up.gif new file mode 100644 index 0000000..d2924f8 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/btn_up.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/button_line.gif b/src/main/webapp/daumeditor/images/icon/editor/table/button_line.gif new file mode 100644 index 0000000..d070112 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/button_line.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/icon_design.gif b/src/main/webapp/daumeditor/images/icon/editor/table/icon_design.gif new file mode 100644 index 0000000..e725fd7 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/icon_design.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/icon_form.gif b/src/main/webapp/daumeditor/images/icon/editor/table/icon_form.gif new file mode 100644 index 0000000..3cf9b45 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/icon_form.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/icon_layout_hovered.gif b/src/main/webapp/daumeditor/images/icon/editor/table/icon_layout_hovered.gif new file mode 100644 index 0000000..786b769 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/icon_layout_hovered.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/img_des_bg.gif b/src/main/webapp/daumeditor/images/icon/editor/table/img_des_bg.gif new file mode 100644 index 0000000..4fe087c Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/img_des_bg.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/img_layout_bg.gif b/src/main/webapp/daumeditor/images/icon/editor/table/img_layout_bg.gif new file mode 100644 index 0000000..4530e12 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/img_layout_bg.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/menu_line.gif b/src/main/webapp/daumeditor/images/icon/editor/table/menu_line.gif new file mode 100644 index 0000000..55028b7 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/menu_line.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/tab_01.gif b/src/main/webapp/daumeditor/images/icon/editor/table/tab_01.gif new file mode 100644 index 0000000..4a6cceb Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/tab_01.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/tab_02.gif b/src/main/webapp/daumeditor/images/icon/editor/table/tab_02.gif new file mode 100644 index 0000000..b8c672d Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/tab_02.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/table/tab_03.gif b/src/main/webapp/daumeditor/images/icon/editor/table/tab_03.gif new file mode 100644 index 0000000..10ce5ed Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/table/tab_03.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/textbox/textbox.gif b/src/main/webapp/daumeditor/images/icon/editor/textbox/textbox.gif new file mode 100644 index 0000000..6bdd8d9 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/textbox/textbox.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/textbox/thum_line01.gif b/src/main/webapp/daumeditor/images/icon/editor/textbox/thum_line01.gif new file mode 100644 index 0000000..6e2cefd Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/textbox/thum_line01.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/textbox/thum_line02.gif b/src/main/webapp/daumeditor/images/icon/editor/textbox/thum_line02.gif new file mode 100644 index 0000000..59e6da6 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/textbox/thum_line02.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/textbox/thum_line03.gif b/src/main/webapp/daumeditor/images/icon/editor/textbox/thum_line03.gif new file mode 100644 index 0000000..ff324bd Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/textbox/thum_line03.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/textbox/thum_line04.gif b/src/main/webapp/daumeditor/images/icon/editor/textbox/thum_line04.gif new file mode 100644 index 0000000..871a77c Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/textbox/thum_line04.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/tvpot/body_bg.gif b/src/main/webapp/daumeditor/images/icon/editor/tvpot/body_bg.gif new file mode 100644 index 0000000..e40f9a6 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/tvpot/body_bg.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/w_bgimg.gif b/src/main/webapp/daumeditor/images/icon/editor/w_bgimg.gif new file mode 100644 index 0000000..5ed36aa Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/w_bgimg.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/w_bgimg_02.gif b/src/main/webapp/daumeditor/images/icon/editor/w_bgimg_02.gif new file mode 100644 index 0000000..e8a1abb Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/w_bgimg_02.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/w_leftimg.gif b/src/main/webapp/daumeditor/images/icon/editor/w_leftimg.gif new file mode 100644 index 0000000..cc44e8b Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/w_leftimg.gif differ diff --git a/src/main/webapp/daumeditor/images/icon/editor/w_rightimg.gif b/src/main/webapp/daumeditor/images/icon/editor/w_rightimg.gif new file mode 100644 index 0000000..0335fc4 Binary files /dev/null and b/src/main/webapp/daumeditor/images/icon/editor/w_rightimg.gif differ diff --git a/src/main/webapp/daumeditor/js/development_environments.js b/src/main/webapp/daumeditor/js/development_environments.js new file mode 100644 index 0000000..6d40e9c --- /dev/null +++ b/src/main/webapp/daumeditor/js/development_environments.js @@ -0,0 +1,75 @@ +/* load editor js files as development environments */ +(function() { + var DE_PREFIX = EditorJSLoader.getJSBasePath("editor.js"); + + function _importScript(filename) { + if (filename) { + EditorJSLoader.loadModule(filename); + } + } + + EXCLUDE_FILES = (typeof EXCLUDE_FILES == "object") ? EXCLUDE_FILES : []; + var isExcludeFile = function(filepath) { + for (var i = 0; i < EXCLUDE_FILES.length; i++) { + if (EXCLUDE_FILES[i] == filepath) { + return true; + } + } + return false; + }; + + // 1. import header + _importScript(DE_PREFIX + "trex/header.js"); + + // 2. import trex + for (var i = 0; i < CORE_FILES.length; i++) { + if (!isExcludeFile(CORE_FILES[i])) { + _importScript(DE_PREFIX + CORE_FILES[i]); + } + } + + // 3. import EXT_FILES + if (typeof EXT_FILES == "object") { + for (i = 0; i < EXT_FILES.length; i++) { + if (!isExcludeFile(EXT_FILES[i])) { + _importScript(EXT_FILES[i]); + } + } + } + + // 4. import projectlib + if (typeof SERVICE_FILES == "object") { + for (i = 0; i < SERVICE_FILES.length; i++) { + if (!isExcludeFile(SERVICE_FILES[i])) { + _importScript(SERVICE_FILES[i]); + } + } + } + + // 5. import footer + _importScript(DE_PREFIX + "trex/footer.js"); +})(); + +/* show development environments indicator */ +(function() { + function addEditorEnvIndicator() { + if (window.Editor && Editor.__EDITOR_LOADED) { + var indicator = document.createElement("span"); + indicator.innerHTML = "DEVELOPMENT MODE"; + $tx.setStyle(indicator, { + position: "absolute", + fontSize: "13px", + color: "green", + fontFamily: "courier,serif", + right: "10px", + bottom : "10px" + }); + var canvas = Editor.getCanvas().elContainer; //$tx("tx_canvas"); + canvas.appendChild(indicator); + } else { + setTimeout(arguments.callee, 500); + } + } + + EditorJSLoader.ready(addEditorEnvIndicator); +})(); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/editor.js b/src/main/webapp/daumeditor/js/editor.js new file mode 100644 index 0000000..2d95784 --- /dev/null +++ b/src/main/webapp/daumeditor/js/editor.js @@ -0,0 +1,181 @@ +// TODO duplicated with editor_common.js +var DEBUG = 1; +var CORE_FILES = [ + "scopeVariable.js", + /** common library */ + "lib/json2.js", + "lib/txlib.js", + "lib/closure-range.js", + "lib/hyperscript.js", + "lib/template.js", + "lib/dgetty.js", + "lib/dfindy.js", + "lib/xgetty.js", + "lib/font_css_property.js", + //"lib/htmlparser.js", + /** trex engine & config */ + "trex/eval.js", + "trex/trex.js", + "trex/event.js", + "trex/config.js", + "trex/message.js", + "trex/configbuilder.js", + /** trex library */ + "trex/lib/markup.js", + "trex/lib/domutil.js", + "trex/lib/utils.js", + "trex/lib/imageresizer.js", + "trex/lib/tableutil.js", + /** trex mixins */ + "trex/mixins/ajax.js", + "trex/mixins/observable.js", + "trex/mixins/colorpallete.js", + "trex/mixins/cookiebaker.js", + /** trex common */ + "trex/common/button.js", + "trex/common/menu.js", + "trex/common/menuback.js", + + /** editor core */ + "trex/editor.js", + "trex/toolbar.js", + "trex/sidebar.js", + "trex/docparser.js", + "trex/entryproxy.js", + "trex/formproxy.js", + "trex/saver.js", + "trex/resizer.js", + + /** canvas & panels */ + "trex/history.js", + "trex/canvas.js", + "trex/panels/panel.js", + "trex/panels/wysiwyg/iframeloader.js", + "trex/panels/wysiwyg/webfontloader.js", + "trex/panels/wysiwyg/wysiwygrelative.js", + "trex/panels/wysiwyg/eventbinder.js", + "trex/panels/wysiwygpanel.js", + "trex/panels/textareapanel.js", + "trex/panels/htmlpanel.js", + "trex/panels/textpanel.js", + + /** processor */ + "trex/processor/marker.js", + "trex/processor/selection.js", + "trex/processor/bookmark.js", + "trex/processor/processor_textarea.js", + "trex/processor/processor_standard.js", + "trex/processor/processor_trident.js", + "trex/processor/processor_trident_standard.js", + "trex/processor/processor_gecko.js", + "trex/processor/processor_webkit.js", + "trex/processor/processor_presto.js", + /* Processor For P */ + "trex/processor/p/processor_standard_p.js", + "trex/processor/p/processor_trident_p.js", + "trex/processor/p/processor_trident_standard_p.js", + "trex/processor/p/processor_gecko_p.js", + "trex/processor/p/processor_webkit_p.js", + "trex/processor/p/processor_presto_p.js", + "trex/processor/processor.js", + + /** each > filter */ + "trex/filters/converting.js", + "trex/filters/redundancy.js", + + /** attacher */ + "trex/attachment.js", + "trex/attachbox.js", + "trex/attachbox/attachbox_ui.js", + "trex/attachbox/filecapacity.js", + "trex/attacher.js", + + /** embeder */ + "trex/embeder.js", + "trex/embedentry.js", + + /** each > tool */ + "trex/tool/buttonFontTool.js", + "trex/tool/menuFontTool.js", + "trex/tool/fontTool.js", + "trex/tool/switcher.js", + "trex/tool/switchertoggle.js", + "trex/tool/fontfamily.js", + "trex/tool/fontsize.js", + "trex/tool/bold.js", + "trex/tool/underline.js", + "trex/tool/italic.js", + "trex/tool/strike.js", + "trex/tool/forecolor.js", + "trex/tool/backcolor.js", + "trex/tool/indent.js", + "trex/tool/indentHelper.js", + "trex/tool/outdent.js", + "trex/mixins/alignexecution.js", + "trex/tool/alignleft.js", + "trex/tool/aligncenter.js", + "trex/tool/alignright.js", + "trex/tool/alignfull.js", + + "trex/tool/insertcells.js", + "trex/tool/deletecells.js", + "trex/tool/mergecells.js", + "trex/tool/cellslineheight.js", + "trex/tool/cellslinecolor.js", + "trex/tool/cellslinestyle.js", + "trex/tool/cellsoutline.js", + "trex/tool/cellslinepreview.js", + "trex/tool/tablebackcolor.js", + "trex/tool/tableedittool.js", + "trex/tool/tabletemplate.js", + + "trex/tool/lineheight.js", + "trex/tool/styledlist.js", + "trex/tool/insertlink.js", + "trex/tool/richtextbox.js", + "trex/tool/quote.js", + "trex/tool/table.js", + "trex/tool/emoticon.js", + "trex/tool/redo.js", + "trex/tool/undo.js", + "trex/tool/removeformat.js", + "trex/tool/horizontalrule.js", + "trex/tool/specialchar.js", + "trex/tool/dictionary.js", + "trex/tool/background.js", + "trex/tool/advanced.js", + "trex/tool/extraButtonDropdown.js", + "trex/tool/fullscreen.js", + + /** each > attacher */ + "trex/attacher/image.js", + "trex/attacher/file.js", + + /** each > embeder */ + "trex/embeder/media.js", + + /** each > module */ + "trex/modules/blockingunload.js", + "trex/modules/alignbuttons.js", + "trex/modules/canvassize.js", + "trex/modules/blockingedit.js", + "trex/modules/saveimagehistory.js", + // TODO. delete table buttons. but hanmailex? + // "trex/modules/tablebuttons.js", + "trex/modules/noticepanel.js", + + "trex/modules/table.js", + "trex/modules/table/selector.js", + "trex/modules/table/merge.js", + "trex/modules/table/insert.js", + "trex/modules/table/delete.js", + + "trex/modules/table/border.js", + "trex/modules/table/template.js", + + "trex/modules/pageupdown.js", + "trex/modules/tabledragger.js", + "trex/modules/exiteditor.js" +]; +var DE_PREFIX = EditorJSLoader.getJSBasePath("editor.js"); +EditorJSLoader.loadModule(DE_PREFIX + "development_environments.js"); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/editor_creator.js b/src/main/webapp/daumeditor/js/editor_creator.js new file mode 100644 index 0000000..66b2149 --- /dev/null +++ b/src/main/webapp/daumeditor/js/editor_creator.js @@ -0,0 +1,18 @@ +var EditorCreator = { + convert: function (el, template, callback) { + if (!el || !template || !$tom) return; + + $tom.applyStyles(el, {display: 'none'}); + Trex.I.XHRequester.sendRequest('get', + template, + '', + false, + function (html) { + var root = document.createElement('div'); + root.innerHTML = html; + $tom.insertNext(root, el); + callback && callback(); + } + ); + } +}; \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/editor_loader.js b/src/main/webapp/daumeditor/js/editor_loader.js new file mode 100644 index 0000000..ecf1536 --- /dev/null +++ b/src/main/webapp/daumeditor/js/editor_loader.js @@ -0,0 +1,288 @@ +(function(document) { + // TODO option parameter 문서 정리 + // TODO bookmarklet 작성 + var DEFAULT_UNKNOWN_OPTION_VALUE = "", + PREFIX_COOKIE = "tx_", + STATUS_UNINITIALIZED = "uninitialized", + STATUS_LOADING = "loading", + STATUS_COMPLETE = "complete", + ENV_PRODUCTION = "production", + ENV_DEVELOPMENT = "development", + MILLISECOND = 1000, + DEFAULT_TIMEOUT = 5; + + var REGX_MATCH_VERSION = /\/(\d+[a-z.]?\.[a-z0-9\-]+\.[\-\w]+)\//; + + var DEFAULT_OPTIONS = { + environment: ENV_PRODUCTION, + service: "core", + version: "", + host: "" + }; + + function getBasePath(url) { + return url.replace(/[^\/]+\/?$/, ''); + } + + function findLoaderScriptElement(filename) { + var scripts = document.getElementsByTagName("script"); + for (var i = 0; i < scripts.length; i++) { + if (scripts[i].src.indexOf(filename) >= 0) { + return scripts[i]; + } + } + throw "cannot find '" + filename + "' script element"; + } + + function readURLParam(filename) { + var script = findLoaderScriptElement(filename); + var url = script.src; + return url.substring(url.indexOf("?") + 1); + } + + function readCurrentURLVersion(filename) { + var script = findLoaderScriptElement(filename); + var urlMatch = script.src.match(REGX_MATCH_VERSION); + if( urlMatch && urlMatch.length == 2 ){ + return urlMatch[1]; + } + return ""; + } + + function getDefaultOption(name) { + return DEFAULT_OPTIONS[name] || DEFAULT_UNKNOWN_OPTION_VALUE; + } + + function getUserOption(name) { + var userOptions = Options.parse(readURLParam(Loader.NAME), "&"); + return userOptions.findByName(name); + } + + function getCookieOption(name) { + var cookieOptions = Options.parse(document.cookie, /;[ ]*/); + var value = cookieOptions.findByName(PREFIX_COOKIE + name); + return value ? decodeURIComponent(value) : value; + } + + + var Options = function() { + this.data = []; + }; + + Options.prototype = { + add: function(name, value) { + this.data.push({ "name": name, "value": value }); + }, + findByName: function(name) { + var founded; + for (var i = 0; i < this.data.length; i++) { + if (this.data[i] && this.data[i].name === name) { + founded = this.data[i].value; + break; + } + } + return founded; + } + }; + + Options.parse = function(rawOptions, separator) { + var options = new Options(); + var params = rawOptions.split(separator); + for (var i = 0; i < params.length; i++) { + var nameAndValue = params[i].split("="); + options.add(nameAndValue[0], nameAndValue[1]); + } + return options; + }; + + + function createScriptDOMElement(src) { + var script = document.createElement("script"); + script.type = "text/javascript"; + script.src = src; + return script; + } + + function absolutizeURL(url) { + var location = document.location; + if (url.match(/^(https?:|file:|)\/\//)) { + } else if (url.indexOf("/") === 0) { + url = "http://" + location.host + url; + } else { + var href = location.href; + var cutPos = href.lastIndexOf("/"); + url = href.substring(0, cutPos + 1) + url; + } + return url; + } + + function loadScriptDOMElement(src, callback) { + var script = createScriptDOMElement(src); + var head = document.getElementsByTagName("head")[0] || document.documentElement; + + addScriptLoadListener(script, head, callback); + + head.insertBefore(script, head.firstChild); // Use insertBefore instead of appendChild to circumvent an IE6 bug. + return script; + } + + function addScriptLoadListener(script, head, callback){ + if(callback){ + script.onload = script.onreadystatechange = function() { + if ( !this.readyState || + this.readyState === "loaded" || + this.readyState === "complete") { + + callback(); + + // Handle memory leak in IE + if (/MSIE/i.test(navigator.userAgent)) { + script.onload = script.onreadystatechange = null; + if ( head && script.parentNode ) { + head.removeChild( script ); + } + } + } + }; + } + } + + function callEditorOnLoadHandler(fn) { + if (typeof fn === "function") { + fn(Editor); + } + } + + var AsyncLoader = function(config){ + this.TIMEOUT = DEFAULT_TIMEOUT * MILLISECOND; + this.readyState = STATUS_UNINITIALIZED; + this.url = config.url; + this.callback = config.callback || function(){}; + this.id = config.id; + this.load(); + }; + AsyncLoader.prototype = { + load: function(){ + var url = this.url; + var self = this; + try { + findLoaderScriptElement(url); + } catch(e){ + self.readyState = STATUS_LOADING; + var script = loadScriptDOMElement(url, function(){ + self.callback(); + self.readyState = STATUS_COMPLETE; + }); + if( self.id ){ + script.id = self.id; + } + } + return this; + }, + startErrorTimer: function() { + var self = this; + setTimeout(function() { + if (self.readyState !== STATUS_COMPLETE) { + self.onTimeout(); + } + }, self.TIMEOUT); + }, + onTimeout: function() { + //NOTE: retry or error log? + }, + onLoadComplete: function(){ + } + }; + + var onLoadHandlers = [], isRetry; + + //noinspection UnnecessaryLocalVariableJS + var Loader = { + NAME: "editor_loader.js", + + TIMEOUT: DEFAULT_TIMEOUT * MILLISECOND, + + readyState: STATUS_UNINITIALIZED, + + /** + *

      개발 환경에서 페이지 로딩시 module 불러오기

      + * @param moduleName {string} e.g. trex/header.js + */ + loadModule: function(moduleName) { + function isModuleNameNotPath(name) { + return !name.match(/^((https?:|file:|)\/\/|\.\.\/|\/)/); + } + + var url = isModuleNameNotPath(moduleName) ? this.getJSBasePath() + moduleName : moduleName; + if (DEFAULT_OPTIONS.environment === ENV_DEVELOPMENT) { + url = url + '?dummy=' + new Date().getTime(); + } + document.write(''); + }, + + /** + *

      페이지 로딩 완료 후 module 불러오기

      + */ + asyncLoadModule: function(config) { + return new AsyncLoader(config); + }, + + /** + *

      editor javascript 파일이 로딩 완료되었을 때 호출될 함수를 등록한다.

      + * @param fn {function} 실행될 함수 + */ + ready: function(fn) { + if (this.readyState === STATUS_COMPLETE) { + callEditorOnLoadHandler(fn); + } else { + onLoadHandlers.push(fn); + } + }, + + finish: function() { + for (var i = 0; i < onLoadHandlers.length; i++) { + callEditorOnLoadHandler(onLoadHandlers[i]); + } + onLoadHandlers = []; + }, + + getBasePath: function(filename) { + var basePath = getCookieOption("base_path"); + if (!basePath) { + var script = findLoaderScriptElement(filename || Loader.NAME); + basePath = getBasePath(getBasePath(script.src)); + } + return absolutizeURL(basePath); + }, + + getJSBasePath: function(filename) { + return this.getBasePath() + "js/"; + }, + + getCSSBasePath: function() { + return this.getBasePath() + "css/"; + }, + + getPageBasePath: function() { + return this.getBasePath() + "pages/"; + }, + + getOption: function(name) { + return getCookieOption(name) || getUserOption(name) || getDefaultOption(name); + } + }; + window.EditorJSLoader = Loader; + + function initialize() { + var jsModuleName = "editor.js"; + + DEFAULT_OPTIONS["version"] = readCurrentURLVersion(Loader.NAME); + var envConfig = getUserOption("environment"); + if (envConfig) { + DEFAULT_OPTIONS.environment = envConfig; + } + Loader.loadModule(jsModuleName); + } + + initialize(); +})(document); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/lib/closure-range.js b/src/main/webapp/daumeditor/js/lib/closure-range.js new file mode 100644 index 0000000..0380077 --- /dev/null +++ b/src/main/webapp/daumeditor/js/lib/closure-range.js @@ -0,0 +1,11666 @@ +// Copyright 2006 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Bootstrap for the Google JS Library (Closure). + * + * In uncompiled mode base.js will write out Closure's deps file, unless the + * global CLOSURE_NO_DEPS is set to true. This allows projects to + * include their own deps file(s) from different locations. + * + */ + +/** + * Base namespace for the Closure library. Checks to see goog is + * already defined in the current scope before assigning to prevent + * clobbering if base.js is loaded more than once. + * + * @const + */ +var goog = _WIN.goog = _WIN.goog || {}; + + +/** + * Reference to the global context. In most cases this will be 'window'. + */ +goog.global = _WIN; + + +/** + * @define {string} LOCALE defines the locale being used for compilation. It is + * used to select locale specific data to be compiled in js binary. BUILD rule + * can specify this value by "--define goog.LOCALE=" as JSCompiler + * option. + * + * Take into account that the locale code format is important. You should use + * the canonical Unicode format with hyphen as a delimiter. Language must be + * lowercase, Language Script - Capitalized, Region - UPPERCASE. + * There are few examples: pt-BR, en, en-US, sr-Latin-BO, zh-Hans-CN. + * + * See more info about locale codes here: + * http://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers + * + * For language codes you should use values defined by ISO 693-1. See it here + * http://www.w3.org/WAI/ER/IG/ert/iso639.htm. There is only one exception from + * this rule: the Hebrew language. For legacy reasons the old code (iw) should + * be used instead of the new code (he), see http://wiki/Main/IIISynonyms. + */ +goog.LOCALE = 'en'; // default to en + + +/** + * Creates object stubs for a namespace. When present in a file, goog.provide + * also indicates that the file defines the indicated object. Calls to + * goog.provide are resolved by the compiler if --closure_pass is set. + * @param {string} name name of the object that this file defines. + */ +goog.provide = function(name) { + goog.exportPath_(name); +}; + + +/** + * Builds an object structure for the provided namespace path, + * ensuring that names that already exist are not overwritten. For + * example: + * "a.b.c" -> a = {};a.b={};a.b.c={}; + * Used by goog.provide and goog.exportSymbol. + * @param {string} name name of the object that this file defines. + * @param {*=} opt_object the object to expose at the end of the path. + * @param {Object=} opt_objectToExportTo The object to add the path to; default + * is |goog.global|. + * @private + */ +goog.exportPath_ = function(name, opt_object, opt_objectToExportTo) { + var parts = name.split('.'); + var cur = opt_objectToExportTo || goog.global; + + // Internet Explorer exhibits strange behavior when throwing errors from + // methods externed in this manner. See the testExportSymbolExceptions in + // base_test.html for an example. + if (!(parts[0] in cur) && cur.execScript) { + cur.execScript('var ' + parts[0]); + } + + // Certain browsers cannot parse code in the form for((a in b); c;); + // This pattern is produced by the JSCompiler when it collapses the + // statement above into the conditional loop below. To prevent this from + // happening, use a for-loop and reserve the init logic as below. + + // Parentheses added to eliminate strict JS warning in Firefox. + for (var part; parts.length && (part = parts.shift());) { + if (!parts.length && goog.isDef(opt_object)) { + // last part and we have an object; use it + cur[part] = opt_object; + } else if (cur[part]) { + cur = cur[part]; + } else { + cur = cur[part] = {}; + } + } +}; + + +/** + * When defining a class Foo with an abstract method bar(), you can do: + * + * Foo.prototype.bar = goog.abstractMethod + * + * Now if a subclass of Foo fails to override bar(), an error + * will be thrown when bar() is invoked. + * + * Note: This does not take the name of the function to override as + * an argument because that would make it more difficult to obfuscate + * our JavaScript code. + * + * @type {!Function} + * @throws {Error} when invoked to indicate the method should be + * overridden. + */ +goog.abstractMethod = function() { + throw Error('unimplemented abstract method'); +}; + + +//============================================================================== +// Language Enhancements +//============================================================================== + + +/** + * This is a "fixed" version of the typeof operator. It differs from the typeof + * operator in such a way that null returns 'null' and arrays return 'array'. + * @param {*} value The value to get the type of. + * @return {string} The name of the type. + */ +goog.typeOf = function(value) { + var s = typeof value; + if (s == 'object') { + if (value) { + // Check these first, so we can avoid calling Object.prototype.toString if + // possible. + // + // IE improperly marshals tyepof across execution contexts, but a + // cross-context object will still return _FALSE for "instanceof Object". + if (value instanceof Array) { + return 'array'; + } else if (value instanceof Object) { + return s; + } + + // HACK: In order to use an Object prototype method on the arbitrary + // value, the compiler requires the value be cast to type Object, + // even though the ECMA spec explicitly allows it. + var className = Object.prototype.toString.call( + /** @type {Object} */ (value)); + // In Firefox 3.6, attempting to access iframe window objects' length + // property throws an NS_ERROR_FAILURE, so we need to special-case it + // here. + if (className == '[object Window]') { + return 'object'; + } + + // We cannot always use constructor == Array or instanceof Array because + // different frames have different Array objects. In IE6, if the iframe + // where the array was created is destroyed, the array loses its + // prototype. Then dereferencing val.splice here throws an exception, so + // we can't use goog.isFunction. Calling typeof directly returns 'unknown' + // so that will work. In this case, this function will return _FALSE and + // most array functions will still work because the array is still + // array-like (supports length and []) even though it has lost its + // prototype. + // Mark Miller noticed that Object.prototype.toString + // allows access to the unforgeable [[Class]] property. + // 15.2.4.2 Object.prototype.toString ( ) + // When the toString method is called, the following steps are taken: + // 1. Get the [[Class]] property of this object. + // 2. Compute a string value by concatenating the three strings + // "[object ", Result(1), and "]". + // 3. Return Result(2). + // and this behavior survives the destruction of the execution context. + if ((className == '[object Array]' || + // In IE all non value types are wrapped as objects across window + // boundaries (not iframe though) so we have to do object detection + // for this edge case + typeof value.length == 'number' && + typeof value.splice != _UNDEFINED+'' && + typeof value.propertyIsEnumerable != _UNDEFINED+'' && + !value.propertyIsEnumerable('splice') + + )) { + return 'array'; + } + // HACK: There is still an array case that fails. + // function ArrayImpostor() {} + // ArrayImpostor.prototype = []; + // var impostor = new ArrayImpostor; + // this can be fixed by getting rid of the fast path + // (value instanceof Array) and solely relying on + // (value && Object.prototype.toString.vall(value) === '[object Array]') + // but that would require many more function calls and is not warranted + // unless closure code is receiving objects from untrusted sources. + + // IE in cross-window calls does not correctly marshal the function type + // (it appears just as an object) so we cannot use just typeof val == + // 'function'. However, if the object has a call property, it is a + // function. + if ((className == '[object Function]' || + typeof value.call != _UNDEFINED+'' && + typeof value.propertyIsEnumerable != _UNDEFINED+'' && + !value.propertyIsEnumerable('call'))) { + return 'function'; + } + + + } else { + return _NULL+''; + } + + } else if (s == 'function' && typeof value.call == _UNDEFINED+'') { + // In Safari typeof nodeList returns 'function', and on Firefox + // typeof behaves similarly for HTML{Applet,Embed,Object}Elements + // and RegExps. We would like to return object for those and we can + // detect an invalid function by making sure that the function + // object has a call method. + return 'object'; + } + return s; +}; + + +/** + * Returns true if the specified value is not |undefined|. + * WARNING: Do not use this to test if an object has a property. Use the in + * operator instead. Additionally, this function assumes that the global + * undefined variable has not been redefined. + * @param {*} val Variable to test. + * @return {boolean} Whether variable is defined. + */ +goog.isDef = function(val) { + return val !== _UNDEFINED; +}; + + +/** + * Returns true if the specified value is |null| + * @param {*} val Variable to test. + * @return {boolean} Whether variable is null. + */ +goog.isNull = function(val) { + return val === _NULL; +}; + + +/** + * Returns true if the specified value is defined and not null + * @param {*} val Variable to test. + * @return {boolean} Whether variable is defined and not null. + */ +goog.isDefAndNotNull = function(val) { + // Note that undefined == null. + return val != _NULL; +}; + + +/** + * Returns true if the specified value is an array + * @param {*} val Variable to test. + * @return {boolean} Whether variable is an array. + */ +goog.isArray = function(val) { + return goog.typeOf(val) == 'array'; +}; + + +/** + * Returns true if the object looks like an array. To qualify as array like + * the value needs to be either a NodeList or an object with a Number length + * property. + * @param {*} val Variable to test. + * @return {boolean} Whether variable is an array. + */ +goog.isArrayLike = function(val) { + var type = goog.typeOf(val); + return type == 'array' || type == 'object' && typeof val.length == 'number'; +}; + + +/** + * Returns true if the object looks like a Date. To qualify as Date-like + * the value needs to be an object and have a getFullYear() function. + * @param {*} val Variable to test. + * @return {boolean} Whether variable is a like a Date. + */ +goog.isDateLike = function(val) { + return goog.isObject(val) && typeof val.getFullYear == 'function'; +}; + + +/** + * Returns true if the specified value is a string + * @param {*} val Variable to test. + * @return {boolean} Whether variable is a string. + */ +goog.isString = function(val) { + return typeof val == 'string'; +}; + + +/** + * Returns true if the specified value is a boolean + * @param {*} val Variable to test. + * @return {boolean} Whether variable is boolean. + */ +goog.isBoolean = function(val) { + return typeof val == 'boolean'; +}; + + +/** + * Returns true if the specified value is a number + * @param {*} val Variable to test. + * @return {boolean} Whether variable is a number. + */ +goog.isNumber = function(val) { + return typeof val == 'number'; +}; + + +/** + * Returns true if the specified value is a function + * @param {*} val Variable to test. + * @return {boolean} Whether variable is a function. + */ +goog.isFunction = function(val) { + return goog.typeOf(val) == 'function'; +}; + + +/** + * Returns true if the specified value is an object. This includes arrays + * and functions. + * @param {*} val Variable to test. + * @return {boolean} Whether variable is an object. + */ +goog.isObject = function(val) { + var type = goog.typeOf(val); + return type == 'object' || type == 'array' || type == 'function'; +}; + + +/** + * Gets a unique ID for an object. This mutates the object so that further + * calls with the same object as a parameter returns the same value. The unique + * ID is guaranteed to be unique across the current session amongst objects that + * are passed into {@code getUid}. There is no guarantee that the ID is unique + * or consistent across sessions. It is unsafe to generate unique ID for + * function prototypes. + * + * @param {Object} obj The object to get the unique ID for. + * @return {number} The unique ID for the object. + */ +goog.getUid = function(obj) { + // TODO(user): Make the type stricter, do not accept null. + + // In Opera window.hasOwnProperty exists but always returns _FALSE so we avoid + // using it. As a consequence the unique ID generated for BaseClass.prototype + // and SubClass.prototype will be the same. + return obj[goog.UID_PROPERTY_] || + (obj[goog.UID_PROPERTY_] = ++goog.uidCounter_); +}; + + +/** + * Name for unique ID property. Initialized in a way to help avoid collisions + * with other closure javascript on the same page. + * @type {string} + * @private + */ +goog.UID_PROPERTY_ = 'closure_uid_' + + Math.floor(Math.random() * 2147483648).toString(36); + + +/** + * Counter for UID. + * @type {number} + * @private + */ +goog.uidCounter_ = 0; + + +/** + * Forward declaration for the clone method. This is necessary until the + * compiler can better support duck-typing constructs as used in + * goog.cloneObject. + * + * TODO(user): Remove once the JSCompiler can infer that the check for + * proto.clone is safe in goog.cloneObject. + * + * @type {Function} + */ +Object.prototype.clone; + + +/** + * A native implementation of goog.bind. + * @param {Function} fn A function to partially apply. + * @param {Object|undefined} selfObj Specifies the object which |this| should + * point to when the function is run. If the value is null or undefined, it + * will default to the global object. + * @param {...*} var_args Additional arguments that are partially + * applied to the function. + * @return {!Function} A partially-applied form of the function bind() was + * invoked as a method of. + * @private + * @suppress {deprecated} The compiler thinks that Function.prototype.bind + * is deprecated because some people have declared a pure-JS version. + * Only the pure-JS version is truly deprecated. + */ +goog.bindNative_ = function(fn, selfObj, var_args) { + return /** @type {!Function} */ (fn.call.apply(fn.bind, arguments)); +}; + + +/** + * A pure-JS implementation of goog.bind. + * @param {Function} fn A function to partially apply. + * @param {Object|undefined} selfObj Specifies the object which |this| should + * point to when the function is run. If the value is null or undefined, it + * will default to the global object. + * @param {...*} var_args Additional arguments that are partially + * applied to the function. + * @return {!Function} A partially-applied form of the function bind() was + * invoked as a method of. + * @private + */ +goog.bindJs_ = function(fn, selfObj, var_args) { + var context = selfObj || goog.global; + + if (arguments.length > 2) { + var boundArgs = Array.prototype.slice.call(arguments, 2); + return function() { + // Prepend the bound arguments to the current arguments. + var newArgs = Array.prototype.slice.call(arguments); + Array.prototype.unshift.apply(newArgs, boundArgs); + return fn.apply(context, newArgs); + }; + + } else { + return function() { + return fn.apply(context, arguments); + }; + } +}; + + +/** + * Partially applies this function to a particular 'this object' and zero or + * more arguments. The result is a new function with some arguments of the first + * function pre-filled and the value of |this| 'pre-specified'.

      + * + * Remaining arguments specified at call-time are appended to the pre- + * specified ones.

      + * + * Also see: {@link #partial}.

      + * + * Usage: + *
      var barMethBound = bind(myFunction, myObj, 'arg1', 'arg2');
      + * barMethBound('arg3', 'arg4');
      + * + * @param {Function} fn A function to partially apply. + * @param {Object|undefined} selfObj Specifies the object which |this| should + * point to when the function is run. If the value is null or undefined, it + * will default to the global object. + * @param {...*} var_args Additional arguments that are partially + * applied to the function. + * @return {!Function} A partially-applied form of the function bind() was + * invoked as a method of. + * @suppress {deprecated} See above. + */ +goog.bind = function(fn, selfObj, var_args) { + // TODO(nicksantos): narrow the type signature. + if (Function.prototype.bind && + // NOTE(nicksantos): Somebody pulled base.js into the default + // Chrome extension environment. This means that for Chrome extensions, + // they get the implementation of Function.prototype.bind that + // calls goog.bind instead of the native one. Even worse, we don't want + // to introduce a circular dependency between goog.bind and + // Function.prototype.bind, so we have to hack this to make sure it + // works correctly. + Function.prototype.bind.toString().indexOf('native code') != -1) { + goog.bind = goog.bindNative_; + } else { + goog.bind = goog.bindJs_; + } + return goog.bind.apply(_NULL, arguments); +}; + + +/** + * Like bind(), except that a 'this object' is not required. Useful when the + * target function is already bound. + * + * Usage: + * var g = partial(f, arg1, arg2); + * g(arg3, arg4); + * + * @param {Function} fn A function to partially apply. + * @param {...*} var_args Additional arguments that are partially + * applied to fn. + * @return {!Function} A partially-applied form of the function bind() was + * invoked as a method of. + */ +goog.partial = function(fn, var_args) { + var args = Array.prototype.slice.call(arguments, 1); + return function() { + // Prepend the bound arguments to the current arguments. + var newArgs = Array.prototype.slice.call(arguments); + newArgs.unshift.apply(newArgs, args); + return fn.apply(this, newArgs); + }; +}; + + +/** + * @return {number} An integer value representing the number of milliseconds + * between midnight, January 1, 1970 and the current time. + */ +goog.now = Date.now || (function() { + // Unary plus operator converts its operand to a number which in the case of + // a date is done by calling getTime(). + return +new Date(); +}); + + +/** + * Inherit the prototype methods from one constructor into another. + * + * Usage: + *
      + * function ParentClass(a, b) { }
      + * ParentClass.prototype.foo = function(a) { }
      + *
      + * function ChildClass(a, b, c) {
      + *   ParentClass.call(this, a, b);
      + * }
      + *
      + * goog.inherits(ChildClass, ParentClass);
      + *
      + * var child = new ChildClass('a', 'b', 'see');
      + * child.foo(); // works
      + * 
      + * + * In addition, a superclass' implementation of a method can be invoked + * as follows: + * + *
      + * ChildClass.prototype.foo = function(a) {
      + *   ChildClass.superClass_.foo.call(this, a);
      + *   // other code
      + * };
      + * 
      + * + * @param {Function} childCtor Child class. + * @param {Function} parentCtor Parent class. + */ +goog.inherits = function(childCtor, parentCtor) { + /** @constructor */ + function tempCtor() {}; + tempCtor.prototype = parentCtor.prototype; + childCtor.superClass_ = parentCtor.prototype; + childCtor.prototype = new tempCtor(); + childCtor.prototype.constructor = childCtor; +}; + + +/** + * Call up to the superclass. + * + * If this is called from a constructor, then this calls the superclass + * contructor with arguments 1-N. + * + * If this is called from a prototype method, then you must pass + * the name of the method as the second argument to this function. If + * you do not, you will get a runtime error. This calls the superclass' + * method with arguments 2-N. + * + * This function only works if you use goog.inherits to express + * inheritance relationships between your classes. + * + * This function is a compiler primitive. At compile-time, the + * compiler will do macro expansion to remove a lot of + * the extra overhead that this function introduces. The compiler + * will also enforce a lot of the assumptions that this function + * makes, and treat it as a compiler error if you break them. + * + * @param {!Object} me Should always be "this". + * @param {*=} opt_methodName The method name if calling a super method. + * @param {...*} var_args The rest of the arguments. + * @return {*} The return value of the superclass method. + */ +goog.base = function(me, opt_methodName, var_args) { + var caller = arguments.callee.caller; + if (caller.superClass_) { + // This is a constructor. Call the superclass constructor. + return caller.superClass_.constructor.apply( + me, Array.prototype.slice.call(arguments, 1)); + } + + var args = Array.prototype.slice.call(arguments, 2); + var foundCaller = _FALSE; + for (var ctor = me.constructor; + ctor; ctor = ctor.superClass_ && ctor.superClass_.constructor) { + if (ctor.prototype[opt_methodName] === caller) { + foundCaller = _TRUE; + } else if (foundCaller) { + return ctor.prototype[opt_methodName].apply(me, args); + } + } + + // If we did not find the caller in the prototype chain, + // then one of two things happened: + // 1) The caller is an instance method. + // 2) This method was not called by the right caller. + if (me[opt_methodName] === caller) { + return me.constructor.prototype[opt_methodName].apply(me, args); + } else { + throw Error( + 'goog.base called from a method of one name ' + + 'to a method of a different name'); + } +}; + + +// Copyright 2006 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Utilities for string manipulation. + */ + + +/** + * Namespace for string utilities + */ +goog.provide('goog.string'); +goog.provide('goog.string.Unicode'); + + +/** + * Common Unicode string characters. + * @enum {string} + */ +goog.string.Unicode = { + NBSP: '\xa0' +}; + +/** + * Fast prefix-checker. + * @param {string} str The string to check. + * @param {string} prefix A string to look for at the start of {@code str}. + * @return {boolean} True if {@code str} begins with {@code prefix}. + */ +goog.string.startsWith = function(str, prefix) { + return str.lastIndexOf(prefix, 0) == 0; +}; + +/** + * Checks if a string is empty or contains only whitespaces. + * @param {string} str The string to check. + * @return {boolean} True if {@code str} is empty or whitespace only. + */ +goog.string.isEmpty = function(str) { + // testing length == 0 first is actually slower in all browsers (about the + // same in Opera). + // Since IE doesn't include non-breaking-space (0xa0) in their \s character + // class (as required by section 7.2 of the ECMAScript spec), we explicitly + // include it in the regexp to enforce consistent cross-browser behavior. + return /^[\s\xa0]*$/.test(str); +}; + + +/** + * Takes a string and replaces newlines with a space. Multiple lines are + * replaced with a single space. + * @param {string} str The string from which to strip newlines. + * @return {string} A copy of {@code str} stripped of newlines. + */ +// FTDUEDTR-1183 +goog.string.stripNewlines = function(str) { + return str.replace(/ ?(\r\n|\r|\n)+/g, ' '); +}; + + +/** + * Replaces Windows and Mac new lines with unix style: \r or \r\n with \n. + * @param {string} str The string to in which to canonicalize newlines. + * @return {string} {@code str} A copy of {@code} with canonicalized newlines. + */ +goog.string.canonicalizeNewlines = function(str) { + return str.replace(/(\r\n|\r|\n)/g, '\n'); +}; + + +/** + * Trims white spaces to the left and right of a string. + * @param {string} str The string to trim. + * @return {string} A trimmed copy of {@code str}. + */ +goog.string.trim = function(str) { + // Since IE doesn't include non-breaking-space (0xa0) in their \s character + // class (as required by section 7.2 of the ECMAScript spec), we explicitly + // include it in the regexp to enforce consistent cross-browser behavior. + return str.replace(/^[\s\xa0]+|[\s\xa0]+$/g, ''); +}; + +/** + * Escape double quote '"' characters in addition to '&', '<', and '>' so that a + * string can be included in an HTML tag attribute value within double quotes. + * + * It should be noted that > doesn't need to be escaped for the HTML or XML to + * be valid, but it has been decided to escape it for consistency with other + * implementations. + * + * NOTE(user): + * HtmlEscape is often called during the generation of large blocks of HTML. + * Using statics for the regular expressions and strings is an optimization + * that can more than half the amount of time IE spends in this function for + * large apps, since strings and regexes both contribute to GC allocations. + * + * Testing for the presence of a character before escaping increases the number + * of function calls, but actually provides a speed increase for the average + * case -- since the average case often doesn't require the escaping of all 4 + * characters and indexOf() is much cheaper than replace(). + * The worst case does suffer slightly from the additional calls, therefore the + * opt_isLikelyToContainHtmlChars option has been included for situations + * where all 4 HTML entities are very likely to be present and need escaping. + * + * Some benchmarks (times tended to fluctuate +-0.05ms): + * FireFox IE6 + * (no chars / average (mix of cases) / all 4 chars) + * no checks 0.13 / 0.22 / 0.22 0.23 / 0.53 / 0.80 + * indexOf 0.08 / 0.17 / 0.26 0.22 / 0.54 / 0.84 + * indexOf + re test 0.07 / 0.17 / 0.28 0.19 / 0.50 / 0.85 + * + * An additional advantage of checking if replace actually needs to be called + * is a reduction in the number of object allocations, so as the size of the + * application grows the difference between the various methods would increase. + * + * @param {string} str string to be escaped. + * @param {boolean=} opt_isLikelyToContainHtmlChars Don't perform a check to see + * if the character needs replacing - use this option if you expect each of + * the characters to appear often. Leave _FALSE if you expect few html + * characters to occur in your strings, such as if you are escaping HTML. + * @return {string} An escaped copy of {@code str}. + */ +goog.string.htmlEscape = function(str, opt_isLikelyToContainHtmlChars) { + + if (opt_isLikelyToContainHtmlChars) { + return str.replace(goog.string.amperRe_, '&') + .replace(goog.string.ltRe_, '<') + .replace(goog.string.gtRe_, '>') + .replace(goog.string.quotRe_, '"'); + + } else { + // quick test helps in the case when there are no chars to replace, in + // worst case this makes barely a difference to the time taken + if (!goog.string.allRe_.test(str)) return str; + + // str.indexOf is faster than regex.test in this case + if (str.indexOf('&') != -1) { + str = str.replace(goog.string.amperRe_, '&'); + } + if (str.indexOf('<') != -1) { + str = str.replace(goog.string.ltRe_, '<'); + } + if (str.indexOf('>') != -1) { + str = str.replace(goog.string.gtRe_, '>'); + } + if (str.indexOf('"') != -1) { + str = str.replace(goog.string.quotRe_, '"'); + } + return str; + } +}; + + +/** + * Regular expression that matches an ampersand, for use in escaping. + * @type {RegExp} + * @private + */ +goog.string.amperRe_ = /&/g; + + +/** + * Regular expression that matches a less than sign, for use in escaping. + * @type {RegExp} + * @private + */ +goog.string.ltRe_ = //g; + + +/** + * Regular expression that matches a double quote, for use in escaping. + * @type {RegExp} + * @private + */ +goog.string.quotRe_ = /\"/g; + + +/** + * Regular expression that matches any character that needs to be escaped. + * @type {RegExp} + * @private + */ +goog.string.allRe_ = /[&<>\"]/; + + +/** + * Checks whether a string contains a given character. + * @param {string} s The string to test. + * @param {string} ss The substring to test for. + * @return {boolean} True if {@code s} contains {@code ss}. + */ +goog.string.contains = function(s, ss) { + return s.indexOf(ss) != -1; +}; + +/** + * Concatenates string expressions. This is useful + * since some browsers are very inefficient when it comes to using plus to + * concat strings. Be careful when using null and undefined here since + * these will not be included in the result. If you need to represent these + * be sure to cast the argument to a String first. + * For example: + *
      buildString('a', 'b', 'c', 'd') -> 'abcd'
      + * buildString(null, undefined) -> ''
      + * 
      + * @param {...*} var_args A list of strings to concatenate. If not a string, + * it will be casted to one. + * @return {string} The concatenation of {@code var_args}. + */ +goog.string.buildString = function(var_args) { + return Array.prototype.join.call(arguments, ''); +}; + + +/** + * Compares two version numbers. + * + * @param {string|number} version1 Version of first item. + * @param {string|number} version2 Version of second item. + * + * @return {number} 1 if {@code version1} is higher. + * 0 if arguments are equal. + * -1 if {@code version2} is higher. + */ +goog.string.compareVersions = function(version1, version2) { + var order = 0; + // Trim leading and trailing whitespace and split the versions into + // subversions. + var v1Subs = goog.string.trim(String(version1)).split('.'); + var v2Subs = goog.string.trim(String(version2)).split('.'); + var subCount = Math.max(v1Subs.length, v2Subs.length); + + // Iterate over the subversions, as long as they appear to be equivalent. + for (var subIdx = 0; order == 0 && subIdx < subCount; subIdx++) { + var v1Sub = v1Subs[subIdx] || ''; + var v2Sub = v2Subs[subIdx] || ''; + + // Split the subversions into pairs of numbers and qualifiers (like 'b'). + // Two different RegExp objects are needed because they are both using + // the 'g' flag. + var v1CompParser = new RegExp('(\\d*)(\\D*)', 'g'); + var v2CompParser = new RegExp('(\\d*)(\\D*)', 'g'); + do { + var v1Comp = v1CompParser.exec(v1Sub) || ['', '', '']; + var v2Comp = v2CompParser.exec(v2Sub) || ['', '', '']; + // Break if there are no more matches. + if (v1Comp[0].length == 0 && v2Comp[0].length == 0) { + break; + } + + // Parse the numeric part of the subversion. A missing number is + // equivalent to 0. + var v1CompNum = v1Comp[1].length == 0 ? 0 : parseInt(v1Comp[1], 10); + var v2CompNum = v2Comp[1].length == 0 ? 0 : parseInt(v2Comp[1], 10); + + // Compare the subversion components. The number has the highest + // precedence. Next, if the numbers are equal, a subversion without any + // qualifier is always higher than a subversion with any qualifier. Next, + // the qualifiers are compared as strings. + order = goog.string.compareElements_(v1CompNum, v2CompNum) || + goog.string.compareElements_(v1Comp[2].length == 0, + v2Comp[2].length == 0) || + goog.string.compareElements_(v1Comp[2], v2Comp[2]); + // Stop as soon as an inequality is discovered. + } while (order == 0); + } + + return order; +}; + + +/** + * Compares elements of a version number. + * + * @param {string|number|boolean} left An element from a version number. + * @param {string|number|boolean} right An element from a version number. + * + * @return {number} 1 if {@code left} is higher. + * 0 if arguments are equal. + * -1 if {@code right} is higher. + * @private + */ +goog.string.compareElements_ = function(left, right) { + if (left < right) { + return -1; + } else if (left > right) { + return 1; + } + return 0; +}; + + +/** + * The most recent unique ID. |0 is equivalent to Math.floor in this case. + * @type {number} + * @private + */ +goog.string.uniqueStringCounter_ = Math.random() * 0x80000000 | 0; + + +/** + * Generates and returns a string which is unique in the current document. + * This is useful, for example, to create unique IDs for DOM elements. + * @return {string} A unique id. + */ +goog.string.createUniqueString = function() { + return 'goog_' + goog.string.uniqueStringCounter_++; +}; + +// Copyright 2006 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Rendering engine detection. + * @see User agent strings + * For information on the browser brand (such as Safari versus Chrome), see + * goog.userAgent.product. + * @see ../demos/useragent.html + */ + +goog.provide('goog.userAgent'); + +//goog.require('goog.string'); + + +/** + * @define {boolean} Whether we know at compile-time that the browser is IE. + */ +goog.userAgent.ASSUME_IE = _FALSE; + + +/** + * @define {boolean} Whether we know at compile-time that the browser is GECKO. + */ +goog.userAgent.ASSUME_GECKO = _FALSE; + + +/** + * @define {boolean} Whether we know at compile-time that the browser is WEBKIT. + */ +goog.userAgent.ASSUME_WEBKIT = _FALSE; + + +/** + * @define {boolean} Whether we know at compile-time that the browser is a + * mobile device running WebKit e.g. iPhone or Android. + */ +goog.userAgent.ASSUME_MOBILE_WEBKIT = _FALSE; + + +/** + * @define {boolean} Whether we know at compile-time that the browser is OPERA. + */ +goog.userAgent.ASSUME_OPERA = _FALSE; + + +/** + * @define {boolean} Whether the + * {@code goog.userAgent.isVersionOrHigher} + * function will return true for any version. + */ +goog.userAgent.ASSUME_ANY_VERSION = _FALSE; + + +/** + * Whether we know the browser engine at compile-time. + * @type {boolean} + * @private + */ +goog.userAgent.BROWSER_KNOWN_ = + goog.userAgent.ASSUME_IE || + goog.userAgent.ASSUME_GECKO || + goog.userAgent.ASSUME_MOBILE_WEBKIT || + goog.userAgent.ASSUME_WEBKIT || + goog.userAgent.ASSUME_OPERA; + + +/** + * Returns the userAgent string for the current browser. + * Some user agents (I'm thinking of you, Gears WorkerPool) do not expose a + * navigator object off the global scope. In that case we return null. + * + * @return {?string} The userAgent string or null if there is none. + */ +goog.userAgent.getUserAgentString = function() { + return goog.global['navigator'] ? goog.global['navigator'].userAgent : _NULL; +}; + + +/** + * @return {Object} The native navigator object. + */ +goog.userAgent.getNavigator = function() { + // Need a local navigator reference instead of using the global one, + // to avoid the rare case where they reference different objects. + // (goog.gears.FakeWorkerPool, for example). + return goog.global['navigator']; +}; + + +/** + * Initializer for goog.userAgent. + * + * This is a named function so that it can be stripped via the jscompiler + * option for stripping types. + * @private + */ +goog.userAgent.init_ = function() { + /** + * Whether the user agent string denotes Opera. + * @type {boolean} + * @private + */ + goog.userAgent.detectedOpera_ = _FALSE; + + /** + * Whether the user agent string denotes Internet Explorer. This includes + * other browsers using Trident as its rendering engine. For example AOL + * and Netscape 8 + * @type {boolean} + * @private + */ + goog.userAgent.detectedIe_ = _FALSE; + + /** + * Whether the user agent string denotes WebKit. WebKit is the rendering + * engine that Safari, Android and others use. + * @type {boolean} + * @private + */ + goog.userAgent.detectedWebkit_ = _FALSE; + + /** + * Whether the user agent string denotes a mobile device. + * @type {boolean} + * @private + */ + goog.userAgent.detectedMobile_ = _FALSE; + + /** + * Whether the user agent string denotes Gecko. Gecko is the rendering + * engine used by Mozilla, Mozilla Firefox, Camino and many more. + * @type {boolean} + * @private + */ + goog.userAgent.detectedGecko_ = _FALSE; + + var ua; + if (!goog.userAgent.BROWSER_KNOWN_ && + (ua = goog.userAgent.getUserAgentString())) { + var navigator = goog.userAgent.getNavigator(); + goog.userAgent.detectedOpera_ = goog.string.startsWith(ua, 'Opera'); + goog.userAgent.detectedIe_ = !goog.userAgent.detectedOpera_ && + (goog.string.contains(ua, 'MSIE') || + goog.string.contains(ua, 'Trident')); + goog.userAgent.detectedWebkit_ = !goog.userAgent.detectedOpera_ && + goog.string.contains(ua, 'WebKit'); + // WebKit also gives navigator.product string equal to 'Gecko'. + goog.userAgent.detectedMobile_ = goog.userAgent.detectedWebkit_ && + goog.string.contains(ua, 'Mobile'); + goog.userAgent.detectedGecko_ = !goog.userAgent.detectedOpera_ && + !goog.userAgent.detectedWebkit_ && !goog.userAgent.detectedIe_ && + navigator.product == 'Gecko'; + } +}; + + +if (!goog.userAgent.BROWSER_KNOWN_) { + goog.userAgent.init_(); +} + + +/** + * Whether the user agent is Opera. + * @type {boolean} + */ +goog.userAgent.OPERA = goog.userAgent.BROWSER_KNOWN_ ? + goog.userAgent.ASSUME_OPERA : goog.userAgent.detectedOpera_; + + +/** + * Whether the user agent is Internet Explorer. This includes other browsers + * using Trident as its rendering engine. For example AOL and Netscape 8 + * @type {boolean} + */ +goog.userAgent.IE = goog.userAgent.BROWSER_KNOWN_ ? + goog.userAgent.ASSUME_IE : goog.userAgent.detectedIe_; + + +/** + * Whether the user agent is Gecko. Gecko is the rendering engine used by + * Mozilla, Mozilla Firefox, Camino and many more. + * @type {boolean} + */ +goog.userAgent.GECKO = goog.userAgent.BROWSER_KNOWN_ ? + goog.userAgent.ASSUME_GECKO : + goog.userAgent.detectedGecko_; + + +/** + * Whether the user agent is WebKit. WebKit is the rendering engine that + * Safari, Android and others use. + * @type {boolean} + */ +goog.userAgent.WEBKIT = goog.userAgent.BROWSER_KNOWN_ ? + goog.userAgent.ASSUME_WEBKIT || goog.userAgent.ASSUME_MOBILE_WEBKIT : + goog.userAgent.detectedWebkit_; + + +/** + * Whether the user agent is running on a mobile device. + * @type {boolean} + */ +goog.userAgent.MOBILE = goog.userAgent.ASSUME_MOBILE_WEBKIT || + goog.userAgent.detectedMobile_; + + +/** + * Used while transitioning code to use WEBKIT instead. + * @type {boolean} + * @deprecated Use {@link goog.userAgent.product.SAFARI} instead. + * TODO(nicksantos): Delete this from goog.userAgent. + */ +goog.userAgent.SAFARI = goog.userAgent.WEBKIT; + + +/** + * @return {string} the platform (operating system) the user agent is running + * on. Default to empty string because navigator.platform may not be defined + * (on Rhino, for example). + * @private + */ +goog.userAgent.determinePlatform_ = function() { + var navigator = goog.userAgent.getNavigator(); + return navigator && navigator.platform || ''; +}; + + +/** + * The platform (operating system) the user agent is running on. Default to + * empty string because navigator.platform may not be defined (on Rhino, for + * example). + * @type {string} + */ +goog.userAgent.PLATFORM = goog.userAgent.determinePlatform_(); + + +/** + * @define {boolean} Whether the user agent is running on a Macintosh operating + * system. + */ +goog.userAgent.ASSUME_MAC = _FALSE; + + +/** + * @define {boolean} Whether the user agent is running on a Windows operating + * system. + */ +goog.userAgent.ASSUME_WINDOWS = _FALSE; + + +/** + * @define {boolean} Whether the user agent is running on a Linux operating + * system. + */ +goog.userAgent.ASSUME_LINUX = _FALSE; + + +/** + * @define {boolean} Whether the user agent is running on a X11 windowing + * system. + */ +goog.userAgent.ASSUME_X11 = _FALSE; + + +/** + * @type {boolean} + * @private + */ +goog.userAgent.PLATFORM_KNOWN_ = + goog.userAgent.ASSUME_MAC || + goog.userAgent.ASSUME_WINDOWS || + goog.userAgent.ASSUME_LINUX || + goog.userAgent.ASSUME_X11; + + +/** + * Initialize the goog.userAgent constants that define which platform the user + * agent is running on. + * @private + */ +goog.userAgent.initPlatform_ = function() { + /** + * Whether the user agent is running on a Macintosh operating system. + * @type {boolean} + * @private + */ + goog.userAgent.detectedMac_ =goog.string.contains(goog.userAgent.PLATFORM, + 'Mac'); + + /** + * Whether the user agent is running on a Windows operating system. + * @type {boolean} + * @private + */ + goog.userAgent.detectedWindows_ = goog.string.contains( + goog.userAgent.PLATFORM, 'Win'); + + /** + * Whether the user agent is running on a Linux operating system. + * @type {boolean} + * @private + */ + goog.userAgent.detectedLinux_ = goog.string.contains(goog.userAgent.PLATFORM, + 'Linux'); + + /** + * Whether the user agent is running on a X11 windowing system. + * @type {boolean} + * @private + */ + goog.userAgent.detectedX11_ = !!goog.userAgent.getNavigator() && + goog.string.contains(goog.userAgent.getNavigator()['appVersion'] || '', + 'X11'); +}; + + +if (!goog.userAgent.PLATFORM_KNOWN_) { + goog.userAgent.initPlatform_(); +} + + +/** + * Whether the user agent is running on a Macintosh operating system. + * @type {boolean} + */ +goog.userAgent.MAC = goog.userAgent.PLATFORM_KNOWN_ ? + goog.userAgent.ASSUME_MAC : goog.userAgent.detectedMac_; + + +/** + * Whether the user agent is running on a Windows operating system. + * @type {boolean} + */ +goog.userAgent.WINDOWS = goog.userAgent.PLATFORM_KNOWN_ ? + goog.userAgent.ASSUME_WINDOWS : goog.userAgent.detectedWindows_; + + +/** + * Whether the user agent is running on a Linux operating system. + * @type {boolean} + */ +goog.userAgent.LINUX = goog.userAgent.PLATFORM_KNOWN_ ? + goog.userAgent.ASSUME_LINUX : goog.userAgent.detectedLinux_; + + +/** + * Whether the user agent is running on a X11 windowing system. + * @type {boolean} + */ +goog.userAgent.X11 = goog.userAgent.PLATFORM_KNOWN_ ? + goog.userAgent.ASSUME_X11 : goog.userAgent.detectedX11_; + + +/** + * @return {string} The string that describes the version number of the user + * agent. + * @private + */ +goog.userAgent.determineVersion_ = function() { + // All browsers have different ways to detect the version and they all have + // different naming schemes. + + // version is a string rather than a number because it may contain 'b', 'a', + // and so on. + var version = '', re; + + if (goog.userAgent.OPERA && goog.global['opera']) { + var operaVersion = goog.global['opera'].version; + version = typeof operaVersion == 'function' ? operaVersion() : operaVersion; + } else { + if (goog.userAgent.GECKO) { + re = /rv\:([^\);]+)(\)|;)/; + } else if (goog.userAgent.IE) { + re = /MSIE\s+([^\);]+)(\)|;)/; + } else if (goog.userAgent.WEBKIT) { + // WebKit/125.4 + re = /WebKit\/(\S+)/; + } + if (re) { + var arr = re.exec(goog.userAgent.getUserAgentString()); + version = arr ? arr[1] : ''; + } + } + if (goog.userAgent.IE) { + // IE9 can be in document mode 9 but be reporting an inconsistent user agent + // version. If it is identifying as a version lower than 9 we take the + // documentMode as the version instead. IE8 has similar behavior. + // It is recommended to set the X-UA-Compatible header to ensure that IE9 + // uses documentMode 9. + var docMode = goog.userAgent.getDocumentMode_(); + if (docMode > parseFloat(version)) { + return String(docMode); + } + } + return version; +}; + + +/** + * @return {number|undefined} Returns the document mode (for testing). + * @private + */ +goog.userAgent.getDocumentMode_ = function() { + // NOTE(user): goog.userAgent may be used in context where there is no DOM. + var doc = goog.global['document']; + return doc ? doc['documentMode'] : _UNDEFINED; +}; + + +/** + * The version of the user agent. This is a string because it might contain + * 'b' (as in beta) as well as multiple dots. + * @type {string} + */ +goog.userAgent.VERSION = goog.userAgent.determineVersion_(); + + +/** + * Compares two version numbers. + * + * @param {string} v1 Version of first item. + * @param {string} v2 Version of second item. + * + * @return {number} 1 if first argument is higher + * 0 if arguments are equal + * -1 if second argument is higher. + * @deprecated Use goog.string.compareVersions. + */ +goog.userAgent.compare = function(v1, v2) { + return goog.string.compareVersions(v1, v2); +}; + + +/** + * Cache for {@link goog.userAgent.isVersion}. Calls to compareVersions are + * surprisingly expensive and as a browsers version number is unlikely to change + * during a session we cache the results. + * @type {Object} + * @private + */ +goog.userAgent.isVersionOrHigherCache_ = {}; + +/** + * Whether the user agent version is higher or the same as the given version. + * NOTE: When checking the version numbers for Firefox and Safari, be sure to + * use the engine's version, not the browser's version number. For example, + * Firefox 3.0 corresponds to Gecko 1.9 and Safari 3.0 to Webkit 522.11. + * Opera and Internet Explorer versions match the product release number.
      + * @see + * Webkit + * @see Gecko + * + * @param {string|number} version The version to check. + * @return {boolean} Whether the user agent version is higher or the same as + * the given version. + */ +goog.userAgent.isVersionOrHigher = function(version) { + return goog.userAgent.ASSUME_ANY_VERSION || + goog.userAgent.isVersionOrHigherCache_[version] || + (goog.userAgent.isVersionOrHigherCache_[version] = + goog.string.compareVersions(goog.userAgent.VERSION, version) >= 0); +}; + + +/** + * Deprecated alias to {@code goog.userAgent.isVersionOrHigher}. + * @param {string|number} version The version to check. + * @return {boolean} Whether the user agent version is higher or the same as + * the given version. + * @deprecated Use goog.userAgent.isVersionOrHigher(). + */ +goog.userAgent.isVersion = goog.userAgent.isVersionOrHigher; + +/** + * Cache for {@link goog.userAgent.isDocumentMode}. + * Browsers document mode version number is unlikely to change during a session + * we cache the results. + * @type {Object} + * @private + */ +goog.userAgent.isDocumentModeCache_ = {}; + + +/** + * Whether the IE effective document mode is higher or the same as the given + * document mode version. + * NOTE: Only for IE, return false for another browser. + * + * @param {number} documentMode The document mode version to check. + * @return {boolean} Whether the IE effective document mode is higher or the + * same as the given version. + */ +goog.userAgent.isDocumentModeOrHigher = function(documentMode) { + return goog.userAgent.IE && goog.userAgent.DOCUMENT_MODE >= documentMode; +}; + + +/** + * Deprecated alias to {@code goog.userAgent.isDocumentModeOrHigher}. + * @param {number} version The version to check. + * @return {boolean} Whether the IE effective document mode is higher or the + * same as the given version. + * @deprecated Use goog.userAgent.isDocumentModeOrHigher(). + */ +goog.userAgent.isDocumentMode = goog.userAgent.isDocumentModeOrHigher; + + +/** + * For IE version < 7, documentMode is undefined, so attempt to use the + * CSS1Compat property to see if we are in standards mode. If we are in + * standards mode, treat the browser version as the document mode. Otherwise, + * IE is emulating version 5. + * @type {number|undefined} + * @const + */ +goog.userAgent.DOCUMENT_MODE = (function() { + var doc = goog.global['document']; + if (!doc || !goog.userAgent.IE) { + return undefined; + } + var mode = goog.userAgent.getDocumentMode_(); + return mode || (doc['compatMode'] == 'CSS1Compat' ? + parseInt(goog.userAgent.VERSION, 10) : 5); +})(); + +// Copyright 2006 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Utilities for manipulating arrays. + * + */ + + +goog.provide('goog.array'); +goog.provide('goog.array.ArrayLike'); + +/** + * @define {boolean} NATIVE_ARRAY_PROTOTYPES indicates whether the code should + * rely on Array.prototype functions, if available. + * + * The Array.prototype functions can be defined by external libraries like + * Prototype and setting this flag to _FALSE forces closure to use its own + * goog.array implementation. + * + * If your javascript can be loaded by a third party site and you are wary about + * relying on the prototype functions, specify + * "--define goog.NATIVE_ARRAY_PROTOTYPES=_FALSE" to the JSCompiler. + */ +goog.NATIVE_ARRAY_PROTOTYPES = _TRUE; + + +/** + * @typedef {Array|NodeList|Arguments|{length: number}} + */ +goog.array.ArrayLike; + + +/** + * Returns the last element in an array without removing it. + * @param {goog.array.ArrayLike} array The array. + * @return {*} Last item in array. + */ +goog.array.peek = function(array) { + return array[array.length - 1]; +}; + + +/** + * Reference to the original {@code Array.prototype}. + * @private + */ +goog.array.ARRAY_PROTOTYPE_ = Array.prototype; + + +// NOTE(user): Since most of the array functions are generic it allows you to +// pass an array-like object. Strings have a length and are considered array- +// like. However, the 'in' operator does not work on strings so we cannot just +// use the array path even if the browser supports indexing into strings. We +// therefore end up splitting the string. + + +/** + * Returns the index of the first element of an array with a specified + * value, or -1 if the element is not present in the array. + * + * See {@link http://tinyurl.com/developer-mozilla-org-array-indexof} + * + * @param {goog.array.ArrayLike} arr The array to be searched. + * @param {*} obj The object for which we are searching. + * @param {number=} opt_fromIndex The index at which to start the search. If + * omitted the search starts at index 0. + * @return {number} The index of the first matching array element. + */ +goog.array.indexOf = goog.NATIVE_ARRAY_PROTOTYPES && + goog.array.ARRAY_PROTOTYPE_.indexOf ? + function(arr, obj, opt_fromIndex) { + return goog.array.ARRAY_PROTOTYPE_.indexOf.call(arr, obj, opt_fromIndex); + } : + function(arr, obj, opt_fromIndex) { + var fromIndex = opt_fromIndex == _NULL ? + 0 : (opt_fromIndex < 0 ? + Math.max(0, arr.length + opt_fromIndex) : opt_fromIndex); + + if (goog.isString(arr)) { + // Array.prototype.indexOf uses === so only strings should be found. + if (!goog.isString(obj) || obj.length != 1) { + return -1; + } + return arr.indexOf(obj, fromIndex); + } + + for (var i = fromIndex; i < arr.length; i++) { + if (i in arr && arr[i] === obj) + return i; + } + return -1; + }; + +/** + * Calls a function for each element in an array. + * + * See {@link http://tinyurl.com/developer-mozilla-org-array-foreach} + * + * @param {goog.array.ArrayLike} arr Array or array like object over + * which to iterate. + * @param {Function} f The function to call for every element. This function + * takes 3 arguments (the element, the index and the array). The return + * value is ignored. The function is called only for indexes of the array + * which have assigned values; it is not called for indexes which have + * been deleted or which have never been assigned values. + * + * @param {Object=} opt_obj The object to be used as the value of 'this' + * within f. + */ +goog.array.forEach = goog.NATIVE_ARRAY_PROTOTYPES && + goog.array.ARRAY_PROTOTYPE_.forEach ? + function(arr, f, opt_obj) { + goog.array.ARRAY_PROTOTYPE_.forEach.call(arr, f, opt_obj); + } : + function(arr, f, opt_obj) { + var l = arr.length; // must be fixed during loop... see docs + var arr2 = goog.isString(arr) ? arr.split('') : arr; + for (var i = 0; i < l; i++) { + if (i in arr2) { + f.call(opt_obj, arr2[i], i, arr); + } + } + }; + + +/** + * Calls a function for each element in an array, starting from the last + * element rather than the first. + * + * @param {goog.array.ArrayLike} arr The array over which to iterate. + * @param {Function} f The function to call for every element. This function + * takes 3 arguments (the element, the index and the array). The return + * value is ignored. + * @param {Object=} opt_obj The object to be used as the value of 'this' + * within f. + */ +goog.array.forEachRight = function(arr, f, opt_obj) { + var l = arr.length; // must be fixed during loop... see docs + var arr2 = goog.isString(arr) ? arr.split('') : arr; + for (var i = l - 1; i >= 0; --i) { + if (i in arr2) { + f.call(opt_obj, arr2[i], i, arr); + } + } +}; + + +/** + * Calls a function for each element in an array, and if the function returns + * true adds the element to a new array. + * + * See {@link http://tinyurl.com/developer-mozilla-org-array-filter} + * + * @param {goog.array.ArrayLike} arr The array over which to iterate. + * @param {Function} f The function to call for every element. This function + * takes 3 arguments (the element, the index and the array) and must + * return a Boolean. If the return value is true the element is added to the + * result array. If it is _FALSE the element is not included. + * @param {Object=} opt_obj The object to be used as the value of 'this' + * within f. + * @return {!Array} a new array in which only elements that passed the test are + * present. + */ +goog.array.filter = goog.NATIVE_ARRAY_PROTOTYPES && + goog.array.ARRAY_PROTOTYPE_.filter ? + function(arr, f, opt_obj) { + return goog.array.ARRAY_PROTOTYPE_.filter.call(arr, f, opt_obj); + } : + function(arr, f, opt_obj) { + var l = arr.length; // must be fixed during loop... see docs + var res = []; + var resLength = 0; + var arr2 = goog.isString(arr) ? arr.split('') : arr; + for (var i = 0; i < l; i++) { + if (i in arr2) { + var val = arr2[i]; // in case f mutates arr2 + if (f.call(opt_obj, val, i, arr)) { + res[resLength++] = val; + } + } + } + return res; + }; + + +/** + * Calls a function for each element in an array and inserts the result into a + * new array. + * + * See {@link http://tinyurl.com/developer-mozilla-org-array-map} + * + * @param {goog.array.ArrayLike} arr The array over which to iterate. + * @param {Function} f The function to call for every element. This function + * takes 3 arguments (the element, the index and the array) and should + * return something. The result will be inserted into a new array. + * @param {Object=} opt_obj The object to be used as the value of 'this' + * within f. + * @return {!Array} a new array with the results from f. + */ +goog.array.map = goog.NATIVE_ARRAY_PROTOTYPES && + goog.array.ARRAY_PROTOTYPE_.map ? + function(arr, f, opt_obj) { + return goog.array.ARRAY_PROTOTYPE_.map.call(arr, f, opt_obj); + } : + function(arr, f, opt_obj) { + var l = arr.length; // must be fixed during loop... see docs + var res = new Array(l); + var arr2 = goog.isString(arr) ? arr.split('') : arr; + for (var i = 0; i < l; i++) { + if (i in arr2) { + res[i] = f.call(opt_obj, arr2[i], i, arr); + } + } + return res; + }; + + +/** + * Calls f for each element of an array. If any call returns true, some() + * returns true (without checking the remaining elements). If all calls + * return _FALSE, some() returns _FALSE. + * + * See {@link http://tinyurl.com/developer-mozilla-org-array-some} + * + * @param {goog.array.ArrayLike} arr The array to check. + * @param {Function} f The function to call for every element. This function + * takes 3 arguments (the element, the index and the array) and must + * return a Boolean. + * @param {Object=} opt_obj The object to be used as the value of 'this' + * within f. + * @return {boolean} true if any element passes the test. + */ +goog.array.some = goog.NATIVE_ARRAY_PROTOTYPES && + goog.array.ARRAY_PROTOTYPE_.some ? + function(arr, f, opt_obj) { + return goog.array.ARRAY_PROTOTYPE_.some.call(arr, f, opt_obj); + } : + function(arr, f, opt_obj) { + var l = arr.length; // must be fixed during loop... see docs + var arr2 = goog.isString(arr) ? arr.split('') : arr; + for (var i = 0; i < l; i++) { + if (i in arr2 && f.call(opt_obj, arr2[i], i, arr)) { + return _TRUE; + } + } + return _FALSE; + }; + + +/** + * Call f for each element of an array. If all calls return true, every() + * returns true. If any call returns _FALSE, every() returns _FALSE and + * does not continue to check the remaining elements. + * + * See {@link http://tinyurl.com/developer-mozilla-org-array-every} + * + * @param {goog.array.ArrayLike} arr The array to check. + * @param {Function} f The function to call for every element. This function + * takes 3 arguments (the element, the index and the array) and must + * return a Boolean. + * @param {Object=} opt_obj The object to be used as the value of 'this' + * within f. + * @return {boolean} _FALSE if any element fails the test. + */ +goog.array.every = goog.NATIVE_ARRAY_PROTOTYPES && + goog.array.ARRAY_PROTOTYPE_.every ? + function(arr, f, opt_obj) { + return goog.array.ARRAY_PROTOTYPE_.every.call(arr, f, opt_obj); + } : + function(arr, f, opt_obj) { + var l = arr.length; // must be fixed during loop... see docs + var arr2 = goog.isString(arr) ? arr.split('') : arr; + for (var i = 0; i < l; i++) { + if (i in arr2 && !f.call(opt_obj, arr2[i], i, arr)) { + return _FALSE; + } + } + return _TRUE; + }; + + +/** + * Whether the array contains the given object. + * @param {goog.array.ArrayLike} arr The array to test for the presence of the + * element. + * @param {*} obj The object for which to test. + * @return {boolean} true if obj is present. + */ +goog.array.contains = function(arr, obj) { + return goog.array.indexOf(arr, obj) >= 0; +}; + + +/** + * Whether the array is empty. + * @param {goog.array.ArrayLike} arr The array to test. + * @return {boolean} true if empty. + */ +goog.array.isEmpty = function(arr) { + return arr.length == 0; +}; + + +/** + * Clears the array. + * @param {goog.array.ArrayLike} arr Array or array like object to clear. + */ +goog.array.clear = function(arr) { + // For non real arrays we don't have the magic length so we delete the + // indices. + if (!goog.isArray(arr)) { + for (var i = arr.length - 1; i >= 0; i--) { + delete arr[i]; + } + } + arr.length = 0; +}; + + +/** + * Inserts an object at the given index of the array. + * @param {goog.array.ArrayLike} arr The array to modify. + * @param {*} obj The object to insert. + * @param {number=} opt_i The index at which to insert the object. If omitted, + * treated as 0. A negative index is counted from the end of the array. + */ +goog.array.insertAt = function(arr, obj, opt_i) { + goog.array.splice(arr, opt_i, 0, obj); +}; + + +/** + * Removes the first occurrence of a particular value from an array. + * @param {goog.array.ArrayLike} arr Array from which to remove value. + * @param {*} obj Object to remove. + * @return {boolean} True if an element was removed. + */ +goog.array.remove = function(arr, obj) { + var i = goog.array.indexOf(arr, obj); + var rv; + if ((rv = i >= 0)) { + goog.array.removeAt(arr, i); + } + return rv; +}; + + +/** + * Removes from an array the element at index i + * @param {goog.array.ArrayLike} arr Array or array like object from which to + * remove value. + * @param {number} i The index to remove. + * @return {boolean} True if an element was removed. + */ +goog.array.removeAt = function(arr, i) { + // use generic form of splice + // splice returns the removed items and if successful the length of that + // will be 1 + return goog.array.ARRAY_PROTOTYPE_.splice.call(arr, i, 1).length == 1; +}; + + +/** + * Returns a new array that is the result of joining the arguments. If arrays + * are passed then their items are added, however, if non-arrays are passed they + * will be added to the return array as is. + * + * Note that ArrayLike objects will be added as is, rather than having their + * items added. + * + * goog.array.concat([1, 2], [3, 4]) -> [1, 2, 3, 4] + * goog.array.concat(0, [1, 2]) -> [0, 1, 2] + * goog.array.concat([1, 2], null) -> [1, 2, null] + * + * There is bug in all current versions of IE (6, 7 and 8) where arrays created + * in an iframe become corrupted soon (not immediately) after the iframe is + * destroyed. This is common if loading data via goog.net.IframeIo, for example. + * This corruption only affects the concat method which will start throwing + * Catastrophic Errors (#-2147418113). + * + * See http://endoflow.com/scratch/corrupted-arrays.html for a test case. + * + * Internally goog.array should use this, so that all methods will continue to + * work on these broken array objects. + * + * @param {...*} var_args Items to concatenate. Arrays will have each item + * added, while primitives and objects will be added as is. + * @return {!Array} The new resultant array. + */ +goog.array.concat = function(var_args) { + return goog.array.ARRAY_PROTOTYPE_.concat.apply( + goog.array.ARRAY_PROTOTYPE_, arguments); +}; + + +/** + * Does a shallow copy of an array. + * @param {goog.array.ArrayLike} arr Array or array-like object to clone. + * @return {!Array} Clone of the input array. + */ +goog.array.clone = function(arr) { + if (goog.isArray(arr)) { + return goog.array.concat(/** @type {!Array} */ (arr)); + } else { // array like + // Concat does not work with non arrays. + var rv = []; + for (var i = 0, len = arr.length; i < len; i++) { + rv[i] = arr[i]; + } + return rv; + } +}; + + +/** + * Converts an object to an array. + * @param {goog.array.ArrayLike} object The object to convert to an array. + * @return {!Array} The object converted into an array. If object has a + * length property, every property indexed with a non-negative number + * less than length will be included in the result. If object does not + * have a length property, an empty array will be returned. + */ +goog.array.toArray = function(object) { + if (goog.isArray(object)) { + // This fixes the JS compiler warning and forces the Object to an Array type + return goog.array.concat(/** @type {!Array} */ (object)); + } + // Clone what we hope to be an array-like object to an array. + // We could check isArrayLike() first, but no check we perform would be as + // reliable as simply making the call. + return goog.array.clone(/** @type {Array} */ (object)); +}; + + +/** + * Adds or removes elements from an array. This is a generic version of Array + * splice. This means that it might work on other objects similar to arrays, + * such as the arguments object. + * + * @param {goog.array.ArrayLike} arr The array to modify. + * @param {number|undefined} index The index at which to start changing the + * array. If not defined, treated as 0. + * @param {number} howMany How many elements to remove (0 means no removal. A + * value below 0 is treated as zero and so is any other non number. Numbers + * are floored). + * @param {...*} var_args Optional, additional elements to insert into the + * array. + * @return {!Array} the removed elements. + */ +goog.array.splice = function(arr, index, howMany, var_args) { + return goog.array.ARRAY_PROTOTYPE_.splice.apply( + arr, goog.array.slice(arguments, 1)); +}; + + +/** + * Returns a new array from a segment of an array. This is a generic version of + * Array slice. This means that it might work on other objects similar to + * arrays, such as the arguments object. + * + * @param {goog.array.ArrayLike} arr The array from which to copy a segment. + * @param {number} start The index of the first element to copy. + * @param {number=} opt_end The index after the last element to copy. + * @return {!Array} A new array containing the specified segment of the original + * array. + */ +goog.array.slice = function(arr, start, opt_end) { + // passing 1 arg to slice is not the same as passing 2 where the second is + // null or undefined (in that case the second argument is treated as 0). + // we could use slice on the arguments object and then use apply instead of + // testing the length + if (arguments.length <= 2) { + return goog.array.ARRAY_PROTOTYPE_.slice.call(arr, start); + } else { + return goog.array.ARRAY_PROTOTYPE_.slice.call(arr, start, opt_end); + } +}; + + +/** + * Sorts the specified array into ascending order. If no opt_compareFn is + * specified, elements are compared using + * goog.array.defaultCompare, which compares the elements using + * the built in < and > operators. This will produce the expected behavior + * for homogeneous arrays of String(s) and Number(s), unlike the native sort, + * but will give unpredictable results for heterogenous lists of strings and + * numbers with different numbers of digits. + * + * This sort is not guaranteed to be stable. + * + * Runtime: Same as Array.prototype.sort + * + * @param {Array} arr The array to be sorted. + * @param {Function=} opt_compareFn Optional comparison function by which the + * array is to be ordered. Should take 2 arguments to compare, and return a + * negative number, zero, or a positive number depending on whether the + * first argument is less than, equal to, or greater than the second. + */ +goog.array.sort = function(arr, opt_compareFn) { + // TODO(user): Update type annotation since null is not accepted. + goog.array.ARRAY_PROTOTYPE_.sort.call( + arr, opt_compareFn || goog.array.defaultCompare); +}; + + +/** + * Compares two arrays for equality. Two arrays are considered equal if they + * have the same length and their corresponding elements are equal according to + * the comparison function. + * + * @param {goog.array.ArrayLike} arr1 The first array to compare. + * @param {goog.array.ArrayLike} arr2 The second array to compare. + * @param {Function=} opt_equalsFn Optional comparison function. + * Should take 2 arguments to compare, and return true if the arguments + * are equal. Defaults to {@link goog.array.defaultCompareEquality} which + * compares the elements using the built-in '===' operator. + * @return {boolean} Whether the two arrays are equal. + */ +goog.array.equals = function(arr1, arr2, opt_equalsFn) { + if (!goog.isArrayLike(arr1) || !goog.isArrayLike(arr2) || + arr1.length != arr2.length) { + return _FALSE; + } + var l = arr1.length; + var equalsFn = opt_equalsFn || goog.array.defaultCompareEquality; + for (var i = 0; i < l; i++) { + if (!equalsFn(arr1[i], arr2[i])) { + return _FALSE; + } + } + return _TRUE; +}; + + +/** + * @deprecated Use {@link goog.array.equals}. + * @param {goog.array.ArrayLike} arr1 See {@link goog.array.equals}. + * @param {goog.array.ArrayLike} arr2 See {@link goog.array.equals}. + * @param {Function=} opt_equalsFn See {@link goog.array.equals}. + * @return {boolean} See {@link goog.array.equals}. + */ +goog.array.compare = function(arr1, arr2, opt_equalsFn) { + return goog.array.equals(arr1, arr2, opt_equalsFn); +}; + + +/** + * Compares its two arguments for order, using the built in < and > + * operators. + * @param {*} a The first object to be compared. + * @param {*} b The second object to be compared. + * @return {number} A negative number, zero, or a positive number as the first + * argument is less than, equal to, or greater than the second. + */ +goog.array.defaultCompare = function(a, b) { + return a > b ? 1 : a < b ? -1 : 0; +}; + + +/** + * Compares its two arguments for equality, using the built in === operator. + * @param {*} a The first object to compare. + * @param {*} b The second object to compare. + * @return {boolean} True if the two arguments are equal, _FALSE otherwise. + */ +goog.array.defaultCompareEquality = function(a, b) { + return a === b; +}; + + +/** + * Returns an array consisting of the given value repeated N times. + * + * @param {*} value The value to repeat. + * @param {number} n The repeat count. + * @return {!Array.<*>} An array with the repeated value. + */ +goog.array.repeat = function(value, n) { + var array = []; + for (var i = 0; i < n; i++) { + array[i] = value; + } + return array; +}; +// Copyright 2006 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Utilities for adding, removing and setting classes. + * + */ + + +goog.provide('goog.dom.classes'); + +//goog.require('goog.array'); +/** + * Gets an array of class names on an element + * @param {Node} element DOM node to get class of. + * @return {Array} Class names on {@code element}. + */ +goog.dom.classes.get = function(element) { + var className = element.className; + // Some types of elements don't have a className in IE (e.g. iframes). + // Furthermore, in Firefox, className is not a string when the element is + // an SVG element. + return className && typeof className.split == 'function' ? + className.split(/\s+/) : []; +}; + + +/** + * Adds a class or classes to an element. Does not add multiples of class names. + * @param {Node} element DOM node to add class to. + * @param {...string} var_args Class names to add. + * @return {boolean} Whether class was added (or all classes were added). + */ +goog.dom.classes.add = function(element, var_args) { + var classes = goog.dom.classes.get(element); + var args = goog.array.slice(arguments, 1); + + var b = goog.dom.classes.add_(classes, args); + element.className = classes.join(' '); + + return b; +}; + + +/** + * Helper method for {@link goog.dom.classes.add} and + * {@link goog.dom.classes.addRemove}. Adds one or more classes to the supplied + * classes array. + * @param {Array.} classes All class names for the element, will be + * updated to have the classes supplied in {@code args} added. + * @param {Array.} args Class names to add. + * @return {boolean} Whether all classes in were added. + * @private + */ +goog.dom.classes.add_ = function(classes, args) { + var rv = 0; + for (var i = 0; i < args.length; i++) { + if (!goog.array.contains(classes, args[i])) { + classes.push(args[i]); + rv++; + } + } + return rv == args.length; +}; +// Copyright 2006 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Utilities for manipulating objects/maps/hashes. + */ + +goog.provide('goog.object'); + + +/** + * Calls a function for each element in an object/map/hash. + * + * @param {Object} obj The object over which to iterate. + * @param {Function} f The function to call for every element. This function + * takes 3 arguments (the element, the index and the object) + * and the return value is irrelevant. + * @param {Object=} opt_obj This is used as the 'this' object within f. + */ +goog.object.forEach = function(obj, f, opt_obj) { + for (var key in obj) { + f.call(opt_obj, obj[key], key, obj); + } +}; + + +/** + * Calls a function for each element in an object/map/hash. If that call returns + * true, adds the element to a new object. + * + * @param {Object} obj The object over which to iterate. + * @param {Function} f The function to call for every element. This + * function takes 3 arguments (the element, the index and the object) + * and should return a boolean. If the return value is true the + * element is added to the result object. If it is _FALSE the + * element is not included. + * @param {Object=} opt_obj This is used as the 'this' object within f. + * @return {!Object} a new object in which only elements that passed the test + * are present. + */ +goog.object.filter = function(obj, f, opt_obj) { + var res = {}; + for (var key in obj) { + if (f.call(opt_obj, obj[key], key, obj)) { + res[key] = obj[key]; + } + } + return res; +}; + + +/** + * For every element in an object/map/hash calls a function and inserts the + * result into a new object. + * + * @param {Object} obj The object over which to iterate. + * @param {Function} f The function to call for every element. This function + * takes 3 arguments (the element, the index and the object) + * and should return something. The result will be inserted + * into a new object. + * @param {Object=} opt_obj This is used as the 'this' object within f. + * @return {!Object} a new object with the results from f. + */ +goog.object.map = function(obj, f, opt_obj) { + var res = {}; + for (var key in obj) { + res[key] = f.call(opt_obj, obj[key], key, obj); + } + return res; +}; + + +/** + * Calls a function for each element in an object/map/hash. If + * all calls return true, returns true. If any call returns _FALSE, returns + * _FALSE at this point and does not continue to check the remaining elements. + * + * @param {Object} obj The object to check. + * @param {Function} f The function to call for every element. This function + * takes 3 arguments (the element, the index and the object) and should + * return a boolean. + * @param {Object=} opt_obj This is used as the 'this' object within f. + * @return {boolean} _FALSE if any element fails the test. + */ +goog.object.every = function(obj, f, opt_obj) { + for (var key in obj) { + if (!f.call(opt_obj, obj[key], key, obj)) { + return _FALSE; + } + } + return _TRUE; +}; + + +/** + * Returns the number of key-value pairs in the object map. + * + * @param {Object} obj The object for which to get the number of key-value + * pairs. + * @return {number} The number of key-value pairs in the object map. + */ +goog.object.getCount = function(obj) { + // JS1.5 has __count__ but it has been deprecated so it raises a warning... + // in other words do not use. Also __count__ only includes the fields on the + // actual object and not in the prototype chain. + var rv = 0; + for (var key in obj) { + rv++; + } + return rv; +}; + + +/** + * Whether the object/hash/map contains the given object as a value. + * An alias for goog.object.containsValue(obj, val). + * + * @param {Object} obj The object in which to look for val. + * @param {*} val The object for which to check. + * @return {boolean} true if val is present. + */ +goog.object.contains = function(obj, val) { + return goog.object.containsValue(obj, val); +}; + + +/** + * Returns the values of the object/map/hash. + * + * @param {Object} obj The object from which to get the values. + * @return {!Array} The values in the object/map/hash. + */ +goog.object.getValues = function(obj) { + var res = []; + var i = 0; + for (var key in obj) { + res[i++] = obj[key]; + } + return res; +}; + + +/** + * Returns the keys of the object/map/hash. + * + * @param {Object} obj The object from which to get the keys. + * @return {!Array.} Array of property keys. + */ +goog.object.getKeys = function(obj) { + var res = []; + var i = 0; + for (var key in obj) { + res[i++] = key; + } + return res; +}; + + +/** + * Whether the object/map/hash contains the given value. This is O(n). + * + * @param {Object} obj The object in which to look for val. + * @param {*} val The value for which to check. + * @return {boolean} true If the map contains the value. + */ +goog.object.containsValue = function(obj, val) { + for (var key in obj) { + if (obj[key] == val) { + return _TRUE; + } + } + return _FALSE; +}; + + +/** + * Whether the object/map/hash is empty. + * + * @param {Object} obj The object to test. + * @return {boolean} true if obj is empty. + */ +goog.object.isEmpty = function(obj) { + for (var key in obj) { + return _FALSE; + } + return _TRUE; +}; + + +/** + * Removes all key value pairs from the object/map/hash. + * + * @param {Object} obj The object to clear. + */ +goog.object.clear = function(obj) { + for (var i in obj) { + delete obj[i]; + } +}; + + +/** + * Removes a key-value pair based on the key. + * + * @param {Object} obj The object from which to remove the key. + * @param {*} key The key to remove. + * @return {boolean} Whether an element was removed. + */ +goog.object.remove = function(obj, key) { + var rv; + if ((rv = key in obj)) { + delete obj[key]; + } + return rv; +}; + + +/** + * Adds a key-value pair to the object. Throws an exception if the key is + * already in use. Use set if you want to change an existing pair. + * + * @param {Object} obj The object to which to add the key-value pair. + * @param {string} key The key to add. + * @param {*} val The value to add. + */ +goog.object.add = function(obj, key, val) { + if (key in obj) { + throw Error('The object already contains the key "' + key + '"'); + } + goog.object.set(obj, key, val); +}; + + +/** + * Returns the value for the given key. + * + * @param {Object} obj The object from which to get the value. + * @param {string} key The key for which to get the value. + * @param {*=} opt_val The value to return if no item is found for the given + * key (default is undefined). + * @return {*} The value for the given key. + */ +goog.object.get = function(obj, key, opt_val) { + if (key in obj) { + return obj[key]; + } + return opt_val; +}; + + +/** + * Adds a key-value pair to the object/map/hash. + * + * @param {Object} obj The object to which to add the key-value pair. + * @param {string} key The key to add. + * @param {*} value The value to add. + */ +goog.object.set = function(obj, key, value) { + obj[key] = value; +}; + + +/** + * Does a flat clone of the object. + * + * @param {Object} obj Object to clone. + * @return {!Object} Clone of the input object. + */ +goog.object.clone = function(obj) { + // We cannot use the prototype trick because a lot of methods depend on where + // the actual key is set. + + var res = {}; + for (var key in obj) { + res[key] = obj[key]; + } + return res; + // We could also use goog.mixin but I wanted this to be independent from that. +}; + + +/** + * The names of the fields that are defined on Object.prototype. + * @type {Array.} + * @private + */ +goog.object.PROTOTYPE_FIELDS_ = [ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' +]; + + +/** + * Extends an object with another object. + * This operates 'in-place'; it does not create a new Object. + * + * Example: + * var o = {}; + * goog.object.extend(o, {a: 0, b: 1}); + * o; // {a: 0, b: 1} + * goog.object.extend(o, {c: 2}); + * o; // {a: 0, b: 1, c: 2} + * + * @param {Object} target The object to modify. + * @param {...Object} var_args The objects from which values will be copied. + */ +goog.object.extend = function(target, var_args) { + var key, source; + for (var i = 1; i < arguments.length; i++) { + source = arguments[i]; + for (key in source) { + target[key] = source[key]; + } + + // For IE the for-in-loop does not contain any properties that are not + // enumerable on the prototype object (for example isPrototypeOf from + // Object.prototype) and it will also not include 'replace' on objects that + // extend String and change 'replace' (not that it is common for anyone to + // extend anything except Object). + + for (var j = 0; j < goog.object.PROTOTYPE_FIELDS_.length; j++) { + key = goog.object.PROTOTYPE_FIELDS_[j]; + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } +}; + + +/** + * Creates a new object built from the key-value pairs provided as arguments. + * @param {...*} var_args If only one argument is provided and it is an array + * then this is used as the arguments, otherwise even arguments are used as + * the property names and odd arguments are used as the property values. + * @return {!Object} The new object. + * @throws {Error} If there are uneven number of arguments or there is only one + * non array argument. + */ +goog.object.create = function(var_args) { + var argLength = arguments.length; + if (argLength == 1 && goog.isArray(arguments[0])) { + return goog.object.create.apply(_NULL, arguments[0]); + } + + if (argLength % 2) { + throw Error('Uneven number of arguments'); + } + + var rv = {}; + for (var i = 0; i < argLength; i += 2) { + rv[arguments[i]] = arguments[i + 1]; + } + return rv; +}; +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Defines the goog.dom.TagName enum. This enumerates + * all html tag names specified by the W3C HTML 4.01 Specification. + * Reference http://www.w3.org/TR/html401/index/elements.html. + */ +goog.provide('goog.dom.TagName'); + + +/** + * Enum of all html tag names specified by the W3C HTML 4.01 Specification. + * Reference http://www.w3.org/TR/html401/index/elements.html + * @enum {string} + */ +goog.dom.TagName = { + A: 'A', + ABBR: 'ABBR', + ACRONYM: 'ACRONYM', + ADDRESS: 'ADDRESS', + APPLET: 'APPLET', + AREA: 'AREA', + B: 'B', + BASE: 'BASE', + BASEFONT: 'BASEFONT', + BDO: 'BDO', + BIG: 'BIG', + BLOCKQUOTE: 'BLOCKQUOTE', + BODY: 'BODY', + BR: 'BR', + BUTTON: 'BUTTON', + CANVAS: 'CANVAS', + CAPTION: 'CAPTION', + CENTER: 'CENTER', + CITE: 'CITE', + CODE: 'CODE', + COL: 'COL', + COLGROUP: 'COLGROUP', + DD: 'DD', + DEL: 'DEL', + DFN: 'DFN', + DIR: 'DIR', + DIV: 'DIV', + DL: 'DL', + DT: 'DT', + EM: 'EM', + FIELDSET: 'FIELDSET', + FONT: 'FONT', + FORM: 'FORM', + FRAME: 'FRAME', + FRAMESET: 'FRAMESET', + H1: 'H1', + H2: 'H2', + H3: 'H3', + H4: 'H4', + H5: 'H5', + H6: 'H6', + HEAD: 'HEAD', + HR: 'HR', + HTML: 'HTML', + I: 'I', + IFRAME: 'IFRAME', + IMG: 'IMG', + INPUT: 'INPUT', + INS: 'INS', + ISINDEX: 'ISINDEX', + KBD: 'KBD', + LABEL: 'LABEL', + LEGEND: 'LEGEND', + LI: 'LI', + LINK: 'LINK', + MAP: 'MAP', + MENU: 'MENU', + META: 'META', + NOFRAMES: 'NOFRAMES', + NOSCRIPT: 'NOSCRIPT', + OBJECT: 'OBJECT', + OL: 'OL', + OPTGROUP: 'OPTGROUP', + OPTION: 'OPTION', + P: 'P', + PARAM: 'PARAM', + PRE: 'PRE', + Q: 'Q', + S: 'S', + SAMP: 'SAMP', + SCRIPT: 'SCRIPT', + SELECT: 'SELECT', + SMALL: 'SMALL', + SPAN: 'SPAN', + STRIKE: 'STRIKE', + STRONG: 'STRONG', + STYLE: 'STYLE', + SUB: 'SUB', + SUP: 'SUP', + TABLE: 'TABLE', + TBODY: 'TBODY', + TD: 'TD', + TEXTAREA: 'TEXTAREA', + TFOOT: 'TFOOT', + TH: 'TH', + THEAD: 'THEAD', + TITLE: 'TITLE', + TR: 'TR', + TT: 'TT', + U: 'U', + UL: 'UL', + VAR: 'VAR' +}; +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview A utility class for representing two-dimensional sizes. + */ + + +goog.provide('goog.math.Size'); + + + +/** + * Class for representing sizes consisting of a width and height. Undefined + * width and height support is deprecated and results in compiler warning. + * @param {number} width Width. + * @param {number} height Height. + * @constructor + */ +goog.math.Size = function(width, height) { + /** + * Width + * @type {number} + */ + this.width = width; + + /** + * Height + * @type {number} + */ + this.height = height; +}; + + +/** + * Compares sizes for equality. + * @param {goog.math.Size} a A Size. + * @param {goog.math.Size} b A Size. + * @return {boolean} True iff the sizes have equal widths and equal + * heights, or if both are null. + */ +goog.math.Size.equals = function(a, b) { + if (a == b) { + return _TRUE; + } + if (!a || !b) { + return _FALSE; + } + return a.width == b.width && a.height == b.height; +}; + + +/** + * @return {!goog.math.Size} A new copy of the Size. + */ +goog.math.Size.prototype.clone = function() { + return new goog.math.Size(this.width, this.height); +}; + + +/** + * @return {number} The area of the size (width * height). + */ +goog.math.Size.prototype.area = function() { + return this.width * this.height; +}; + + +/** + * @return {boolean} True if the size has zero area, _FALSE if both dimensions + * are non-zero numbers. + */ +goog.math.Size.prototype.isEmpty = function() { + return !this.area(); +}; +// Copyright 2010 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Browser capability checks for the dom package. + * + */ + + +goog.provide('goog.dom.BrowserFeature'); + +//goog.require('goog.userAgent'); + + +/** + * Enum of browser capabilities. + * @enum {boolean} + */ +goog.dom.BrowserFeature = { + /** + * Whether attributes 'name' and 'type' can be added to an element after it's + * created. _FALSE in Internet Explorer prior to version 9. + */ + CAN_ADD_NAME_OR_TYPE_ATTRIBUTES: !goog.userAgent.IE || + goog.userAgent.isVersion('9'), + + /** + * Whether we can use element.children to access an element's Element + * children. Available since Gecko 1.9.1, IE 9. (IE<9 also includes comment + * nodes in the collection.) + */ + CAN_USE_CHILDREN_ATTRIBUTE: !goog.userAgent.GECKO && !goog.userAgent.IE || + goog.userAgent.IE && goog.userAgent.isVersion('9') || + goog.userAgent.GECKO && goog.userAgent.isVersion('1.9.1'), + + /** + * Opera, Safari 3, and Internet Explorer 9 all support innerText but they + * include text nodes in script and style tags. + */ + CAN_USE_INNER_TEXT: goog.userAgent.IE && !goog.userAgent.isVersion('9'), + + /** + * Whether NoScope elements need a scoped element written before them in + * innerHTML. + * MSDN: http://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx#1 + */ + INNER_HTML_NEEDS_SCOPED_ELEMENT: goog.userAgent.IE +}; +// Copyright 2006 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview A utility class for representing two-dimensional positions. + */ + + +goog.provide('goog.math.Coordinate'); + + + +/** + * Class for representing coordinates and positions. + * @param {number=} opt_x Left, defaults to 0. + * @param {number=} opt_y Top, defaults to 0. + * @constructor + */ +goog.math.Coordinate = function(opt_x, opt_y) { + /** + * X-value + * @type {number} + */ + this.x = goog.isDef(opt_x) ? opt_x : 0; + + /** + * Y-value + * @type {number} + */ + this.y = goog.isDef(opt_y) ? opt_y : 0; +}; + + +/** + * Returns a new copy of the coordinate. + * @return {!goog.math.Coordinate} A clone of this coordinate. + */ +goog.math.Coordinate.prototype.clone = function() { + return new goog.math.Coordinate(this.x, this.y); +}; + + +/** + * Compares coordinates for equality. + * @param {goog.math.Coordinate} a A Coordinate. + * @param {goog.math.Coordinate} b A Coordinate. + * @return {boolean} True iff the coordinates are equal, or if both are null. + */ +goog.math.Coordinate.equals = function(a, b) { + if (a == b) { + return _TRUE; + } + if (!a || !b) { + return _FALSE; + } + return a.x == b.x && a.y == b.y; +}; +// Copyright 2006 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Utilities for manipulating the browser's Document Object Model + * Inspiration taken *heavily* from mochikit (http://mochikit.com/). + * + * You can use {@link goog.dom.DomHelper} to create new dom helpers that refer + * to a different document object. This is useful if you are working with + * frames or multiple windows. + * + */ + + +// TODO(user): Rename/refactor getTextContent and getRawTextContent. The problem +// is that getTextContent should mimic the DOM3 textContent. We should add a +// getInnerText (or getText) which tries to return the visible text, innerText. + + +goog.provide('goog.dom'); +goog.provide('goog.dom.DomHelper'); +goog.provide('goog.dom.NodeType'); + +//goog.require('goog.array'); +//goog.require('goog.dom.BrowserFeature'); +//goog.require('goog.dom.TagName'); +//goog.require('goog.dom.classes'); +//goog.require('goog.math.Coordinate'); +//goog.require('goog.math.Size'); +//goog.require('goog.object'); +//goog.require('goog.string'); +//goog.require('goog.userAgent'); + + +/** + * @define {boolean} Whether we know at compile time that the browser is in + * quirks mode. + */ +goog.dom.ASSUME_QUIRKS_MODE = _FALSE; + + +/** + * @define {boolean} Whether we know at compile time that the browser is in + * standards compliance mode. + */ +goog.dom.ASSUME_STANDARDS_MODE = _FALSE; + + +/** + * Whether we know the compatibility mode at compile time. + * @type {boolean} + * @private + */ +goog.dom.COMPAT_MODE_KNOWN_ = + goog.dom.ASSUME_QUIRKS_MODE || goog.dom.ASSUME_STANDARDS_MODE; + + +/** + * Enumeration for DOM node types (for reference) + * @enum {number} + */ +goog.dom.NodeType = { + ELEMENT: 1, + ATTRIBUTE: 2, + TEXT: 3, + CDATA_SECTION: 4, + ENTITY_REFERENCE: 5, + ENTITY: 6, + PROCESSING_INSTRUCTION: 7, + COMMENT: 8, + DOCUMENT: 9, + DOCUMENT_TYPE: 10, + DOCUMENT_FRAGMENT: 11, + NOTATION: 12 +}; + + +/** + * Gets the DomHelper object for the document where the element resides. + * @param {Node|Window=} opt_element If present, gets the DomHelper for this + * element. + * @return {!goog.dom.DomHelper} The DomHelper. + */ +goog.dom.getDomHelper = function(opt_element) { + return opt_element ? + new goog.dom.DomHelper(goog.dom.getOwnerDocument(opt_element)) : + (goog.dom.defaultDomHelper_ || + (goog.dom.defaultDomHelper_ = new goog.dom.DomHelper())); +}; + + +/** + * Cached default DOM helper. + * @type {goog.dom.DomHelper} + * @private + */ +goog.dom.defaultDomHelper_; + + +/** + * Gets the document object being used by the dom library. + * @return {!Document} Document object. + */ +goog.dom.getDocument = function() { + return document; +}; + + +/** + * Alias for getElementById. If a DOM node is passed in then we just return + * that. + * @param {string|Element} element Element ID or a DOM node. + * @return {Element} The element with the given ID, or the node passed in. + */ +goog.dom.getElement = function(element) { + return goog.isString(element) ? + _DOC.getElementById(element) : element; +}; + + +/** + * Alias for getElement. + * @param {string|Element} element Element ID or a DOM node. + * @return {Element} The element with the given ID, or the node passed in. + * @deprecated Use {@link goog.dom.getElement} instead. + */ +goog.dom.$ = goog.dom.getElement; + + +/** + * Looks up elements by both tag and class name, using browser native functions + * ({@code querySelectorAll}, {@code getElementsByTagName} or + * {@code getElementsByClassName}) where possible. This function + * is a useful, if limited, way of collecting a list of DOM elements + * with certain characteristics. {@code goog.dom.query} offers a + * more powerful and general solution which allows matching on CSS3 + * selector expressions, but at increased cost in code size. If all you + * need is particular tags belonging to a single class, this function + * is fast and sleek. + * + * @see {goog.dom.query} + * + * @param {?string=} opt_tag Element tag name. + * @param {?string=} opt_class Optional class name. + * @param {Document|Element=} opt_el Optional element to look in. + * @return { {length: number} } Array-like list of elements (only a length + * property and numerical indices are guaranteed to exist). + */ +goog.dom.getElementsByTagNameAndClass = function(opt_tag, opt_class, opt_el) { + return goog.dom.getElementsByTagNameAndClass_(document, opt_tag, opt_class, + opt_el); +}; + + +/** + * Returns an array of all the elements with the provided className. + * @see {goog.dom.query} + * @param {!string} className the name of the class to look for. + * @param {Document|Element=} opt_el Optional element to look in. + * @return { {length: number} } The items found with the class name provided. + */ +goog.dom.getElementsByClass = function(className, opt_el) { + var parent = opt_el || document; + if (goog.dom.canUseQuerySelector_(parent)) { + return parent.querySelectorAll('.' + className); + } else if (parent.getElementsByClassName) { + return parent.getElementsByClassName(className); + } + return goog.dom.getElementsByTagNameAndClass_( + document, '*', className, opt_el); +}; + + +/** + * Returns the first element with the provided className. + * @see {goog.dom.query} + * @param {!string} className the name of the class to look for. + * @param {Element|Document=} opt_el Optional element to look in. + * @return {Element} The first item with the class name provided. + */ +goog.dom.getElementByClass = function(className, opt_el) { + var parent = opt_el || document; + var retVal = _NULL; + if (goog.dom.canUseQuerySelector_(parent)) { + retVal = parent.querySelector('.' + className); + } else { + retVal = goog.dom.getElementsByClass(className, opt_el)[0]; + } + return retVal || _NULL; +}; + + +/** + * Prefer the standardized (http://www.w3.org/TR/selectors-api/), native and + * fast W3C Selectors API. However, the version of WebKit that shipped with + * Safari 3.1 and Chrome has a bug where it will not correctly match mixed- + * case class name selectors in quirks mode. + * @param {!Element|Document} parent The parent document object. + * @return {boolean} whether or not we can use parent.querySelector* APIs. + * @private + */ +goog.dom.canUseQuerySelector_ = function(parent) { + return parent.querySelectorAll && + parent.querySelector && + (!goog.userAgent.WEBKIT || goog.dom.isCss1CompatMode_(document) || + goog.userAgent.isVersion('528')); +}; + + +/** + * Helper for {@code getElementsByTagNameAndClass}. + * @param {!Document} doc The document to get the elements in. + * @param {?string=} opt_tag Element tag name. + * @param {?string=} opt_class Optional class name. + * @param {Document|Element=} opt_el Optional element to look in. + * @return { {length: number} } Array-like list of elements (only a length + * property and numerical indices are guaranteed to exist). + * @private + */ +goog.dom.getElementsByTagNameAndClass_ = function(doc, opt_tag, opt_class, + opt_el) { + var parent = opt_el || doc; + var tagName = (opt_tag && opt_tag != '*') ? opt_tag.toUpperCase() : ''; + + if (goog.dom.canUseQuerySelector_(parent) && + (tagName || opt_class)) { + var query = tagName + (opt_class ? '.' + opt_class : ''); + return parent.querySelectorAll(query); + } + + // Use the native getElementsByClassName if available, under the assumption + // that even when the tag name is specified, there will be fewer elements to + // filter through when going by class than by tag name + if (opt_class && parent.getElementsByClassName) { + var els = parent.getElementsByClassName(opt_class); + + if (tagName) { + var arrayLike = {}; + var len = 0; + + // Filter for specific tags if requested. + for (var i = 0, el; el = els[i]; i++) { + if (tagName == el.nodeName) { + arrayLike[len++] = el; + } + } + arrayLike.length = len; + + return arrayLike; + } else { + return els; + } + } + + var els = parent.getElementsByTagName(tagName || '*'); + + if (opt_class) { + var arrayLike = {}; + var len = 0; + for (var i = 0, el; el = els[i]; i++) { + var className = el.className; + // Check if className has a split function since SVG className does not. + if (typeof className.split == 'function' && + goog.array.contains(className.split(/\s+/), opt_class)) { + arrayLike[len++] = el; + } + } + arrayLike.length = len; + return arrayLike; + } else { + return els; + } +}; + + +/** + * Alias for {@code getElementsByTagNameAndClass}. + * @param {?string=} opt_tag Element tag name. + * @param {?string=} opt_class Optional class name. + * @param {Element=} opt_el Optional element to look in. + * @return { {length: number} } Array-like list of elements (only a length + * property and numerical indices are guaranteed to exist). + * @deprecated Use {@link goog.dom.getElementsByTagNameAndClass} instead. + */ +goog.dom.$$ = goog.dom.getElementsByTagNameAndClass; + + +/** + * Sets multiple properties on a node. + * @param {Element} element DOM node to set properties on. + * @param {Object} properties Hash of property:value pairs. + */ +goog.dom.setProperties = function(element, properties) { + goog.object.forEach(properties, function(val, key) { + if (key == 'style') { + element.style.cssText = val; + } else if (key == 'class') { + element.className = val; + } else if (key == 'for') { + element.htmlFor = val; + } else if (key in goog.dom.DIRECT_ATTRIBUTE_MAP_) { + element.setAttribute(goog.dom.DIRECT_ATTRIBUTE_MAP_[key], val); + } else { + element[key] = val; + } + }); +}; + + +/** + * Map of attributes that should be set using + * element.setAttribute(key, val) instead of element[key] = val. Used + * by goog.dom.setProperties. + * + * @type {Object} + * @private + */ +goog.dom.DIRECT_ATTRIBUTE_MAP_ = { + 'cellpadding': 'cellPadding', + 'cellspacing': 'cellSpacing', + 'colspan': 'colSpan', + 'rowspan': 'rowSpan', + 'valign': 'vAlign', + 'height': 'height', + 'width': 'width', + 'usemap': 'useMap', + 'frameborder': 'frameBorder', + 'maxlength': 'maxLength', + 'type': 'type' +}; + + +/** + * Gets the dimensions of the viewport. + * + * Gecko Standards mode: + * docEl.clientWidth Width of viewport excluding scrollbar. + * win.innerWidth Width of viewport including scrollbar. + * body.clientWidth Width of body element. + * + * docEl.clientHeight Height of viewport excluding scrollbar. + * win.innerHeight Height of viewport including scrollbar. + * body.clientHeight Height of document. + * + * Gecko Backwards compatible mode: + * docEl.clientWidth Width of viewport excluding scrollbar. + * win.innerWidth Width of viewport including scrollbar. + * body.clientWidth Width of viewport excluding scrollbar. + * + * docEl.clientHeight Height of document. + * win.innerHeight Height of viewport including scrollbar. + * body.clientHeight Height of viewport excluding scrollbar. + * + * IE6/7 Standards mode: + * docEl.clientWidth Width of viewport excluding scrollbar. + * win.innerWidth Undefined. + * body.clientWidth Width of body element. + * + * docEl.clientHeight Height of viewport excluding scrollbar. + * win.innerHeight Undefined. + * body.clientHeight Height of document element. + * + * IE5 + IE6/7 Backwards compatible mode: + * docEl.clientWidth 0. + * win.innerWidth Undefined. + * body.clientWidth Width of viewport excluding scrollbar. + * + * docEl.clientHeight 0. + * win.innerHeight Undefined. + * body.clientHeight Height of viewport excluding scrollbar. + * + * Opera 9 Standards and backwards compatible mode: + * docEl.clientWidth Width of viewport excluding scrollbar. + * win.innerWidth Width of viewport including scrollbar. + * body.clientWidth Width of viewport excluding scrollbar. + * + * docEl.clientHeight Height of document. + * win.innerHeight Height of viewport including scrollbar. + * body.clientHeight Height of viewport excluding scrollbar. + * + * WebKit: + * Safari 2 + * docEl.clientHeight Same as scrollHeight. + * docEl.clientWidth Same as innerWidth. + * win.innerWidth Width of viewport excluding scrollbar. + * win.innerHeight Height of the viewport including scrollbar. + * frame.innerHeight Height of the viewport exluding scrollbar. + * + * Safari 3 (tested in 522) + * + * docEl.clientWidth Width of viewport excluding scrollbar. + * docEl.clientHeight Height of viewport excluding scrollbar in strict mode. + * body.clientHeight Height of viewport excluding scrollbar in quirks mode. + * + * @param {Window=} opt_window Optional window element to test. + * @return {!goog.math.Size} Object with values 'width' and 'height'. + */ +goog.dom.getViewportSize = function(opt_window) { + // TODO(user): This should not take an argument + return goog.dom.getViewportSize_(opt_window || window); +}; + + +/** + * Helper for {@code getViewportSize}. + * @param {Window} win The window to get the view port size for. + * @return {!goog.math.Size} Object with values 'width' and 'height'. + * @private + */ +goog.dom.getViewportSize_ = function(win) { + var doc = win.document; + + if (goog.userAgent.WEBKIT && !goog.userAgent.isVersion('500') && + !goog.userAgent.MOBILE) { + // TODO(user): Sometimes we get something that isn't a valid window + // object. In this case we just revert to the current window. We need to + // figure out when this happens and find a real fix for it. + // See the comments on goog.dom.getWindow. + if (typeof win.innerHeight == _UNDEFINED+'') { + win = window; + } + var innerHeight = win.innerHeight; + var scrollHeight = win.document.documentElement.scrollHeight; + + if (win == win.top) { + if (scrollHeight < innerHeight) { + innerHeight -= 15; // Scrollbars are 15px wide on Mac + } + } + return new goog.math.Size(win.innerWidth, innerHeight); + } + + var el = goog.dom.isCss1CompatMode_(doc) ? doc.documentElement : doc.body; + + return new goog.math.Size(el.clientWidth, el.clientHeight); +}; + + +/** + * Gets the window object associated with the given document. + * + * @param {Document=} opt_doc Document object to get window for. + * @return {Window} The window associated with the given document. + */ +goog.dom.getWindow = function(opt_doc) { + // TODO(user): This should not take an argument. + return opt_doc ? goog.dom.getWindow_(opt_doc) : window; +}; + + +/** + * Helper for {@code getWindow}. + * + * @param {!Document} doc Document object to get window for. + * @return {!Window} The window associated with the given document. + * @private + */ +goog.dom.getWindow_ = function(doc) { + return doc.parentWindow || doc.defaultView; +}; + + +/** + * Returns a dom node with a set of attributes. This function accepts varargs + * for subsequent nodes to be added. Subsequent nodes will be added to the + * first node as childNodes. + * + * So: + * createDom('div', null, createDom('p'), createDom('p')); + * would return a div with two child paragraphs + * + * @param {string} tagName Tag to create. + * @param {Object|Array.|string=} opt_attributes If object, then a map + * of name-value pairs for attributes. If a string, then this is the + * className of the new element. If an array, the elements will be joined + * together as the className of the new element. + * @param {...Object|string|Array|NodeList} var_args Further DOM nodes or + * strings for text nodes. If one of the var_args is an array or NodeList,i + * its elements will be added as childNodes instead. + * @return {!Element} Reference to a DOM node. + */ +goog.dom.createDom = function(tagName, opt_attributes, var_args) { + return goog.dom.createDom_(document, arguments); +}; + + +/** + * Helper for {@code createDom}. + * @param {!Document} doc The document to create the DOM in. + * @param {!Arguments} args Argument object passed from the callers. See + * {@code goog.dom.createDom} for details. + * @return {!Element} Reference to a DOM node. + * @private + */ +goog.dom.createDom_ = function(doc, args) { + var tagName = args[0]; + var attributes = args[1]; + + // Internet Explorer is dumb: http://msdn.microsoft.com/workshop/author/ + // dhtml/reference/properties/name_2.asp + // Also does not allow setting of 'type' attribute on 'input' or 'button'. + if (!goog.dom.BrowserFeature.CAN_ADD_NAME_OR_TYPE_ATTRIBUTES && attributes && + (attributes.name || attributes.type)) { + var tagNameArr = ['<', tagName]; + if (attributes.name) { + tagNameArr.push(' name="', goog.string.htmlEscape(attributes.name), + '"'); + } + if (attributes.type) { + tagNameArr.push(' type="', goog.string.htmlEscape(attributes.type), + '"'); + + // Clone attributes map to remove 'type' without mutating the input. + var clone = {}; + goog.object.extend(clone, attributes); + attributes = clone; + delete attributes.type; + } + tagNameArr.push('>'); + tagName = tagNameArr.join(''); + } + + var element = doc.createElement(tagName); + + if (attributes) { + if (goog.isString(attributes)) { + element.className = attributes; + } else if (goog.isArray(attributes)) { + goog.dom.classes.add.apply(_NULL, [element].concat(attributes)); + } else { + goog.dom.setProperties(element, attributes); + } + } + + if (args.length > 2) { + goog.dom.append_(doc, element, args, 2); + } + + return element; +}; + + +/** + * Appends a node with text or other nodes. + * @param {!Document} doc The document to create new nodes in. + * @param {!Node} parent The node to append nodes to. + * @param {!Arguments} args The values to add. See {@code goog.dom.append}. + * @param {number} startIndex The index of the array to start from. + * @private + */ +goog.dom.append_ = function(doc, parent, args, startIndex) { + function childHandler(child) { + // TODO(user): More coercion, ala MochiKit? + if (child) { + parent.appendChild(goog.isString(child) ? + doc.createTextNode(child) : child); + } + } + + for (var i = startIndex; i < args.length; i++) { + var arg = args[i]; + // TODO(user): Fix isArrayLike to return _FALSE for a text node. + if (goog.isArrayLike(arg) && !goog.dom.isNodeLike(arg)) { + // If the argument is a node list, not a real array, use a clone, + // because forEach can't be used to mutate a NodeList. + goog.array.forEach(goog.dom.isNodeList(arg) ? + goog.array.clone(arg) : arg, + childHandler); + } else { + childHandler(arg); + } + } +}; + + +/** + * Alias for {@code createDom}. + * @param {string} tagName Tag to create. + * @param {string|Object=} opt_attributes If object, then a map of name-value + * pairs for attributes. If a string, then this is the className of the new + * element. + * @param {...Object|string|Array|NodeList} var_args Further DOM nodes or + * strings for text nodes. If one of the var_args is an array, its + * children will be added as childNodes instead. + * @return {!Element} Reference to a DOM node. + * @deprecated Use {@link goog.dom.createDom} instead. + */ +goog.dom.$dom = goog.dom.createDom; + + +/** + * Creates a new element. + * @param {string} name Tag name. + * @return {!Element} The new element. + */ +goog.dom.createElement = function(name) { + return _DOC.createElement(name); +}; + + +/** + * Creates a new text node. + * @param {string} content Content. + * @return {!Text} The new text node. + */ +goog.dom.createTextNode = function(content) { + return _DOC.createTextNode(content); +}; + + +/** + * Returns true if the browser is in "CSS1-compatible" (standards-compliant) + * mode, _FALSE otherwise. + * @param {Document} doc The document to check. + * @return {boolean} True if in CSS1-compatible mode. + * @private + */ +goog.dom.isCss1CompatMode_ = function(doc) { + if (goog.dom.COMPAT_MODE_KNOWN_) { + return goog.dom.ASSUME_STANDARDS_MODE; + } + + return doc.compatMode == 'CSS1Compat'; +}; + + +/** + * Determines if the given node can contain children, intended to be used for + * HTML generation. + * + * IE natively supports node.canHaveChildren but has inconsistent behavior. + * Prior to IE8 the base tag allows children and in IE9 all nodes return true + * for canHaveChildren. + * + * In practice all non-IE browsers allow you to add children to any node, but + * the behavior is inconsistent: + * + *
      + *   var a = document.createElement('br');
      + *   a.appendChild(document.createTextNode('foo'));
      + *   a.appendChild(document.createTextNode('bar'));
      + *   console.log(a.childNodes.length);  // 2
      + *   console.log(a.innerHTML);  // Chrome: "", IE9: "foobar", FF3.5: "foobar"
      + * 
      + * + * TODO(user): Rename shouldAllowChildren() ? + * + * @param {Node} node The node to check. + * @return {boolean} Whether the node can contain children. + */ +goog.dom.canHaveChildren_OLD = function(node) { + if (node.nodeType != goog.dom.NodeType.ELEMENT) { + return _FALSE; + } + switch (node.tagName) { + case goog.dom.TagName.APPLET: + case goog.dom.TagName.AREA: + case goog.dom.TagName.BASE: + case goog.dom.TagName.BR: + case goog.dom.TagName.COL: + case goog.dom.TagName.FRAME: + case goog.dom.TagName.HR: + case goog.dom.TagName.IMG: + case goog.dom.TagName.INPUT: + case goog.dom.TagName.IFRAME: + case goog.dom.TagName.ISINDEX: + case goog.dom.TagName.LINK: + case goog.dom.TagName.NOFRAMES: + case goog.dom.TagName.NOSCRIPT: + case goog.dom.TagName.META: + case goog.dom.TagName.OBJECT: + case goog.dom.TagName.PARAM: + case goog.dom.TagName.SCRIPT: + case goog.dom.TagName.STYLE: + return _FALSE; + } + return _TRUE; +}; + +goog.dom.TAGS_CANT_HAVE_CHILDREN = { + APPLET: _TRUE, + AREA: _TRUE, + BASE: _TRUE, + BR: _TRUE, + COL: _TRUE, + FRAME: _TRUE, + HR: _TRUE, + IMG: _TRUE, + INPUT: _TRUE, + IFRAME: _TRUE, + ISINDEX: _TRUE, + LINK: _TRUE, + NOFRAMES: _TRUE, + NOSCRIPT: _TRUE, + META: _TRUE, + OBJECT: _TRUE, + PARAM: _TRUE, + SCRIPT: _TRUE, + STYLE: _TRUE +}; +goog.dom.canHaveChildren = function(node) { + return node.nodeType == goog.dom.NodeType.ELEMENT && + !goog.dom.TAGS_CANT_HAVE_CHILDREN[node.tagName]; +}; + +/** + * Appends a child to a node. + * @param {Node} parent Parent. + * @param {Node} child Child. + */ +goog.dom.appendChild = function(parent, child) { + parent.appendChild(child); +}; + + +/** + * Appends a node with text or other nodes. + * @param {!Node} parent The node to append nodes to. + * @param {...goog.dom.Appendable} var_args The things to append to the node. + * If this is a Node it is appended as is. + * If this is a string then a text node is appended. + * If this is an array like object then fields 0 to length - 1 are appended. + */ +goog.dom.append = function(parent, var_args) { + goog.dom.append_(goog.dom.getOwnerDocument(parent), parent, arguments, 1); +}; + + +/** + * Removes all the child nodes on a DOM node. + * @param {Node} node Node to remove children from. + */ +goog.dom.removeChildren = function(node) { + // Note: Iterations over live collections can be slow, this is the fastest + // we could find. The double parenthesis are used to prevent JsCompiler and + // strict warnings. + var child; + while ((child = node.firstChild)) { + node.removeChild(child); + } +}; + + +/** + * Inserts a new node before an existing reference node (i.e. as the previous + * sibling). If the reference node has no parent, then does nothing. + * @param {Node} newNode Node to insert. + * @param {Node} refNode Reference node to insert before. + */ +goog.dom.insertSiblingBefore = function(newNode, refNode) { + if (refNode.parentNode) { + refNode.parentNode.insertBefore(newNode, refNode); + } +}; + + +/** + * Inserts a new node after an existing reference node (i.e. as the next + * sibling). If the reference node has no parent, then does nothing. + * @param {Node} newNode Node to insert. + * @param {Node} refNode Reference node to insert after. + */ +goog.dom.insertSiblingAfter = function(newNode, refNode) { + if (refNode.parentNode) { + refNode.parentNode.insertBefore(newNode, refNode.nextSibling); + } +}; + + +/** + * Removes a node from its parent. + * @param {Node} node The node to remove. + * @return {Node} The node removed if removed; else, null. + */ +goog.dom.removeNode = function(node) { + return node && node.parentNode ? node.parentNode.removeChild(node) : _NULL; +}; + + +/** + * Replaces a node in the DOM tree. Will do nothing if {@code oldNode} has no + * parent. + * @param {Node} newNode Node to insert. + * @param {Node} oldNode Node to replace. + */ +goog.dom.replaceNode = function(newNode, oldNode) { + var parent = oldNode.parentNode; + if (parent) { + parent.replaceChild(newNode, oldNode); + } +}; + + +/** + * Flattens an element. That is, removes it and replace it with its children. + * Does nothing if the element is not in the document. + * @param {Element} element The element to flatten. + * @return {Element|undefined} The original element, detached from the document + * tree, sans children; or undefined, if the element was not in the + * document to begin with. + */ +goog.dom.flattenElement = function(element) { + var child, parent = element.parentNode; + if (parent && parent.nodeType != goog.dom.NodeType.DOCUMENT_FRAGMENT) { + // Use IE DOM method (supported by Opera too) if available + if (element.removeNode) { + return /** @type {Element} */ (element.removeNode(_FALSE)); + } else { + // Move all children of the original node up one level. + while ((child = element.firstChild)) { + parent.insertBefore(child, element); + } + + // Detach the original element. + return /** @type {Element} */ (goog.dom.removeNode(element)); + } + } +}; + + +/** + * Whether the object looks like a DOM node. + * @param {*} obj The object being tested for node likeness. + * @return {boolean} Whether the object looks like a DOM node. + */ +goog.dom.isNodeLike = function(obj) { + return goog.isObject(obj) && obj.nodeType > 0; +}; + + +/** + * Whether a node contains another node. + * @param {Node} parent The node that should contain the other node. + * @param {Node} descendant The node to test presence of. + * @return {boolean} Whether the parent node contains the descendent node. + */ +goog.dom.contains = function(parent, descendant) { + // We use browser specific methods for this if available since it is faster + // that way. + + // IE DOM + if (parent.contains && descendant.nodeType == goog.dom.NodeType.ELEMENT) { + return parent == descendant || parent.contains(descendant); + } + + // W3C DOM Level 3 + if (typeof parent.compareDocumentPosition != _UNDEFINED+'') { + return parent == descendant || + Boolean(parent.compareDocumentPosition(descendant) & 16); + } + + // W3C DOM Level 1 + while (descendant && parent != descendant) { + descendant = descendant.parentNode; + } + return descendant == parent; +}; + + +/** + * Compares the document order of two nodes, returning 0 if they are the same + * node, a negative number if node1 is before node2, and a positive number if + * node2 is before node1. Note that we compare the order the tags appear in the + * document so in the tree text the B node is considered to be + * before the I node. + * + * @param {Node} node1 The first node to compare. + * @param {Node} node2 The second node to compare. + * @return {number} 0 if the nodes are the same node, a negative number if node1 + * is before node2, and a positive number if node2 is before node1. + */ +goog.dom.compareNodeOrder = function(node1, node2) { + // Fall out quickly for equality. + if (node1 == node2) { + return 0; + } + + // Use compareDocumentPosition where available + if (node1.compareDocumentPosition) { + // 4 is the bitmask for FOLLOWS. + return node1.compareDocumentPosition(node2) & 2 ? 1 : -1; + } + + // Process in IE using sourceIndex - we check to see if the first node has + // a source index or if its parent has one. + if ('sourceIndex' in node1 || + (node1.parentNode && 'sourceIndex' in node1.parentNode)) { + var isElement1 = node1.nodeType == goog.dom.NodeType.ELEMENT; + var isElement2 = node2.nodeType == goog.dom.NodeType.ELEMENT; + + if (isElement1 && isElement2) { + return node1.sourceIndex - node2.sourceIndex; + } else { + var parent1 = node1.parentNode; + var parent2 = node2.parentNode; + + if (parent1 == parent2) { + return goog.dom.compareSiblingOrder_(node1, node2); + } + + if (!isElement1 && goog.dom.contains(parent1, node2)) { + return -1 * goog.dom.compareParentsDescendantNodeIe_(node1, node2); + } + + + if (!isElement2 && goog.dom.contains(parent2, node1)) { + return goog.dom.compareParentsDescendantNodeIe_(node2, node1); + } + + return (isElement1 ? node1.sourceIndex : parent1.sourceIndex) - + (isElement2 ? node2.sourceIndex : parent2.sourceIndex); + } + } + + // For Safari, we compare ranges. + var doc = goog.dom.getOwnerDocument(node1); + + var range1, range2; + range1 = doc.createRange(); + range1.selectNode(node1); + range1.collapse(_TRUE); + + range2 = doc.createRange(); + range2.selectNode(node2); + range2.collapse(_TRUE); + + return range1.compareBoundaryPoints(goog.global['Range'].START_TO_END, + range2); +}; + + +/** + * Utility function to compare the position of two nodes, when + * {@code textNode}'s parent is an ancestor of {@code node}. If this entry + * condition is not met, this function will attempt to reference a null object. + * @param {Node} textNode The textNode to compare. + * @param {Node} node The node to compare. + * @return {number} -1 if node is before textNode, +1 otherwise. + * @private + */ +goog.dom.compareParentsDescendantNodeIe_ = function(textNode, node) { + var parent = textNode.parentNode; + if (parent == node) { + // If textNode is a child of node, then node comes first. + return -1; + } + var sibling = node; + while (sibling.parentNode != parent) { + sibling = sibling.parentNode; + } + return goog.dom.compareSiblingOrder_(sibling, textNode); +}; + + +/** + * Utility function to compare the position of two nodes known to be non-equal + * siblings. + * @param {Node} node1 The first node to compare. + * @param {Node} node2 The second node to compare. + * @return {number} -1 if node1 is before node2, +1 otherwise. + * @private + */ +goog.dom.compareSiblingOrder_ = function(node1, node2) { + var s = node2; + while ((s = s.previousSibling)) { + if (s == node1) { + // We just found node1 before node2. + return -1; + } + } + + // Since we didn't find it, node1 must be after node2. + return 1; +}; + + +/** + * Find the deepest common ancestor of the given nodes. + * @param {...Node} var_args The nodes to find a common ancestor of. + * @return {Node} The common ancestor of the nodes, or null if there is none. + * null will only be returned if two or more of the nodes are from different + * documents. + */ +goog.dom.findCommonAncestor = function(var_args) { + var i, count = arguments.length; + if (!count) { + return _NULL; + } else if (count == 1) { + return arguments[0]; + } + + var paths = []; + var minLength = Infinity; + for (i = 0; i < count; i++) { + // Compute the list of ancestors. + var ancestors = []; + var node = arguments[i]; + while (node) { + ancestors.unshift(node); + node = node.parentNode; + } + + // Save the list for comparison. + paths.push(ancestors); + minLength = Math.min(minLength, ancestors.length); + } + var output = _NULL; + for (i = 0; i < minLength; i++) { + var first = paths[0][i]; + for (var j = 1; j < count; j++) { + if (first != paths[j][i]) { + return output; + } + } + output = first; + } + return output; +}; + + +/** + * Returns the owner document for a node. + * @param {Node|Window} node The node to get the document for. + * @return {!Document} The document owning the node. + */ +goog.dom.getOwnerDocument = function(node) { + // TODO(user): Remove IE5 code. + // IE5 uses document instead of ownerDocument + return /** @type {!Document} */ ( + node.nodeType == goog.dom.NodeType.DOCUMENT ? node : + node.ownerDocument || node.document); +}; + +/** + * Gets the outerHTML of a node, which islike innerHTML, except that it + * actually contains the HTML of the node itself. + * @param {Element} element The element to get the HTML of. + * @return {string} The outerHTML of the given element. + */ +goog.dom.getOuterHtml = function(element) { + // IE, Opera and WebKit all have outerHTML. + if ('outerHTML' in element) { + return element.outerHTML; + } else { + var doc = goog.dom.getOwnerDocument(element); + var div = doc.createElement('div'); + div.appendChild(element.cloneNode(_TRUE)); + return div.innerHTML; + } +}; + + +/** + * Map of tags whose content to ignore when calculating text length. + * @type {Object} + * @private + */ +goog.dom.TAGS_TO_IGNORE_ = { + 'SCRIPT': 1, + 'STYLE': 1, + 'HEAD': 1, + 'IFRAME': 1, + 'OBJECT': 1 +}; + + +/** + * Map of tags which have predefined values with regard to whitespace. + * @type {Object} + * @private + */ +goog.dom.PREDEFINED_TAG_VALUES_ = {'IMG': ' ', 'BR': '\n'}; + + +/** + * Returns the text content of the current node, without markup and invisible + * symbols. New lines are stripped and whitespace is collapsed, + * such that each character would be visible. + * + * In browsers that support it, innerText is used. Other browsers attempt to + * simulate it via node traversal. Line breaks are canonicalized in IE. + * + * @param {Node} node The node from which we are getting content. + * @return {string} The text content. + */ +goog.dom.getTextContent = function(node) { + var textContent; + // Note(user): IE9, Opera, and Safara 3 support innerText but they include + // text nodes in script tags. So we revert to use a user agent test here. + if (goog.dom.BrowserFeature.CAN_USE_INNER_TEXT && ('innerText' in node)) { + textContent = goog.string.canonicalizeNewlines(node.innerText); + // Unfortunately .innerText() returns text with ­ symbols + // We need to filter it out and then remove duplicate whitespaces + } else { + var buf = []; + goog.dom.getTextContent_(node, buf, _TRUE); + textContent = buf.join(''); + } + + // Strip ­ entities. goog.format.insertWordBreaks inserts them in Opera. + textContent = textContent.replace(/ \xAD /g, ' ').replace(/\xAD/g, ''); + // Strip ​ entities. goog.format.insertWordBreaks inserts them in IE8. + textContent = textContent.replace(/\u200B/g, ''); + + // Skip this replacement on IE, which automatically turns   into ' ' + // and / +/ into ' ' when reading innerText. + if (!goog.userAgent.IE) { + textContent = textContent.replace(/ +/g, ' '); + } + if (textContent != ' ') { + textContent = textContent.replace(/^\s*/, ''); + } + + return textContent; +}; + + +/** + * Returns the text content of the current node, without markup. + * + * Unlike {@code getTextContent} this method does not collapse whitespaces + * or normalize lines breaks. + * + * @param {Node} node The node from which we are getting content. + * @return {string} The raw text content. + */ +goog.dom.getRawTextContent = function(node) { + var buf = []; + goog.dom.getTextContent_(node, buf, _FALSE); + + return buf.join(''); +}; + + +/** + * Recursive support function for text content retrieval. + * + * @param {Node} node The node from which we are getting content. + * @param {Array} buf string buffer. + * @param {boolean} normalizeWhitespace Whether to normalize whitespace. + * @private + */ +goog.dom.getTextContent_ = function(node, buf, normalizeWhitespace) { + if (node.nodeName in goog.dom.TAGS_TO_IGNORE_) { + // ignore certain tags + } else if (node.nodeType == goog.dom.NodeType.TEXT) { + if (normalizeWhitespace) { + buf.push(String(node.nodeValue).replace(/(\r\n|\r|\n)/g, '')); + } else { + buf.push(node.nodeValue); + } + } else if (node.nodeName in goog.dom.PREDEFINED_TAG_VALUES_) { + buf.push(goog.dom.PREDEFINED_TAG_VALUES_[node.nodeName]); + } else { + var child = node.firstChild; + while (child) { + goog.dom.getTextContent_(child, buf, normalizeWhitespace); + child = child.nextSibling; + } + } +}; + + +/** + * Returns true if the object is a {@code NodeList}. To qualify as a NodeList, + * the object must have a numeric length property and an item function (which + * has type 'string' on IE for some reason). + * @param {Object} val Object to test. + * @return {boolean} Whether the object is a NodeList. + */ +goog.dom.isNodeList = function(val) { + // TODO(user): Now the isNodeList is part of goog.dom we can use + // goog.userAgent to make this simpler. + // A NodeList must have a length property of type 'number' on all platforms. + if (val && typeof val.length == 'number') { + // A NodeList is an object everywhere except Safari, where it's a function. + if (goog.isObject(val)) { + // A NodeList must have an item function (on non-IE platforms) or an item + // property of type 'string' (on IE). + return typeof val.item == 'function' || typeof val.item == 'string'; + } else if (goog.isFunction(val)) { + // On Safari, a NodeList is a function with an item property that is also + // a function. + return typeof val.item == 'function'; + } + } + + // Not a NodeList. + return _FALSE; +}; + + + +/** + * Create an instance of a DOM helper with a new document object. + * @param {Document=} opt_document Document object to associate with this + * DOM helper. + * @constructor + */ +goog.dom.DomHelper = function(opt_document) { + /** + * Reference to the document object to use + * @type {!Document} + * @private + */ + this.document_ = opt_document || goog.global.document || document; +}; + + +/** + * Gets the dom helper object for the document where the element resides. + * @param {Node=} opt_node If present, gets the DomHelper for this node. + * @return {!goog.dom.DomHelper} The DomHelper. + */ +goog.dom.DomHelper.prototype.getDomHelper = goog.dom.getDomHelper; + + +/** + * Sets the document object. + * @param {!Document} document Document object. + */ +goog.dom.DomHelper.prototype.setDocument = function(document) { + this.document_ = document; +}; + + +/** + * Gets the document object being used by the dom library. + * @return {!Document} Document object. + */ +goog.dom.DomHelper.prototype.getDocument = function() { + return this.document_; +}; + + +/** + * Alias for {@code getElementById}. If a DOM node is passed in then we just + * return that. + * @param {string|Element} element Element ID or a DOM node. + * @return {Element} The element with the given ID, or the node passed in. + */ +goog.dom.DomHelper.prototype.getElement = function(element) { + if (goog.isString(element)) { + return this.document_.getElementById(element); + } else { + return element; + } +}; + + +/** + * Alias for {@code getElement}. + * @param {string|Element} element Element ID or a DOM node. + * @return {Element} The element with the given ID, or the node passed in. + * @deprecated Use {@link goog.dom.DomHelper.prototype.getElement} instead. + */ +goog.dom.DomHelper.prototype.$ = goog.dom.DomHelper.prototype.getElement; + + +/** + * Looks up elements by both tag and class name, using browser native functions + * ({@code querySelectorAll}, {@code getElementsByTagName} or + * {@code getElementsByClassName}) where possible. The returned array is a live + * NodeList or a static list depending on the code path taken. + * + * @see goog.dom.query + * + * @param {?string=} opt_tag Element tag name or * for all tags. + * @param {?string=} opt_class Optional class name. + * @param {Document|Element=} opt_el Optional element to look in. + * @return { {length: number} } Array-like list of elements (only a length + * property and numerical indices are guaranteed to exist). + */ +goog.dom.DomHelper.prototype.getElementsByTagNameAndClass = function(opt_tag, + opt_class, + opt_el) { + return goog.dom.getElementsByTagNameAndClass_(this.document_, opt_tag, + opt_class, opt_el); +}; + + +/** + * Returns an array of all the elements with the provided className. + * @see {goog.dom.query} + * @param {!string} className the name of the class to look for. + * @param {Element|Document=} opt_el Optional element to look in. + * @return { {length: number} } The items found with the class name provided. + */ +goog.dom.DomHelper.prototype.getElementsByClass = function(className, opt_el) { + var doc = opt_el || this.document_; + return goog.dom.getElementsByClass(className, doc); +}; + + +/** + * Returns the first element we find matching the provided class name. + * @see {goog.dom.query} + * @param {!string} className the name of the class to look for. + * @param {Element|Document=} opt_el Optional element to look in. + * @return {Element} The first item found with the class name provided. + */ +goog.dom.DomHelper.prototype.getElementByClass = function(className, opt_el) { + var doc = opt_el || this.document_; + return goog.dom.getElementByClass(className, doc); +}; + + +/** + * Alias for {@code getElementsByTagNameAndClass}. + * @deprecated Use DomHelper getElementsByTagNameAndClass. + * @see goog.dom.query + * + * @param {?string=} opt_tag Element tag name. + * @param {?string=} opt_class Optional class name. + * @param {Element=} opt_el Optional element to look in. + * @return { {length: number} } Array-like list of elements (only a length + * property and numerical indices are guaranteed to exist). + */ +goog.dom.DomHelper.prototype.$$ = + goog.dom.DomHelper.prototype.getElementsByTagNameAndClass; + + +/** + * Sets a number of properties on a node. + * @param {Element} element DOM node to set properties on. + * @param {Object} properties Hash of property:value pairs. + */ +goog.dom.DomHelper.prototype.setProperties = goog.dom.setProperties; + + +/** + * Gets the dimensions of the viewport. + * @param {Window=} opt_window Optional window element to test. Defaults to + * the window of the Dom Helper. + * @return {!goog.math.Size} Object with values 'width' and 'height'. + */ +goog.dom.DomHelper.prototype.getViewportSize = function(opt_window) { + // TODO(user): This should not take an argument. That breaks the rule of a + // a DomHelper representing a single frame/window/document. + return goog.dom.getViewportSize(opt_window || this.getWindow()); +}; + + +/** + * Typedef for use with goog.dom.createDom and goog.dom.append. + * @typedef {Object|string|Array|NodeList} + */ +goog.dom.Appendable; + + +/** + * Returns a dom node with a set of attributes. This function accepts varargs + * for subsequent nodes to be added. Subsequent nodes will be added to the + * first node as childNodes. + * + * So: + * createDom('div', null, createDom('p'), createDom('p')); + * would return a div with two child paragraphs + * + * An easy way to move all child nodes of an existing element to a new parent + * element is: + * createDom('div', null, oldElement.childNodes); + * which will remove all child nodes from the old element and add them as + * child nodes of the new DIV. + * + * @param {string} tagName Tag to create. + * @param {Object|string=} opt_attributes If object, then a map of name-value + * pairs for attributes. If a string, then this is the className of the new + * element. + * @param {...goog.dom.Appendable} var_args Further DOM nodes or + * strings for text nodes. If one of the var_args is an array or + * NodeList, its elements will be added as childNodes instead. + * @return {!Element} Reference to a DOM node. + */ +goog.dom.DomHelper.prototype.createDom = function(tagName, + opt_attributes, + var_args) { + return goog.dom.createDom_(this.document_, arguments); +}; + + +/** + * Alias for {@code createDom}. + * @param {string} tagName Tag to create. + * @param {Object|string=} opt_attributes If object, then a map of name-value + * pairs for attributes. If a string, then this is the className of the new + * element. + * @param {...goog.dom.Appendable} var_args Further DOM nodes or strings for + * text nodes. If one of the var_args is an array, its children will be + * added as childNodes instead. + * @return {!Element} Reference to a DOM node. + * @deprecated Use {@link goog.dom.DomHelper.prototype.createDom} instead. + */ +goog.dom.DomHelper.prototype.$dom = goog.dom.DomHelper.prototype.createDom; + + +/** + * Creates a new element. + * @param {string} name Tag name. + * @return {!Element} The new element. + */ +goog.dom.DomHelper.prototype.createElement = function(name) { + return this.document_.createElement(name); +}; + + +/** + * Creates a new text node. + * @param {string} content Content. + * @return {!Text} The new text node. + */ +goog.dom.DomHelper.prototype.createTextNode = function(content) { + return this.document_.createTextNode(content); +}; + + +/** + * Gets the window object associated with the document. + * @return {!Window} The window associated with the given document. + */ +goog.dom.DomHelper.prototype.getWindow = function() { + return goog.dom.getWindow_(this.document_); +}; + + +/** + * Appends a child to a node. + * @param {Node} parent Parent. + * @param {Node} child Child. + */ +goog.dom.DomHelper.prototype.appendChild = goog.dom.appendChild; + + +/** + * Appends a node with text or other nodes. + * @param {!Node} parent The node to append nodes to. + * @param {...goog.dom.Appendable} var_args The things to append to the node. + * If this is a Node it is appended as is. + * If this is a string then a text node is appended. + * If this is an array like object then fields 0 to length - 1 are appended. + */ +goog.dom.DomHelper.prototype.append = goog.dom.append; + + +/** + * Removes all the child nodes on a DOM node. + * @param {Node} node Node to remove children from. + */ +goog.dom.DomHelper.prototype.removeChildren = goog.dom.removeChildren; + + +/** + * Inserts a new node before an existing reference node (i.e., as the previous + * sibling). If the reference node has no parent, then does nothing. + * @param {Node} newNode Node to insert. + * @param {Node} refNode Reference node to insert before. + */ +goog.dom.DomHelper.prototype.insertSiblingBefore = goog.dom.insertSiblingBefore; + + +/** + * Inserts a new node after an existing reference node (i.e., as the next + * sibling). If the reference node has no parent, then does nothing. + * @param {Node} newNode Node to insert. + * @param {Node} refNode Reference node to insert after. + */ +goog.dom.DomHelper.prototype.insertSiblingAfter = goog.dom.insertSiblingAfter; + + +/** + * Removes a node from its parent. + * @param {Node} node The node to remove. + * @return {Node} The node removed if removed; else, null. + */ +goog.dom.DomHelper.prototype.removeNode = goog.dom.removeNode; + + +/** + * Replaces a node in the DOM tree. Will do nothing if {@code oldNode} has no + * parent. + * @param {Node} newNode Node to insert. + * @param {Node} oldNode Node to replace. + */ +goog.dom.DomHelper.prototype.replaceNode = goog.dom.replaceNode; + + +/** + * Flattens an element. That is, removes it and replace it with its children. + * @param {Element} element The element to flatten. + * @return {Element|undefined} The original element, detached from the document + * tree, sans children, or undefined if the element was already not in the + * document. + */ +goog.dom.DomHelper.prototype.flattenElement = goog.dom.flattenElement; + + +/** + * Whether the object looks like a DOM node. + * @param {*} obj The object being tested for node likeness. + * @return {boolean} Whether the object looks like a DOM node. + */ +goog.dom.DomHelper.prototype.isNodeLike = goog.dom.isNodeLike; + + +/** + * Whether a node contains another node. + * @param {Node} parent The node that should contain the other node. + * @param {Node} descendant The node to test presence of. + * @return {boolean} Whether the parent node contains the descendent node. + */ +goog.dom.DomHelper.prototype.contains = goog.dom.contains; + + +/** + * Returns the owner document for a node. + * @param {Node} node The node to get the document for. + * @return {!Document} The document owning the node. + */ +goog.dom.DomHelper.prototype.getOwnerDocument = goog.dom.getOwnerDocument; + + +/** + * Returns the text contents of the current node, without markup. New lines are + * stripped and whitespace is collapsed, such that each character would be + * visible. + * + * In browsers that support it, innerText is used. Other browsers attempt to + * simulate it via node traversal. Line breaks are canonicalized in IE. + * + * @param {Node} node The node from which we are getting content. + * @return {string} The text content. + */ +goog.dom.DomHelper.prototype.getTextContent = goog.dom.getTextContent; + +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Python style iteration utilities. + */ + + +goog.provide('goog.iter'); +goog.provide('goog.iter.Iterator'); +goog.provide('goog.iter.StopIteration'); + +//goog.require('goog.array'); + + +// TODO(user): Add more functions from Python's itertools. +// http://docs.python.org/library/itertools.html + + +/** + * @typedef {goog.iter.Iterator|{length:number}|{__iterator__}} + */ +goog.iter.Iterable; + + +// For script engines that already support iterators. +if ('StopIteration' in goog.global) { + /** + * Singleton Error object that is used to terminate iterations. + * @type {Error} + */ + goog.iter.StopIteration = goog.global['StopIteration']; +} else { + /** + * Singleton Error object that is used to terminate iterations. + * @type {Error} + * @suppress {duplicate} + */ + goog.iter.StopIteration = Error('StopIteration'); +} + + + +/** + * Class/interface for iterators. An iterator needs to implement a {@code next} + * method and it needs to throw a {@code goog.iter.StopIteration} when the + * iteration passes beyond the end. Iterators have no {@code hasNext} method. + * It is recommended to always use the helper functions to iterate over the + * iterator or in case you are only targeting JavaScript 1.7 for in loops. + * @constructor + */ +goog.iter.Iterator = function() {}; + + +/** + * Returns the next value of the iteration. This will throw the object + * {@see goog.iter#StopIteration} when the iteration passes the end. + * @return {*} Any object or value. + */ +goog.iter.Iterator.prototype.next = function() { + throw goog.iter.StopIteration; +}; + + +/** + * Returns the {@code Iterator} object itself. This is used to implement + * the iterator protocol in JavaScript 1.7 + * @param {boolean=} opt_keys Whether to return the keys or values. Default is + * to only return the values. This is being used by the for-in loop (true) + * and the for-each-in loop (_FALSE). Even though the param gives a hint + * about what the iterator will return there is no guarantee that it will + * return the keys when true is passed. + * @return {!goog.iter.Iterator} The object itself. + */ +goog.iter.Iterator.prototype.__iterator__ = function(opt_keys) { + return this; +}; + + +/** + * Returns an iterator that knows how to iterate over the values in the object. + * @param {goog.iter.Iterable} iterable If the object is an iterator it + * will be returned as is. If the object has a {@code __iterator__} method + * that will be called to get the value iterator. If the object is an + * array-like object we create an iterator for that. + * @return {!goog.iter.Iterator} An iterator that knows how to iterate over the + * values in {@code iterable}. + */ +goog.iter.toIterator = function(iterable) { + if (iterable instanceof goog.iter.Iterator) { + return iterable; + } + if (typeof iterable.__iterator__ == 'function') { + return iterable.__iterator__(_FALSE); + } + if (goog.isArrayLike(iterable)) { + var i = 0; + var newIter = new goog.iter.Iterator; + newIter.next = function() { + while (_TRUE) { + if (i >= iterable.length) { + throw goog.iter.StopIteration; + } + // Don't include deleted elements. + if (!(i in iterable)) { + i++; + continue; + } + return iterable[i++]; + } + }; + return newIter; + } + + + // TODO(user): Should we fall back on goog.structs.getValues()? + throw Error('Not implemented'); +}; + + +/** + * Calls a function for each element in the iterator with the element of the + * iterator passed as argument. + * + * @param {goog.iter.Iterable} iterable The iterator to iterate + * over. If the iterable is an object {@code toIterator} will be called on + * it. + * @param {Function} f The function to call for every element. This function + * takes 3 arguments (the element, undefined, and the iterator) and the + * return value is irrelevant. The reason for passing undefined as the + * second argument is so that the same function can be used in + * {@see goog.array#forEach} as well as others. + * @param {Object=} opt_obj The object to be used as the value of 'this' within + * {@code f}. + */ +goog.iter.forEach = function(iterable, f, opt_obj) { + if (goog.isArrayLike(iterable)) { + /** @preserveTry */ + try { + goog.array.forEach((/** @type {goog.array.ArrayLike} */ iterable), f, + opt_obj); + } catch (ex) { + if (ex !== goog.iter.StopIteration) { + throw ex; + } + } + } else { + iterable = goog.iter.toIterator(iterable); + /** @preserveTry */ + try { + while (_TRUE) { + f.call(opt_obj, iterable.next(), _UNDEFINED, iterable); + } + } catch (ex) { + if (ex !== goog.iter.StopIteration) { + throw ex; + } + } + } +}; + + +/** + * Calls a function for every element in the iterator, and if the function + * returns true adds the element to a new iterator. + * + * @param {goog.iter.Iterable} iterable The iterator to iterate over. + * @param {Function} f The function to call for every element. This function + * takes 3 arguments (the element, undefined, and the iterator) and should + * return a boolean. If the return value is true the element will be + * included in the returned iteror. If it is _FALSE the element is not + * included. + * @param {Object=} opt_obj The object to be used as the value of 'this' within + * {@code f}. + * @return {!goog.iter.Iterator} A new iterator in which only elements that + * passed the test are present. + */ +goog.iter.filter = function(iterable, f, opt_obj) { + iterable = goog.iter.toIterator(iterable); + var newIter = new goog.iter.Iterator; + newIter.next = function() { + while (_TRUE) { + var val = iterable.next(); + if (f.call(opt_obj, val, _UNDEFINED, iterable)) { + return val; + } + } + }; + return newIter; +}; + + +/** + * Joins the values in a iterator with a delimiter. + * @param {goog.iter.Iterable} iterable The iterator to get the values from. + * @param {string} deliminator The text to put between the values. + * @return {string} The joined value string. + */ +goog.iter.join = function(iterable, deliminator) { + return goog.iter.toArray(iterable).join(deliminator); +}; + + +/** + * For every element in the iterator call a function and return a new iterator + * with that value. + * + * @param {goog.iter.Iterable} iterable The iterator to iterate over. + * @param {Function} f The function to call for every element. This function + * takes 3 arguments (the element, undefined, and the iterator) and should + * return a new value. + * @param {Object=} opt_obj The object to be used as the value of 'this' within + * {@code f}. + * @return {!goog.iter.Iterator} A new iterator that returns the results of + * applying the function to each element in the original iterator. + */ +goog.iter.map = function(iterable, f, opt_obj) { + iterable = goog.iter.toIterator(iterable); + var newIter = new goog.iter.Iterator; + newIter.next = function() { + while (_TRUE) { + var val = iterable.next(); + return f.call(opt_obj, val, _UNDEFINED, iterable); + } + }; + return newIter; +}; + + +/** + * Goes through the values in the iterator. Calls f for each these and if any of + * them returns true, this returns true (without checking the rest). If all + * return _FALSE this will return _FALSE. + * + * @param {goog.iter.Iterable} iterable The iterator object. + * @param {Function} f The function to call for every value. This function + * takes 3 arguments (the value, undefined, and the iterator) and should + * return a boolean. + * @param {Object=} opt_obj The object to be used as the value of 'this' within + * {@code f}. + * @return {boolean} true if any value passes the test. + */ +goog.iter.some = function(iterable, f, opt_obj) { + iterable = goog.iter.toIterator(iterable); + /** @preserveTry */ + try { + while (_TRUE) { + if (f.call(opt_obj, iterable.next(), _UNDEFINED, iterable)) { + return _TRUE; + } + } + } catch (ex) { + if (ex !== goog.iter.StopIteration) { + throw ex; + } + } + return _FALSE; +}; + + +/** + * Goes through the values in the iterator. Calls f for each these and if any of + * them returns _FALSE this returns _FALSE (without checking the rest). If all + * return true this will return true. + * + * @param {goog.iter.Iterable} iterable The iterator object. + * @param {Function} f The function to call for every value. This function + * takes 3 arguments (the value, undefined, and the iterator) and should + * return a boolean. + * @param {Object=} opt_obj The object to be used as the value of 'this' within + * {@code f}. + * @return {boolean} true if every value passes the test. + */ +goog.iter.every = function(iterable, f, opt_obj) { + iterable = goog.iter.toIterator(iterable); + /** @preserveTry */ + try { + while (_TRUE) { + if (!f.call(opt_obj, iterable.next(), _UNDEFINED, iterable)) { + return _FALSE; + } + } + } catch (ex) { + if (ex !== goog.iter.StopIteration) { + throw ex; + } + } + return _TRUE; +}; + + +/** + * Converts the iterator to an array + * @param {goog.iter.Iterable} iterable The iterator to convert to an array. + * @return {!Array} An array of the elements the iterator iterates over. + */ +goog.iter.toArray = function(iterable) { + // Fast path for array-like. + if (goog.isArrayLike(iterable)) { + return goog.array.toArray((/** @type {!goog.array.ArrayLike} */ iterable)); + } + iterable = goog.iter.toIterator(iterable); + var array = []; + goog.iter.forEach(iterable, function(val) { + array.push(val); + }); + return array; +}; + + +/** + * Iterates over 2 iterators and returns true if they contain the same sequence + * of elements and have the same length. + * @param {goog.iter.Iterable} iterable1 The first iterable object. + * @param {goog.iter.Iterable} iterable2 The second iterable object. + * @return {boolean} true if the iterators contain the same sequence of + * elements and have the same length. + */ +goog.iter.equals = function(iterable1, iterable2) { + iterable1 = goog.iter.toIterator(iterable1); + iterable2 = goog.iter.toIterator(iterable2); + var b1, b2; + /** @preserveTry */ + try { + while (_TRUE) { + b1 = b2 = _FALSE; + var val1 = iterable1.next(); + b1 = _TRUE; + var val2 = iterable2.next(); + b2 = _TRUE; + if (val1 != val2) { + return _FALSE; + } + } + } catch (ex) { + if (ex !== goog.iter.StopIteration) { + throw ex; + } else { + if (b1 && !b2) { + // iterable1 done but iterable2 is not done. + return _FALSE; + } + if (!b2) { + /** @preserveTry */ + try { + // iterable2 not done? + val2 = iterable2.next(); + // iterable2 not done but iterable1 is done + return _FALSE; + } catch (ex1) { + if (ex1 !== goog.iter.StopIteration) { + throw ex1; + } + // iterable2 done as well... They are equal + return _TRUE; + } + } + } + } + return _FALSE; +}; +// Copyright 2008 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Iterator subclass for DOM tree traversal. + * + * @author robbyw@google.com (Robby Walker) + */ + +goog.provide('goog.dom.TagIterator'); +goog.provide('goog.dom.TagWalkType'); + +//goog.require('goog.dom.NodeType'); +//goog.require('goog.iter.Iterator'); +//goog.require('goog.iter.StopIteration'); + + +/** + * There are three types of token: + *
        + *
      1. {@code START_TAG} - The beginning of a tag. + *
      2. {@code OTHER} - Any non-element node position. + *
      3. {@code END_TAG} - The end of a tag. + *
      + * Users of this enumeration can rely on {@code START_TAG + END_TAG = 0} and + * that {@code OTHER = 0}. + * + * @enum {number} + */ +goog.dom.TagWalkType = { + START_TAG: 1, + OTHER: 0, + END_TAG: -1 +}; + + + +/** + * A DOM tree traversal iterator. + * + * Starting with the given node, the iterator walks the DOM in order, reporting + * events for the start and end of Elements, and the presence of text nodes. For + * example: + * + *
      + * <div>1<span>2</span>3</div>
      + * 
      + * + * Will return the following nodes: + * + * [div, 1, span, 2, span, 3, div] + * + * With the following states: + * + * [START, OTHER, START, OTHER, END, OTHER, END] + * + * And the following depths + * + * [1, 1, 2, 2, 1, 1, 0] + * + * Imagining | represents iterator position, the traversal stops at + * each of the following locations: + * + *
      + * <div>|1|<span>|2|</span>|3|</div>|
      + * 
      + * + * The iterator can also be used in reverse mode, which will return the nodes + * and states in the opposite order. The depths will be slightly different + * since, like in normal mode, the depth is computed *after* the given node. + * + * Lastly, it is possible to create an iterator that is unconstrained, meaning + * that it will continue iterating until the end of the document instead of + * until exiting the start node. + * + * @param {Node=} opt_node The start node. If unspecified or null, defaults to + * an empty iterator. + * @param {boolean=} opt_reversed Whether to traverse the tree in reverse. + * @param {boolean=} opt_unconstrained Whether the iterator is not constrained + * to the starting node and its children. + * @param {goog.dom.TagWalkType?=} opt_tagType The type of the position. + * Defaults to the start of the given node for forward iterators, and + * the end of the node for reverse iterators. + * @param {number=} opt_depth The starting tree depth. + * @constructor + * @extends {goog.iter.Iterator} + */ +goog.dom.TagIterator = function(opt_node, opt_reversed, + opt_unconstrained, opt_tagType, opt_depth) { + this.reversed = !!opt_reversed; + if (opt_node) { + this.setPosition(opt_node, opt_tagType); + } + this.depth = opt_depth != _UNDEFINED ? opt_depth : this.tagType || 0; + if (this.reversed) { + this.depth *= -1; + } + this.constrained = !opt_unconstrained; +}; +goog.inherits(goog.dom.TagIterator, goog.iter.Iterator); + + +/** + * The node this position is located on. + * @type {Node} + */ +goog.dom.TagIterator.prototype.node = _NULL; + + +/** + * The type of this position. + * @type {goog.dom.TagWalkType} + */ +goog.dom.TagIterator.prototype.tagType = goog.dom.TagWalkType.OTHER; + + +/** + * The tree depth of this position relative to where the iterator started. The + * depth is considered to be the tree depth just past the current node, so if an + * iterator is at position
      + *     
      |
      + *
      + * (i.e. the node is the div and the type is START_TAG) its depth will be 1. + * @type {number} + */ +goog.dom.TagIterator.prototype.depth; + + +/** + * Whether the node iterator is moving in reverse. + * @type {boolean} + */ +goog.dom.TagIterator.prototype.reversed; + + +/** + * Whether the iterator is constrained to the starting node and its children. + * @type {boolean} + */ +goog.dom.TagIterator.prototype.constrained; + + +/** + * Whether iteration has started. + * @type {boolean} + * @private + */ +goog.dom.TagIterator.prototype.started_ = _FALSE; + + +/** + * Set the position of the iterator. Overwrite the tree node and the position + * type which can be one of the {@link goog.dom.TagWalkType} token types. + * Only overwrites the tree depth when the parameter is specified. + * @param {Node} node The node to set the position to. + * @param {goog.dom.TagWalkType?=} opt_tagType The type of the position + * Defaults to the start of the given node. + * @param {number=} opt_depth The tree depth. + */ +goog.dom.TagIterator.prototype.setPosition = function(node, + opt_tagType, opt_depth) { + this.node = node; + + if (node) { + if (goog.isNumber(opt_tagType)) { + this.tagType = opt_tagType; + } else { + // Auto-determine the proper type + this.tagType = this.node.nodeType != goog.dom.NodeType.ELEMENT ? + goog.dom.TagWalkType.OTHER : + this.reversed ? goog.dom.TagWalkType.END_TAG : + goog.dom.TagWalkType.START_TAG; + } + } + + if (goog.isNumber(opt_depth)) { + this.depth = opt_depth; + } +}; + + +/** + * Replace this iterator's values with values from another. + * @param {goog.dom.TagIterator} other The iterator to copy. + * @protected + */ +goog.dom.TagIterator.prototype.copyFrom = function(other) { + this.node = other.node; + this.tagType = other.tagType; + this.depth = other.depth; + this.reversed = other.reversed; + this.constrained = other.constrained; +}; + + +/** + * @return {goog.dom.TagIterator} A copy of this iterator. + */ +goog.dom.TagIterator.prototype.clone = function() { + return new goog.dom.TagIterator(this.node, this.reversed, + !this.constrained, this.tagType, this.depth); +}; + + +/** + * Skip the current tag. + */ +goog.dom.TagIterator.prototype.skipTag = function() { + var check = this.reversed ? goog.dom.TagWalkType.END_TAG : + goog.dom.TagWalkType.START_TAG; + if (this.tagType == check) { + this.tagType = /** @type {goog.dom.TagWalkType} */ (check * -1); + this.depth += this.tagType * (this.reversed ? -1 : 1); + } +}; + + +/** + * Restart the current tag. + */ +goog.dom.TagIterator.prototype.restartTag = function() { + var check = this.reversed ? goog.dom.TagWalkType.START_TAG : + goog.dom.TagWalkType.END_TAG; + if (this.tagType == check) { + this.tagType = /** @type {goog.dom.TagWalkType} */ (check * -1); + this.depth += this.tagType * (this.reversed ? -1 : 1); + } +}; + + +/** + * Move to the next position in the DOM tree. + * @return {Node} Returns the next node, or throws a goog.iter.StopIteration + * exception if the end of the iterator's range has been reached. + */ +goog.dom.TagIterator.prototype.next = function() { + var node; + + if (this.started_) { + if (!this.node || this.constrained && this.depth == 0) { + throw goog.iter.StopIteration; + } + node = this.node; + + var startType = this.reversed ? goog.dom.TagWalkType.END_TAG : + goog.dom.TagWalkType.START_TAG; + + if (this.tagType == startType) { + // If we have entered the tag, test if there are any children to move to. + var child = this.reversed ? node.lastChild : node.firstChild; + if (child) { + this.setPosition(child); + } else { + // If not, move on to exiting this tag. + this.setPosition(node, + /** @type {goog.dom.TagWalkType} */ (startType * -1)); + } + } else { + var sibling = this.reversed ? node.previousSibling : node.nextSibling; + // by simonz + //
      인 경우에 IE에서 무한 loop가 발생한다. + // strong을 iteration하지 않고 빠져나가도록 수정을 했다. + if (sibling && node.parentNode == sibling.parentNode) { +// if (sibling) { + // Try to move to the next node. + this.setPosition(sibling); + } else { + // If no such node exists, exit our parent. + this.setPosition(node.parentNode, + /** @type {goog.dom.TagWalkType} */ (startType * -1)); + } + } + + this.depth += this.tagType * (this.reversed ? -1 : 1); + } else { + this.started_ = _TRUE; + } + + // Check the new position for being last, and return it if it's not. + node = this.node; + if (!this.node) { + throw goog.iter.StopIteration; + } + return node; +}; + + +/** + * @return {boolean} Whether next has ever been called on this iterator. + * @protected + */ +goog.dom.TagIterator.prototype.isStarted = function() { + return this.started_; +}; + + +/** + * @return {boolean} Whether this iterator's position is a start tag position. + */ +goog.dom.TagIterator.prototype.isStartTag = function() { + return this.tagType == goog.dom.TagWalkType.START_TAG; +}; + + +/** + * @return {boolean} Whether this iterator's position is an end tag position. + */ +goog.dom.TagIterator.prototype.isEndTag = function() { + return this.tagType == goog.dom.TagWalkType.END_TAG; +}; + + +/** + * Test if two iterators are at the same position - i.e. if the node and tagType + * is the same. This will still return true if the two iterators are moving in + * opposite directions or have different constraints. + * @param {goog.dom.TagIterator} other The iterator to compare to. + * @return {boolean} Whether the two iterators are at the same position. + */ +goog.dom.TagIterator.prototype.equals = function(other) { + // Nodes must be equal, and we must either have reached the end of our tree + // or be at the same position. + return other.node == this.node && (!this.node || + other.tagType == this.tagType); +}; + + +/** + * Replace the current node with the list of nodes. Reset the iterator so that + * it visits the first of the nodes next. + * @param {...Object} var_args A list of nodes to replace the current node with. + * If the first argument is array-like, it will be used, otherwise all the + * arguments are assumed to be nodes. + */ +goog.dom.TagIterator.prototype.splice = function(var_args) { + // Reset the iterator so that it iterates over the first replacement node in + // the arguments on the next iteration. + var node = this.node; + this.restartTag(); + this.reversed = !this.reversed; + goog.dom.TagIterator.prototype.next.call(this); + this.reversed = !this.reversed; + + // Replace the node with the arguments. + var arr = goog.isArrayLike(arguments[0]) ? arguments[0] : arguments; + for (var i = arr.length - 1; i >= 0; i--) { + goog.dom.insertSiblingAfter(arr[i], node); + } + goog.dom.removeNode(node); +}; +// Copyright 2006 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Generics method for collection-like classes and objects. + * + * + * This file contains functions to work with collections. It supports using + * Map, Set, Array and Object and other classes that implement collection-like + * methods. + */ + + +goog.provide('goog.structs'); + +//goog.require('goog.array'); +//goog.require('goog.object'); + + +// We treat an object as a dictionary if it has getKeys or it is an object that +// isn't arrayLike. + + +/** + * Returns the number of values in the collection-like object. + * @param {Object} col The collection-like object. + * @return {number} The number of values in the collection-like object. + */ +goog.structs.getCount = function(col) { + if (typeof col.getCount == 'function') { + return col.getCount(); + } + if (goog.isArrayLike(col) || goog.isString(col)) { + return col.length; + } + return goog.object.getCount(col); +}; + + +/** + * Returns the values of the collection-like object. + * @param {Object} col The collection-like object. + * @return {!Array} The values in the collection-like object. + */ +goog.structs.getValues = function(col) { + if (typeof col.getValues == 'function') { + return col.getValues(); + } + if (goog.isString(col)) { + return col.split(''); + } + if (goog.isArrayLike(col)) { + var rv = []; + var l = col.length; + for (var i = 0; i < l; i++) { + rv.push(col[i]); + } + return rv; + } + return goog.object.getValues(col); +}; + + +/** + * Returns the keys of the collection. Some collections have no notion of + * keys/indexes and this function will return undefined in those cases. + * @param {Object} col The collection-like object. + * @return {!Array|undefined} The keys in the collection. + */ +goog.structs.getKeys = function(col) { + if (typeof col.getKeys == 'function') { + return col.getKeys(); + } + // if we have getValues but no getKeys we know this is a key-less collection + if (typeof col.getValues == 'function') { + return _UNDEFINED; + } + if (goog.isArrayLike(col) || goog.isString(col)) { + var rv = []; + var l = col.length; + for (var i = 0; i < l; i++) { + rv.push(i); + } + return rv; + } + + return goog.object.getKeys(col); +}; + + +/** + * Whether the collection contains the given value. This is O(n) and uses + * equals (==) to test the existence. + * @param {Object} col The collection-like object. + * @param {*} val The value to check for. + * @return {boolean} True if the map contains the value. + */ +goog.structs.contains = function(col, val) { + if (typeof col.contains == 'function') { + return col.contains(val); + } + if (typeof col.containsValue == 'function') { + return col.containsValue(val); + } + if (goog.isArrayLike(col) || goog.isString(col)) { + return goog.array.contains(/** @type {Array} */ (col), val); + } + return goog.object.containsValue(col, val); +}; + + +/** + * Whether the collection is empty. + * @param {Object} col The collection-like object. + * @return {boolean} True if empty. + */ +goog.structs.isEmpty = function(col) { + if (typeof col.isEmpty == 'function') { + return col.isEmpty(); + } + + // We do not use goog.string.isEmpty because here we treat the string as + // collection and as such even whitespace matters + + if (goog.isArrayLike(col) || goog.isString(col)) { + return goog.array.isEmpty(/** @type {Array} */ (col)); + } + return goog.object.isEmpty(col); +}; + + +/** + * Removes all the elements from the collection. + * @param {Object} col The collection-like object. + */ +goog.structs.clear = function(col) { + // NOTE(user): This should not contain strings because strings are immutable + if (typeof col.clear == 'function') { + col.clear(); + } else if (goog.isArrayLike(col)) { + goog.array.clear((/** @type {goog.array.ArrayLike} */ col)); + } else { + goog.object.clear(col); + } +}; + + +/** + * Calls a function for each value in a collection. The function takes + * three arguments; the value, the key and the collection. + * + * @param {Object} col The collection-like object. + * @param {Function} f The function to call for every value. This function takes + * 3 arguments (the value, the key or undefined if the collection has no + * notion of keys, and the collection) and the return value is irrelevant. + * @param {Object=} opt_obj The object to be used as the value of 'this' + * within {@code f}. + */ +goog.structs.forEach = function(col, f, opt_obj) { + if (typeof col.forEach == 'function') { + col.forEach(f, opt_obj); + } else if (goog.isArrayLike(col) || goog.isString(col)) { + goog.array.forEach(/** @type {Array} */ (col), f, opt_obj); + } else { + var keys = goog.structs.getKeys(col); + var values = goog.structs.getValues(col); + var l = values.length; + for (var i = 0; i < l; i++) { + f.call(opt_obj, values[i], keys && keys[i], col); + } + } +}; + + +/** + * Calls a function for every value in the collection. When a call returns true, + * adds the value to a new collection (Array is returned by default). + * + * @param {Object} col The collection-like object. + * @param {Function} f The function to call for every value. This function takes + * 3 arguments (the value, the key or undefined if the collection has no + * notion of keys, and the collection) and should return a Boolean. If the + * return value is true the value is added to the result collection. If it + * is _FALSE the value is not included. + * @param {Object=} opt_obj The object to be used as the value of 'this' + * within {@code f}. + * @return {!Object|!Array} A new collection where the passed values are + * present. If col is a key-less collection an array is returned. If col + * has keys and values a plain old JS object is returned. + */ +goog.structs.filter = function(col, f, opt_obj) { + if (typeof col.filter == 'function') { + return col.filter(f, opt_obj); + } + if (goog.isArrayLike(col) || goog.isString(col)) { + return goog.array.filter(/** @type {!Array} */ (col), f, opt_obj); + } + + var rv; + var keys = goog.structs.getKeys(col); + var values = goog.structs.getValues(col); + var l = values.length; + if (keys) { + rv = {}; + for (var i = 0; i < l; i++) { + if (f.call(opt_obj, values[i], keys[i], col)) { + rv[keys[i]] = values[i]; + } + } + } else { + // We should not use goog.array.filter here since we want to make sure that + // the index is undefined as well as make sure that col is passed to the + // function. + rv = []; + for (var i = 0; i < l; i++) { + if (f.call(opt_obj, values[i], _UNDEFINED, col)) { + rv.push(values[i]); + } + } + } + return rv; +}; + + +/** + * Calls a function for every value in the collection and adds the result into a + * new collection (defaults to creating a new Array). + * + * @param {Object} col The collection-like object. + * @param {Function} f The function to call for every value. This function + * takes 3 arguments (the value, the key or undefined if the collection has + * no notion of keys, and the collection) and should return something. The + * result will be used as the value in the new collection. + * @param {Object=} opt_obj The object to be used as the value of 'this' + * within {@code f}. + * @return {!Object|!Array} A new collection with the new values. If col is a + * key-less collection an array is returned. If col has keys and values a + * plain old JS object is returned. + */ +goog.structs.map = function(col, f, opt_obj) { + if (typeof col.map == 'function') { + return col.map(f, opt_obj); + } + if (goog.isArrayLike(col) || goog.isString(col)) { + return goog.array.map(/** @type {!Array} */ (col), f, opt_obj); + } + + var rv; + var keys = goog.structs.getKeys(col); + var values = goog.structs.getValues(col); + var l = values.length; + if (keys) { + rv = {}; + for (var i = 0; i < l; i++) { + rv[keys[i]] = f.call(opt_obj, values[i], keys[i], col); + } + } else { + // We should not use goog.array.map here since we want to make sure that + // the index is undefined as well as make sure that col is passed to the + // function. + rv = []; + for (var i = 0; i < l; i++) { + rv[i] = f.call(opt_obj, values[i], _UNDEFINED, col); + } + } + return rv; +}; + + +/** + * Calls f for each value in a collection. If any call returns true this returns + * true (without checking the rest). If all returns _FALSE this returns _FALSE. + * + * @param {Object|Array|string} col The collection-like object. + * @param {Function} f The function to call for every value. This function takes + * 3 arguments (the value, the key or undefined if the collection has no + * notion of keys, and the collection) and should return a Boolean. + * @param {Object=} opt_obj The object to be used as the value of 'this' + * within {@code f}. + * @return {boolean} True if any value passes the test. + */ +goog.structs.some = function(col, f, opt_obj) { + if (typeof col.some == 'function') { + return col.some(f, opt_obj); + } + if (goog.isArrayLike(col) || goog.isString(col)) { + return goog.array.some(/** @type {!Array} */ (col), f, opt_obj); + } + var keys = goog.structs.getKeys(col); + var values = goog.structs.getValues(col); + var l = values.length; + for (var i = 0; i < l; i++) { + if (f.call(opt_obj, values[i], keys && keys[i], col)) { + return _TRUE; + } + } + return _FALSE; +}; + + +/** + * Calls f for each value in a collection. If all calls return true this return + * true this returns true. If any returns _FALSE this returns _FALSE at this point + * and does not continue to check the remaining values. + * + * @param {Object} col The collection-like object. + * @param {Function} f The function to call for every value. This function takes + * 3 arguments (the value, the key or undefined if the collection has no + * notion of keys, and the collection) and should return a Boolean. + * @param {Object=} opt_obj The object to be used as the value of 'this' + * within {@code f}. + * @return {boolean} True if all key-value pairs pass the test. + */ +goog.structs.every = function(col, f, opt_obj) { + if (typeof col.every == 'function') { + return col.every(f, opt_obj); + } + if (goog.isArrayLike(col) || goog.isString(col)) { + return goog.array.every(/** @type {!Array} */ (col), f, opt_obj); + } + var keys = goog.structs.getKeys(col); + var values = goog.structs.getValues(col); + var l = values.length; + for (var i = 0; i < l; i++) { + if (!f.call(opt_obj, values[i], keys && keys[i], col)) { + return _FALSE; + } + } + return _TRUE; +}; +// Copyright 2006 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Datastructure: Hash Map. + * + * + * This file contains an implementation of a Map structure. It implements a lot + * of the methods used in goog.structs so those functions work on hashes. For + * convenience with common usage the methods accept any type for the key, though + * internally they will be cast to strings. + */ + + +goog.provide('goog.structs.Map'); + +//goog.require('goog.iter.Iterator'); +//goog.require('goog.iter.StopIteration'); +//goog.require('goog.object'); +//goog.require('goog.structs'); + + + +/** + * Class for Hash Map datastructure. + * @param {*=} opt_map Map or Object to initialize the map with. + * @param {...*} var_args If 2 or more arguments are present then they + * will be used as key-value pairs. + * @constructor + */ +goog.structs.Map = function(opt_map, var_args) { + + /** + * Underlying JS object used to implement the map. + * @type {!Object} + * @private + */ + this.map_ = {}; + + /** + * An array of keys. This is necessary for two reasons: + * 1. Iterating the keys using for (var key in this.map_) allocates an + * object for every key in IE which is really bad for IE6 GC perf. + * 2. Without a side data structure, we would need to escape all the keys + * as that would be the only way we could tell during iteration if the + * key was an internal key or a property of the object. + * + * This array can contain deleted keys so it's necessary to check the map + * as well to see if the key is still in the map (this doesn't require a + * memory allocation in IE). + * @type {!Array.} + * @private + */ + this.keys_ = []; + + var argLength = arguments.length; + + if (argLength > 1) { + if (argLength % 2) { + throw Error('Uneven number of arguments'); + } + for (var i = 0; i < argLength; i += 2) { + this.set(arguments[i], arguments[i + 1]); + } + } else if (opt_map) { + this.addAll(/** @type {Object} */ (opt_map)); + } +}; + + +/** + * The number of key value pairs in the map. + * @private + * @type {number} + */ +goog.structs.Map.prototype.count_ = 0; + + +/** + * Version used to detect changes while iterating. + * @private + * @type {number} + */ +goog.structs.Map.prototype.version_ = 0; + + +/** + * @return {number} The number of key-value pairs in the map. + */ +goog.structs.Map.prototype.getCount = function() { + return this.count_; +}; + + +/** + * Returns the values of the map. + * @return {!Array} The values in the map. + */ +goog.structs.Map.prototype.getValues = function() { + this.cleanupKeysArray_(); + + var rv = []; + for (var i = 0; i < this.keys_.length; i++) { + var key = this.keys_[i]; + rv.push(this.map_[key]); + } + return rv; +}; + + +/** + * Returns the keys of the map. + * @return {!Array.} Array of string values. + */ +goog.structs.Map.prototype.getKeys = function() { + this.cleanupKeysArray_(); + return /** @type {!Array.} */ (this.keys_.concat()); +}; + + +/** + * Whether the map contains the given key. + * @param {*} key The key to check for. + * @return {boolean} Whether the map contains the key. + */ +goog.structs.Map.prototype.containsKey = function(key) { + return goog.structs.Map.hasKey_(this.map_, key); +}; + + +/** + * Whether the map contains the given value. This is O(n). + * @param {*} val The value to check for. + * @return {boolean} Whether the map contains the value. + */ +goog.structs.Map.prototype.containsValue = function(val) { + for (var i = 0; i < this.keys_.length; i++) { + var key = this.keys_[i]; + if (goog.structs.Map.hasKey_(this.map_, key) && this.map_[key] == val) { + return _TRUE; + } + } + return _FALSE; +}; + + +/** + * Whether this map is equal to the argument map. + * @param {goog.structs.Map} otherMap The map against which to test equality. + * @param {function(*, *) : boolean=} opt_equalityFn Optional equality function + * to test equality of values. If not specified, this will test whether + * the values contained in each map are identical objects. + * @return {boolean} Whether the maps are equal. + */ +goog.structs.Map.prototype.equals = function(otherMap, opt_equalityFn) { + if (this === otherMap) { + return _TRUE; + } + + if (this.count_ != otherMap.getCount()) { + return _FALSE; + } + + var equalityFn = opt_equalityFn || goog.structs.Map.defaultEquals; + + this.cleanupKeysArray_(); + for (var key, i = 0; key = this.keys_[i]; i++) { + if (!equalityFn(this.get(key), otherMap.get(key))) { + return _FALSE; + } + } + + return _TRUE; +}; + + +/** + * Default equality test for values. + * @param {*} a The first value. + * @param {*} b The second value. + * @return {boolean} Whether a and b reference the same object. + */ +goog.structs.Map.defaultEquals = function(a, b) { + return a === b; +}; + + +/** + * @return {boolean} Whether the map is empty. + */ +goog.structs.Map.prototype.isEmpty = function() { + return this.count_ == 0; +}; + + +/** + * Removes all key-value pairs from the map. + */ +goog.structs.Map.prototype.clear = function() { + this.map_ = {}; + this.keys_.length = 0; + this.count_ = 0; + this.version_ = 0; +}; + + +/** + * Removes a key-value pair based on the key. This is O(logN) amortized due to + * updating the keys array whenever the count becomes half the size of the keys + * in the keys array. + * @param {*} key The key to remove. + * @return {boolean} Whether object was removed. + */ +goog.structs.Map.prototype.remove = function(key) { + if (goog.structs.Map.hasKey_(this.map_, key)) { + delete this.map_[key]; + this.count_--; + this.version_++; + + // clean up the keys array if the threshhold is hit + if (this.keys_.length > 2 * this.count_) { + this.cleanupKeysArray_(); + } + + return _TRUE; + } + return _FALSE; +}; + + +/** + * Cleans up the temp keys array by removing entries that are no longer in the + * map. + * @private + */ +goog.structs.Map.prototype.cleanupKeysArray_ = function() { + if (this.count_ != this.keys_.length) { + // First remove keys that are no longer in the map. + var srcIndex = 0; + var destIndex = 0; + while (srcIndex < this.keys_.length) { + var key = this.keys_[srcIndex]; + if (goog.structs.Map.hasKey_(this.map_, key)) { + this.keys_[destIndex++] = key; + } + srcIndex++; + } + this.keys_.length = destIndex; + } + + if (this.count_ != this.keys_.length) { + // If the count still isn't correct, that means we have duplicates. This can + // happen when the same key is added and removed multiple times. Now we have + // to allocate one extra Object to remove the duplicates. This could have + // been done in the first pass, but in the common case, we can avoid + // allocating an extra object by only doing this when necessary. + var seen = {}; + var srcIndex = 0; + var destIndex = 0; + while (srcIndex < this.keys_.length) { + var key = this.keys_[srcIndex]; + if (!(goog.structs.Map.hasKey_(seen, key))) { + this.keys_[destIndex++] = key; + seen[key] = 1; + } + srcIndex++; + } + this.keys_.length = destIndex; + } +}; + + +/** + * Returns the value for the given key. If the key is not found and the default + * value is not given this will return {@code undefined}. + * @param {*} key The key to get the value for. + * @param {*=} opt_val The value to return if no item is found for the given + * key, defaults to undefined. + * @return {*} The value for the given key. + */ +goog.structs.Map.prototype.get = function(key, opt_val) { + if (goog.structs.Map.hasKey_(this.map_, key)) { + return this.map_[key]; + } + return opt_val; +}; + + +/** + * Adds a key-value pair to the map. + * @param {*} key The key. + * @param {*} value The value to add. + */ +goog.structs.Map.prototype.set = function(key, value) { + if (!(goog.structs.Map.hasKey_(this.map_, key))) { + this.count_++; + this.keys_.push(key); + // Only change the version if we add a new key. + this.version_++; + } + this.map_[key] = value; +}; + + +/** + * Adds multiple key-value pairs from another goog.structs.Map or Object. + * @param {Object} map Object containing the data to add. + */ +goog.structs.Map.prototype.addAll = function(map) { + var keys, values; + if (map instanceof goog.structs.Map) { + keys = map.getKeys(); + values = map.getValues(); + } else { + keys = goog.object.getKeys(map); + values = goog.object.getValues(map); + } + // we could use goog.array.forEach here but I don't want to introduce that + // dependency just for this. + for (var i = 0; i < keys.length; i++) { + this.set(keys[i], values[i]); + } +}; + + +/** + * Clones a map and returns a new map. + * @return {!goog.structs.Map} A new map with the same key-value pairs. + */ +goog.structs.Map.prototype.clone = function() { + return new goog.structs.Map(this); +}; + + +/** + * @return {!Object} Object representation of the map. + */ +goog.structs.Map.prototype.toObject = function() { + this.cleanupKeysArray_(); + var obj = {}; + for (var i = 0; i < this.keys_.length; i++) { + var key = this.keys_[i]; + obj[key] = this.map_[key]; + } + return obj; +}; + + +/** + * Returns an iterator that iterates over the values or the keys in the map. + * This throws an exception if the map was mutated since the iterator was + * created. + * @param {boolean=} opt_keys True to iterate over the keys. _FALSE to iterate + * over the values. The default value is _FALSE. + * @return {!goog.iter.Iterator} An iterator over the values or keys in the map. + */ +goog.structs.Map.prototype.__iterator__ = function(opt_keys) { + // Clean up keys to minimize the risk of iterating over dead keys. + this.cleanupKeysArray_(); + + var i = 0; + var keys = this.keys_; + var map = this.map_; + var version = this.version_; + var selfObj = this; + + var newIter = new goog.iter.Iterator; + newIter.next = function() { + while (_TRUE) { + if (version != selfObj.version_) { + throw Error('The map has changed since the iterator was created'); + } + if (i >= keys.length) { + throw goog.iter.StopIteration; + } + var key = keys[i++]; + return opt_keys ? key : map[key]; + } + }; + return newIter; +}; + + +/** + * Safe way to test for hasOwnProperty. It even allows testing for + * 'hasOwnProperty'. + * @param {Object} obj The object to test for presence of the given key. + * @param {*} key The key to check for. + * @return {boolean} Whether the object has the key. + * @private + */ +goog.structs.Map.hasKey_ = function(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +}; +// Copyright 2006 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Datastructure: Set. + * + * + * This class implements a set data structure. Adding and removing is O(1). It + * supports both object and primitive values. Be careful because you can add + * both 1 and new Number(1), because these are not the same. You can even add + * multiple new Number(1) because these are not equal. + */ + + +goog.provide('goog.structs.Set'); + +//goog.require('goog.structs'); +//goog.require('goog.structs.Map'); + + + +/** + * A set that can contain both primitives and objects. Adding and removing + * elements is O(1). Primitives are treated as identical if they have the same + * type and convert to the same string. Objects are treated as identical only + * if they are references to the same object. WARNING: A goog.structs.Set can + * contain both 1 and (new Number(1)), because they are not the same. WARNING: + * Adding (new Number(1)) twice will yield two distinct elements, because they + * are two different objects. WARNING: Any object that is added to a + * goog.structs.Set will be modified! Because goog.getUid() is used to + * identify objects, every object in the set will be mutated. + * @param {Array|Object=} opt_values Initial values to start with. + * @constructor + */ +goog.structs.Set = function(opt_values) { + this.map_ = new goog.structs.Map; + if (opt_values) { + this.addAll(opt_values); + } +}; + + +/** + * Obtains a unique key for an element of the set. Primitives will yield the + * same key if they have the same type and convert to the same string. Object + * references will yield the same key only if they refer to the same object. + * @param {*} val Object or primitive value to get a key for. + * @return {string} A unique key for this value/object. + * @private + */ +goog.structs.Set.getKey_ = function(val) { + var type = typeof val; + if (type == 'object' && val || type == 'function') { + return 'o' + goog.getUid(/** @type {Object} */ (val)); + } else { + return type.substr(0, 1) + val; + } +}; + + +/** + * @return {number} The number of elements in the set. + */ +goog.structs.Set.prototype.getCount = function() { + return this.map_.getCount(); +}; + + +/** + * Add a primitive or an object to the set. + * @param {*} element The primitive or object to add. + */ +goog.structs.Set.prototype.add = function(element) { + this.map_.set(goog.structs.Set.getKey_(element), element); +}; + + +/** + * Adds all the values in the given collection to this set. + * @param {Array|Object} col A collection containing the elements to add. + */ +goog.structs.Set.prototype.addAll = function(col) { + var values = goog.structs.getValues(col); + var l = values.length; + for (var i = 0; i < l; i++) { + this.add(values[i]); + } +}; + + +/** + * Removes the given element from this set. + * @param {*} element The primitive or object to remove. + * @return {boolean} Whether the element was found and removed. + */ +goog.structs.Set.prototype.remove = function(element) { + return this.map_.remove(goog.structs.Set.getKey_(element)); +}; + + +/** + * Removes all elements from this set. + */ +goog.structs.Set.prototype.clear = function() { + this.map_.clear(); +}; + + +/** + * Tests whether this set is empty. + * @return {boolean} True if there are no elements in this set. + */ +goog.structs.Set.prototype.isEmpty = function() { + return this.map_.isEmpty(); +}; + + +/** + * Tests whether this set contains the given element. + * @param {*} element The primitive or object to test for. + * @return {boolean} True if this set contains the given element. + */ +goog.structs.Set.prototype.contains = function(element) { + return this.map_.containsKey(goog.structs.Set.getKey_(element)); +}; + + +/** + * Tests whether this set contains all the values in a given collection. + * Repeated elements in the collection are ignored, e.g. (new + * goog.structs.Set([1, 2])).containsAll([1, 1]) is True. + * @param {Object} col A collection-like object. + * @return {boolean} True if the set contains all elements. + */ +goog.structs.Set.prototype.containsAll = function(col) { + return goog.structs.every(col, this.contains, this); +}; + + +/** + * Returns an array containing all the elements in this set. + * @return {Array} An array containing all the elements in this set. + */ +goog.structs.Set.prototype.getValues = function() { + return this.map_.getValues(); +}; + + +/** + * Creates a shallow clone of this set. + * @return {goog.structs.Set} A new set containing all the same elements as + * this set. + */ +goog.structs.Set.prototype.clone = function() { + return new goog.structs.Set(this); +}; + + +/** + * Tests whether the given collection consists of the same elements as this set, + * regardless of order, without repetition. Primitives are treated as equal if + * they have the same type and convert to the same string; objects are treated + * as equal if they are references to the same object. This operation is O(n). + * @param {Object} col A collection. + * @return {boolean} True if the given collection consists of the same elements + * as this set, regardless of order, without repetition. + */ +goog.structs.Set.prototype.equals = function(col) { + return this.getCount() == goog.structs.getCount(col) && this.isSubsetOf(col); +}; + + +/** + * Tests whether the given collection contains all the elements in this set. + * Primitives are treated as equal if they have the same type and convert to the + * same string; objects are treated as equal if they are references to the same + * object. This operation is O(n). + * @param {Object} col A collection. + * @return {boolean} True if this set is a subset of the given collection. + */ +goog.structs.Set.prototype.isSubsetOf = function(col) { + var colCount = goog.structs.getCount(col); + if (this.getCount() > colCount) { + return _FALSE; + } + // TODO(user) Find the minimal collection size where the conversion makes + // the contains() method faster. + if (!(col instanceof goog.structs.Set) && colCount > 5) { + // Convert to a goog.structs.Set so that goog.structs.contains runs in + // O(1) time instead of O(n) time. + col = new goog.structs.Set(col); + } + return goog.structs.every(this, function(value) { + return goog.structs.contains(col, value); + }); +}; + + +/** + * Returns an iterator that iterates over the elements in this set. + * @param {boolean=} opt_keys This argument is ignored. + * @return {goog.iter.Iterator} An iterator over the elements in this set. + */ +goog.structs.Set.prototype.__iterator__ = function(opt_keys) { + return this.map_.__iterator__(_FALSE); +}; +// Copyright 2006 The Closure Library Authors. All Rights Reserved. +// +// 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. + +//goog.require('goog.array'); +//goog.require('goog.string'); +//goog.require('goog.structs.Set'); + + + +// Copyright 2011 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Definition of the disposable interface. A disposable object + * has a dispose method to to clean up references and resources. + */ + + +goog.provide('goog.disposable.IDisposable'); + + + +/** + * Interface for a disposable object. If a instance requires cleanup + * (references COM objects, DOM notes, or other disposable objects), it should + * implement this interface (it may subclass goog.Disposable). + * @interface + */ +goog.disposable.IDisposable = function() {}; + + +/** + * Disposes of the object and its resources. + * @return {void} Nothing. + */ +goog.disposable.IDisposable.prototype.dispose; + + +/** + * @return {boolean} Whether the object has been disposed of. + */ +goog.disposable.IDisposable.prototype.isDisposed; +// Copyright 2005 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Implements the disposable interface. The dispose method is used + * to clean up references and resources. + */ + + +goog.provide('goog.Disposable'); +goog.provide('goog.dispose'); + +//goog.require('goog.disposable.IDisposable'); + + + +/** + * Class that provides the basic implementation for disposable objects. If your + * class holds one or more references to COM objects, DOM nodes, or other + * disposable objects, it should extend this class or implement the disposable + * interface (defined in goog.disposable.IDisposable). + * @constructor + * @implements {goog.disposable.IDisposable} + */ +goog.Disposable = function() { + if (goog.Disposable.ENABLE_MONITORING) { + goog.Disposable.instances_[goog.getUid(this)] = this; + } +}; + + +/** + * @define {boolean} Whether to enable the monitoring of the goog.Disposable + * instances. Switching on the monitoring is only recommended for debugging + * because it has a significant impact on performance and memory usage. + * If switched off, the monitoring code compiles down to 0 bytes. + * The monitoring expects that all disposable objects call the + * {@code goog.Disposable} base constructor. + */ +goog.Disposable.ENABLE_MONITORING = _FALSE; + + +/** + * Maps the unique ID of every undisposed {@code goog.Disposable} object to + * the object itself. + * @type {!Object.} + * @private + */ +goog.Disposable.instances_ = {}; + + +/** + * Whether the object has been disposed of. + * @type {boolean} + * @private + */ +goog.Disposable.prototype.disposed_ = _FALSE; + + +/** + * @return {boolean} Whether the object has been disposed of. + */ +goog.Disposable.prototype.isDisposed = function() { + return this.disposed_; +}; + + +/** + * @return {boolean} Whether the object has been disposed of. + * @deprecated Use {@link #isDisposed} instead. + */ +goog.Disposable.prototype.getDisposed = goog.Disposable.prototype.isDisposed; + + +/** + * Disposes of the object. If the object hasn't already been disposed of, calls + * {@link #disposeInternal}. Classes that extend {@code goog.Disposable} should + * override {@link #disposeInternal} in order to delete references to COM + * objects, DOM nodes, and other disposable objects. + * + * @return {void} Nothing. + */ +goog.Disposable.prototype.dispose = function() { + if (!this.disposed_) { + // Set disposed_ to true first, in case during the chain of disposal this + // gets disposed recursively. + this.disposed_ = _TRUE; + this.disposeInternal(); + if (goog.Disposable.ENABLE_MONITORING) { + var uid = goog.getUid(this); + if (!goog.Disposable.instances_.hasOwnProperty(uid)) { + throw Error(this + ' did not call the goog.Disposable base ' + + 'constructor or was disposed of after a clearUndisposedObjects ' + + 'call'); + } + delete goog.Disposable.instances_[uid]; + } + } +}; + + +/** + * Deletes or nulls out any references to COM objects, DOM nodes, or other + * disposable objects. Classes that extend {@code goog.Disposable} should + * override this method. For example: + *
      + *   mypackage.MyClass = function() {
      + *     goog.Disposable.call(this);
      + *     // Constructor logic specific to MyClass.
      + *     ...
      + *   };
      + *   goog.inherits(mypackage.MyClass, goog.Disposable);
      + *
      + *   mypackage.MyClass.prototype.disposeInternal = function() {
      + *     mypackage.MyClass.superClass_.disposeInternal.call(this);
      + *     // Dispose logic specific to MyClass.
      + *     ...
      + *   };
      + * 
      + * @protected + */ +goog.Disposable.prototype.disposeInternal = function() { + // No-op in the base class. +}; + + +/** + * Calls {@code dispose} on the argument if it supports it. If obj is not an + * object with a dispose() method, this is a no-op. + * @param {*} obj The object to dispose of. + */ +goog.dispose = function(obj) { + if (obj && typeof obj.dispose == 'function') { + obj.dispose(); + } +}; +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview A generic interface for saving and restoring ranges. + * + * @author robbyw@google.com (Robby Walker) + */ + + +goog.provide('goog.dom.SavedRange'); + +//goog.require('goog.Disposable'); + + + +/** + * Abstract interface for a saved range. + * @constructor + * @extends {goog.Disposable} + */ +goog.dom.SavedRange = function() { + goog.Disposable.call(this); +}; +goog.inherits(goog.dom.SavedRange, goog.Disposable); + + +/** + * Restores the range and by default disposes of the saved copy. Take note: + * this means the by default SavedRange objects are single use objects. + * @param {boolean=} opt_stayAlive Whether this SavedRange should stay alive + * (not be disposed) after restoring the range. Defaults to _FALSE (dispose). + * @return {goog.dom.AbstractRange} The restored range. + */ +goog.dom.SavedRange.prototype.restore = function(opt_stayAlive) { + var range = this.restoreInternal(); + if (!opt_stayAlive) { + this.dispose(); + } + return range; +}; + + +/** + * Internal method to restore the saved range. + * @return {goog.dom.AbstractRange} The restored range. + */ +goog.dom.SavedRange.prototype.restoreInternal = goog.abstractMethod; +// Copyright 2008 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview An API for saving and restoring ranges as HTML carets. + * + * @author nicksantos@google.com (Nick Santos) + */ + + +goog.provide('goog.dom.SavedCaretRange'); + +//goog.require('goog.array'); +//goog.require('goog.dom'); +//goog.require('goog.dom.SavedRange'); +//goog.require('goog.dom.TagName'); +//goog.require('goog.string'); + + + +/** + * A struct for holding context about saved selections. + * This can be used to preserve the selection and restore while the DOM is + * manipulated, or through an asynchronous call. Use goog.dom.Range factory + * methods to obtain an {@see goog.dom.AbstractRange} instance, and use + * {@see goog.dom.AbstractRange#saveUsingCarets} to obtain a SavedCaretRange. + * For editor ranges under content-editable elements or design-mode iframes, + * prefer using {@see goog.editor.range.saveUsingNormalizedCarets}. + * @param {goog.dom.AbstractRange} range The range being saved. + * @constructor + * @extends {goog.dom.SavedRange} + */ +goog.dom.SavedCaretRange = function(range) { + goog.dom.SavedRange.call(this); + + /** + * The DOM id of the caret at the start of the range. + * @type {string} + * @private + */ + this.startCaretId_ = goog.string.createUniqueString(); + + /** + * The DOM id of the caret at the end of the range. + * @type {string} + * @private + */ + this.endCaretId_ = goog.string.createUniqueString(); + + /** + * A DOM helper for storing the current document context. + * @type {goog.dom.DomHelper} + * @private + */ + this.dom_ = goog.dom.getDomHelper(range.getDocument()); + + range.surroundWithNodes(this.createCaret_(_TRUE), this.createCaret_(_FALSE)); + this.removeIncidentalTextNode_(); +}; +goog.inherits(goog.dom.SavedCaretRange, goog.dom.SavedRange); + + +/** + * Gets carets. + * @param {boolean} start If true, returns the start caret. Otherwise, get the + * end caret. + * @return {Element} The start or end caret in the given document. + */ +goog.dom.SavedCaretRange.prototype.getCaret = function(start) { + return this.dom_.getElement(start ? this.startCaretId_ : this.endCaretId_); +}; + +goog.dom.SavedCaretRange.prototype.removeIncidentalTextNode_ = function() { + var startCaret = this.getCaret(_TRUE); + this.removeIfEmptyText_(startCaret.previousSibling); + this.removeIfEmptyText_(startCaret.nextSibling); + + var endCaret = this.getCaret(_FALSE); + this.removeIfEmptyText_(endCaret.previousSibling); + this.removeIfEmptyText_(endCaret.nextSibling); +}; + +goog.dom.SavedCaretRange.prototype.removeIfEmptyText_ = function(node) { + if (node && node.nodeType === goog.dom.NodeType.TEXT && !node.nodeValue) { + goog.dom.removeNode(node); + } +} + +/** + * Removes the carets from the current restoration document. + * @param {goog.dom.AbstractRange=} opt_range A range whose offsets have already + * been adjusted for caret removal; it will be adjusted if it is also + * affected by post-removal operations, such as text node normalization. + * @return {goog.dom.AbstractRange|undefined} The adjusted range, if opt_range + * was provided. + */ +goog.dom.SavedCaretRange.prototype.removeCarets = function(opt_range) { + goog.dom.removeNode(this.getCaret(_TRUE)); + goog.dom.removeNode(this.getCaret(_FALSE)); + return opt_range; +}; + + +/** + * Reconstruct the selection from the given saved range. Removes carets after + * restoring the selection. If restore does not dispose this saved range, it may + * only be restored a second time if innerHTML or some other mechanism is used + * to restore the carets to the dom. + * @return {goog.dom.AbstractRange?} Restored selection. + * @override + * @protected + */ +goog.dom.SavedCaretRange.prototype.restoreInternal = function() { + var range = _NULL; + var startCaret = this.getCaret(_TRUE); + var endCaret = this.getCaret(_FALSE); + if (startCaret && endCaret) { + var startNode = startCaret.parentNode; + var startOffset = goog.array.indexOf(startNode.childNodes, startCaret); + var endNode = endCaret.parentNode; + var endOffset = goog.array.indexOf(endNode.childNodes, endCaret); + range = goog.dom.Range.createFromNodes(startNode, startOffset + 1, + endNode, endOffset); + range.select(); + } + return range; +}; +//goog.dom.SavedCaretRange.prototype.restoreInternal = function() { +// var range = null; +// var startCaret = this.getCaret(true); +// var endCaret = this.getCaret(false); +// if (startCaret && endCaret) { +// var startNode = startCaret.parentNode; +// var startOffset = goog.array.indexOf(startNode.childNodes, startCaret); +// var endNode = endCaret.parentNode; +// var endOffset = goog.array.indexOf(endNode.childNodes, endCaret); +// if (endNode == startNode) { +// // Compensate for the start caret being removed. +// endOffset -= 1; +// } +// range = goog.dom.Range.createFromNodes(startNode, startOffset, +// endNode, endOffset); +// range = this.removeCarets(range); +//// range.select(); +// } else { +// // If only one caret was found, remove it. +// this.removeCarets(); +// } +// return range; +//}; + +/** + * Dispose the saved range and remove the carets from the DOM. + * @override + * @protected + */ +goog.dom.SavedCaretRange.prototype.disposeInternal = function() { + this.removeCarets(); + this.dom_ = _NULL; +}; + + +/** + * Creates a caret element. + * @param {boolean} start If true, creates the start caret. Otherwise, + * creates the end caret. + * @return {Element} The new caret element. + * @private + */ +goog.dom.SavedCaretRange.prototype.createCaret_ = function(start) { + return this.dom_.createDom(goog.dom.TagName.SPAN, + {'id': start ? this.startCaretId_ : this.endCaretId_}); +}; + + +/** + * A regex that will match all saved range carets in a string. + * @type {RegExp} + */ +goog.dom.SavedCaretRange.CARET_REGEX = /<\/span>/ig; + + +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Interface definitions for working with ranges + * in HTML documents. + * + * @author robbyw@google.com (Robby Walker) + */ + + +goog.provide('goog.dom.AbstractRange'); +goog.provide('goog.dom.RangeIterator'); +goog.provide('goog.dom.RangeType'); + +//goog.require('goog.dom'); +//goog.require('goog.dom.NodeType'); +//goog.require('goog.dom.SavedCaretRange'); +//goog.require('goog.dom.TagIterator'); +//goog.require('goog.userAgent'); + + +/** + * Types of ranges. + * @enum {string} + */ +goog.dom.RangeType = { + TEXT: 'text', + CONTROL: 'control', + MULTI: 'mutli' +}; + + + +/** + * Creates a new selection with no properties. Do not use this constructor - + * use one of the goog.dom.Range.from* methods instead. + * @constructor + */ +goog.dom.AbstractRange = function() { +}; + + +/** + * Gets the browser native selection object from the given window. + * @param {Window} win The window to get the selection object from. + * @return {Object} The browser native selection object, or null if it could + * not be retrieved. + */ +goog.dom.AbstractRange.getBrowserSelectionForWindow = function(win) { + if (win.getSelection) { + // W3C + return win.getSelection(); + } else { + // IE + var doc = win.document; + var sel = doc.selection; + if (sel) { + // IE has a bug where it sometimes returns a selection from the wrong + // document. Catching these cases now helps us avoid problems later. + try { + var range = sel.createRange(); + // Only TextRanges have a parentElement method. + if (range.parentElement) { + if (range.parentElement().document != doc) { + return _NULL; + } + } else if (!range.length || range.item(0).document != doc) { + // For ControlRanges, check that the range has items, and that + // the first item in the range is in the correct document. + return _NULL; + } + } catch (e) { + // If the selection is in the wrong document, and the wrong document is + // in a different domain, IE will throw an exception. + return _NULL; + } + // TODO(user|robbyw) Sometimes IE 6 returns a selection instance + // when there is no selection. This object has a 'type' property equals + // to 'None' and a typeDetail property bound to undefined. Ideally this + // function should not return this instance. + return sel; + } + return _NULL; + } +}; + + +/** + * Tests if the given Object is a controlRange. + * @param {Object} range The range object to test. + * @return {boolean} Whether the given Object is a controlRange. + */ +goog.dom.AbstractRange.isNativeControlRange = function(range) { + // For now, tests for presence of a control range function. + return !!range && !!range.addElement; +}; + + +/** + * @return {goog.dom.AbstractRange} A clone of this range. + */ +goog.dom.AbstractRange.prototype.clone = goog.abstractMethod; + + +/** + * @return {goog.dom.RangeType} The type of range represented by this object. + */ +goog.dom.AbstractRange.prototype.getType = goog.abstractMethod; + + +/** + * @return {Range|TextRange} The native browser range object. + */ +goog.dom.AbstractRange.prototype.getBrowserRangeObject = goog.abstractMethod; + + +/** + * Sets the native browser range object, overwriting any state this range was + * storing. + * @param {Range|TextRange} nativeRange The native browser range object. + * @return {boolean} Whether the given range was accepted. If not, the caller + * will need to call goog.dom.Range.createFromBrowserRange to create a new + * range object. + */ +goog.dom.AbstractRange.prototype.setBrowserRangeObject = function(nativeRange) { + return _FALSE; +}; + + +/** + * @return {number} The number of text ranges in this range. + */ +goog.dom.AbstractRange.prototype.getTextRangeCount = goog.abstractMethod; + + +/** + * Get the i-th text range in this range. The behavior is undefined if + * i >= getTextRangeCount or i < 0. + * @param {number} i The range number to retrieve. + * @return {goog.dom.TextRange} The i-th text range. + */ +goog.dom.AbstractRange.prototype.getTextRange = goog.abstractMethod; + + +/** + * Gets an array of all text ranges this range is comprised of. For non-multi + * ranges, returns a single element array containing this. + * @return {Array.} Array of text ranges. + */ +goog.dom.AbstractRange.prototype.getTextRanges = function() { + var output = []; + for (var i = 0, len = this.getTextRangeCount(); i < len; i++) { + output.push(this.getTextRange(i)); + } + return output; +}; + + +/** + * @return {Node} The deepest node that contains the entire range. + */ +goog.dom.AbstractRange.prototype.getContainer = goog.abstractMethod; + + + +/** + * @return {Node} The element or text node the range starts in. For text + * ranges, the range comprises all text between the start and end position. + * For other types of range, start and end give bounds of the range but + * do not imply all nodes in those bounds are selected. + */ +goog.dom.AbstractRange.prototype.getStartNode = goog.abstractMethod; + + +/** + * @return {number} The offset into the node the range starts in. For text + * nodes, this is an offset into the node value. For elements, this is + * an offset into the childNodes array. + */ +goog.dom.AbstractRange.prototype.getStartOffset = goog.abstractMethod; + + +/** + * @return {Node} The element or text node the range ends in. + */ +goog.dom.AbstractRange.prototype.getEndNode = goog.abstractMethod; + + +/** + * @return {number} The offset into the node the range ends in. For text + * nodes, this is an offset into the node value. For elements, this is + * an offset into the childNodes array. + */ +goog.dom.AbstractRange.prototype.getEndOffset = goog.abstractMethod; + + +/** + * @return {Node} The element or text node the range is anchored at. + */ +goog.dom.AbstractRange.prototype.getAnchorNode = function() { + return this.isReversed() ? this.getEndNode() : this.getStartNode(); +}; + + +/** + * @return {number} The offset into the node the range is anchored at. For + * text nodes, this is an offset into the node value. For elements, this + * is an offset into the childNodes array. + */ +goog.dom.AbstractRange.prototype.getAnchorOffset = function() { + return this.isReversed() ? this.getEndOffset() : this.getStartOffset(); +}; + + +/** + * @return {Node} The element or text node the range is focused at - i.e. where + * the cursor is. + */ +goog.dom.AbstractRange.prototype.getFocusNode = function() { + return this.isReversed() ? this.getStartNode() : this.getEndNode(); +}; + + +/** + * @return {number} The offset into the node the range is focused at - i.e. + * where the cursor is. For text nodes, this is an offset into the node + * value. For elements, this is an offset into the childNodes array. + */ +goog.dom.AbstractRange.prototype.getFocusOffset = function() { + return this.isReversed() ? this.getStartOffset() : this.getEndOffset(); +}; + + +/** + * @return {boolean} Whether the selection is reversed. + */ +goog.dom.AbstractRange.prototype.isReversed = function() { + return _FALSE; +}; + + +/** + * @return {Document} The document this selection is a part of. + */ +goog.dom.AbstractRange.prototype.getDocument = function() { + // Using start node in IE was crashing the browser in some cases so use + // getContainer for that browser. It's also faster for IE, but still slower + // than start node for other browsers so we continue to use getStartNode when + // it is not problematic. See bug 1687309. + return goog.dom.getOwnerDocument(goog.userAgent.IE ? + this.getContainer() : this.getStartNode()); +}; + + +/** + * @return {Window} The window this selection is a part of. + */ +goog.dom.AbstractRange.prototype.getWindow = function() { + return goog.dom.getWindow(this.getDocument()); +}; + + +/** + * Tests if this range contains the given range. + * @param {goog.dom.AbstractRange} range The range to test. + * @param {boolean=} opt_allowPartial If true, the range can be partially + * contained in the selection, otherwise the range must be entirely + * contained. + * @return {boolean} Whether this range contains the given range. + */ +goog.dom.AbstractRange.prototype.containsRange = goog.abstractMethod; + + +/** + * Tests if this range contains the given node. + * @param {Node} node The node to test for. + * @param {boolean=} opt_allowPartial If not set or _FALSE, the node must be + * entirely contained in the selection for this function to return true. + * @return {boolean} Whether this range contains the given node. + */ +goog.dom.AbstractRange.prototype.containsNode = function(node, + opt_allowPartial) { + return this.containsRange(goog.dom.Range.createFromNodeContents(node), + opt_allowPartial); +}; + + +/** + * Tests whether this range is valid (i.e. whether its endpoints are still in + * the document). A range becomes invalid when, after this object was created, + * either one or both of its endpoints are removed from the document. Use of + * an invalid range can lead to runtime errors, particularly in IE. + * @return {boolean} Whether the range is valid. + */ +goog.dom.AbstractRange.prototype.isRangeInDocument = goog.abstractMethod; + + +/** + * @return {boolean} Whether the range is collapsed. + */ +goog.dom.AbstractRange.prototype.isCollapsed = goog.abstractMethod; + + +/** + * @return {string} The text content of the range. + */ +goog.dom.AbstractRange.prototype.getText = goog.abstractMethod; + + +/** + * Returns the HTML fragment this range selects. This is slow on all browsers. + * The HTML fragment may not be valid HTML, for instance if the user selects + * from a to b inclusively in the following html: + * + * >div<a>/div<b + * + * This method will return + * + * a</div>b + * + * If you need valid HTML, use {@link #getValidHtml} instead. + * + * @return {string} HTML fragment of the range, does not include context + * containing elements. + */ +goog.dom.AbstractRange.prototype.getHtmlFragment = goog.abstractMethod; + + +/** + * Returns valid HTML for this range. This is fast on IE, and semi-fast on + * other browsers. + * @return {string} Valid HTML of the range, including context containing + * elements. + */ +goog.dom.AbstractRange.prototype.getValidHtml = goog.abstractMethod; + + +/** + * Returns pastable HTML for this range. This guarantees that any child items + * that must have specific ancestors will have them, for instance all TDs will + * be contained in a TR in a TBODY in a TABLE and all LIs will be contained in + * a UL or OL as appropriate. This is semi-fast on all browsers. + * @return {string} Pastable HTML of the range, including context containing + * elements. + */ +goog.dom.AbstractRange.prototype.getPastableHtml = goog.abstractMethod; + + +/** + * Returns a RangeIterator over the contents of the range. Regardless of the + * direction of the range, the iterator will move in document order. + * @param {boolean=} opt_keys Unused for this iterator. + * @return {goog.dom.RangeIterator} An iterator over tags in the range. + */ +goog.dom.AbstractRange.prototype.__iterator__ = goog.abstractMethod; + + +// RANGE ACTIONS + + +/** + * Sets this range as the selection in its window. + */ +goog.dom.AbstractRange.prototype.select = goog.abstractMethod; + + +/** + * Removes the contents of the range from the document. + */ +goog.dom.AbstractRange.prototype.removeContents = goog.abstractMethod; + + +/** + * Inserts a node before (or after) the range. The range may be disrupted + * beyond recovery because of the way this splits nodes. + * @param {Node} node The node to insert. + * @param {boolean} before True to insert before, _FALSE to insert after. + * @return {Node} The node added to the document. This may be different + * than the node parameter because on IE we have to clone it. + */ +goog.dom.AbstractRange.prototype.insertNode = goog.abstractMethod; + + +/** + * Surrounds this range with the two given nodes. The range may be disrupted + * beyond recovery because of the way this splits nodes. + * @param {Element} startNode The node to insert at the start. + * @param {Element} endNode The node to insert at the end. + */ +goog.dom.AbstractRange.prototype.surroundWithNodes = goog.abstractMethod; + + +// SAVE/RESTORE + + +/** + * Saves the range so that if the start and end nodes are left alone, it can + * be restored. + * @return {goog.dom.SavedRange} A range representation that can be restored + * as long as the endpoint nodes of the selection are not modified. + */ +goog.dom.AbstractRange.prototype.saveUsingDom = goog.abstractMethod; + + +/** + * Saves the range using HTML carets. As long as the carets remained in the + * HTML, the range can be restored...even when the HTML is copied across + * documents. + * @return {goog.dom.SavedCaretRange?} A range representation that can be + * restored as long as carets are not removed. Returns null if carets + * could not be created. + */ +goog.dom.AbstractRange.prototype.saveUsingCarets = function() { + return (this.getStartNode() && this.getEndNode()) ? + new goog.dom.SavedCaretRange(this) : _NULL; +}; + + +// RANGE MODIFICATION + + +/** + * Collapses the range to one of its boundary points. + * @param {boolean} toAnchor Whether to collapse to the anchor of the range. + */ +goog.dom.AbstractRange.prototype.collapse = goog.abstractMethod; + +// RANGE ITERATION + + + +/** + * Subclass of goog.dom.TagIterator that iterates over a DOM range. It + * adds functions to determine the portion of each text node that is selected. + * @param {Node} node The node to start traversal at. When null, creates an + * empty iterator. + * @param {boolean=} opt_reverse Whether to traverse nodes in reverse. + * @constructor + * @extends {goog.dom.TagIterator} + */ +goog.dom.RangeIterator = function(node, opt_reverse) { + goog.dom.TagIterator.call(this, node, opt_reverse, _TRUE); +}; +goog.inherits(goog.dom.RangeIterator, goog.dom.TagIterator); + + +/** + * @return {number} The offset into the current node, or -1 if the current node + * is not a text node. + */ +goog.dom.RangeIterator.prototype.getStartTextOffset = goog.abstractMethod; + + +/** + * @return {number} The end offset into the current node, or -1 if the current + * node is not a text node. + */ +goog.dom.RangeIterator.prototype.getEndTextOffset = goog.abstractMethod; + + +/** + * @return {Node} node The iterator's start node. + */ +goog.dom.RangeIterator.prototype.getStartNode = goog.abstractMethod; + + +/** + * @return {Node} The iterator's end node. + */ +goog.dom.RangeIterator.prototype.getEndNode = goog.abstractMethod; + + +/** + * @return {boolean} Whether a call to next will fail. + */ +goog.dom.RangeIterator.prototype.isLast = goog.abstractMethod; +// Copyright 2008 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Utilities for working with ranges comprised of multiple + * sub-ranges. + * + * @author robbyw@google.com (Robby Walker) + * @author jparent@google.com (Julie Parent) + */ + + +goog.provide('goog.dom.AbstractMultiRange'); + +//goog.require('goog.array'); +//goog.require('goog.dom'); +//goog.require('goog.dom.AbstractRange'); + + + +/** + * Creates a new multi range with no properties. Do not use this + * constructor: use one of the goog.dom.Range.createFrom* methods instead. + * @constructor + * @extends {goog.dom.AbstractRange} + */ +goog.dom.AbstractMultiRange = function() { +}; +goog.inherits(goog.dom.AbstractMultiRange, goog.dom.AbstractRange); + + +/** @inheritDoc */ +goog.dom.AbstractMultiRange.prototype.containsRange = function( + otherRange, opt_allowPartial) { + // TODO(user): This will incorrectly return _FALSE if two (or more) adjacent + // elements are both in the control range, and are also in the text range + // being compared to. + var ranges = this.getTextRanges(); + var otherRanges = otherRange.getTextRanges(); + + var fn = opt_allowPartial ? goog.array.some : goog.array.every; + return fn(otherRanges, function(otherRange) { + return goog.array.some(ranges, function(range) { + return range.containsRange(otherRange, opt_allowPartial); + }); + }); +}; + + +/** @inheritDoc */ +goog.dom.AbstractMultiRange.prototype.insertNode = function(node, before) { + if (before) { + goog.dom.insertSiblingBefore(node, this.getStartNode()); + } else { + goog.dom.insertSiblingAfter(node, this.getEndNode()); + } + return node; +}; + + +/** @inheritDoc */ +goog.dom.AbstractMultiRange.prototype.surroundWithNodes = function(startNode, + endNode) { + this.insertNode(startNode, _TRUE); + this.insertNode(endNode, _FALSE); +}; +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Iterator between two DOM text range positions. + * + * @author robbyw@google.com (Robby Walker) + */ + +goog.provide('goog.dom.TextRangeIterator'); + +//goog.require('goog.array'); +//goog.require('goog.dom.NodeType'); +//goog.require('goog.dom.RangeIterator'); +//goog.require('goog.dom.TagName'); +//goog.require('goog.iter.StopIteration'); + + + +/** + * Subclass of goog.dom.TagIterator that iterates over a DOM range. It + * adds functions to determine the portion of each text node that is selected. + * + * @param {Node} startNode The starting node position. + * @param {number} startOffset The offset in to startNode. If startNode is + * an element, indicates an offset in to childNodes. If startNode is a + * text node, indicates an offset in to nodeValue. + * @param {Node} endNode The ending node position. + * @param {number} endOffset The offset in to endNode. If endNode is + * an element, indicates an offset in to childNodes. If endNode is a + * text node, indicates an offset in to nodeValue. + * @param {boolean=} opt_reverse Whether to traverse nodes in reverse. + * @constructor + * @extends {goog.dom.RangeIterator} + */ +goog.dom.TextRangeIterator = function(startNode, startOffset, endNode, + endOffset, opt_reverse) { + var goNext; + + if (startNode) { + this.startNode_ = startNode; + this.startOffset_ = startOffset; + this.endNode_ = endNode; + this.endOffset_ = endOffset; + + // Skip to the offset nodes - being careful to special case BRs since these + // have no children but still can appear as the startContainer of a range. + if (startNode.nodeType == goog.dom.NodeType.ELEMENT && + startNode.tagName != goog.dom.TagName.BR) { + var startChildren = startNode.childNodes; + var candidate = startChildren[startOffset]; + if (candidate) { + this.startNode_ = candidate; + this.startOffset_ = 0; + } else { + if (startChildren.length) { + this.startNode_ = + /** @type {Node} */ (goog.array.peek(startChildren)); + } + goNext = _TRUE; + } + } + + if (endNode.nodeType == goog.dom.NodeType.ELEMENT) { + this.endNode_ = endNode.childNodes[endOffset]; + if (this.endNode_) { + this.endOffset_ = 0; + } else { + // The offset was past the last element. + this.endNode_ = endNode; + } + } + } + + goog.dom.RangeIterator.call(this, opt_reverse ? this.endNode_ : + this.startNode_, opt_reverse); + + if (goNext) { + try { + this.next(); + } catch (e) { + if (e != goog.iter.StopIteration) { + throw e; + } + } + } +}; +goog.inherits(goog.dom.TextRangeIterator, goog.dom.RangeIterator); + + +/** + * The first node in the selection. + * @type {Node} + * @private + */ +goog.dom.TextRangeIterator.prototype.startNode_ = _NULL; + + +/** + * The last node in the selection. + * @type {Node} + * @private + */ +goog.dom.TextRangeIterator.prototype.endNode_ = _NULL; + + +/** + * The offset within the first node in the selection. + * @type {number} + * @private + */ +goog.dom.TextRangeIterator.prototype.startOffset_ = 0; + + +/** + * The offset within the last node in the selection. + * @type {number} + * @private + */ +goog.dom.TextRangeIterator.prototype.endOffset_ = 0; + + +/** @inheritDoc */ +goog.dom.TextRangeIterator.prototype.getStartTextOffset = function() { + // Offsets only apply to text nodes. If our current node is the start node, + // return the saved offset. Otherwise, return 0. + return this.node.nodeType != goog.dom.NodeType.TEXT ? -1 : + this.node == this.startNode_ ? this.startOffset_ : 0; +}; + + +/** @inheritDoc */ +goog.dom.TextRangeIterator.prototype.getEndTextOffset = function() { + // Offsets only apply to text nodes. If our current node is the end node, + // return the saved offset. Otherwise, return the length of the node. + return this.node.nodeType != goog.dom.NodeType.TEXT ? -1 : + this.node == this.endNode_ ? this.endOffset_ : this.node.nodeValue.length; +}; + + +/** @inheritDoc */ +goog.dom.TextRangeIterator.prototype.getStartNode = function() { + return this.startNode_; +}; + + +/** + * Change the start node of the iterator. + * @param {Node} node The new start node. + */ +goog.dom.TextRangeIterator.prototype.setStartNode = function(node) { + if (!this.isStarted()) { + this.setPosition(node); + } + + this.startNode_ = node; + this.startOffset_ = 0; +}; + + +/** @inheritDoc */ +goog.dom.TextRangeIterator.prototype.getEndNode = function() { + return this.endNode_; +}; + + +/** + * Change the end node of the iterator. + * @param {Node} node The new end node. + */ +goog.dom.TextRangeIterator.prototype.setEndNode = function(node) { + this.endNode_ = node; + this.endOffset_ = 0; +}; + + +/** @inheritDoc */ +goog.dom.TextRangeIterator.prototype.isLast = function() { + return this.isStarted() && this.node == this.endNode_ && + (!this.endOffset_ || !this.isStartTag()); +}; + + +/** + * Move to the next position in the selection. + * Throws {@code goog.iter.StopIteration} when it passes the end of the range. + * @return {Node} The node at the next position. + */ +goog.dom.TextRangeIterator.prototype.next = function() { + if (this.isLast()) { + throw goog.iter.StopIteration; + } + + // Call the super function. + return goog.dom.TextRangeIterator.superClass_.next.call(this); +}; + + +/** @inheritDoc */ +goog.dom.TextRangeIterator.prototype.skipTag = function() { + goog.dom.TextRangeIterator.superClass_.skipTag.apply(this); + + // If the node we are skipping contains the end node, we just skipped past + // the end, so we stop the iteration. + if (goog.dom.contains(this.node, this.endNode_)) { + throw goog.iter.StopIteration; + } +}; + + +/** + * Replace this iterator's values with values from another. + * @param {goog.dom.TextRangeIterator} other The iterator to copy. + * @protected + */ +goog.dom.TextRangeIterator.prototype.copyFrom = function(other) { + this.startNode_ = other.startNode_; + this.endNode_ = other.endNode_; + this.startOffset_ = other.startOffset_; + this.endOffset_ = other.endOffset_; + this.isReversed_ = other.isReversed_; + + goog.dom.TextRangeIterator.superClass_.copyFrom.call(this, other); +}; + + +/** + * @return {goog.dom.TextRangeIterator} An identical iterator. + */ +goog.dom.TextRangeIterator.prototype.clone = function() { + var copy = new goog.dom.TextRangeIterator(this.startNode_, + this.startOffset_, this.endNode_, this.endOffset_, this.isReversed_); + copy.copyFrom(this); + return copy; +}; +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Detection of JScript version. + * + */ + + +goog.provide('goog.userAgent.jscript'); + +//goog.require('goog.string'); + + +/** + * @define {boolean} True if it is known at compile time that the runtime + * environment will not be using JScript. + */ +goog.userAgent.jscript.ASSUME_NO_JSCRIPT = _FALSE; + + +/** + * Initializer for goog.userAgent.jscript. Detects if the user agent is using + * Microsoft JScript and which version of it. + * + * This is a named function so that it can be stripped via the jscompiler + * option for stripping types. + * @private + */ +goog.userAgent.jscript.init_ = function() { + var hasScriptEngine = 'ScriptEngine' in goog.global; + + /** + * @type {boolean} + * @private + */ + goog.userAgent.jscript.DETECTED_HAS_JSCRIPT_ = + hasScriptEngine && goog.global['ScriptEngine']() == 'JScript'; + + /** + * @type {string} + * @private + */ + goog.userAgent.jscript.DETECTED_VERSION_ = + goog.userAgent.jscript.DETECTED_HAS_JSCRIPT_ ? + (goog.global['ScriptEngineMajorVersion']() + '.' + + goog.global['ScriptEngineMinorVersion']() + '.' + + goog.global['ScriptEngineBuildVersion']()) : + '0'; +}; + +if (!goog.userAgent.jscript.ASSUME_NO_JSCRIPT) { + goog.userAgent.jscript.init_(); +} + + +/** + * Whether we detect that the user agent is using Microsoft JScript. + * @type {boolean} + */ +goog.userAgent.jscript.HAS_JSCRIPT = goog.userAgent.jscript.ASSUME_NO_JSCRIPT ? + _FALSE : goog.userAgent.jscript.DETECTED_HAS_JSCRIPT_; + + +/** + * The installed version of JScript. + * @type {string} + */ +goog.userAgent.jscript.VERSION = goog.userAgent.jscript.ASSUME_NO_JSCRIPT ? + '0' : goog.userAgent.jscript.DETECTED_VERSION_; + + +/** + * Whether the installed version of JScript is as new or newer than a given + * version. + * @param {string} version The version to check. + * @return {boolean} Whether the installed version of JScript is as new or + * newer than the given version. + */ +goog.userAgent.jscript.isVersion = function(version) { + return goog.string.compareVersions(goog.userAgent.jscript.VERSION, + version) >= 0; +}; +// Copyright 2006 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Utility for fast string concatenation. + */ + +goog.provide('goog.string.StringBuffer'); + +//goog.require('goog.userAgent.jscript'); + + + +/** + * Utility class to facilitate much faster string concatenation in IE, + * using Array.join() rather than the '+' operator. For other browsers + * we simply use the '+' operator. + * + * @param {Object|number|string|boolean=} opt_a1 Optional first initial item + * to append. + * @param {...Object|number|string|boolean} var_args Other initial items to + * append, e.g., new goog.string.StringBuffer('foo', 'bar'). + * @constructor + */ +goog.string.StringBuffer = function(opt_a1, var_args) { + /** + * Internal buffer for the string to be concatenated. + * @type {string|Array} + * @private + */ + this.buffer_ = goog.userAgent.jscript.HAS_JSCRIPT ? [] : ''; + + if (opt_a1 != _NULL) { + this.append.apply(this, arguments); + } +}; + + +/** + * Sets the contents of the string buffer object, replacing what's currently + * there. + * + * @param {string} s String to set. + */ +goog.string.StringBuffer.prototype.set = function(s) { + this.clear(); + this.append(s); +}; + + +if (goog.userAgent.jscript.HAS_JSCRIPT) { + /** + * Length of internal buffer (faster than calling buffer_.length). + * Only used if buffer_ is an array. + * @type {number} + * @private + */ + goog.string.StringBuffer.prototype.bufferLength_ = 0; + + /** + * Appends one or more items to the buffer. + * + * Calling this with null, undefined, or empty arguments is an error. + * + * @param {Object|number|string|boolean} a1 Required first string. + * @param {Object|number|string|boolean=} opt_a2 Optional second string. + * @param {...Object|number|string|boolean} var_args Other items to append, + * e.g., sb.append('foo', 'bar', 'baz'). + * @return {goog.string.StringBuffer} This same StringBuffer object. + */ + goog.string.StringBuffer.prototype.append = function(a1, opt_a2, var_args) { + // IE version. + + if (opt_a2 == _NULL) { // second argument is undefined (null == undefined) + // Array assignment is 2x faster than Array push. Also, use a1 + // directly to avoid arguments instantiation, another 2x improvement. + this.buffer_[this.bufferLength_++] = a1; + } else { + this.buffer_.push.apply(/** @type {Array} */ (this.buffer_), arguments); + this.bufferLength_ = this.buffer_.length; + } + return this; + }; +} else { + + /** + * Appends one or more items to the buffer. + * + * Calling this with null, undefined, or empty arguments is an error. + * + * @param {Object|number|string|boolean} a1 Required first string. + * @param {Object|number|string|boolean=} opt_a2 Optional second string. + * @param {...Object|number|string|boolean} var_args Other items to append, + * e.g., sb.append('foo', 'bar', 'baz'). + * @return {goog.string.StringBuffer} This same StringBuffer object. + * @suppress {duplicate} + */ + goog.string.StringBuffer.prototype.append = function(a1, opt_a2, var_args) { + // W3 version. + + // Use a1 directly to avoid arguments instantiation for single-arg case. + this.buffer_ += a1; + if (opt_a2 != _NULL) { // second argument is undefined (null == undefined) + for (var i = 1; i < arguments.length; i++) { + this.buffer_ += arguments[i]; + } + } + return this; + }; +} + + +/** + * Clears the internal buffer. + */ +goog.string.StringBuffer.prototype.clear = function() { + if (goog.userAgent.jscript.HAS_JSCRIPT) { + this.buffer_.length = 0; // Reuse the array to avoid creating new object. + this.bufferLength_ = 0; + } else { + this.buffer_ = ''; + } +}; + + +/** + * Returns the length of the current contents of the buffer. In IE, this is + * O(n) where n = number of appends, so to avoid quadratic behavior, do not call + * this after every append. + * + * @return {number} the length of the current contents of the buffer. + */ +goog.string.StringBuffer.prototype.getLength = function() { + return this.toString().length; +}; + + +/** + * Returns the concatenated string. + * + * @return {string} The concatenated string. + */ +goog.string.StringBuffer.prototype.toString = function() { + if (goog.userAgent.jscript.HAS_JSCRIPT) { + var str = this.buffer_.join(''); + // Given a string with the entire contents, simplify the StringBuffer by + // setting its contents to only be this string, rather than many fragments. + this.clear(); + if (str) { + this.append(str); + } + return str; + } else { + return /** @type {string} */ (this.buffer_); + } +}; +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Simple struct for endpoints of a range. + * + * @author robbyw@google.com (Robby Walker) + */ + + +goog.provide('goog.dom.RangeEndpoint'); + + +/** + * Constants for selection endpoints. + * @enum {number} + */ +goog.dom.RangeEndpoint = { + START: 1, + END: 0 +}; +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Definition of the browser range interface. + * + * DO NOT USE THIS FILE DIRECTLY. Use goog.dom.Range instead. + * + * @author robbyw@google.com (Robby Walker) + * @author ojan@google.com (Ojan Vafai) + * @author jparent@google.com (Julie Parent) + */ + + +goog.provide('goog.dom.browserrange.AbstractRange'); + +//goog.require('goog.dom'); +//goog.require('goog.dom.NodeType'); +//goog.require('goog.dom.RangeEndpoint'); +//goog.require('goog.dom.TagName'); +//goog.require('goog.dom.TextRangeIterator'); +//goog.require('goog.iter'); +//goog.require('goog.string'); +//goog.require('goog.string.StringBuffer'); +//goog.require('goog.userAgent'); + + + +/** + * The constructor for abstract ranges. Don't call this from subclasses. + * @constructor + */ +goog.dom.browserrange.AbstractRange = function() { +}; + + +/** + * @return {goog.dom.browserrange.AbstractRange} A clone of this range. + */ +goog.dom.browserrange.AbstractRange.prototype.clone = goog.abstractMethod; + + +/** + * Returns the browser native implementation of the range. Please refrain from + * using this function - if you find you need the range please add wrappers for + * the functionality you need rather than just using the native range. + * @return {Range|TextRange} The browser native range object. + */ +goog.dom.browserrange.AbstractRange.prototype.getBrowserRange = + goog.abstractMethod; + + +/** + * Returns the deepest node in the tree that contains the entire range. + * @return {Node} The deepest node that contains the entire range. + */ +goog.dom.browserrange.AbstractRange.prototype.getContainer = + goog.abstractMethod; + + +/** + * Returns the node the range starts in. + * @return {Node} The element or text node the range starts in. + */ +goog.dom.browserrange.AbstractRange.prototype.getStartNode = + goog.abstractMethod; + + +/** + * Returns the offset into the node the range starts in. + * @return {number} The offset into the node the range starts in. For text + * nodes, this is an offset into the node value. For elements, this is + * an offset into the childNodes array. + */ +goog.dom.browserrange.AbstractRange.prototype.getStartOffset = + goog.abstractMethod; + + +/** + * Returns the node the range ends in. + * @return {Node} The element or text node the range ends in. + */ +goog.dom.browserrange.AbstractRange.prototype.getEndNode = + goog.abstractMethod; + + +/** + * Returns the offset into the node the range ends in. + * @return {number} The offset into the node the range ends in. For text + * nodes, this is an offset into the node value. For elements, this is + * an offset into the childNodes array. + */ +goog.dom.browserrange.AbstractRange.prototype.getEndOffset = + goog.abstractMethod; + + +/** + * Compares one endpoint of this range with the endpoint of another browser + * native range object. + * @param {Range|TextRange} range The browser native range to compare against. + * @param {goog.dom.RangeEndpoint} thisEndpoint The endpoint of this range + * to compare with. + * @param {goog.dom.RangeEndpoint} otherEndpoint The endpoint of the other + * range to compare with. + * @return {number} 0 if the endpoints are equal, negative if this range + * endpoint comes before the other range endpoint, and positive otherwise. + */ +goog.dom.browserrange.AbstractRange.prototype.compareBrowserRangeEndpoints = + goog.abstractMethod; + + +/** + * Tests if this range contains the given range. + * @param {goog.dom.browserrange.AbstractRange} abstractRange The range to test. + * @param {boolean=} opt_allowPartial If not set or _FALSE, the range must be + * entirely contained in the selection for this function to return true. + * @return {boolean} Whether this range contains the given range. + */ +goog.dom.browserrange.AbstractRange.prototype.containsRange = + function(abstractRange, opt_allowPartial) { + // IE sometimes misreports the boundaries for collapsed ranges. So if the + // other range is collapsed, make sure the whole range is contained. This is + // logically equivalent, and works around IE's bug. + var checkPartial = opt_allowPartial && !abstractRange.isCollapsed(); + + var range = abstractRange.getBrowserRange(); + var start = goog.dom.RangeEndpoint.START, end = goog.dom.RangeEndpoint.END; + /** {@preserveTry} */ + try { + if (checkPartial) { + // There are two ways to not overlap. Being before, and being after. + // Before is represented by this.end before range.start: comparison < 0. + // After is represented by this.start after range.end: comparison > 0. + // The below is the negation of not overlapping. + return this.compareBrowserRangeEndpoints(range, end, start) >= 0 && + this.compareBrowserRangeEndpoints(range, start, end) <= 0; + + } else { + // Return true if this range bounds the parameter range from both sides. + return this.compareBrowserRangeEndpoints(range, end, end) >= 0 && + this.compareBrowserRangeEndpoints(range, start, start) <= 0; + } + } catch (e) { + if (!goog.userAgent.IE) { + throw e; + } + // IE sometimes throws exceptions when one range is invalid, i.e. points + // to a node that has been removed from the document. Return _FALSE in this + // case. + return _FALSE; + } +}; + + +/** + * Tests if this range contains the given node. + * @param {Node} node The node to test. + * @param {boolean=} opt_allowPartial If not set or _FALSE, the node must be + * entirely contained in the selection for this function to return true. + * @return {boolean} Whether this range contains the given node. + */ +goog.dom.browserrange.AbstractRange.prototype.containsNode = function(node, + opt_allowPartial) { + return this.containsRange( + goog.dom.browserrange.createRangeFromNodeContents(node), + opt_allowPartial); +}; + + +/** + * Tests if the selection is collapsed - i.e. is just a caret. + * @return {boolean} Whether the range is collapsed. + */ +goog.dom.browserrange.AbstractRange.prototype.isCollapsed = + goog.abstractMethod; + + +/** + * @return {string} The text content of the range. + */ +goog.dom.browserrange.AbstractRange.prototype.getText = + goog.abstractMethod; + + +/** + * Returns the HTML fragment this range selects. This is slow on all browsers. + * @return {string} HTML fragment of the range, does not include context + * containing elements. + */ +goog.dom.browserrange.AbstractRange.prototype.getHtmlFragment = function() { + var output = new goog.string.StringBuffer(); + goog.iter.forEach(this, function(node, ignore, it) { + if (node.nodeType == goog.dom.NodeType.TEXT) { + output.append(goog.string.htmlEscape(node.nodeValue.substring( + it.getStartTextOffset(), it.getEndTextOffset()))); + } else if (node.nodeType == goog.dom.NodeType.ELEMENT) { + if (it.isEndTag()) { + if (goog.dom.canHaveChildren(node)) { + output.append(''); + } + } else { + var shallow = node.cloneNode(_FALSE); + var html = goog.dom.getOuterHtml(shallow); + if (goog.userAgent.IE && node.tagName == goog.dom.TagName.LI) { + // For an LI, IE just returns "
    • " with no closing tag + output.append(html); + } else { + var index = html.lastIndexOf('<'); + output.append(index ? html.substr(0, index) : html); + } + } + } + }, this); + + return output.toString(); +}; + + +/** + * Returns valid HTML for this range. This is fast on IE, and semi-fast on + * other browsers. + * @return {string} Valid HTML of the range, including context containing + * elements. + */ +goog.dom.browserrange.AbstractRange.prototype.getValidHtml = + goog.abstractMethod; + + +/** + * Returns a RangeIterator over the contents of the range. Regardless of the + * direction of the range, the iterator will move in document order. + * @param {boolean=} opt_keys Unused for this iterator. + * @return {goog.dom.RangeIterator} An iterator over tags in the range. + */ +goog.dom.browserrange.AbstractRange.prototype.__iterator__ = function( + opt_keys) { + return new goog.dom.TextRangeIterator(this.getStartNode(), + this.getStartOffset(), this.getEndNode(), this.getEndOffset()); +}; + + +// SELECTION MODIFICATION + + +/** + * Set this range as the selection in its window. + * @param {boolean=} opt_reverse Whether to select the range in reverse, + * if possible. + */ +goog.dom.browserrange.AbstractRange.prototype.select = + goog.abstractMethod; + + +/** + * Removes the contents of the range from the document. As a side effect, the + * selection will be collapsed. The behavior of content removal is normalized + * across browsers. For instance, IE sometimes creates extra text nodes that + * a W3C browser does not. That behavior is corrected for. + */ +goog.dom.browserrange.AbstractRange.prototype.removeContents = + goog.abstractMethod; + + +/** + * Surrounds the text range with the specified element (on Mozilla) or with a + * clone of the specified element (on IE). Returns a reference to the + * surrounding element if the operation was successful; returns null if the + * operation failed. + * @param {Element} element The element with which the selection is to be + * surrounded. + * @return {Element} The surrounding element (same as the argument on Mozilla, + * but not on IE), or null if unsuccessful. + */ +goog.dom.browserrange.AbstractRange.prototype.surroundContents = + goog.abstractMethod; + + +/** + * Inserts a node before (or after) the range. The range may be disrupted + * beyond recovery because of the way this splits nodes. + * @param {Node} node The node to insert. + * @param {boolean} before True to insert before, _FALSE to insert after. + * @return {Node} The node added to the document. This may be different + * than the node parameter because on IE we have to clone it. + */ +goog.dom.browserrange.AbstractRange.prototype.insertNode = + goog.abstractMethod; + + +/** + * Surrounds this range with the two given nodes. The range may be disrupted + * beyond recovery because of the way this splits nodes. + * @param {Element} startNode The node to insert at the start. + * @param {Element} endNode The node to insert at the end. + */ +goog.dom.browserrange.AbstractRange.prototype.surroundWithNodes = + goog.abstractMethod; + + +/** + * Collapses the range to one of its boundary points. + * @param {boolean} toStart Whether to collapse to the start of the range. + */ +goog.dom.browserrange.AbstractRange.prototype.collapse = + goog.abstractMethod; +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Definition of the W3C spec following range wrapper. + * + * DO NOT USE THIS FILE DIRECTLY. Use goog.dom.Range instead. + * + * @author robbyw@google.com (Robby Walker) + * @author ojan@google.com (Ojan Vafai) + * @author jparent@google.com (Julie Parent) + */ + + +goog.provide('goog.dom.browserrange.W3cRange'); + +//goog.require('goog.dom'); +//goog.require('goog.dom.NodeType'); +//goog.require('goog.dom.RangeEndpoint'); +//goog.require('goog.dom.browserrange.AbstractRange'); +//goog.require('goog.string'); + + + +/** + * The constructor for W3C specific browser ranges. + * @param {Range} range The range object. + * @constructor + * @extends {goog.dom.browserrange.AbstractRange} + */ +goog.dom.browserrange.W3cRange = function(range) { + this.range_ = range; +}; +goog.inherits(goog.dom.browserrange.W3cRange, + goog.dom.browserrange.AbstractRange); + + +/** + * Returns a browser range spanning the given node's contents. + * @param {Node} node The node to select. + * @return {Range} A browser range spanning the node's contents. + * @protected + */ +goog.dom.browserrange.W3cRange.getBrowserRangeForNode = function(node) { + var nodeRange = goog.dom.getOwnerDocument(node).createRange(); + + if (node.nodeType == goog.dom.NodeType.TEXT) { + nodeRange.setStart(node, 0); + nodeRange.setEnd(node, node.length); + } else { + if (!goog.dom.browserrange.canContainRangeEndpoint(node)) { + var rangeParent = node.parentNode; + var rangeStartOffset = goog.array.indexOf(rangeParent.childNodes, node); + nodeRange.setStart(rangeParent, rangeStartOffset); + nodeRange.setEnd(rangeParent, rangeStartOffset + 1); + } else { + var tempNode, leaf = node; + while ((tempNode = leaf.firstChild) && + goog.dom.browserrange.canContainRangeEndpoint(tempNode)) { + leaf = tempNode; + } + nodeRange.setStart(leaf, 0); + + leaf = node; + while ((tempNode = leaf.lastChild) && + goog.dom.browserrange.canContainRangeEndpoint(tempNode)) { + leaf = tempNode; + } + nodeRange.setEnd(leaf, leaf.nodeType == goog.dom.NodeType.ELEMENT ? + leaf.childNodes.length : leaf.length); + } + } + + return nodeRange; +}; + + +/** + * Returns a browser range spanning the given nodes. + * @param {Node} startNode The node to start with - should not be a BR. + * @param {number} startOffset The offset within the start node. + * @param {Node} endNode The node to end with - should not be a BR. + * @param {number} endOffset The offset within the end node. + * @return {Range} A browser range spanning the node's contents. + * @protected + */ +goog.dom.browserrange.W3cRange.getBrowserRangeForNodes = function(startNode, + startOffset, endNode, endOffset) { + // Create and return the range. + var nodeRange = goog.dom.getOwnerDocument(startNode).createRange(); + nodeRange.setStart(startNode, startOffset); + nodeRange.setEnd(endNode, endOffset); + return nodeRange; +}; + + +/** + * Creates a range object that selects the given node's text. + * @param {Node} node The node to select. + * @return {goog.dom.browserrange.W3cRange} A Gecko range wrapper object. + */ +goog.dom.browserrange.W3cRange.createFromNodeContents = function(node) { + return new goog.dom.browserrange.W3cRange( + goog.dom.browserrange.W3cRange.getBrowserRangeForNode(node)); +}; + + +/** + * Creates a range object that selects between the given nodes. + * @param {Node} startNode The node to start with. + * @param {number} startOffset The offset within the start node. + * @param {Node} endNode The node to end with. + * @param {number} endOffset The offset within the end node. + * @return {goog.dom.browserrange.W3cRange} A wrapper object. + */ +goog.dom.browserrange.W3cRange.createFromNodes = function(startNode, + startOffset, endNode, endOffset) { + return new goog.dom.browserrange.W3cRange( + goog.dom.browserrange.W3cRange.getBrowserRangeForNodes(startNode, + startOffset, endNode, endOffset)); +}; + + +/** + * @return {goog.dom.browserrange.W3cRange} A clone of this range. + */ +goog.dom.browserrange.W3cRange.prototype.clone = function() { + return new this.constructor(this.range_.cloneRange()); +}; + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.getBrowserRange = function() { + return this.range_; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.getContainer = function() { + return this.range_.commonAncestorContainer; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.getStartNode = function() { + return this.range_.startContainer; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.getStartOffset = function() { + return this.range_.startOffset; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.getEndNode = function() { + return this.range_.endContainer; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.getEndOffset = function() { + return this.range_.endOffset; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.compareBrowserRangeEndpoints = + function(range, thisEndpoint, otherEndpoint) { + return this.range_.compareBoundaryPoints( + otherEndpoint == goog.dom.RangeEndpoint.START ? + (thisEndpoint == goog.dom.RangeEndpoint.START ? + goog.global['Range'].START_TO_START : + goog.global['Range'].START_TO_END) : + (thisEndpoint == goog.dom.RangeEndpoint.START ? + goog.global['Range'].END_TO_START : + goog.global['Range'].END_TO_END), + /** @type {Range} */ (range)); +}; + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.isCollapsed = function() { + return this.range_.collapsed; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.getText = function() { + return this.range_.toString(); +}; + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.getValidHtml = function() { + var div = goog.dom.getDomHelper(this.range_.startContainer).createDom('div'); + div.appendChild(this.range_.cloneContents()); + var result = div.innerHTML; + + if (goog.string.startsWith(result, '<') || + !this.isCollapsed() && !goog.string.contains(result, '<')) { + // We attempt to mimic IE, which returns no containing element when a + // only text nodes are selected, does return the containing element when + // the selection is empty, and does return the element when multiple nodes + // are selected. + return result; + } + + var container = this.getContainer(); + container = container.nodeType == goog.dom.NodeType.ELEMENT ? container : + container.parentNode; + + var html = goog.dom.getOuterHtml( + /** @type {Element} */ (container.cloneNode(_FALSE))); + return html.replace('>', '>' + result); +}; + + +// SELECTION MODIFICATION + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.select = function(reverse) { + var win = goog.dom.getWindow(goog.dom.getOwnerDocument(this.getStartNode())); + this.selectInternal(win.getSelection(), reverse); +}; + + +/** + * Select this range. + * @param {Selection} selection Browser selection object. + * @param {*} reverse Whether to select this range in reverse. + * @protected + */ +goog.dom.browserrange.W3cRange.prototype.selectInternal = function(selection, + reverse) { + // Browser-specific tricks are needed to create reversed selections + // programatically. For this generic W3C codepath, ignore the reverse + // parameter. + selection.removeAllRanges(); + selection.addRange(this.range_); +}; + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.removeContents = function() { + var range = this.range_; + range.extractContents(); + + if (range.startContainer.hasChildNodes()) { + // Remove any now empty nodes surrounding the extracted contents. + var rangeStartContainer = + range.startContainer.childNodes[range.startOffset]; + if (rangeStartContainer) { + var rangePrevious = rangeStartContainer.previousSibling; + + if (goog.dom.getRawTextContent(rangeStartContainer) == '') { + goog.dom.removeNode(rangeStartContainer); + } + + if (rangePrevious && goog.dom.getRawTextContent(rangePrevious) == '') { + goog.dom.removeNode(rangePrevious); + } + } + } +}; + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.surroundContents = function(element) { + this.range_.surroundContents(element); + return element; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.insertNode = function(node, before) { + var range = this.range_.cloneRange(); + range.collapse(before); + range.insertNode(node); + range.detach(); + + return node; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.surroundWithNodes = function( + startNode, endNode) { + var win = goog.dom.getWindow( + goog.dom.getOwnerDocument(this.getStartNode())); + var selectionRange = goog.dom.Range.createFromWindow(win); + if (selectionRange) { + var sNode = selectionRange.getStartNode(); + var eNode = selectionRange.getEndNode(); + var sOffset = selectionRange.getStartOffset(); + var eOffset = selectionRange.getEndOffset(); + } + + var clone1 = this.range_.cloneRange(); + var clone2 = this.range_.cloneRange(); + + clone1.collapse(_FALSE); + clone2.collapse(_TRUE); + + clone1.insertNode(endNode); + clone2.insertNode(startNode); + + clone1.detach(); + clone2.detach(); + + if (selectionRange) { + // There are 4 ways that surroundWithNodes can wreck the saved + // selection object. All of them happen when an inserted node splits + // a text node, and one of the end points of the selection was in the + // latter half of that text node. + // + // Clients of this library should use saveUsingCarets to avoid this + // problem. Unfortunately, saveUsingCarets uses this method, so that's + // not really an option for us. :( We just recompute the offsets. + var isInsertedNode = function(n) { + return n == startNode || n == endNode; + }; + if (sNode.nodeType == goog.dom.NodeType.TEXT) { + while (sOffset > sNode.length) { + sOffset -= sNode.length; + do { + sNode = sNode.nextSibling; + } while (isInsertedNode(sNode)); + } + } + + if (eNode.nodeType == goog.dom.NodeType.TEXT) { + while (eOffset > eNode.length) { + eOffset -= eNode.length; + do { + eNode = eNode.nextSibling; + } while (isInsertedNode(eNode)); + } + } + + goog.dom.Range.createFromNodes( + sNode, /** @type {number} */ (sOffset), + eNode, /** @type {number} */ (eOffset)).select(); + } +}; + + +/** @inheritDoc */ +goog.dom.browserrange.W3cRange.prototype.collapse = function(toStart) { + this.range_.collapse(toStart); +}; +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Definition of the WebKit specific range wrapper. Inherits most + * functionality from W3CRange, but adds exceptions as necessary. + * + * DO NOT USE THIS FILE DIRECTLY. Use goog.dom.Range instead. + * + * @author robbyw@google.com (Robby Walker) + */ + + +goog.provide('goog.dom.browserrange.WebKitRange'); + +//goog.require('goog.dom.RangeEndpoint'); +//goog.require('goog.dom.browserrange.W3cRange'); +//goog.require('goog.userAgent'); + + + +/** + * The constructor for WebKit specific browser ranges. + * @param {Range} range The range object. + * @constructor + * @extends {goog.dom.browserrange.W3cRange} + */ +goog.dom.browserrange.WebKitRange = function(range) { + goog.dom.browserrange.W3cRange.call(this, range); +}; +goog.inherits(goog.dom.browserrange.WebKitRange, + goog.dom.browserrange.W3cRange); + + +/** + * Creates a range object that selects the given node's text. + * @param {Node} node The node to select. + * @return {goog.dom.browserrange.WebKitRange} A WebKit range wrapper object. + */ +goog.dom.browserrange.WebKitRange.createFromNodeContents = function(node) { + return new goog.dom.browserrange.WebKitRange( + goog.dom.browserrange.W3cRange.getBrowserRangeForNode(node)); +}; + + +/** + * Creates a range object that selects between the given nodes. + * @param {Node} startNode The node to start with. + * @param {number} startOffset The offset within the start node. + * @param {Node} endNode The node to end with. + * @param {number} endOffset The offset within the end node. + * @return {goog.dom.browserrange.WebKitRange} A wrapper object. + */ +goog.dom.browserrange.WebKitRange.createFromNodes = function(startNode, + startOffset, endNode, endOffset) { + return new goog.dom.browserrange.WebKitRange( + goog.dom.browserrange.W3cRange.getBrowserRangeForNodes(startNode, + startOffset, endNode, endOffset)); +}; + + +/** @inheritDoc */ +goog.dom.browserrange.WebKitRange.prototype.compareBrowserRangeEndpoints = + function(range, thisEndpoint, otherEndpoint) { + // Webkit pre-528 has some bugs where compareBoundaryPoints() doesn't work the + // way it is supposed to, but if we reverse the sense of two comparisons, + // it works fine. + // https://bugs.webkit.org/show_bug.cgi?id=20738 + if (goog.userAgent.isVersion('528')) { + return (goog.dom.browserrange.WebKitRange.superClass_. + compareBrowserRangeEndpoints.call( + this, range, thisEndpoint, otherEndpoint)); + } + return this.range_.compareBoundaryPoints( + otherEndpoint == goog.dom.RangeEndpoint.START ? + (thisEndpoint == goog.dom.RangeEndpoint.START ? + goog.global['Range'].START_TO_START : + goog.global['Range'].END_TO_START) : // Sense reversed + (thisEndpoint == goog.dom.RangeEndpoint.START ? + goog.global['Range'].START_TO_END : // Sense reversed + goog.global['Range'].END_TO_END), + /** @type {Range} */ (range)); +}; + + +/** @inheritDoc */ +goog.dom.browserrange.WebKitRange.prototype.selectInternal = function( + selection, reversed) { + // Unselect everything. This addresses a bug in Webkit where it sometimes + // caches the old selection. + // https://bugs.webkit.org/show_bug.cgi?id=20117 + selection.removeAllRanges(); + + if (reversed) { + selection.setBaseAndExtent(this.getEndNode(), this.getEndOffset(), + this.getStartNode(), this.getStartOffset()); + } else { + selection.setBaseAndExtent(this.getStartNode(), this.getStartOffset(), + this.getEndNode(), this.getEndOffset()); + } +}; +// Copyright 2008 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Iterator subclass for DOM tree traversal. + * + * @author robbyw@google.com (Robby Walker) + */ + +goog.provide('goog.dom.NodeIterator'); + +//goog.require('goog.dom.TagIterator'); + + + +/** + * A DOM tree traversal iterator. + * + * Starting with the given node, the iterator walks the DOM in order, reporting + * events for each node. The iterator acts as a prefix iterator: + * + *
      + * <div>1<span>2</span>3</div>
      + * 
      + * + * Will return the following nodes: + * + * [div, 1, span, 2, 3] + * + * With the following depths + * + * [1, 1, 2, 2, 1] + * + * Imagining | represents iterator position, the traversal stops at + * each of the following locations: + * + *
      <div>|1|<span>|2|</span>3|</div>
      + * + * The iterator can also be used in reverse mode, which will return the nodes + * and states in the opposite order. The depths will be slightly different + * since, like in normal mode, the depth is computed *after* the last move. + * + * Lastly, it is possible to create an iterator that is unconstrained, meaning + * that it will continue iterating until the end of the document instead of + * until exiting the start node. + * + * @param {Node=} opt_node The start node. Defaults to an empty iterator. + * @param {boolean=} opt_reversed Whether to traverse the tree in reverse. + * @param {boolean=} opt_unconstrained Whether the iterator is not constrained + * to the starting node and its children. + * @param {number=} opt_depth The starting tree depth. + * @constructor + * @extends {goog.dom.TagIterator} + */ +goog.dom.NodeIterator = function(opt_node, opt_reversed, + opt_unconstrained, opt_depth) { + goog.dom.TagIterator.call(this, opt_node, opt_reversed, opt_unconstrained, + _NULL, opt_depth); +}; +goog.inherits(goog.dom.NodeIterator, goog.dom.TagIterator); + + +/** + * Moves to the next position in the DOM tree. + * @return {Node} Returns the next node, or throws a goog.iter.StopIteration + * exception if the end of the iterator's range has been reached. + */ +goog.dom.NodeIterator.prototype.next = function() { + do { + goog.dom.NodeIterator.superClass_.next.call(this); + } while (this.isEndTag()); + + return this.node; +}; +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Definition of the IE browser specific range wrapper. + * + * DO NOT USE THIS FILE DIRECTLY. Use goog.dom.Range instead. + * + * @author robbyw@google.com (Robby Walker) + * @author ojan@google.com (Ojan Vafai) + * @author jparent@google.com (Julie Parent) + */ + + +goog.provide('goog.dom.browserrange.IeRange'); + +//goog.require('goog.array'); +//goog.require('goog.dom'); +//goog.require('goog.dom.NodeIterator'); +//goog.require('goog.dom.NodeType'); +//goog.require('goog.dom.RangeEndpoint'); +//goog.require('goog.dom.TagName'); +//goog.require('goog.dom.browserrange.AbstractRange'); +//goog.require('goog.iter'); +//goog.require('goog.iter.StopIteration'); +//goog.require('goog.string'); + + + +/** + * The constructor for IE specific browser ranges. + * @param {TextRange} range The range object. + * @param {Document} doc The document the range exists in. + * @constructor + * @extends {goog.dom.browserrange.AbstractRange} + */ +goog.dom.browserrange.IeRange = function(range, doc) { + /** + * The browser range object this class wraps. + * @type {TextRange} + * @private + */ + this.range_ = range; + + /** + * The document the range exists in. + * @type {Document} + * @private + */ + this.doc_ = doc; +}; +goog.inherits(goog.dom.browserrange.IeRange, + goog.dom.browserrange.AbstractRange); + + +/** + * Returns a browser range spanning the given node's contents. + * @param {Node} node The node to select. + * @return {TextRange} A browser range spanning the node's contents. + * @private + */ +goog.dom.browserrange.IeRange.getBrowserRangeForNode_ = function(node) { + var nodeRange = goog.dom.getOwnerDocument(node).body.createTextRange(); + if (node.nodeType == goog.dom.NodeType.ELEMENT) { + // Elements are easy. + nodeRange.moveToElementText(node); + // Note(user) : If there are no child nodes of the element, the + // range.htmlText includes the element's outerHTML. The range created above + // is not collapsed, and should be collapsed explicitly. + // Example : node =
      + // But if the node is sth like
      , it shouldnt be collapsed. + if (goog.dom.browserrange.canContainRangeEndpoint(node) && + !node.childNodes.length) { + nodeRange.collapse(_FALSE); + } + } else { + // Text nodes are hard. + // Compute the offset from the nearest element related position. + var offset = 0; + var sibling = node; + while (sibling = sibling.previousSibling) { + var nodeType = sibling.nodeType; + if (nodeType == goog.dom.NodeType.TEXT) { + offset += sibling.length; + } else if (nodeType == goog.dom.NodeType.ELEMENT) { + // Move to the space after this element. + nodeRange.moveToElementText(sibling); + break; + } + } + + if (!sibling) { + nodeRange.moveToElementText(node.parentNode); + } + + nodeRange.collapse(!sibling); + + if (offset) { + nodeRange.move('character', offset); + } + + nodeRange.moveEnd('character', node.length); + } + + return nodeRange; +}; + + +/** + * Returns a browser range spanning the given nodes. + * @param {Node} startNode The node to start with. + * @param {number} startOffset The offset within the start node. + * @param {Node} endNode The node to end with. + * @param {number} endOffset The offset within the end node. + * @return {TextRange} A browser range spanning the node's contents. + * @private + */ +goog.dom.browserrange.IeRange.getBrowserRangeForNodes_ = function(startNode, + startOffset, endNode, endOffset) { + // Create a range starting at the correct start position. + var child, collapse = _FALSE; + if (startNode.nodeType == goog.dom.NodeType.ELEMENT) { + child = startNode.childNodes[startOffset]; + collapse = !child; + startNode = child || startNode.lastChild || startNode; + startOffset = 0; + } + var leftRange = goog.dom.browserrange.IeRange. + getBrowserRangeForNode_(startNode); + + // This happens only when startNode is a text node. + if (startOffset) { + leftRange.move('character', startOffset); + } + + + // The range movements in IE are still an approximation to the standard W3C + // behavior, and IE has its trickery when it comes to htmlText and text + // properties of the range. So we short-circuit computation whenever we can. + if (startNode == endNode && startOffset == endOffset) { + leftRange.collapse(_TRUE); + return leftRange; + } + + // This can happen only when the startNode is an element, and there is no node + // at the given offset. We start at the last point inside the startNode in + // that case. + if (collapse) { + leftRange.collapse(_FALSE); + } + + // Create a range that ends at the right position. + collapse = _FALSE; + if (endNode.nodeType == goog.dom.NodeType.ELEMENT) { + child = endNode.childNodes[endOffset]; + endNode = child || endNode.lastChild || endNode; + endOffset = 0; + collapse = !child; + } + var rightRange = goog.dom.browserrange.IeRange. + getBrowserRangeForNode_(endNode); + rightRange.collapse(!collapse); + if (endOffset) { + rightRange.moveEnd('character', endOffset); + } + + // Merge and return. + leftRange.setEndPoint('EndToEnd', rightRange); + return leftRange; +}; + + +/** + * Create a range object that selects the given node's text. + * @param {Node} node The node to select. + * @return {goog.dom.browserrange.IeRange} An IE range wrapper object. + */ +goog.dom.browserrange.IeRange.createFromNodeContents = function(node) { + var range = new goog.dom.browserrange.IeRange( + goog.dom.browserrange.IeRange.getBrowserRangeForNode_(node), + goog.dom.getOwnerDocument(node)); + + if (!goog.dom.browserrange.canContainRangeEndpoint(node)) { + range.startNode_ = range.endNode_ = range.parentNode_ = node.parentNode; + range.startOffset_ = goog.array.indexOf(range.parentNode_.childNodes, node); + range.endOffset_ = range.startOffset_ + 1; + } else { + // Note(user) : Emulate the behavior of W3CRange - Go to deepest possible + // range containers on both edges. It seems W3CRange did this to match the + // IE behavior, and now it is a circle. Changing W3CRange may break clients + // in all sorts of ways. + var tempNode, leaf = node; + while ((tempNode = leaf.firstChild) && + goog.dom.browserrange.canContainRangeEndpoint(tempNode)) { + leaf = tempNode; + } + range.startNode_ = leaf; + range.startOffset_ = 0; + + leaf = node; + while ((tempNode = leaf.lastChild) && + goog.dom.browserrange.canContainRangeEndpoint(tempNode)) { + leaf = tempNode; + } + range.endNode_ = leaf; + range.endOffset_ = leaf.nodeType == goog.dom.NodeType.ELEMENT ? + leaf.childNodes.length : leaf.length; + range.parentNode_ = node; + } + return range; +}; + + +/** + * Static method that returns the proper type of browser range. + * @param {Node} startNode The node to start with. + * @param {number} startOffset The offset within the start node. + * @param {Node} endNode The node to end with. + * @param {number} endOffset The offset within the end node. + * @return {goog.dom.browserrange.AbstractRange} A wrapper object. + */ +goog.dom.browserrange.IeRange.createFromNodes = function(startNode, + startOffset, endNode, endOffset) { + var range = new goog.dom.browserrange.IeRange( + goog.dom.browserrange.IeRange.getBrowserRangeForNodes_(startNode, + startOffset, endNode, endOffset), + goog.dom.getOwnerDocument(startNode)); + range.startNode_ = startNode; + range.startOffset_ = startOffset; + range.endNode_ = endNode; + range.endOffset_ = endOffset; + return range; +}; + + +// Even though goog.dom.TextRange does similar caching to below, keeping these +// caches allows for better performance in the get*Offset methods. + + +/** + * Lazy cache of the node containing the entire selection. + * @type {Node} + * @private + */ +goog.dom.browserrange.IeRange.prototype.parentNode_ = _NULL; + + +/** + * Lazy cache of the node containing the start of the selection. + * @type {Node} + * @private + */ +goog.dom.browserrange.IeRange.prototype.startNode_ = _NULL; + + +/** + * Lazy cache of the node containing the end of the selection. + * @type {Node} + * @private + */ +goog.dom.browserrange.IeRange.prototype.endNode_ = _NULL; + + +/** + * Lazy cache of the offset in startNode_ where this range starts. + * @type {number} + * @private + */ +goog.dom.browserrange.IeRange.prototype.startOffset_ = -1; + + +/** + * Lazy cache of the offset in endNode_ where this range ends. + * @type {number} + * @private + */ +goog.dom.browserrange.IeRange.prototype.endOffset_ = -1; + + +/** + * @return {goog.dom.browserrange.IeRange} A clone of this range. + */ +goog.dom.browserrange.IeRange.prototype.clone = function() { + var range = new goog.dom.browserrange.IeRange( + this.range_.duplicate(), this.doc_); + range.parentNode_ = this.parentNode_; + range.startNode_ = this.startNode_; + range.endNode_ = this.endNode_; + return range; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.getBrowserRange = function() { + return this.range_; +}; + + +/** + * Clears the cached values for containers. + * @private + */ +goog.dom.browserrange.IeRange.prototype.clearCachedValues_ = function() { + this.parentNode_ = this.startNode_ = this.endNode_ = _NULL; + this.startOffset_ = this.endOffset_ = -1; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.getContainer = function() { + if (!this.parentNode_) { + var selectText = this.range_.text; + + // If the selection ends with spaces, we need to remove these to get the + // parent container of only the real contents. This is to get around IE's + // inconsistency where it selects the spaces after a word when you double + // click, but leaves out the spaces during execCommands. + var range = this.range_.duplicate(); + // We can't use goog.string.trimRight, as that will remove other whitespace + // too. + var rightTrimmedSelectText = selectText.replace(/ +$/, ''); + var numSpacesAtEnd = selectText.length - rightTrimmedSelectText.length; + if (numSpacesAtEnd) { + range.moveEnd('character', -numSpacesAtEnd); + } + + // Get the parent node. This should be the end, but alas, it is not. + var parent = range.parentElement(); + + var htmlText = range.htmlText; + var htmlTextLen = goog.string.stripNewlines(htmlText).length; + if (this.isCollapsed() && htmlTextLen > 0) { + return (this.parentNode_ = parent); + } + + // Deal with selection bug where IE thinks one of the selection's children + // is actually the selection's parent. Relies on the assumption that the + // HTML text of the parent container is longer than the length of the + // selection's HTML text. + + // Also note IE will sometimes insert \r and \n whitespace, which should be + // disregarded. Otherwise the loop may run too long and return wrong parent + while (htmlTextLen > goog.string.stripNewlines(parent.outerHTML).length) { + parent = parent.parentNode; + } + + // Deal with IE's selecting the outer tags when you double click + // If the innerText is the same, then we just want the inner node + while (parent.childNodes.length == 1 && + parent.firstChild && // FTDUEDTR-1212 + parent.innerText == goog.dom.browserrange.IeRange.getNodeText_( + parent.firstChild)) { + // A container should be an element which can have children or a text + // node. Elements like IMG, BR, etc. can not be containers. + if (!goog.dom.browserrange.canContainRangeEndpoint(parent.firstChild)) { + break; + } + parent = parent.firstChild; + } + + // If the selection is empty, we may need to do extra work to position it + // properly. + if (selectText.length == 0) { + parent = this.findDeepestContainer_(parent); + } + + this.parentNode_ = parent; + } + + return this.parentNode_; +}; + + +/** + * Helper method to find the deepest parent for this range, starting + * the search from {@code node}, which must contain the range. + * @param {Node} node The node to start the search from. + * @return {Node} The deepest parent for this range. + * @private + */ +goog.dom.browserrange.IeRange.prototype.findDeepestContainer_ = function(node) { + var childNodes = node.childNodes; + for (var i = 0, len = childNodes.length; i < len; i++) { + var child = childNodes[i]; + + if (goog.dom.browserrange.canContainRangeEndpoint(child)) { + var childRange = + goog.dom.browserrange.IeRange.getBrowserRangeForNode_(child); + var start = goog.dom.RangeEndpoint.START; + var end = goog.dom.RangeEndpoint.END; + + // There are two types of erratic nodes where the range over node has + // different htmlText than the node's outerHTML. + // Case 1 - A node with magic   child. In this case : + // nodeRange.htmlText shows   ('

       

      ), while + // node.outerHTML doesn't show the magic node (

      ). + // Case 2 - Empty span. In this case : + // node.outerHTML shows '' + // node.htmlText is just empty string ''. + var isChildRangeErratic = (childRange.htmlText != child.outerHTML); + + // Moreover the inRange comparison fails only when the + var isNativeInRangeErratic = this.isCollapsed() && isChildRangeErratic; + + // In case 2 mentioned above, childRange is also collapsed. So we need to + // compare start of this range with both start and end of child range. + var inChildRange = isNativeInRangeErratic ? + (this.compareBrowserRangeEndpoints(childRange, start, start) >= 0 && + this.compareBrowserRangeEndpoints(childRange, start, end) <= 0) : + this.range_.inRange(childRange); + if (inChildRange) { + return this.findDeepestContainer_(child); + } + } + } + + return node; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.getStartNode = function() { + if (!this.startNode_) { + this.startNode_ = this.getEndpointNode_(goog.dom.RangeEndpoint.START); + if (this.isCollapsed()) { + this.endNode_ = this.startNode_; + } + } + return this.startNode_; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.getStartOffset = function() { + if (this.startOffset_ < 0) { + this.startOffset_ = this.getOffset_(goog.dom.RangeEndpoint.START); + if (this.isCollapsed()) { + this.endOffset_ = this.startOffset_; + } + } + return this.startOffset_; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.getEndNode = function() { + if (this.isCollapsed()) { + return this.getStartNode(); + } + if (!this.endNode_) { + this.endNode_ = this.getEndpointNode_(goog.dom.RangeEndpoint.END); + } + return this.endNode_; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.getEndOffset = function() { + if (this.isCollapsed()) { + return this.getStartOffset(); + } + if (this.endOffset_ < 0) { + this.endOffset_ = this.getOffset_(goog.dom.RangeEndpoint.END); + if (this.isCollapsed()) { + this.startOffset_ = this.endOffset_; + } + } + return this.endOffset_; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.compareBrowserRangeEndpoints = function( + range, thisEndpoint, otherEndpoint) { + return this.range_.compareEndPoints( + (thisEndpoint == goog.dom.RangeEndpoint.START ? 'Start' : 'End') + + 'To' + + (otherEndpoint == goog.dom.RangeEndpoint.START ? 'Start' : 'End'), + range); +}; + + +/** + * Recurses to find the correct node for the given endpoint. + * @param {goog.dom.RangeEndpoint} endpoint The endpoint to get the node for. + * @param {Node=} opt_node Optional node to start the search from. + * @return {Node} The deepest node containing the endpoint. + * @private + */ +goog.dom.browserrange.IeRange.prototype.getEndpointNode_ = function(endpoint, + opt_node) { + + /** @type {Node} */ + var node = opt_node || this.getContainer(); + + // If we're at a leaf in the DOM, we're done. + if (!node || !node.firstChild) { + return node; + } + + var start = goog.dom.RangeEndpoint.START, end = goog.dom.RangeEndpoint.END; + var isStartEndpoint = endpoint == start; + + // Find the first/last child that overlaps the selection. + // NOTE(user) : One of the children can be the magic   node. This + // node will have only nodeType property as valid and accessible. All other + // dom related properties like ownerDocument, parentNode, nextSibling etc + // cause error when accessed. Therefore use the for-loop on childNodes to + // iterate. + for (var j = 0, length = node.childNodes.length; j < length; j++) { + var i = isStartEndpoint ? j : length - j - 1; + var child = node.childNodes[i]; + var childRange; + try { + childRange = goog.dom.browserrange.createRangeFromNodeContents(child); + } catch (e) { + // If the child is the magic   node, then the above will throw + // error. The magic node exists only when editing using keyboard, so can + // not add any unit test. + continue; + } + var ieRange = childRange.getBrowserRange(); + + // Case 1 : Finding end points when this range is collapsed. + // Note that in case of collapsed range, getEnd{Node,Offset} call + // getStart{Node,Offset}. + if (this.isCollapsed()) { + // Handle situations where caret is not in a text node. In such cases, + // the adjacent child won't be a valid range endpoint container. + if (!goog.dom.browserrange.canContainRangeEndpoint(child)) { + // The following handles a scenario like

      [caret]
      , + // where point should be (div, 1). + if (this.compareBrowserRangeEndpoints(ieRange, start, start) == 0) { + this.startOffset_ = this.endOffset_ = i; + return node; + } + } else if (childRange.containsRange(this)) { + // For collapsed range, we should invert the containsRange check with + // childRange. + return this.getEndpointNode_(endpoint, child); + } + + // Case 2 - The first child encountered to have overlap this range is + // contained entirely in this range. + } else if (this.containsRange(childRange)) { + // If it is an element which can not be a range endpoint container, the + // current child offset can be used to deduce the endpoint offset. + if (!goog.dom.browserrange.canContainRangeEndpoint(child)) { + + // Container can't be any deeper, so current node is the container. + if (isStartEndpoint) { + this.startOffset_ = i; + } else { + this.endOffset_ = i + 1; + } + return node; + } + + // If child can contain range endpoints, recurse inside this child. + while(child.childNodes.length == 1) { + child = child.firstChild; + } + return this.getEndpointNode_(endpoint, child); + + // Case 3 - Partial non-adjacency overlap. + } else if (this.compareBrowserRangeEndpoints(ieRange, start, end) < 0 && + this.compareBrowserRangeEndpoints(ieRange, end, start) > 0) { + // If this child overlaps the selection partially, recurse down to find + // the first/last child the next level down that overlaps the selection + // completely. We do not consider edge-adjacency (== 0) as overlap. + + while(child.childNodes.length == 1 && child.firstChild) { + child = child.firstChild; + } + return this.getEndpointNode_(endpoint, child); + } + + } + + // None of the children of this node overlapped the selection, that means + // the selection starts/ends in this node directly. + return node; +}; + + +/** + * Compares one endpoint of this range with the endpoint of a node. + * For internal methods, we should prefer this method to containsNode. + * containsNode has a lot of _FALSE negatives when we're dealing with + * {@code
      } tags. + * + * @param {Node} node The node to compare against. + * @param {goog.dom.RangeEndpoint} thisEndpoint The endpoint of this range + * to compare with. + * @param {goog.dom.RangeEndpoint} otherEndpoint The endpoint of the node + * to compare with. + * @return {number} 0 if the endpoints are equal, negative if this range + * endpoint comes before the other node endpoint, and positive otherwise. + * @private + */ +goog.dom.browserrange.IeRange.prototype.compareNodeEndpoints_ = + function(node, thisEndpoint, otherEndpoint) { + return this.range_.compareEndPoints( + (thisEndpoint == goog.dom.RangeEndpoint.START ? 'Start' : 'End') + + 'To' + + (otherEndpoint == goog.dom.RangeEndpoint.START ? 'Start' : 'End'), + goog.dom.browserrange.createRangeFromNodeContents(node). + getBrowserRange()); +}; + + +/** + * Returns the offset into the start/end container. + * @param {goog.dom.RangeEndpoint} endpoint The endpoint to get the offset for. + * @param {Node=} opt_container The container to get the offset relative to. + * Defaults to the value returned by getStartNode/getEndNode. + * @return {number} The offset. + * @private + */ +goog.dom.browserrange.IeRange.prototype.getOffset_ = function(endpoint, + opt_container) { + var isStartEndpoint = endpoint == goog.dom.RangeEndpoint.START; + var container = opt_container || + (isStartEndpoint ? this.getStartNode() : this.getEndNode()); + + if (container.nodeType == goog.dom.NodeType.ELEMENT) { + // Find the first/last child that overlaps the selection + var children = container.childNodes; + var len = children.length; + var edge = isStartEndpoint ? 0 : len - 1; + var sign = isStartEndpoint ? 1 : - 1; + + // We find the index in the child array of the endpoint of the selection. + for (var i = edge; i >= 0 && i < len; i += sign) { + var child = children[i]; + // Ignore the child nodes, which could be end point containers. + if (goog.dom.browserrange.canContainRangeEndpoint(child)) { + continue; + } + // Stop looping when we reach the edge of the selection. + var endPointCompare = + this.compareNodeEndpoints_(child, endpoint, endpoint); + if (endPointCompare == 0) { + return isStartEndpoint ? i : i + 1; + } + } + + // When starting from the end in an empty container, we erroneously return + // -1: fix this to return 0. + return i == -1 ? 0 : i; + } else { + // Get a temporary range object. + var range = this.range_.duplicate(); + + // Create a range that selects the entire container. + var nodeRange = goog.dom.browserrange.IeRange.getBrowserRangeForNode_( + container); + + // Now, intersect our range with the container range - this should give us + // the part of our selection that is in the container. + range.setEndPoint(isStartEndpoint ? 'EndToEnd' : 'StartToStart', nodeRange); + + var rangeLength = range.text.length; + return isStartEndpoint ? container.length - rangeLength : rangeLength; + } +}; + + +/** + * Returns the text of the given node. Uses IE specific properties. + * @param {Node} node The node to retrieve the text of. + * @return {string} The node's text. + * @private + */ +goog.dom.browserrange.IeRange.getNodeText_ = function(node) { + return node.nodeType == goog.dom.NodeType.TEXT ? + node.nodeValue : node.innerText; +}; + + +/** + * Tests whether this range is valid (i.e. whether its endpoints are still in + * the document). A range becomes invalid when, after this object was created, + * either one or both of its endpoints are removed from the document. Use of + * an invalid range can lead to runtime errors, particularly in IE. + * @return {boolean} Whether the range is valid. + */ +goog.dom.browserrange.IeRange.prototype.isRangeInDocument = function() { + var range = this.doc_.body.createTextRange(); + range.moveToElementText(this.doc_.body); + + return this.containsRange( + new goog.dom.browserrange.IeRange(range, this.doc_), _TRUE); +}; + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.isCollapsed = function() { + // Note(user) : The earlier implementation used (range.text == ''), but this + // fails when (range.htmlText == '
      ') + // Alternative: this.range_.htmlText == ''; + return this.range_.compareEndPoints('StartToEnd', this.range_) == 0; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.getText = function() { + return this.range_.text; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.getValidHtml = function() { + return this.range_.htmlText; +}; + + +// SELECTION MODIFICATION + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.select = function(opt_reverse) { + // IE doesn't support programmatic reversed selections. + this.range_.select(); +}; + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.removeContents = function() { + if (this.range_.htmlText) { + // Store some before-removal state. + var startNode = this.getStartNode(); + var endNode = this.getEndNode(); + var oldText = this.range_.text; + + // IE sometimes deletes nodes unrelated to the selection. This trick fixes + // that problem most of the time. Even though it looks like a no-op, it is + // somehow changing IE's internal state such that empty unrelated nodes are + // no longer deleted. + var clone = this.range_.duplicate(); + clone.moveStart('character', 1); + clone.moveStart('character', -1); + + // However, sometimes when the range is empty, moving the start back and + // forth ends up changing the range. This indicates a case we need to + // handle manually. + if (clone.text != oldText) { + // Delete all nodes entirely contained in the range. + var iter = new goog.dom.NodeIterator(startNode, _FALSE, _TRUE); + var toDelete = []; + goog.iter.forEach(iter, function(node) { + // Any text node we encounter here is by definition contained entirely + // in the range. + if (node.nodeType != goog.dom.NodeType.TEXT && + this.containsNode(node)) { + toDelete.push(node); + iter.skipTag(); + } + if (node == endNode) { + throw goog.iter.StopIteration; + } + }); + this.collapse(_TRUE); + goog.array.forEach(toDelete, goog.dom.removeNode); + + this.clearCachedValues_(); + return; + } + + // Outside of the unfortunate cases where we have to handle deletion + // manually, we can use the browser's native deletion code. + this.range_ = clone; + this.range_.text = ''; + this.clearCachedValues_(); + + // Unfortunately, when deleting a portion of a single text node, IE creates + // an extra text node unlike other browsers which just change the text in + // the node. We normalize for that behavior here, making IE behave like all + // the other browsers. + var newStartNode = this.getStartNode(); + var newStartOffset = this.getStartOffset(); + /** @preserveTry */ + try { + var sibling = startNode.nextSibling; + if (startNode == endNode && startNode.parentNode && + startNode.nodeType == goog.dom.NodeType.TEXT && + sibling && sibling.nodeType == goog.dom.NodeType.TEXT) { + startNode.nodeValue += sibling.nodeValue; + goog.dom.removeNode(sibling); + + // Make sure to reselect the appropriate position. + this.range_ = goog.dom.browserrange.IeRange.getBrowserRangeForNode_( + newStartNode); + this.range_.move('character', newStartOffset); + this.clearCachedValues_(); + } + } catch (e) { + // IE throws errors on orphaned nodes. + } + } +}; + + +/** + * @param {TextRange} range The range to get a dom helper for. + * @return {goog.dom.DomHelper} A dom helper for the document the range + * resides in. + * @private + */ +goog.dom.browserrange.IeRange.getDomHelper_ = function(range) { + return goog.dom.getDomHelper(range.parentElement()); +}; + + +/** + * Pastes the given element into the given range, returning the resulting + * element. + * @param {TextRange} range The range to paste into. + * @param {Element} element The node to insert a copy of. + * @param {goog.dom.DomHelper=} opt_domHelper DOM helper object for the document + * the range resides in. + * @return {Element} The resulting copy of element. + * @private + */ +goog.dom.browserrange.IeRange.pasteElement_ = function(range, element, + opt_domHelper) { + opt_domHelper = opt_domHelper || goog.dom.browserrange.IeRange.getDomHelper_( + range); + + // Make sure the node has a unique id. + var id; + var originalId = id = element.id; + if (!id) { + id = element.id = goog.string.createUniqueString(); + } + + // Insert (a clone of) the node. + range.pasteHTML(element.outerHTML); + + // Pasting the outerHTML of the modified element into the document creates + // a clone of the element argument. We want to return a reference to the + // clone, not the original. However we need to remove the temporary ID + // first. + element = opt_domHelper.getElement(id); + + // If element is null here, we failed. + if (element) { + if (!originalId) { + element.removeAttribute('id'); + } + } + + return element; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.surroundContents = function(element) { + // Make sure the element is detached from the document. + goog.dom.removeNode(element); + + // IE more or less guarantees that range.htmlText is well-formed & valid. + element.innerHTML = this.range_.htmlText; + element = goog.dom.browserrange.IeRange.pasteElement_(this.range_, element); + + // If element is null here, we failed. + if (element) { + this.range_.moveToElementText(element); + } + + this.clearCachedValues_(); + + return element; +}; + + +/** + * Internal handler for inserting a node. + * @param {TextRange} clone A clone of this range's browser range object. + * @param {Node} node The node to insert. + * @param {boolean} before Whether to insert the node before or after the range. + * @param {goog.dom.DomHelper=} opt_domHelper The dom helper to use. + * @return {Node} The resulting copy of node. + * @private + */ +goog.dom.browserrange.IeRange.insertNode_ = function(clone, node, + before, opt_domHelper) { + // Get a DOM helper. + opt_domHelper = opt_domHelper || goog.dom.browserrange.IeRange.getDomHelper_( + clone); + + // If it's not an element, wrap it in one. + var isNonElement; + if (node.nodeType != goog.dom.NodeType.ELEMENT) { + isNonElement = _TRUE; + node = opt_domHelper.createDom(goog.dom.TagName.DIV, _NULL, node); + } + + clone.collapse(before); + node = goog.dom.browserrange.IeRange.pasteElement_(clone, + /** @type {Element} */ (node), opt_domHelper); + + // If we didn't want an element, unwrap the element and return the node. + if (isNonElement) { + // pasteElement_() may have returned a copy of the wrapper div, and the + // node it wraps could also be a new copy. So we must extract that new + // node from the new wrapper. + var newNonElement = node.firstChild; + opt_domHelper.flattenElement(node); + node = newNonElement; + } + + return node; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.insertNode = function(node, before) { + var output = goog.dom.browserrange.IeRange.insertNode_( + this.range_.duplicate(), node, before); + this.clearCachedValues_(); + return output; +}; + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.surroundWithNodes = function( + startNode, endNode) { + var clone1 = this.range_.duplicate(); + var clone2 = this.range_.duplicate(); + goog.dom.browserrange.IeRange.insertNode_(clone1, startNode, _TRUE); + goog.dom.browserrange.IeRange.insertNode_(clone2, endNode, _FALSE); + + this.clearCachedValues_(); +}; + + +/** @inheritDoc */ +goog.dom.browserrange.IeRange.prototype.collapse = function(toStart) { + this.range_.collapse(toStart); + + if (toStart) { + this.endNode_ = this.startNode_; + this.endOffset_ = this.startOffset_; + } else { + this.startNode_ = this.endNode_; + this.startOffset_ = this.endOffset_; + } +}; +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Definition of the Gecko specific range wrapper. Inherits most + * functionality from W3CRange, but adds exceptions as necessary. + * + * DO NOT USE THIS FILE DIRECTLY. Use goog.dom.Range instead. + * + * @author robbyw@google.com (Robby Walker) + */ + + +goog.provide('goog.dom.browserrange.GeckoRange'); + +//goog.require('goog.dom.browserrange.W3cRange'); + + + +/** + * The constructor for Gecko specific browser ranges. + * @param {Range} range The range object. + * @constructor + * @extends {goog.dom.browserrange.W3cRange} + */ +goog.dom.browserrange.GeckoRange = function(range) { + goog.dom.browserrange.W3cRange.call(this, range); +}; +goog.inherits(goog.dom.browserrange.GeckoRange, goog.dom.browserrange.W3cRange); + + +/** + * Creates a range object that selects the given node's text. + * @param {Node} node The node to select. + * @return {goog.dom.browserrange.GeckoRange} A Gecko range wrapper object. + */ +goog.dom.browserrange.GeckoRange.createFromNodeContents = function(node) { + return new goog.dom.browserrange.GeckoRange( + goog.dom.browserrange.W3cRange.getBrowserRangeForNode(node)); +}; + + +/** + * Creates a range object that selects between the given nodes. + * @param {Node} startNode The node to start with. + * @param {number} startOffset The offset within the node to start. + * @param {Node} endNode The node to end with. + * @param {number} endOffset The offset within the node to end. + * @return {goog.dom.browserrange.GeckoRange} A wrapper object. + */ +goog.dom.browserrange.GeckoRange.createFromNodes = function(startNode, + startOffset, endNode, endOffset) { + return new goog.dom.browserrange.GeckoRange( + goog.dom.browserrange.W3cRange.getBrowserRangeForNodes(startNode, + startOffset, endNode, endOffset)); +}; + + +/** @inheritDoc */ +goog.dom.browserrange.GeckoRange.prototype.selectInternal = function( + selection, reversed) { + var anchorNode = reversed ? this.getEndNode() : this.getStartNode(); + var anchorOffset = reversed ? this.getEndOffset() : this.getStartOffset(); + var focusNode = reversed ? this.getStartNode() : this.getEndNode(); + var focusOffset = reversed ? this.getStartOffset() : this.getEndOffset(); + + selection.collapse(anchorNode, anchorOffset); + if (anchorNode != focusNode || anchorOffset != focusOffset) { + selection.extend(focusNode, focusOffset); + } +}; +// Copyright 2009 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Definition of the Opera specific range wrapper. Inherits most + * functionality from W3CRange, but adds exceptions as necessary. + * + * DO NOT USE THIS FILE DIRECTLY. Use goog.dom.Range instead. + * + */ + + +goog.provide('goog.dom.browserrange.OperaRange'); + +//goog.require('goog.dom.browserrange.W3cRange'); + + + +/** + * The constructor for Opera specific browser ranges. + * @param {Range} range The range object. + * @constructor + * @extends {goog.dom.browserrange.W3cRange} + */ +goog.dom.browserrange.OperaRange = function(range) { + goog.dom.browserrange.W3cRange.call(this, range); +}; +goog.inherits(goog.dom.browserrange.OperaRange, goog.dom.browserrange.W3cRange); + + +/** + * Creates a range object that selects the given node's text. + * @param {Node} node The node to select. + * @return {goog.dom.browserrange.OperaRange} A Opera range wrapper object. + */ +goog.dom.browserrange.OperaRange.createFromNodeContents = function(node) { + return new goog.dom.browserrange.OperaRange( + goog.dom.browserrange.W3cRange.getBrowserRangeForNode(node)); +}; + + +/** + * Creates a range object that selects between the given nodes. + * @param {Node} startNode The node to start with. + * @param {number} startOffset The offset within the node to start. + * @param {Node} endNode The node to end with. + * @param {number} endOffset The offset within the node to end. + * @return {goog.dom.browserrange.OperaRange} A wrapper object. + */ +goog.dom.browserrange.OperaRange.createFromNodes = function(startNode, + startOffset, endNode, endOffset) { + return new goog.dom.browserrange.OperaRange( + goog.dom.browserrange.W3cRange.getBrowserRangeForNodes(startNode, + startOffset, endNode, endOffset)); +}; + + +/** @inheritDoc */ +goog.dom.browserrange.OperaRange.prototype.selectInternal = function( + selection, reversed) { + // Avoid using addRange as we have to removeAllRanges first, which + // blurs editable fields in Opera. + selection.collapse(this.getStartNode(), this.getStartOffset()); + if (this.getEndNode() != this.getStartNode() || + this.getEndOffset() != this.getStartOffset()) { + selection.extend(this.getEndNode(), this.getEndOffset()); + } + // This can happen if the range isn't in an editable field. + if (selection.rangeCount == 0) { + selection.addRange(this.range_); + } +}; +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Definition of the browser range namespace and interface, as + * well as several useful utility functions. + * + * DO NOT USE THIS FILE DIRECTLY. Use goog.dom.Range instead. + * + * @author robbyw@google.com (Robby Walker) + * @author ojan@google.com (Ojan Vafai) + * @author jparent@google.com (Julie Parent) + * + * @supported IE6, IE7, FF1.5+, Safari. + */ + + +goog.provide('goog.dom.browserrange'); +goog.provide('goog.dom.browserrange.Error'); + +//goog.require('goog.dom'); +//goog.require('goog.dom.browserrange.GeckoRange'); +//goog.require('goog.dom.browserrange.IeRange'); +//goog.require('goog.dom.browserrange.OperaRange'); +//goog.require('goog.dom.browserrange.W3cRange'); +//goog.require('goog.dom.browserrange.WebKitRange'); +//goog.require('goog.userAgent'); + + +/** + * Common error constants. + * @enum {string} + */ +goog.dom.browserrange.Error = { + NOT_IMPLEMENTED: 'Not Implemented' +}; + + +// NOTE(robbyw): While it would be nice to eliminate the duplicate switches +// below, doing so uncovers bugs in the JsCompiler in which +// necessary code is stripped out. + + +/** + * Static method that returns the proper type of browser range. + * @param {Range|TextRange} range A browser range object. + * @return {goog.dom.browserrange.AbstractRange} A wrapper object. + */ +goog.dom.browserrange.createRange = function(range) { + if (goog.userAgent.IE && !goog.userAgent.isDocumentMode(9)) { + return new goog.dom.browserrange.IeRange( + /** @type {TextRange} */ (range), + goog.dom.getOwnerDocument(range.parentElement())); + } else if (goog.userAgent.WEBKIT) { + return new goog.dom.browserrange.WebKitRange( + /** @type {Range} */ (range)); + } else if (goog.userAgent.GECKO) { + return new goog.dom.browserrange.GeckoRange( + /** @type {Range} */ (range)); + } else if (goog.userAgent.OPERA) { + return new goog.dom.browserrange.OperaRange( + /** @type {Range} */ (range)); + } else { + // Default other browsers, including Opera, to W3c ranges. + return new goog.dom.browserrange.W3cRange( + /** @type {Range} */ (range)); + } +}; + + +/** + * Static method that returns the proper type of browser range. + * @param {Node} node The node to select. + * @return {goog.dom.browserrange.AbstractRange} A wrapper object. + */ +goog.dom.browserrange.createRangeFromNodeContents = function(node) { + if (goog.userAgent.IE && !goog.userAgent.isDocumentMode(9)) { + return goog.dom.browserrange.IeRange.createFromNodeContents(node); + } else if (goog.userAgent.WEBKIT) { + return goog.dom.browserrange.WebKitRange.createFromNodeContents(node); + } else if (goog.userAgent.GECKO) { + return goog.dom.browserrange.GeckoRange.createFromNodeContents(node); + } else if (goog.userAgent.OPERA) { + return goog.dom.browserrange.OperaRange.createFromNodeContents(node); + } else { + // Default other browsers to W3c ranges. + return goog.dom.browserrange.W3cRange.createFromNodeContents(node); + } +}; + + +/** + * Static method that returns the proper type of browser range. + * @param {Node} startNode The node to start with. + * @param {number} startOffset The offset within the node to start. This is + * either the index into the childNodes array for element startNodes or + * the index into the character array for text startNodes. + * @param {Node} endNode The node to end with. + * @param {number} endOffset The offset within the node to end. This is + * either the index into the childNodes array for element endNodes or + * the index into the character array for text endNodes. + * @return {goog.dom.browserrange.AbstractRange} A wrapper object. + */ +goog.dom.browserrange.createRangeFromNodes = function(startNode, startOffset, + endNode, endOffset) { + if (goog.userAgent.IE && !goog.userAgent.isDocumentMode(9)) { + return goog.dom.browserrange.IeRange.createFromNodes(startNode, startOffset, + endNode, endOffset); + } else if (goog.userAgent.WEBKIT) { + return goog.dom.browserrange.WebKitRange.createFromNodes(startNode, + startOffset, endNode, endOffset); + } else if (goog.userAgent.GECKO) { + return goog.dom.browserrange.GeckoRange.createFromNodes(startNode, + startOffset, endNode, endOffset); + } else if (goog.userAgent.OPERA) { + return goog.dom.browserrange.OperaRange.createFromNodes(startNode, + startOffset, endNode, endOffset); + } else { + // Default other browsers to W3c ranges. + return goog.dom.browserrange.W3cRange.createFromNodes(startNode, + startOffset, endNode, endOffset); + } +}; + + +/** + * Tests whether the given node can contain a range end point. + * @param {Node} node The node to check. + * @return {boolean} Whether the given node can contain a range end point. + */ +goog.dom.browserrange.canContainRangeEndpoint = function(node) { + // NOTE(user, bloom): This is not complete, as divs with style - + // 'display:inline-block' or 'position:absolute' can also not contain range + // endpoints. A more complete check is to see if that element can be partially + // selected (can be container) or not. + return goog.dom.canHaveChildren(node) || + node.nodeType == goog.dom.NodeType.TEXT; +}; +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Utilities for working with text ranges in HTML documents. + * + * @author robbyw@google.com (Robby Walker) + * @author ojan@google.com (Ojan Vafai) + * @author jparent@google.com (Julie Parent) + */ + + +goog.provide('goog.dom.TextRange'); + +//goog.require('goog.array'); +//goog.require('goog.dom'); +//goog.require('goog.dom.AbstractRange'); +//goog.require('goog.dom.RangeType'); +//goog.require('goog.dom.SavedRange'); +//goog.require('goog.dom.TagName'); +//goog.require('goog.dom.TextRangeIterator'); +//goog.require('goog.dom.browserrange'); +//goog.require('goog.string'); +//goog.require('goog.userAgent'); + + + +/** + * Create a new text selection with no properties. Do not use this constructor: + * use one of the goog.dom.Range.createFrom* methods instead. + * @constructor + * @extends {goog.dom.AbstractRange} + */ +goog.dom.TextRange = function() { +}; +goog.inherits(goog.dom.TextRange, goog.dom.AbstractRange); + + +/** + * Create a new range wrapper from the given browser range object. Do not use + * this method directly - please use goog.dom.Range.createFrom* instead. + * @param {Range|TextRange} range The browser range object. + * @param {boolean=} opt_isReversed Whether the focus node is before the anchor + * node. + * @return {goog.dom.TextRange} A range wrapper object. + */ +goog.dom.TextRange.createFromBrowserRange = function(range, opt_isReversed) { + return goog.dom.TextRange.createFromBrowserRangeWrapper_( + goog.dom.browserrange.createRange(range), opt_isReversed); +}; + + +/** + * Create a new range wrapper from the given browser range wrapper. + * @param {goog.dom.browserrange.AbstractRange} browserRange The browser range + * wrapper. + * @param {boolean=} opt_isReversed Whether the focus node is before the anchor + * node. + * @return {goog.dom.TextRange} A range wrapper object. + * @private + */ +goog.dom.TextRange.createFromBrowserRangeWrapper_ = function(browserRange, + opt_isReversed) { + var range = new goog.dom.TextRange(); + + // Initialize the range as a browser range wrapper type range. + range.browserRangeWrapper_ = browserRange; + range.isReversed_ = !!opt_isReversed; + + return range; +}; + + +/** + * Create a new range wrapper that selects the given node's text. Do not use + * this method directly - please use goog.dom.Range.createFrom* instead. + * @param {Node} node The node to select. + * @param {boolean=} opt_isReversed Whether the focus node is before the anchor + * node. + * @return {goog.dom.TextRange} A range wrapper object. + */ +goog.dom.TextRange.createFromNodeContents = function(node, opt_isReversed) { + return goog.dom.TextRange.createFromBrowserRangeWrapper_( + goog.dom.browserrange.createRangeFromNodeContents(node), + opt_isReversed); +}; + + +/** + * Create a new range wrapper that selects the area between the given nodes, + * accounting for the given offsets. Do not use this method directly - please + * use goog.dom.Range.createFrom* instead. + * @param {Node} anchorNode The node to start with. + * @param {number} anchorOffset The offset within the node to start. + * @param {Node} focusNode The node to end with. + * @param {number} focusOffset The offset within the node to end. + * @return {goog.dom.TextRange} A range wrapper object. + */ +goog.dom.TextRange.createFromNodes = function(anchorNode, anchorOffset, + focusNode, focusOffset) { + var range = new goog.dom.TextRange(); + range.isReversed_ = goog.dom.Range.isReversed(anchorNode, anchorOffset, + focusNode, focusOffset); + + // Avoid selecting BRs directly + if (anchorNode.tagName == 'BR') { + var parent = anchorNode.parentNode; + anchorOffset = goog.array.indexOf(parent.childNodes, anchorNode); + anchorNode = parent; + } + + if (focusNode.tagName == 'BR') { + var parent = focusNode.parentNode; + focusOffset = goog.array.indexOf(parent.childNodes, focusNode); + focusNode = parent; + } + + // Initialize the range as a W3C style range. + if (range.isReversed_) { + range.startNode_ = focusNode; + range.startOffset_ = focusOffset; + range.endNode_ = anchorNode; + range.endOffset_ = anchorOffset; + } else { + range.startNode_ = anchorNode; + range.startOffset_ = anchorOffset; + range.endNode_ = focusNode; + range.endOffset_ = focusOffset; + } + + return range; +}; + + +// Representation 1: a browser range wrapper. + + +/** + * The browser specific range wrapper. This can be null if one of the other + * representations of the range is specified. + * @type {goog.dom.browserrange.AbstractRange?} + * @private + */ +goog.dom.TextRange.prototype.browserRangeWrapper_ = _NULL; + + +// Representation 2: two endpoints specified as nodes + offsets + + +/** + * The start node of the range. This can be null if one of the other + * representations of the range is specified. + * @type {Node} + * @private + */ +goog.dom.TextRange.prototype.startNode_ = _NULL; + + +/** + * The start offset of the range. This can be null if one of the other + * representations of the range is specified. + * @type {?number} + * @private + */ +goog.dom.TextRange.prototype.startOffset_ = _NULL; + + +/** + * The end node of the range. This can be null if one of the other + * representations of the range is specified. + * @type {Node} + * @private + */ +goog.dom.TextRange.prototype.endNode_ = _NULL; + + +/** + * The end offset of the range. This can be null if one of the other + * representations of the range is specified. + * @type {?number} + * @private + */ +goog.dom.TextRange.prototype.endOffset_ = _NULL; + + +/** + * Whether the focus node is before the anchor node. + * @type {boolean} + * @private + */ +goog.dom.TextRange.prototype.isReversed_ = _FALSE; + + +// Method implementations + + +/** + * @return {goog.dom.TextRange} A clone of this range. + */ +goog.dom.TextRange.prototype.clone = function() { + var range = new goog.dom.TextRange(); + range.browserRangeWrapper_ = this.browserRangeWrapper_; + range.startNode_ = this.startNode_; + range.startOffset_ = this.startOffset_; + range.endNode_ = this.endNode_; + range.endOffset_ = this.endOffset_; + range.isReversed_ = this.isReversed_; + + return range; +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.getType = function() { + return goog.dom.RangeType.TEXT; +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.getBrowserRangeObject = function() { + return this.getBrowserRangeWrapper_().getBrowserRange(); +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.setBrowserRangeObject = function(nativeRange) { + // Test if it's a control range by seeing if a control range only method + // exists. + if (goog.dom.AbstractRange.isNativeControlRange(nativeRange)) { + return _FALSE; + } + this.browserRangeWrapper_ = goog.dom.browserrange.createRange( + nativeRange); + this.clearCachedValues_(); + return _TRUE; +}; + + +/** + * Clear all cached values. + * @private + */ +goog.dom.TextRange.prototype.clearCachedValues_ = function() { + this.startNode_ = this.startOffset_ = this.endNode_ = this.endOffset_ = _NULL; +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.getTextRangeCount = function() { + return 1; +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.getTextRange = function(i) { + return this; +}; + + +/** + * @return {goog.dom.browserrange.AbstractRange} The range wrapper object. + * @private + */ +goog.dom.TextRange.prototype.getBrowserRangeWrapper_ = function() { + return this.browserRangeWrapper_ || + (this.browserRangeWrapper_ = goog.dom.browserrange.createRangeFromNodes( + this.getStartNode(), this.getStartOffset(), + this.getEndNode(), this.getEndOffset())); +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.getContainer = function() { + return this.getBrowserRangeWrapper_().getContainer(); +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.getStartNode = function() { + return this.startNode_ || + (this.startNode_ = this.getBrowserRangeWrapper_().getStartNode()); +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.getStartOffset = function() { + return this.startOffset_ != _NULL ? this.startOffset_ : + (this.startOffset_ = this.getBrowserRangeWrapper_().getStartOffset()); +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.getEndNode = function() { + return this.endNode_ || + (this.endNode_ = this.getBrowserRangeWrapper_().getEndNode()); +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.getEndOffset = function() { + return this.endOffset_ != _NULL ? this.endOffset_ : + (this.endOffset_ = this.getBrowserRangeWrapper_().getEndOffset()); +}; + + +/** + * Moves a TextRange to the provided nodes and offsets. + * @param {Node} startNode The node to start with. + * @param {number} startOffset The offset within the node to start. + * @param {Node} endNode The node to end with. + * @param {number} endOffset The offset within the node to end. + * @param {boolean} isReversed Whether the range is reversed. + */ +goog.dom.TextRange.prototype.moveToNodes = function(startNode, startOffset, + endNode, endOffset, + isReversed) { + this.startNode_ = startNode; + this.startOffset_ = startOffset; + this.endNode_ = endNode; + this.endOffset_ = endOffset; + this.isReversed_ = isReversed; + this.browserRangeWrapper_ = _NULL; +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.isReversed = function() { + return this.isReversed_; +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.containsRange = function(otherRange, + opt_allowPartial) { + var otherRangeType = otherRange.getType(); + if (otherRangeType == goog.dom.RangeType.TEXT) { + return this.getBrowserRangeWrapper_().containsRange( + otherRange.getBrowserRangeWrapper_(), opt_allowPartial); + } else if (otherRangeType == goog.dom.RangeType.CONTROL) { + var elements = otherRange.getElements(); + var fn = opt_allowPartial ? goog.array.some : goog.array.every; + return fn(elements, function(el) { + return this.containsNode(el, opt_allowPartial); + }, this); + } + return _FALSE; +}; + + +/** + * Tests if the given node is in a document. + * @param {Node} node The node to check. + * @return {boolean} Whether the given node is in the given document. + */ +goog.dom.TextRange.isAttachedNode = function(node) { + if (goog.userAgent.IE && !goog.userAgent.isDocumentMode(9)) { + var returnValue = _FALSE; + /** @preserveTry */ + try { + returnValue = node.parentNode; + } catch (e) { + // IE sometimes throws Invalid Argument errors when a node is detached. + // Note: trying to return a value from the above try block can cause IE + // to crash. It is necessary to use the local returnValue + } + return !!returnValue; + } else { + return goog.dom.contains(node.ownerDocument.body, node); + } +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.isRangeInDocument = function() { + // Ensure any cached nodes are in the document. IE also allows ranges to + // become detached, so we check if the range is still in the document as + // well for IE. + return (!this.startNode_ || + goog.dom.TextRange.isAttachedNode(this.startNode_)) && + (!this.endNode_ || + goog.dom.TextRange.isAttachedNode(this.endNode_)) && + (!(goog.userAgent.IE && !goog.userAgent.isDocumentMode(9)) || + this.getBrowserRangeWrapper_().isRangeInDocument()); +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.isCollapsed = function() { + return this.getBrowserRangeWrapper_().isCollapsed(); +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.getText = function() { + return this.getBrowserRangeWrapper_().getText(); +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.getHtmlFragment = function() { + // TODO(robbyw): Generalize the code in browserrange so it is static and + // just takes an iterator. This would mean we don't always have to create a + // browser range. + return this.getBrowserRangeWrapper_().getHtmlFragment(); +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.getValidHtml = function() { + return this.getBrowserRangeWrapper_().getValidHtml(); +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.getPastableHtml = function() { + // TODO(robbyw): Get any attributes the table or tr has. + + var html = this.getValidHtml(); + + if (html.match(/^\s*
    • '; + } else if (html.match(/^\s*'; + } else if (html.match(/^\s*'; + } else if (html.match(/^\s*', html, ''); + } + + return html; +}; + + +/** + * Returns a TextRangeIterator over the contents of the range. Regardless of + * the direction of the range, the iterator will move in document order. + * @param {boolean=} opt_keys Unused for this iterator. + * @return {goog.dom.TextRangeIterator} An iterator over tags in the range. + */ +goog.dom.TextRange.prototype.__iterator__ = function(opt_keys) { + return new goog.dom.TextRangeIterator(this.getStartNode(), + this.getStartOffset(), this.getEndNode(), this.getEndOffset()); +}; + + +// RANGE ACTIONS + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.select = function() { + this.getBrowserRangeWrapper_().select(this.isReversed_); +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.removeContents = function() { + this.getBrowserRangeWrapper_().removeContents(); + this.clearCachedValues_(); +}; + + +/** + * Surrounds the text range with the specified element (on Mozilla) or with a + * clone of the specified element (on IE). Returns a reference to the + * surrounding element if the operation was successful; returns null if the + * operation failed. + * @param {Element} element The element with which the selection is to be + * surrounded. + * @return {Element} The surrounding element (same as the argument on Mozilla, + * but not on IE), or null if unsuccessful. + */ +goog.dom.TextRange.prototype.surroundContents = function(element) { + var output = this.getBrowserRangeWrapper_().surroundContents(element); + this.clearCachedValues_(); + return output; +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.insertNode = function(node, before) { + var output = this.getBrowserRangeWrapper_().insertNode(node, before); + this.clearCachedValues_(); + return output; +}; + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.surroundWithNodes = function(startNode, endNode) { + this.getBrowserRangeWrapper_().surroundWithNodes(startNode, endNode); + this.clearCachedValues_(); +}; + + +// SAVE/RESTORE + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.saveUsingDom = function() { + return new goog.dom.DomSavedTextRange_(this); +}; + + +// RANGE MODIFICATION + + +/** @inheritDoc */ +goog.dom.TextRange.prototype.collapse = function(toAnchor) { + var toStart = this.isReversed() ? !toAnchor : toAnchor; + + if (this.browserRangeWrapper_) { + this.browserRangeWrapper_.collapse(toStart); + } + + if (toStart) { + this.endNode_ = this.startNode_; + this.endOffset_ = this.startOffset_; + } else { + this.startNode_ = this.endNode_; + this.startOffset_ = this.endOffset_; + } + + // Collapsed ranges can't be reversed + this.isReversed_ = _FALSE; +}; + + +// SAVED RANGE OBJECTS + + + +/** + * A SavedRange implementation using DOM endpoints. + * @param {goog.dom.AbstractRange} range The range to save. + * @constructor + * @extends {goog.dom.SavedRange} + * @private + */ +goog.dom.DomSavedTextRange_ = function(range) { + /** + * The anchor node. + * @type {Node} + * @private + */ + this.anchorNode_ = range.getAnchorNode(); + + /** + * The anchor node offset. + * @type {number} + * @private + */ + this.anchorOffset_ = range.getAnchorOffset(); + + /** + * The focus node. + * @type {Node} + * @private + */ + this.focusNode_ = range.getFocusNode(); + + /** + * The focus node offset. + * @type {number} + * @private + */ + this.focusOffset_ = range.getFocusOffset(); +}; +goog.inherits(goog.dom.DomSavedTextRange_, goog.dom.SavedRange); + + +/** + * @return {goog.dom.AbstractRange} The restored range. + */ +goog.dom.DomSavedTextRange_.prototype.restoreInternal = function() { + return goog.dom.Range.createFromNodes(this.anchorNode_, this.anchorOffset_, + this.focusNode_, this.focusOffset_); +}; + + +/** @inheritDoc */ +goog.dom.DomSavedTextRange_.prototype.disposeInternal = function() { + goog.dom.DomSavedTextRange_.superClass_.disposeInternal.call(this); + + this.anchorNode_ = _NULL; + this.focusNode_ = _NULL; +}; +// Copyright 2008 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Utilities for working with W3C multi-part ranges. + * + * @author robbyw@google.com (Robby Walker) + */ + + +goog.provide('goog.dom.MultiRange'); +goog.provide('goog.dom.MultiRangeIterator'); + +////goog.require('goog.array'); +//goog.require('goog.dom.AbstractMultiRange'); +//goog.require('goog.dom.AbstractRange'); +//goog.require('goog.dom.RangeIterator'); +//goog.require('goog.dom.RangeType'); +//goog.require('goog.dom.SavedRange'); +//goog.require('goog.dom.TextRange'); +//goog.require('goog.iter.StopIteration'); + + + +/** + * Creates a new multi part range with no properties. Do not use this + * constructor: use one of the goog.dom.Range.createFrom* methods instead. + * @constructor + * @extends {goog.dom.AbstractMultiRange} + */ +goog.dom.MultiRange = function() { + /** + * Array of browser sub-ranges comprising this multi-range. + * @type {Array.} + * @private + */ + this.browserRanges_ = []; + + /** + * Lazily initialized array of range objects comprising this multi-range. + * @type {Array.} + * @private + */ + this.ranges_ = []; + + /** + * Lazily computed sorted version of ranges_, sorted by start point. + * @type {Array.?} + * @private + */ + this.sortedRanges_ = _NULL; + + /** + * Lazily computed container node. + * @type {Node} + * @private + */ + this.container_ = _NULL; +}; +goog.inherits(goog.dom.MultiRange, goog.dom.AbstractMultiRange); + + +/** + * Creates a new range wrapper from the given browser selection object. Do not + * use this method directly - please use goog.dom.Range.createFrom* instead. + * @param {Selection} selection The browser selection object. + * @return {goog.dom.MultiRange} A range wrapper object. + */ +goog.dom.MultiRange.createFromBrowserSelection = function(selection) { + var range = new goog.dom.MultiRange(); + for (var i = 0, len = selection.rangeCount; i < len; i++) { + range.browserRanges_.push(selection.getRangeAt(i)); + } + return range; +}; + + +/** + * Creates a new range wrapper from the given browser ranges. Do not + * use this method directly - please use goog.dom.Range.createFrom* instead. + * @param {Array.} browserRanges The browser ranges. + * @return {goog.dom.MultiRange} A range wrapper object. + */ +goog.dom.MultiRange.createFromBrowserRanges = function(browserRanges) { + var range = new goog.dom.MultiRange(); + range.browserRanges_ = goog.array.clone(browserRanges); + return range; +}; + + +/** + * Creates a new range wrapper from the given goog.dom.TextRange objects. Do + * not use this method directly - please use goog.dom.Range.createFrom* instead. + * @param {Array.} textRanges The text range objects. + * @return {goog.dom.MultiRange} A range wrapper object. + */ +goog.dom.MultiRange.createFromTextRanges = function(textRanges) { + var range = new goog.dom.MultiRange(); + range.ranges_ = textRanges; + range.browserRanges_ = textRanges.map(function(range) { // modified + return range.getBrowserRangeObject(); + }); + return range; +}; + +// Method implementations + + +/** + * Clears cached values. Should be called whenever this.browserRanges_ is + * modified. + * @private + */ +goog.dom.MultiRange.prototype.clearCachedValues_ = function() { + this.ranges_ = []; + this.sortedRanges_ = _NULL; + this.container_ = _NULL; +}; + + +/** + * @return {goog.dom.MultiRange} A clone of this range. + */ +goog.dom.MultiRange.prototype.clone = function() { + return goog.dom.MultiRange.createFromBrowserRanges(this.browserRanges_); +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.getType = function() { + return goog.dom.RangeType.MULTI; +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.getBrowserRangeObject = function() { + // NOTE(robbyw): This method does not make sense for multi-ranges. + return this.browserRanges_[0]; +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.setBrowserRangeObject = function(nativeRange) { + // TODO(robbyw): Look in to adding setBrowserSelectionObject. + return _FALSE; +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.getTextRangeCount = function() { + return this.browserRanges_.length; +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.getTextRange = function(i) { + if (!this.ranges_[i]) { + this.ranges_[i] = goog.dom.TextRange.createFromBrowserRange( + this.browserRanges_[i]); + } + return this.ranges_[i]; +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.getContainer = function() { + if (!this.container_) { + var nodes = []; + for (var i = 0, len = this.getTextRangeCount(); i < len; i++) { + nodes.push(this.getTextRange(i).getContainer()); + } + this.container_ = goog.dom.findCommonAncestor.apply(_NULL, nodes); + } + return this.container_; +}; + + +/** + * @return {Array.} An array of sub-ranges, sorted by start + * point. + */ +goog.dom.MultiRange.prototype.getSortedRanges = function() { + if (!this.sortedRanges_) { + this.sortedRanges_ = this.getTextRanges(); + this.sortedRanges_.sort(function(a, b) { + var aStartNode = a.getStartNode(); + var aStartOffset = a.getStartOffset(); + var bStartNode = b.getStartNode(); + var bStartOffset = b.getStartOffset(); + + if (aStartNode == bStartNode && aStartOffset == bStartOffset) { + return 0; + } + + return goog.dom.Range.isReversed(aStartNode, aStartOffset, bStartNode, + bStartOffset) ? 1 : -1; + }); + } + return this.sortedRanges_; +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.getStartNode = function() { + return this.getSortedRanges()[0].getStartNode(); +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.getStartOffset = function() { + return this.getSortedRanges()[0].getStartOffset(); +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.getEndNode = function() { + // NOTE(robbyw): This may return the wrong node if any subranges overlap. + return this.getSortedRanges().last().getEndNode(); // modified +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.getEndOffset = function() { + // NOTE(robbyw): This may return the wrong value if any subranges overlap. + return this.getSortedRanges().last().getEndOffset(); // modified +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.isRangeInDocument = function() { + return this.getTextRanges().every(function(range) { // modified + return range.isRangeInDocument(); + }); +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.isCollapsed = function() { + return this.browserRanges_.length == 0 || + this.browserRanges_.length == 1 && this.getTextRange(0).isCollapsed(); +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.getText = function() { + return this.getTextRanges().map(function(range) { // modified + return range.getText(); + }).join(''); +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.getHtmlFragment = function() { + return this.getValidHtml(); +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.getValidHtml = function() { + // NOTE(robbyw): This does not behave well if the sub-ranges overlap. + return this.getTextRanges().map(function(range) { // modified + return range.getValidHtml(); + }).join(''); +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.getPastableHtml = function() { + // TODO(robbyw): This should probably do something smart like group TR and TD + // selections in to the same table. + return this.getValidHtml(); +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.__iterator__ = function(opt_keys) { + return new goog.dom.MultiRangeIterator(this); +}; + + +// RANGE ACTIONS + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.select = function() { + var selection = goog.dom.AbstractRange.getBrowserSelectionForWindow( + this.getWindow()); + selection.removeAllRanges(); + for (var i = 0, len = this.getTextRangeCount(); i < len; i++) { + selection.addRange(this.getTextRange(i).getBrowserRangeObject()); + } +}; + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.removeContents = function() { + this.getTextRanges().each(function(range) { // modified + range.removeContents(); + }); +}; + + +// SAVE/RESTORE + + +/** @inheritDoc */ +goog.dom.MultiRange.prototype.saveUsingDom = function() { + return new goog.dom.DomSavedMultiRange_(this); +}; + + +// RANGE MODIFICATION + + +/** + * Collapses this range to a single point, either the first or last point + * depending on the parameter. This will result in the number of ranges in this + * multi range becoming 1. + * @param {boolean} toAnchor Whether to collapse to the anchor. + */ +goog.dom.MultiRange.prototype.collapse = function(toAnchor) { + if (!this.isCollapsed()) { + var range = toAnchor ? this.getTextRange(0) : this.getTextRange( + this.getTextRangeCount() - 1); + + this.clearCachedValues_(); + range.collapse(toAnchor); + this.ranges_ = [range]; + this.sortedRanges_ = [range]; + this.browserRanges_ = [range.getBrowserRangeObject()]; + } +}; + + +// SAVED RANGE OBJECTS + + + +/** + * A SavedRange implementation using DOM endpoints. + * @param {goog.dom.MultiRange} range The range to save. + * @constructor + * @extends {goog.dom.SavedRange} + * @private + */ +goog.dom.DomSavedMultiRange_ = function(range) { + /** + * Array of saved ranges. + * @type {Array.} + * @private + */ + this.savedRanges_ = range.getTextRanges().map(function(range) { // modified + return range.saveUsingDom(); + }); +}; +goog.inherits(goog.dom.DomSavedMultiRange_, goog.dom.SavedRange); + + +/** + * @return {goog.dom.MultiRange} The restored range. + */ +goog.dom.DomSavedMultiRange_.prototype.restoreInternal = function() { + var ranges = this.savedRanges_.map(function(savedRange) { // modified + return savedRange.restore(); + }); + return goog.dom.MultiRange.createFromTextRanges(ranges); +}; + + +/** @inheritDoc */ +goog.dom.DomSavedMultiRange_.prototype.disposeInternal = function() { + goog.dom.DomSavedMultiRange_.superClass_.disposeInternal.call(this); + + this.savedRanges_.map(function(savedRange) { // modified + savedRange.dispose(); + }); + delete this.savedRanges_; +}; + + +// RANGE ITERATION + + + +/** + * Subclass of goog.dom.TagIterator that iterates over a DOM range. It + * adds functions to determine the portion of each text node that is selected. + * + * @param {goog.dom.MultiRange} range The range to traverse. + * @constructor + * @extends {goog.dom.RangeIterator} + */ +goog.dom.MultiRangeIterator = function(range) { + if (range) { + this.iterators_ = range.getSortedRanges().map( + function(r) { + return goog.iter.toIterator(r); + }); + } + + goog.dom.RangeIterator.call( + this, range ? this.getStartNode() : _NULL, _FALSE); +}; +goog.inherits(goog.dom.MultiRangeIterator, goog.dom.RangeIterator); + + +/** + * The list of range iterators left to traverse. + * @type {Array.?} + * @private + */ +goog.dom.MultiRangeIterator.prototype.iterators_ = _NULL; + + +/** + * The index of the current sub-iterator being traversed. + * @type {number} + * @private + */ +goog.dom.MultiRangeIterator.prototype.currentIdx_ = 0; + + +/** @inheritDoc */ +goog.dom.MultiRangeIterator.prototype.getStartTextOffset = function() { + return this.iterators_[this.currentIdx_].getStartTextOffset(); +}; + + +/** @inheritDoc */ +goog.dom.MultiRangeIterator.prototype.getEndTextOffset = function() { + return this.iterators_[this.currentIdx_].getEndTextOffset(); +}; + + +/** @inheritDoc */ +goog.dom.MultiRangeIterator.prototype.getStartNode = function() { + return this.iterators_[0].getStartNode(); +}; + + +/** @inheritDoc */ +goog.dom.MultiRangeIterator.prototype.getEndNode = function() { + return this.iterators_.last().getEndNode(); +}; + + +/** @inheritDoc */ +goog.dom.MultiRangeIterator.prototype.isLast = function() { + return this.iterators_[this.currentIdx_].isLast(); +}; + + +/** @inheritDoc */ +goog.dom.MultiRangeIterator.prototype.next = function() { + /** @preserveTry */ + try { + var it = this.iterators_[this.currentIdx_]; + var next = it.next(); + this.setPosition(it.node, it.tagType, it.depth); + return next; + } catch (ex) { + if (ex !== goog.iter.StopIteration || + this.iterators_.length - 1 == this.currentIdx_) { + throw ex; + } else { + // In case we got a StopIteration, increment counter and try again. + this.currentIdx_++; + return this.next(); + } + } +}; + + +/** + * Replaces this iterator's values with values from another. + * @param {goog.dom.MultiRangeIterator} other The iterator to copy. + * @protected + */ +goog.dom.MultiRangeIterator.prototype.copyFrom = function(other) { + this.iterators_ = goog.array.clone(other.iterators_); + goog.dom.MultiRangeIterator.superClass_.copyFrom.call(this, other); +}; + + +/** + * @return {goog.dom.MultiRangeIterator} An identical iterator. + */ +goog.dom.MultiRangeIterator.prototype.clone = function() { + var copy = new goog.dom.MultiRangeIterator(_NULL); + copy.copyFrom(this); + return copy; +}; +// Copyright 2008 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Utilities for working with IE control ranges. + * + * @author robbyw@google.com (Robby Walker) + * @author jparent@google.com (Julie Parent) + */ + + +goog.provide('goog.dom.ControlRange'); +goog.provide('goog.dom.ControlRangeIterator'); + +//goog.require('goog.dom'); +//goog.require('goog.dom.AbstractMultiRange'); +//goog.require('goog.dom.AbstractRange'); +//goog.require('goog.dom.RangeIterator'); +//goog.require('goog.dom.RangeType'); +//goog.require('goog.dom.SavedRange'); +//goog.require('goog.dom.TagWalkType'); +//goog.require('goog.dom.TextRange'); +//goog.require('goog.iter.StopIteration'); +//goog.require('goog.userAgent'); + + + +/** + * Create a new control selection with no properties. Do not use this + * constructor: use one of the goog.dom.Range.createFrom* methods instead. + * @constructor + * @extends {goog.dom.AbstractMultiRange} + */ +goog.dom.ControlRange = function() { +}; +goog.inherits(goog.dom.ControlRange, goog.dom.AbstractMultiRange); + + +/** + * Create a new range wrapper from the given browser range object. Do not use + * this method directly - please use goog.dom.Range.createFrom* instead. + * @param {Object} controlRange The browser range object. + * @return {goog.dom.ControlRange} A range wrapper object. + */ +goog.dom.ControlRange.createFromBrowserRange = function(controlRange) { + var range = new goog.dom.ControlRange(); + range.range_ = controlRange; + return range; +}; + + +/** + * Create a new range wrapper that selects the given element. Do not use + * this method directly - please use goog.dom.Range.createFrom* instead. + * @param {...Element} var_args The element(s) to select. + * @return {goog.dom.ControlRange} A range wrapper object. + */ +goog.dom.ControlRange.createFromElements = function(var_args) { + var range = goog.dom.getOwnerDocument(arguments[0]).body.createControlRange(); + for (var i = 0, len = arguments.length; i < len; i++) { + range.addElement(arguments[i]); + } + return goog.dom.ControlRange.createFromBrowserRange(range); +}; + + +/** + * The IE control range obejct. + * @type {Object} + * @private + */ +goog.dom.ControlRange.prototype.range_ = _NULL; + + +/** + * Cached list of elements. + * @type {Array.?} + * @private + */ +goog.dom.ControlRange.prototype.elements_ = _NULL; + + +/** + * Cached sorted list of elements. + * @type {Array.?} + * @private + */ +goog.dom.ControlRange.prototype.sortedElements_ = _NULL; + + +// Method implementations + + +/** + * Clear cached values. + * @private + */ +goog.dom.ControlRange.prototype.clearCachedValues_ = function() { + this.elements_ = _NULL; + this.sortedElements_ = _NULL; +}; + + +/** + * @return {goog.dom.ControlRange} A clone of this range. + */ +goog.dom.ControlRange.prototype.clone = function() { + return goog.dom.ControlRange.createFromElements.apply(this, + this.getElements()); +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.getType = function() { + return goog.dom.RangeType.CONTROL; +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.getBrowserRangeObject = function() { + return this.range_ || _DOC.body.createControlRange(); +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.setBrowserRangeObject = function(nativeRange) { + if (!goog.dom.AbstractRange.isNativeControlRange(nativeRange)) { + return _FALSE; + } + this.range_ = nativeRange; + return _TRUE; +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.getTextRangeCount = function() { + return this.range_ ? this.range_.length : 0; +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.getTextRange = function(i) { + return goog.dom.TextRange.createFromNodeContents(this.range_.item(i)); +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.getContainer = function() { + return goog.dom.findCommonAncestor.apply(_NULL, this.getElements()); +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.getStartNode = function() { + return this.getSortedElements()[0]; +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.getStartOffset = function() { + return 0; +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.getEndNode = function() { + var sorted = this.getSortedElements(); + var startsLast = /** @type {Node} */ (sorted.last()); // modified + return /** @type {Node} */ (sorted.find(function(el) { + return goog.dom.contains(el, startsLast); + })); +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.getEndOffset = function() { + return this.getEndNode().childNodes.length; +}; + + +// TODO(robbyw): Figure out how to unify getElements with TextRange API. +/** + * @return {Array.} Array of elements in the control range. + */ +goog.dom.ControlRange.prototype.getElements = function() { + if (!this.elements_) { + this.elements_ = []; + if (this.range_) { + for (var i = 0; i < this.range_.length; i++) { + this.elements_.push(this.range_.item(i)); + } + } + } + + return this.elements_; +}; + + +/** + * @return {Array.} Array of elements comprising the control range, + * sorted by document order. + */ +goog.dom.ControlRange.prototype.getSortedElements = function() { + if (!this.sortedElements_) { + this.sortedElements_ = this.getElements().concat(); + this.sortedElements_.sort(function(a, b) { + return a.sourceIndex - b.sourceIndex; + }); + } + + return this.sortedElements_; +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.isRangeInDocument = function() { + var returnValue = _FALSE; + + try { + returnValue = this.getElements().every(function(element) { // modified + // On IE, this throws an exception when the range is detached. + return goog.userAgent.IE ? + element.parentNode : + goog.dom.contains(element.ownerDocument.body, element); + }); + } catch (e) { + // IE sometimes throws Invalid Argument errors for detached elements. + // Note: trying to return a value from the above try block can cause IE + // to crash. It is necessary to use the local returnValue. + } + + return returnValue; +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.isCollapsed = function() { + return !this.range_ || !this.range_.length; +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.getText = function() { + // TODO(robbyw): What about for table selections? Should those have text? + return ''; +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.getHtmlFragment = function() { + return this.getSortedElements().map(goog.dom.getOuterHtml). // modified + join(''); +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.getValidHtml = function() { + return this.getHtmlFragment(); +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.getPastableHtml = + goog.dom.ControlRange.prototype.getValidHtml; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.__iterator__ = function(opt_keys) { + return new goog.dom.ControlRangeIterator(this); +}; + + +// RANGE ACTIONS + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.select = function() { + if (this.range_) { + this.range_.select(); + } +}; + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.removeContents = function() { + // TODO(robbyw): Test implementing with execCommand('Delete') + if (this.range_) { + var nodes = []; + for (var i = 0, len = this.range_.length; i < len; i++) { + nodes.push(this.range_.item(i)); + } + nodes.each(goog.dom.removeNode); // modified + + this.collapse(_FALSE); + } +}; + + +// SAVE/RESTORE + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.saveUsingDom = function() { + return new goog.dom.DomSavedControlRange_(this); +}; + + +// RANGE MODIFICATION + + +/** @inheritDoc */ +goog.dom.ControlRange.prototype.collapse = function(toAnchor) { + // TODO(robbyw): Should this return a text range? If so, API needs to change. + this.range_ = _NULL; + this.clearCachedValues_(); +}; + + +// SAVED RANGE OBJECTS + + + +/** + * A SavedRange implementation using DOM endpoints. + * @param {goog.dom.ControlRange} range The range to save. + * @constructor + * @extends {goog.dom.SavedRange} + * @private + */ +goog.dom.DomSavedControlRange_ = function(range) { + /** + * The element list. + * @type {Array.} + * @private + */ + this.elements_ = range.getElements(); +}; +goog.inherits(goog.dom.DomSavedControlRange_, goog.dom.SavedRange); + + +/** + * @return {goog.dom.ControlRange} The restored range. + */ +goog.dom.DomSavedControlRange_.prototype.restoreInternal = function() { + var doc = this.elements_.length ? + goog.dom.getOwnerDocument(this.elements_[0]) : document; + var controlRange = doc.body.createControlRange(); + for (var i = 0, len = this.elements_.length; i < len; i++) { + controlRange.addElement(this.elements_[i]); + } + return goog.dom.ControlRange.createFromBrowserRange(controlRange); +}; + + +/** @inheritDoc */ +goog.dom.DomSavedControlRange_.prototype.disposeInternal = function() { + goog.dom.DomSavedControlRange_.superClass_.disposeInternal.call(this); + delete this.elements_; +}; + + +// RANGE ITERATION + + + +/** + * Subclass of goog.dom.TagIterator that iterates over a DOM range. It + * adds functions to determine the portion of each text node that is selected. + * + * @param {goog.dom.ControlRange?} range The range to traverse. + * @constructor + * @extends {goog.dom.RangeIterator} + */ +goog.dom.ControlRangeIterator = function(range) { + if (range) { + this.elements_ = range.getSortedElements(); + this.startNode_ = this.elements_.shift(); + this.endNode_ = /** @type {Node} */ (this.elements_.last()) || // modified + this.startNode_; + } + + goog.dom.RangeIterator.call(this, this.startNode_, _FALSE); +}; +goog.inherits(goog.dom.ControlRangeIterator, goog.dom.RangeIterator); + + +/** + * The first node in the selection. + * @type {Node} + * @private + */ +goog.dom.ControlRangeIterator.prototype.startNode_ = _NULL; + + +/** + * The last node in the selection. + * @type {Node} + * @private + */ +goog.dom.ControlRangeIterator.prototype.endNode_ = _NULL; + + +/** + * The list of elements left to traverse. + * @type {Array.?} + * @private + */ +goog.dom.ControlRangeIterator.prototype.elements_ = _NULL; + + +/** @inheritDoc */ +goog.dom.ControlRangeIterator.prototype.getStartTextOffset = function() { + return 0; +}; + + +/** @inheritDoc */ +goog.dom.ControlRangeIterator.prototype.getEndTextOffset = function() { + return 0; +}; + + +/** @inheritDoc */ +goog.dom.ControlRangeIterator.prototype.getStartNode = function() { + return this.startNode_; +}; + + +/** @inheritDoc */ +goog.dom.ControlRangeIterator.prototype.getEndNode = function() { + return this.endNode_; +}; + + +/** @inheritDoc */ +goog.dom.ControlRangeIterator.prototype.isLast = function() { + return !this.depth && !this.elements_.length; +}; + + +/** + * Move to the next position in the selection. + * Throws {@code goog.iter.StopIteration} when it passes the end of the range. + * @return {Node} The node at the next position. + */ +goog.dom.ControlRangeIterator.prototype.next = function() { + // Iterate over each element in the range, and all of its children. + if (this.isLast()) { + throw goog.iter.StopIteration; + } else if (!this.depth) { + var el = this.elements_.shift(); + this.setPosition(el, + goog.dom.TagWalkType.START_TAG, + goog.dom.TagWalkType.START_TAG); + return el; + } + + // Call the super function. + return goog.dom.ControlRangeIterator.superClass_.next.call(this); +}; + + +/** + * Replace this iterator's values with values from another. + * @param {goog.dom.ControlRangeIterator} other The iterator to copy. + * @protected + */ +goog.dom.ControlRangeIterator.prototype.copyFrom = function(other) { + this.elements_ = other.elements_; + this.startNode_ = other.startNode_; + this.endNode_ = other.endNode_; + + goog.dom.ControlRangeIterator.superClass_.copyFrom.call(this, other); +}; + + +/** + * @return {goog.dom.ControlRangeIterator} An identical iterator. + */ +goog.dom.ControlRangeIterator.prototype.clone = function() { + var copy = new goog.dom.ControlRangeIterator(_NULL); + copy.copyFrom(this); + return copy; +}; +// Copyright 2007 The Closure Library Authors. All Rights Reserved. +// +// 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. + +/** + * @fileoverview Utilities for working with ranges in HTML documents. + * + * @author robbyw@google.com (Robby Walker) + * @author ojan@google.com (Ojan Vafai) + * @author jparent@google.com (Julie Parent) + */ + +goog.provide('goog.dom.Range'); + +//goog.require('goog.dom'); +//goog.require('goog.dom.AbstractRange'); +//goog.require('goog.dom.ControlRange'); +//goog.require('goog.dom.MultiRange'); +//goog.require('goog.dom.NodeType'); +//goog.require('goog.dom.TextRange'); +//goog.require('goog.userAgent'); + + +/** + * Create a new selection from the given browser window's current selection. + * Note that this object does not auto-update if the user changes their + * selection and should be used as a snapshot. + * @param {Window=} opt_win The window to get the selection of. Defaults to the + * window this class was defined in. + * @return {goog.dom.AbstractRange?} A range wrapper object, or null if there + * was an error. + */ +goog.dom.Range.createFromWindow = function(opt_win) { + var sel = goog.dom.AbstractRange.getBrowserSelectionForWindow( + opt_win || window); + return sel && goog.dom.Range.createFromBrowserSelection(sel); +}; + + +/** + * Create a new range wrapper from the given browser selection object. Note + * that this object does not auto-update if the user changes their selection and + * should be used as a snapshot. + * @param {!Object} selection The browser selection object. + * @return {goog.dom.AbstractRange?} A range wrapper object or null if there + * was an error. + */ +goog.dom.Range.createFromBrowserSelection = function(selection) { + var range; + var isReversed = _FALSE; + if (selection.createRange) { + /** @preserveTry */ + try { + range = selection.createRange(); + } catch (e) { + // Access denied errors can be thrown here in IE if the selection was + // a flash obj or if there are cross domain issues + return _NULL; + } + } else if (selection.rangeCount) { + if (selection.rangeCount > 1) { + return goog.dom.MultiRange.createFromBrowserSelection( + /** @type {Selection} */ (selection)); + } else { + range = selection.getRangeAt(0); + isReversed = goog.dom.Range.isReversed(selection.anchorNode, + selection.anchorOffset, selection.focusNode, selection.focusOffset); + } + } else { + return _NULL; + } + + return goog.dom.Range.createFromBrowserRange(range, isReversed); +}; + + +/** + * Create a new range wrapper from the given browser range object. + * @param {Range|TextRange} range The browser range object. + * @param {boolean=} opt_isReversed Whether the focus node is before the anchor + * node. + * @return {goog.dom.AbstractRange} A range wrapper object. + */ +goog.dom.Range.createFromBrowserRange = function(range, opt_isReversed) { + // Create an IE control range when appropriate. + return goog.dom.AbstractRange.isNativeControlRange(range) ? + goog.dom.ControlRange.createFromBrowserRange(range) : + goog.dom.TextRange.createFromBrowserRange(range, opt_isReversed); +}; + + +/** + * Create a new range wrapper that selects the given node's text. + * @param {Node} node The node to select. + * @param {boolean=} opt_isReversed Whether the focus node is before the anchor + * node. + * @return {goog.dom.AbstractRange} A range wrapper object. + */ +goog.dom.Range.createFromNodeContents = function(node, opt_isReversed) { + return goog.dom.TextRange.createFromNodeContents(node, opt_isReversed); +}; + + +/** + * Create a new range wrapper that represents a caret at the given node, + * accounting for the given offset. This always creates a TextRange, regardless + * of whether node is an image node or other control range type node. + * @param {Node} node The node to place a caret at. + * @param {number} offset The offset within the node to place the caret at. + * @return {goog.dom.AbstractRange} A range wrapper object. + */ +goog.dom.Range.createCaret = function(node, offset) { + return goog.dom.TextRange.createFromNodes(node, offset, node, offset); +}; + + +/** + * Create a new range wrapper that selects the area between the given nodes, + * accounting for the given offsets. + * @param {Node} startNode The node to start with. + * @param {number} startOffset The offset within the node to start. + * @param {Node} endNode The node to end with. + * @param {number} endOffset The offset within the node to end. + * @return {goog.dom.AbstractRange} A range wrapper object. + */ +goog.dom.Range.createFromNodes = function(startNode, startOffset, endNode, + endOffset) { + return goog.dom.TextRange.createFromNodes(startNode, startOffset, endNode, + endOffset); +}; + + +/** + * Clears the window's selection. + * @param {Window=} opt_win The window to get the selection of. Defaults to the + * window this class was defined in. + */ +goog.dom.Range.clearSelection = function(opt_win) { + var sel = goog.dom.AbstractRange.getBrowserSelectionForWindow( + opt_win || window); + if (!sel) { + return; + } + if (sel.empty) { + // We can't just check that the selection is empty, becuase IE + // sometimes gets confused. + try { + sel.empty(); + } catch (e) { + // Emptying an already empty selection throws an exception in IE + } + } else { + sel.removeAllRanges(); + } +}; + + +/** + * Returns whether the focus position occurs before the anchor position. + * @param {Node} anchorNode The node to start with. + * @param {number} anchorOffset The offset within the node to start. + * @param {Node} focusNode The node to end with. + * @param {number} focusOffset The offset within the node to end. + * @return {boolean} Whether the focus position occurs before the anchor + * position. + */ +goog.dom.Range.isReversed = function(anchorNode, anchorOffset, focusNode, + focusOffset) { + if (anchorNode == focusNode) { + return focusOffset < anchorOffset; + } + var child; + if (anchorNode.nodeType == goog.dom.NodeType.ELEMENT && anchorOffset) { + child = anchorNode.childNodes[anchorOffset]; + if (child) { + anchorNode = child; + anchorOffset = 0; + } else if (goog.dom.contains(anchorNode, focusNode)) { + // If focus node is contained in anchorNode, it must be before the + // end of the node. Hence we are reversed. + return _TRUE; + } + } + if (focusNode.nodeType == goog.dom.NodeType.ELEMENT && focusOffset) { + child = focusNode.childNodes[focusOffset]; + if (child) { + focusNode = child; + focusOffset = 0; + } else if (goog.dom.contains(focusNode, anchorNode)) { + // If anchor node is contained in focusNode, it must be before the + // end of the node. Hence we are not reversed. + return _FALSE; + } + } + return (goog.dom.compareNodeOrder(anchorNode, focusNode) || + anchorOffset - focusOffset) > 0; +}; +goog.provide("export_dep"); + +//goog.require('goog.dom.ControlRange'); +//goog.require('goog.dom.MultiRange'); +//goog.require('goog.dom.Range'); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/lib/dfindy.js b/src/main/webapp/daumeditor/js/lib/dfindy.js new file mode 100644 index 0000000..cdb1233 --- /dev/null +++ b/src/main/webapp/daumeditor/js/lib/dfindy.js @@ -0,0 +1,125 @@ +/** + * DomFindy - Very Very Simple Dom Selector Engine, But find ancestor + * - id : # + * - class : . + * - tag : tagname + */ +(function(){ + var m, el, els; + var filters = { + '#': function(cnxt, expr){ + if ((m = /(\S*)#(\S+)/.exec(expr)) !== _NULL) { + var tag = ((m[1] === "") ? "*" : m[1]); + var id = m[2]; + var _node = cnxt; + while(_node) { + if(_node.nodeName.toLowerCase() == "body") { + break; + } + if (tag == "*" || _node.nodeName.toLowerCase() == tag) { + if (_node.id == id) { + return _node; + } + } + _node = _node.parentNode; + } + } + return _NULL; + }, + '.': function(cnxt, expr){ + if ((m = /(\S*)\.(\S+)/.exec(expr)) !== _NULL) { + var tag = ((m[1] === "") ? "*" : m[1]); + var klass = m[2]; + var _node = cnxt; + while(_node) { + if(_node.nodeName.toLowerCase() == "body") { + break; + } + if (tag == "*" || _node.nodeName.toLowerCase() == tag) { + if (_node.className.indexOf(klass) > -1) { + return _node; + } + } + _node = _node.parentNode; + } + } + return _NULL; + }, + '*': function(cnxt, expr){ + var _node = cnxt; + var map = {}; + var exprs = expr.split(","); + for (var i=0,len=exprs.length; i default document + */ + _WIN.dFindy = function() { + var args = arguments; + if(args.length == 1) { + throw new Error("need more arguments"); + } else if(args.length == 2) { + if(args[0].nodeType && typeof (args[1]) === "string") { + return DomFindy(args[0], args[1]); + } + } + return _NULL; + }; +})(); diff --git a/src/main/webapp/daumeditor/js/lib/dgetty.js b/src/main/webapp/daumeditor/js/lib/dgetty.js new file mode 100644 index 0000000..2a5fbd1 --- /dev/null +++ b/src/main/webapp/daumeditor/js/lib/dgetty.js @@ -0,0 +1,244 @@ +/** + * DomGetty - Very Very Simple Dom Selector Engine + * - id : # + * - class : . + * - tag : tagname + */ +(function(){ + var m, el, els; + var filters = { + '#': function(cnxt, expr){ + if ((m = /(\S*)#(\S+)/.exec(expr)) !== _NULL) { + var tag = m[1]; + var id = m[2]; + if(!cnxt.getElementById) { //ie + cnxt = cnxt.ownerDocument; + } + if (el = cnxt.getElementById(id)) { + if (tag.length < 1 || el.nodeName.toLowerCase() == tag) { + return [el]; + } + } + } + return []; + }, + '.': function(cnxt, expr){ + if ((m = /(\S*)\.(\S+)/.exec(expr)) !== _NULL) { + var tag = ((m[1] === "") ? "*" : m[1]); + var klass = m[2]; + if ((els = cnxt.getElementsByTagName(tag)).length > 0) { + var results = []; + for (var i=0; i 0) { + var results = []; + for (var i=0; i 0) { + mathes = mathes.concat(els); + if(!all) { + break; + } + } + } + if(all) { + return mathes; + } else { + return mathes[0]; + } + }; + + /** + * Get Element By Css Selector + * + * dGetty(element, selector) or dGetty(selector) + * ex) + * dGetty(document, "#wrapper div.article") + * dGetty($tx("#wrapper"), "div.article") + * dGetty("#wrapper div.article") -> default document + */ + _WIN.dGetty = function() { + var args = arguments; + if(args.length == 1) { + if(typeof (args[0]) === "string") { + return DomGetty(_DOC, args[0]); + } + } else if(args.length == 2) { + if(args[0].nodeType && typeof (args[1]) === "string") { + return DomGetty(args[0], args[1]); + } + } + return _NULL; + }; + + /** + * Get Element List By Css Selector + * + * dGetties(element, selector) or dGetties(selector) + * ex) + * dGetties(document, "#wrapper div.article") + * dGetties($tx("#wrapper"), "div.article") + * dGetties("#wrapper div.article") -> default document + */ + _WIN.dGetties = function() { + var args = arguments; + if(args.length == 1) { + if(typeof (args[0]) === "string") { + return DomGetty(_DOC, args[0], _TRUE); + } + } else if(args.length == 2) { + if(args[0].nodeType && typeof (args[1]) === "string") { + return DomGetty(args[0], args[1], _TRUE); + } + } + return []; + }; + +})(); + +/** + * DomChecky - Very Very Simple Dom Check Engine By Selector + * - id : # + * - class : . + * - tag : tagname + */ +(function(){ + var m, el, els; + var filters = { + '#': function(cnxt, expr){ + if ((m = /(\S*)#(\S+)/.exec(expr)) !== _NULL) { + var tag = m[1]; + var id = m[2]; + if (tag.length < 1 || cnxt.nodeName.toLowerCase() == tag) { + if (cnxt.id == id) { + return _TRUE; + } + } + } + return _FALSE; + }, + '.': function(cnxt, expr){ + if ((m = /(\S*)\.(\S+)/.exec(expr)) !== _NULL) { + var tag = m[1]; + var klass = m[2]; + if (tag.length < 1 || cnxt.nodeName.toLowerCase() == tag) { + if (cnxt.className.indexOf(klass) > -1) { + return _TRUE; + } + } + } + return _FALSE; + }, + '*': function(cnxt, expr){ + var tag = expr; + if (cnxt.nodeName.toLowerCase() == tag) { + return _TRUE; + } + return _FALSE; + } + }; + + var check = function(cnxt, expr) { + var fltr; + if ((f = /(\.|#)/.exec(expr)) !== _NULL) { + if (filters[f[1]]) { + fltr = f[1]; + } + } + fltr = fltr || "*"; + return filters[fltr](cnxt, expr); + }; + + var DomChecky = function(context, selector) { + if ( context.nodeType !== 1) { + return _FALSE; + } + + var found = _FALSE; + var exprs = selector.split(","); + for (var i = 0; i < exprs.length; i++) { + found = check(context, exprs[i]); + if(found) { + break; + } + } + return found; + }; + + /** + * Check Element By Css Selector + * @returns boolean + * + * dChecky(element, selector) + * ex) + * dChecky(document, "#wrapper") + */ + _WIN.dChecky = function() { + var args = arguments; + if(args.length == 2) { + if(args[0].nodeType && typeof (args[1]) === "string") { + return DomChecky(args[0], args[1]); + } + } + return _FALSE; + }; + +})(); diff --git a/src/main/webapp/daumeditor/js/lib/font_css_property.js b/src/main/webapp/daumeditor/js/lib/font_css_property.js new file mode 100644 index 0000000..d1d2afa --- /dev/null +++ b/src/main/webapp/daumeditor/js/lib/font_css_property.js @@ -0,0 +1,169 @@ +function extend(dest, org) { + for (var key in org) { + dest[key] = org[key]; + } + return dest; +} +var FontCssProperty = function() { + this.empty = true; + this.shorthand = false; + this.properties = {}; +}; + +FontCssProperty.TAGS_FOR_PRESENTATION = { + U: { textDecoration: "underline" }, + B: { fontWeight: "bold" }, + STRONG: { fontWeight: "bold" }, + I: { fontStyle: "italic" }, + EM: { fontStyle: "italic" }, +// SUB: { fontSize: "smaller", verticalAlign: "sub"}, +// SUP: { fontSize: "smaller", verticalAlign: "super"}, +// BIG: { fontSize: "larger" }, +// SMALL: { fontSize: "smaller" }, + S: { textDecoration: "line-through" }, + STRIKE: { textDecoration: "line-through" }, + INS: { textDecoration: "underline" }, + DEL: { textDecoration: "line-through" }, + FONT: function(attributes) { + var result = {}; + if (attributes.face) { + result.fontFamily = attributes.face; + } + if (attributes.color) { + result.color = attributes.color; + } + + var fontSizeMap = ["", "x-small", "small", "medium", "large", "x-large", "xx-large"]; + if (attributes.size) { + var fontSize = attributes.size; + result.fontSize = isNaN(fontSize) ? + fontSize : fontSizeMap[Math.min(Math.max(1, fontSize), 6)]; + } + return result; + } +}; + +FontCssProperty.FONT_RELATED_CSS_PROPERTIES = { + "font": "font", + "font-style": "fontStyle", + "font-weight": "fontWeight", + "font-size": "fontSize", + "font-family": "fontFamily", + "text-decoration": "textDecoration", + "color": "color", + "background-color": "backgroundColor" +}; + +FontCssProperty.create = function(nodeName, attributes) { + var fontCssProperty = new FontCssProperty(); + var elemStyle = FontCssProperty.TAGS_FOR_PRESENTATION[nodeName]; + if (elemStyle) { + var fontTagStyle = (typeof elemStyle == "function") ? elemStyle(attributes) : elemStyle; + for (var name in fontTagStyle) { + fontCssProperty.setProperty(name, fontTagStyle[name]); + } + } + var cssText = attributes.style; + if (cssText) { + cssText = cssText.replace(/[\w-]+:\s?;/g, ""); + var properties = cssText.split(/; ?|: ?/); + for (var i = 0; i < properties.length - 1; i += 2) { + var styleName = FontCssProperty.FONT_RELATED_CSS_PROPERTIES[properties[i].toLowerCase()]; + if (styleName) { + // block에 지정된 backgroundColor style은 가져오지 않는다. + // TODO font related tags + if (styleName != "backgroundColor" || (FontCssProperty.TAGS_FOR_PRESENTATION[nodeName] || nodeName == "SPAN")) { + fontCssProperty.setProperty(styleName, properties[i + 1]); + } + } + } + } + return fontCssProperty.getComputedStyles(); +}; + +FontCssProperty.FONT_CSS_REGEXP = /(.*?)(\w+)(\/\w+)?\s+(['"]?[\w\uac00-\ud7a3]+['"]?)$/; +FontCssProperty.NORMAL_VALUE = "normal"; + +FontCssProperty.prototype.isEmpty = function() { + return this.empty; +}; + +FontCssProperty.prototype.setProperty = function(name, value) { + if (/^font$/i.test(name)) { + // because of opera + var parsedProperties = this.fromShorthand(value); + if (parsedProperties) { + this.shorthand = true; + extend(this.properties, this.fromShorthand(value)); + } + } else { + this.properties[name] = value; + } + this.empty = false; +}; + +FontCssProperty.prototype.getComputedStyles = function() { + if (this.shorthand) { + return this.toShorthand(); + } else { + return extend({}, this.properties); + } +}; + +FontCssProperty.prototype.fromShorthand = function(fontCssText) { + // parse extra font-families + var indexOfComma = fontCssText.indexOf(","), extraFontFamilies = ""; + if (indexOfComma > 0) { + extraFontFamilies = fontCssText.substring(indexOfComma); + fontCssText = fontCssText.substring(0, indexOfComma); + } + var splittedProperties = fontCssText.match(FontCssProperty.FONT_CSS_REGEXP); + if (splittedProperties === _NULL) { // invalid font css property value + return _NULL; + } + var NORMAL = FontCssProperty.NORMAL_VALUE; + // parse main properties + var properties = { + fontSize: splittedProperties[2], + lineHeight: (splittedProperties[3] || NORMAL).replace("/", ""), + fontFamily: splittedProperties[4] + extraFontFamilies, + fontWeight: NORMAL, + fontStyle: NORMAL, + fontVariant: NORMAL + }; + // parse optional properties + var optionalProperties = splittedProperties[1]; + if (/bold|700/i.test(optionalProperties)) { + properties.fontWeight = "bold"; + } + if (/italic/i.test(optionalProperties)) { + properties.fontStyle = "italic"; + } + if (/small-caps/i.test(optionalProperties)) { + properties.fontVarient = "small-caps"; + } + return properties; +}; + +FontCssProperty.prototype.toShorthand = function() { + var propertiesClone = extend({}, this.properties); + var NORMAL = FontCssProperty.NORMAL_VALUE; + var validFontProperties = []; + ["fontWeight", "fontStyle", "fontVarient"].each(function(name) { + if (propertiesClone[name] != NORMAL) { + validFontProperties.push(propertiesClone[name]); + } + }); + if (propertiesClone.lineHeight != NORMAL) { + validFontProperties.push(propertiesClone.fontSize + "/" + propertiesClone.lineHeight); + } else { + validFontProperties.push(propertiesClone.fontSize); + } + validFontProperties.push(propertiesClone.fontFamily); + ["fontWeight", "fontStyle", "fontVarient", "fontSize", "lineHeight", "fontFamily"].each(function(name) { + delete propertiesClone[name]; + }); + var result = { font: validFontProperties.join(" ") }; + result = extend(result, propertiesClone); + return result; +}; \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/lib/htmlparser.js b/src/main/webapp/daumeditor/js/lib/htmlparser.js new file mode 100644 index 0000000..255469c --- /dev/null +++ b/src/main/webapp/daumeditor/js/lib/htmlparser.js @@ -0,0 +1,504 @@ +/** + * Referred Sources + * http://ckeditor.com/ htmlparser.js + * http://ejohn.org/blog/pure-javascript-html-parser/ by John Resig (ejohn.org) + * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js by Erik Arvidsson + */ +(function() { + /** + * MSO + * Text
      + * , + * area, param + */ + function extend(dest, org) { + for (var key in org) { + dest[key] = org[key]; + } + return dest; + } + + function makeMap(str) { + var obj = {}, items = str.split(","); + for (var i = 0; i < items.length; i++) { + obj[ items[i] ] = true; + obj[ items[i].toUpperCase() ] = true; + } + return obj; + } + + var htmlPartsRegex = /<(?:(?:\/([A-Za-z][-A-Za-z0-9_:]*)[^>]*>)|(?:!--([\S\s]*?)-->)|(?:([A-Za-z][-A-Za-z0-9_:]*)((?:\s+(?:\/(?!>)|[^>\s=])+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*?)\s*(\/?)>))/g; + + // Empty Elements - HTML 4.01 + var empty = makeMap("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"); + + // Block Elements - HTML 4.01 + var block = makeMap("address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul"); + + // Inline Elements - HTML 4.01 + var inline = makeMap("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"); + + // Elements that you can, intentionally, leave open + // (and which close themselves) + var closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"); + + // Attributes that have their values filled in disabled="disabled" + // var fillAttrs = makeMap("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"); + + // Special Elements (can contain anything) + var special = makeMap("script,style,textarea"); + + // 다른 데에서도 사용을 할까? + var Set = { + isEmpty: function(obj) { + for (var key in obj) { + return false; + } + return true; + }, + intersection: function(s1, s2) { + var result = {}; + for (var key in s1) { + if (key in s2 && s1[key] === s2[key]) { + result[key] = s1[key]; + } + } + return result; + }, + difference: function(s1, s2) { + var result = extend({}, s1); + for (var key in s2) { + delete result[key]; + } + return result; + }, + union: function(s1, s2) { + var result = extend({}, s1); + for (var key in s2) { + result[key] = s2[key]; + } + return result; + }, + isSubset: function(s1, s2) { + for (var key in s2) { + if (s2[key] !== s1[key]) { + return false; + } + } + return true; + } + }; + + var HTMLTree = this.HTMLTree = function() { + this.current = null; + this.depth = 0; + this.maxDepth = 0; + }; + + HTMLTree.create = function() { + var tree = new HTMLTree(); + tree.openTag(1, "ROOT", "", false, false); + return tree; + }; + + HTMLTree.parseAttributes = function(attrText) { + var ATTRIBUTE_REGEX = /\s*([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g; + var attribMatch, attribs = {}; + if (attrText) { + while (( attribMatch = ATTRIBUTE_REGEX.exec(attrText) )) { + var attName = attribMatch[1].toLowerCase(), + attValue = attribMatch[2] || attribMatch[3] || attribMatch[4] || ''; + if (attName == "class") { + attName = "className"; // class is special. {class:1}, {}.class makes error. + } + attribs[ attName ] = attValue; + } + } + return attribs; + }; + + HTMLTree.prototype.openTag = function(nodeType, nodeData, restText, unary) { + var tagName = nodeType == 1 ? nodeData.toUpperCase() : null; + var data = { + parent: this.current, + nodeType: nodeType, + tagName: tagName, + nodeData: nodeData, + restText: restText || "", + children: [], + inheritingFontStyle: {}, + fontStyle: {}, + hasText: nodeType == 8 || (nodeType == 3 && !/^(\r|\n)*$/.test(nodeData)), + valid: true, + unary: nodeType == 1 ? unary : true, + hasKeyAttribute: false + }; + + // attribute, font관련 css에 대한 처리를 한다. + if (nodeType == 1) { + // ancestor에서 정의된 font 속성 + var inheritedFontStyle = data.parent ? data.parent.inheritingFontStyle : {}; + if (tagName == "TABLE" /* && quirks mode */) { + inheritedFontStyle = {}; + } + + var attributes = HTMLTree.parseAttributes(restText); + // 중요한 속성을 갖고 있는가? + if (attributes.id || attributes.className) { + // TODO : naming + data.hasKeyAttribute = true; + } + // 현재 node에서 정의한 font 속성 + var currentFontStyle = FontCssProperty.create(tagName, attributes); + data.fontStyle = currentFontStyle; + /* Hello 에서 문제 발생, valid 여부 확인하면서 돌면 될듯함 + // ancestor에서 정의된 속성에 포함이 되는가? + // TODO font related tags + if ((FontCssProperty.TAGS_FOR_PRESENTATION[tagName] || tagName == "SPAN") && Set.isSubset(inheritedFontStyle, currentFontStyle) && !data.hasAttributes) { + data.valid = false; + } + */ + // descendant에 적용될 font 속성 + var inheritingFontStyle = extend({}, inheritedFontStyle); + inheritingFontStyle = extend(inheritedFontStyle, currentFontStyle); + data.inheritingFontStyle = inheritingFontStyle; + } + + if (this.current) { + this.current.children.push(data); + } else { + this.root = data; + data.valid = false; + } + this.depth += 1; + this.maxDepth = Math.max(this.depth, this.maxDepth); + this.current = data; + }; + + HTMLTree.prototype.unaryTag = function(nodeType, nodeData, restText) { + this.openTag(nodeType, nodeData, restText, true); + this.closeTag(); + }; + + HTMLTree.prototype.closeTag = function() { + this.depth -= 1; + this.current = this.current.parent; + }; + + HTMLTree.prototype.toString = function() { + var result = []; + var root = this.root; + visitNode(root); + return result.join(''); + + function visitNode(node) { + if (root != node) { + if (node.nodeType == 1) { + result.push("<"); + result.push(node.nodeData); + result.push(node.restText); + result.push(">"); + } else if (node.nodeType == 3) { + result.push(node.nodeData); + } else if (node.nodeType == 8) { + result.push(""); + } + } + for (var i = 0; i < node.children.length; i++) { + visitNode(node.children[i]); + } + if (root != node && !node.unary) { + result.push(""); + } + } + }; + + HTMLTree.prototype.cleanHTML = function() { + if (!this.cleanedUp) { + this.removeUseless(); + this.cleanedUp = true; + } + var result = []; + visitNode(this.root); + return result.join(""); + + function visitNode(node) { + if (node.valid) { + if (node.nodeType == 1) { + result.push("<"); + result.push(node.nodeData); + result.push(node.restText); + result.push(">"); + } else if (node.nodeType == 3) { + result.push(node.nodeData); + } else if (node.nodeType == 8) { + result.push(""); + } + } + for (var i = 0; i < node.children.length; i++) { + visitNode(node.children[i]); + } + if (node.valid && !node.unary) { + result.push(""); + } + } + }; + + HTMLTree.prototype.postOrder = function(callback) { + visitNode(this.root); + + function visitNode(node) { + for (var i = 0; i < node.children.length; i++) { + visitNode(node.children[i]); + } + callback(node); + } + }; + + HTMLTree.prototype.removeUseless = function() { + var start = new Date().getTime(); + var count = 0; + this.postOrder(function(node) { + switch(node.nodeType) { + case 1: + var tagName = node.tagName; + + var childrenCommonStyles = {}; + for (var i = 0; i < node.children.length; i++) { + var child = node.children[i]; + if (i == 0) { + childrenCommonStyles = extend({}, child.fontStyle); + } else { + childrenCommonStyles = Set.intersection(childrenCommonStyles, child.fontStyle); + } + if (!node.hasText) { + node.hasText = child.hasText; + } + } +// console.log(tagName, JSON.stringify(node.fontStyle), JSON.stringify(childCommonStyles)); + + var effectingStyle = Set.difference(node.fontStyle, childrenCommonStyles); + node.fontStyle = Set.union(node.fontStyle, childrenCommonStyles); + // TODO font related + if (!node.hasKeyAttribute && (FontCssProperty.TAGS_FOR_PRESENTATION[tagName] || tagName == "SPAN")) { + if (Set.isEmpty(effectingStyle) || !node.hasText) { + count++; + node.valid = false; + } + } + break; + case 3: + node.fontStyle = {}; + break; + case 8: + node.fontStyle = {}; + break; + } + }); +// console.log('# of removed elements: ' + count); +// console.log('duration: ' + (new Date().getTime() - start)); + }; + + this.HTMLParser = function(html) { + var wellFormed = true, + parts, + tagName, + nextIndex = 0, + stack = [], + tree = HTMLTree.create(), + cdata; // The collected data inside a CDATA section. + stack.empty = function() { + return this.length === 0; + }; + stack.last = function() { + return this[this.length - 1]; + }; + + while (( parts = htmlPartsRegex.exec(html) )) { + // visit TextNode + var tagIndex = parts.index; + if (tagIndex > nextIndex) { + var text = html.substring(nextIndex, tagIndex); + + if (cdata) { + cdata.push(text); + } else { + onText(text); + } + } + + nextIndex = htmlPartsRegex.lastIndex; + + /* + "parts" is an array with the following items: + 0 : The entire match for opening/closing tags and comments. + 1 : Group filled with the tag name for closing tags. + 2 : Group filled with the comment text. + 3 : Group filled with the tag name for opening tags. + 4 : Group filled with the attributes part of opening tags. + */ + + // Closing tag + if (( tagName = parts[ 1 ] )) { + if (cdata && special[ tagName ]) { + onCDATA(cdata.join('')); + cdata = null; + } + + if (!cdata) { + onEndTag(tagName); + continue; + } + } + + // If CDATA is enabled, just save the raw match. + if (cdata) { + cdata.push(parts[ 0 ]); + continue; + } + + // Opening tag + if (( tagName = parts[ 3 ] )) { + + // There are some tag names that can break things, so let's + // simply ignore them when parsing. (#5224) + if (/="/.test(tagName)) + continue; + + var unary = !!( parts[ 4 ] && parts[ 4 ].charAt(parts[ 4 ].length - 1) == '/' ); + + onStartTag(tagName, parts[ 4 ], unary); + + // Open CDATA mode when finding the appropriate tags. + if (!cdata && special[ tagName ]) { + cdata = []; + } + + continue; + } + + // Comment + if (( tagName = parts[ 2 ] )) { + onComment(tagName); + } + } + onText(html.substring(nextIndex)); + cleanUnclosedUp(); + return { + wellFormed: wellFormed, + maxDepth: tree.maxDepth, + cleanHTML: tree.cleanHTML() + }; + + function onStartTag(tagName, rest, unary) { + if (closeSelf[ tagName ] && !stack.empty() && stack.last().tagName == tagName) { + onEndTag(tagName); + } + + var repair = []; + /** p > block을 해결위한 코드이지만, tree를 과다하게 크게 생성하기 때문에 제외함. + while (!stack.empty() && tagName.toLowerCase() == 'p') { + var last = stack.last(); + if (inline[ last.tagName ]) { + onEndTag(last.tagName); + repair.push(last); + } else if (last.tagName.toLowerCase() == "p") { + onEndTag(last.tagName); + break; + } else { + break; + } + } + */ + unary = empty[ tagName ] || !!unary; + if (!unary) { + stack.push({ + tagName: tagName, + rest: rest, + unary: unary + }); + tree.openTag(1, tagName, rest, unary); + for (var i = repair.length - 1; i >= 0; i--) { + onStartTag(repair[i].tagName, repair[i].rest, repair[i].unary); + } + } else { + tree.unaryTag(1, tagName, rest); + } + } + + function onEndTag(tagName) { + if (stack.empty()) { + wellFormed = false; +// console.log('stack is empty : ' + tagName); + return; + } + + var repair = [], + found = -1, + i; + for (i = stack.length - 1; i >= 0; i--) { + var visit = stack[i]; + if (visit.tagName == tagName) { + found = i; + break; + } else { + wellFormed = false; + if (closeSelf[visit.tagName]) { +// console.log('self close by meeting closing tag : ' + tagName); + } else { + repair.push(visit); +// console.log('invalid : ' + tagName); + } + } + } + if (found == -1) { + wellFormed = false; +// console.log('not opened tag : ' + tagName); + return; + } + for (i = stack.length - 1; i >= found; i--) { + stack.pop(); + tree.closeTag(); + } + for (i = repair.length - 1; i >= 0; i--) { +// console.log("wrong pair : " + tagName); + onStartTag(repair[i].tagName, repair[i].rest, repair[i].unary); + } + } + + function onText(text) { + tree.unaryTag(3, text); + } + + function onCDATA(cdata) { + tree.unaryTag(3, cdata); + } + + function onComment(comment) { + tree.unaryTag(8, comment); + } + + function cleanUnclosedUp() { + if (stack.length > 0) { + wellFormed = false; + + for (var i = stack.length - 1; i >= 0; i--) { + if (closeSelf[ stack[ i ].tagName ]) { +// console.log('self close : ' + stack[i].tagName); + } else { +// console.log('not closed : ' + stack[i].tagName); + } + tree.closeTag(); + } + } + } + } +})(); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/lib/hyperscript.js b/src/main/webapp/daumeditor/js/lib/hyperscript.js new file mode 100644 index 0000000..f9a6499 --- /dev/null +++ b/src/main/webapp/daumeditor/js/lib/hyperscript.js @@ -0,0 +1,59 @@ +/* megascript */ +_WIN.tx = {}; + +function each(a, f) { + for (var i = 0, l = a.length; i < l; i++) f(a[i]); +} +_WIN.installHyperscript = function(namespace, oDocument) { + each('a big blockquote br b center code dd dl dt div em font form h1 h2 h3 h4 h5 h6 hr img iframe input i li ol option pre p script select small span strike strong style sub sup table tbody td textarea tr ul u'.split(' '), + function(label) { + namespace[label]=function(){ + var tag=oDocument.createElement(label); + each(arguments, function(arg){ + if(arg.nodeType) { + tag.appendChild(arg); + } else if(typeof arg=='string' || typeof arg=='number') { + if(label == "textarea") { + if($tx.msie) { + tag.value+=arg; + } else { + tag.text+=arg; + } + } else { + tag.innerHTML+=arg; + } + } else if(typeof arg=='array') { + for(var i=0; i _screenWidth) { + if ($tx.msie) { + _DOC.body.scroll = "yes"; + } + + contentWidth = _screenWidth; + contentHeight += _scrollbarSize.height; + } + + if(contentHeight > _screenHeight) { + if ($tx.msie) { + _DOC.body.scroll = "yes"; + } + contentHeight = _screenHeight; + contentWidth += _scrollbarSize.width; + + if (contentWidth > _screenWidth) { + contentWidth = _screenWidth; + } + } + + //position + if (contentWidth + popLeft > _screenWidth) { + popLeft = 0; + + } + if (contentHeight + popTop > _screenHeight) { + popTop = 0; + } + + targetWindow.moveTo(popLeft - _screenMargin.left, popTop - _screenMargin.top); + targetWindow.resizeTo(contentWidth, contentHeight); + }; + }; + + var _rubber; + _WIN.resizeHeight = function(width, wrapper) { + if(!_rubber) { + _rubber = new Rubber(0); + } + + _rubber.resize(wrapper); + }; +})(); diff --git a/src/main/webapp/daumeditor/js/lib/template.js b/src/main/webapp/daumeditor/js/lib/template.js new file mode 100644 index 0000000..3fa6398 --- /dev/null +++ b/src/main/webapp/daumeditor/js/lib/template.js @@ -0,0 +1,95 @@ +/** + * Template - Very Very Simple Template Engine + * similar prototype.js template engine + * add syntax > #{for:name:maxCount:cutCount} template #{/for:name} + * add syntax > #{if:name sign value} template #{/if:name} + */ +(function(){ + + function evaluate(data, tpl) { + if (!data) { + return ''; + } + if (tpl.indexOf("\{if:") > -1) { + tpl = tpl.replace(/#\{if:([_\w]+)([=> -1) { + tpl = tpl.replace(/#\{for:([_\w]+):?(\d*):?(\d*)\}([\s\S]*?)#\{\/for:\1\}/gm, function(full, start, maxCnt, cutCnt, looptpl) { + if (!data[start] || !data[start].length) { + return full; + } + var _list = data[start]; + var _listTpl = []; + maxCnt = !!maxCnt? (isNaN(maxCnt)? _list.length: parseInt(maxCnt)): _list.length; + cutCnt = !!cutCnt? (isNaN(cutCnt)? 0: parseInt(cutCnt)): 0; + for (var i = 0, len = Math.min(_list.length, maxCnt); i < len; i++) { + _listTpl.push(evaluate(_list[i], looptpl)); + } + return _listTpl.join("").substring(cutCnt); + }); + } + return tpl.replace(/#\{([_\w]+)\}/g, function(full, name) { + if(data[name] != _NULL) { + return data[name]; + } else { + return full; + } + }); + } + + var tmp = _WIN.Template = function(template) { + this.template = template; + }; + + tmp.prototype = { + evaluate : function(data) { + return evaluate(data, this.template); + }, + evaluateToDom : function(data, element) { + if(typeof(element) === 'string') { + element = _DOC.getElementById(element); + } + element.innerHTML = evaluate(data, this.template); + }, + evaluateAsDom : function(data, context) { + var _tmpNode = (context || document).createElement('div'); + _tmpNode.innerHTML = evaluate(data, this.template); + return _tmpNode.firstChild; + } + }; + /* + Template.prototype.evaluate = function(data) { + return evaluate(data, this.template); + }; + + Template.prototype.evaluateToDom = function(data, element) { + if(typeof(element) === 'string') { + element = _DOC.getElementById(element); + } + element.innerHTML = evaluate(data, this.template); + }; + + Template.prototype.evaluateAsDom = function(data, context) { + var _tmpNode = (context || document).createElement('div'); + _tmpNode.innerHTML = evaluate(data, this.template); + return _tmpNode.firstChild; + }; + */ + +})(); diff --git a/src/main/webapp/daumeditor/js/lib/txlib.js b/src/main/webapp/daumeditor/js/lib/txlib.js new file mode 100644 index 0000000..40fd875 --- /dev/null +++ b/src/main/webapp/daumeditor/js/lib/txlib.js @@ -0,0 +1,1585 @@ + +/** @namespace */ +var $tx = {}; +(function() { + /** + * @function + */ + Object.extend = function(destination, source) { + for (var property in source) { + destination[property] = source[property]; + } + return destination; + }; + + _WIN.Class = { + create: function() { + return function() { + this.initialize.apply(this, arguments); + }; + } + }; + /** + * @class + */ + _WIN.$break = {}; + /** + * 함수(=메소드) 소유자 객체로 미리 묶는 함수의 인스턴스를 반환. 반환된 함수는 원래의 것과 같은 인자를 가질 것이다. + * @function + */ + Function.prototype.bind = function() { + var __method = this, args = $A(arguments), object = args.shift(); + return function() { + return __method.apply(object, args.concat($A(arguments))); + }; + }; + /** + * 유하는 객체 함수(=메소드) 소유자 객체로 미리 묶는 함수의 인스턴스를 반환. 반환된 함수는 이것의 인자로 현재 이벤트 객체를 가질것이다. + * @function + */ + Function.prototype.bindAsEventListener = function() { + var __method = this, args = $A(arguments), object = args.shift(); + return function(event) { + return __method.apply(object, [event || _WIN.event].concat(args)); + }; + }; + + var txlib = function(element) { + var args = arguments; + if (args.length > 1) { + for (var i = 0, elements = [], length = args.length; i < length; i++) + elements.push($tx(args[i])); + return elements; + } + if (typeof element == 'string') { + element = _DOC.getElementById(element); + } + return element; + }; + $tx = txlib; + + var txua = navigator.userAgent.toLowerCase(); + var isExistAgentString = function(str){ + return txua.indexOf(str)!=-1; + }; + var isExistAgentStringByRegx = function(regx){ + return regx.test(txua); + }; + Object.extend($tx, /** @lends $tx */{ + /** + * Chrome browser 이면 true + * @field + */ + chrome: isExistAgentString("chrome"), + /** + * safari browser 이면 true + * @field + */ + safari: isExistAgentString("safari") && isExistAgentString("chrome") == _FALSE, + /** + * Firefox browser 이면 true + * @field + */ + gecko: isExistAgentString("firefox"), + /** + * Firefox browser의 버전 + * @field + */ + gecko_ver: isExistAgentString("firefox")?parseFloat(txua.replace(/.*firefox\/([\d\.]+).*/g,"$1")):0, + /** + * MS IE 이면 true + * IE7 이하는 msie로 구분 + * IE8 이상은 trident로 구분 + * @field + */ + msie: isExistAgentString("msie") || isExistAgentString("trident"), + /** + * MS IE browser 버전 a.match(/rv:(\d+)\.\d+/) + * IE7 이하는 msie로 구분 + * IE8 이상은 trident & rv:x로 구분 + * @field + */ + msie_ver: isExistAgentString("msie") || isExistAgentString("trident")?(function(){ + return isExistAgentString("msie") ? parseFloat(txua.split("msie")[1]) : parseFloat(txua.split("rv:")[1]); + })():0, + /** + * MS IE document mode 버전 + * @field + */ + msie_docmode: _DOC.documentMode || 0, + /** + * AppleWebKit browser 이면 true + * @field + */ + webkit: isExistAgentString("applewebkit"), + /** + * AppleWebKit 버전 + * @field + */ + webkit_ver: isExistAgentString("applewebkit")?parseFloat(txua.replace(/.*safari\//g,"")):0, + /** + * Opera 이면 true + * @field + */ + opera: isExistAgentString("opera"), + /** + * Presto browser 이면 true + * @field + */ + presto: isExistAgentString("presto"), + os_win: isExistAgentString("win"), + os_win7: isExistAgentString('windows nt 6.1'), + os_win8: isExistAgentString('windows nt 6.2'), + os_win8_1: isExistAgentString('windows nt 6.3'), + os_mac: isExistAgentString("mac"), + /** + * iPhone 이면 true + * @field + */ + iphone: isExistAgentString("iphone"), + /** + * iPod 이면 true + * @field + */ + ipod: isExistAgentString("ipod"), + /** + * iPad 이면 true + * @field + */ + ipad: isExistAgentString("ipad"), + /** + * iPhone, iPod Touch, iPad 이면 true (애플 모바일 OS) + */ + ios: isExistAgentString("like mac os x") && isExistAgentString("mobile"), + /** + * iPhone, iPod Touch, iPad 의 iOS 버전 + */ + ios_ver: (isExistAgentString("like mac os x") && isExistAgentString("mobile")) ? parseFloat(txua.replace(/^.*os (\d+)([_\d]*) .*$/g, "$1.$2").replace(/_/g, "")) : 0, + /** + * Android 이면 true + */ + android: isExistAgentString("android"), + /** + * Android OS 버전 + */ + android_ver: isExistAgentString("android") ? parseFloat(txua.replace(/.*android[\s]*([\d\.]+).*/g, "$1")) : 0, + /** + * BlackBerry 이면 true + */ + blackberry: isExistAgentString("blackberry"), + /** + * Windows Phone OS 이면 true + */ + winphone: isExistAgentString("windows phone os"), + /** + * Windows CE 이면 true + */ + wince: isExistAgentString("windows ce") + }); + + Object.extend($tx, /** @lends $tx */{ + //msie11above: (isExistAgentString("trident") && isExistAgentStringByRegx(/rv:\d+\.\d+/)),//@Deprecated $tx.msie11above + msie_std: ($tx.msie && !_DOC.selection), + msie_nonstd: ($tx.msie && !!_DOC.selection), + msie6: ($tx.msie && 6 <= $tx.msie_ver && $tx.msie_ver < 7), + msie_quirks: (function(){ + try { + return $tx.msie && _WIN.top.document.compatMode !== 'CSS1Compat' + } catch(e) { + try { + return _DOC.compatMode !== 'CSS1Compat' + } catch(e) { + return _FALSE; + } + } + })() + }); + + Object.extend($tx, /** @lends $tx */{ + extend: Object.extend, + /** + * browser의 이름 리턴 + * @function + */ + browser: function() { + if($tx.msie) { + return 'msie'; + } else if($tx.gecko) { + return 'firefox'; + } else if($tx.chrome) { + return 'chrome'; + } else if($tx.webkit) { + return 'safari'; + } else if($tx.opera) { + return 'opera'; + } else { + return ""; + } + }() + }); + + /** + * @function + */ + _WIN.$must = function(id, className) { + var _el = $tx(id); + if (!_el) { + throw new Error("[Exception] " + className + ": cannot find element: id='" + id + "'"); + } + return _el; + }; + + //expose + _WIN.txlib = txlib; +})(); + +(function() { + /** + * template + * @deprecated + (function() { + window.Template = Class.create(); + Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\}|#%7B(.*?)%7D)/; + Template.prototype = { + initialize: function(template, pattern) { + this.template = template.toString(); + this.pattern = pattern || Template.Pattern; + }, + evaluate: function(object) { + return this.template.gsub(this.pattern, function(match) { + var before = match[1]; + if (before == '\\') + return match[2]; + return before + String.interpret(object[match[3] || match[4]]); + }); + } + }; + })(); + */ + + $tx.extend($tx, /** @lends $tx */{ + /** + * 주어진 element와 관련된 CSS 클래스명을 표시하는 Element.ClassNames 객체를 반환 + * @function + */ + classNames: function(el) { + return el.className.split(' '); + }, + /** + * 요소가 class명중에 하나로 주어진 class명을 가진다면 true를 반환 + * @function + */ + hasClassName: function(el, className) { + if (className && el.className) { + var classNames = el.className.split(/\s+/); + return classNames.contains(className); + } + return _FALSE; + }, + /** + * 주어진 class명을 요소의 class명으로 추가 + * @function + */ + addClassName: function(el, c) { + if (!this.hasClassName(el, c)) { + el.className += ' ' + c; + } + }, + /** + * 요소의 class명으로 부터 주어진 class명을 제거 + * @function + */ + removeClassName: function(el, className) { + var classNames = el.className.split(/\s+/); + el.className = classNames.without(className) + .compact() + .join(' '); + }, + /** + * 요소가 눈에 보이는지 표시하는 Boolean값을 반환 + * @function + */ + visible: function(element) { + //return $tx(element).style.display != 'none'; + return $tx.getStyle(element, "display" ) != 'none'; + }, + /** + * 각각의 전달된 요소의 가시성(visibility)을 토글(toggle)한다. + * @function + */ + toggle: function(element) { + element = $tx(element); + $tx[$tx.visible(element) ? 'hide' : 'show'](element); + return element; + }, + /** + * style.display를 'block'로 셋팅하여 각각의 요소를 보여준다. + * @function + */ + show: function(element) { + $tx(element).style.display = 'block'; + return element; + }, + /** + * style.display를 'none'로 셋팅하여 각각의 요소를 숨긴다. + * @function + */ + hide: function(element) { + $tx(element).style.display = 'none'; + return element; + } + }); +})(); + +$tx.extend($tx, /** @lends $tx */{ + /** + * 인자로 넘겨 받은 Element의 style 속성값을 리턴한다. + * @function + * @param {HTMLElement} element + * @param {string} style property name + */ + getStyle: function(element, style) { + element = $tx(element); + style = style == 'float' ? 'cssFloat' : style.camelize(); + var value = element.style[style]; + if (!value) { + var win = (_DOC.defaultView || _DOC.parentWindow); + var css = win.getComputedStyle(element, _NULL); + value = css ? css[style] : _NULL; + } + if (style == 'opacity') + return value ? parseFloat(value) : 1.0; + return value == 'auto' ? _NULL : value; + }, + + /** + * 요소의 style 속성을 셋팅한다. + * @function + */ + setStyle: function(element, styles, camelized) { + element = $tx(element); + var elementStyle = element.style; + for (var property in styles) { + if (styles.hasOwnProperty(property)) { + if (property === 'opacity') { + $tx.setOpacity(element, styles[property]); + } else { + // TODO What the... + elementStyle[(property === 'float' || property === 'cssFloat') ? (elementStyle.styleFloat === _UNDEFINED ? 'cssFloat' : 'styleFloat') : (camelized ? property : property.camelize())] = styles[property]; + } + } + } + // TODO is it necessary? + return element; + }, + + setStyleProperty: function(element, styles) { + var isCamelizedPropertyName = _TRUE; + this.setStyle(element, styles, isCamelizedPropertyName); + }, + + /** + * 요소의 style속성 중 opacity 값을 리턴한다. + * @function + */ + getOpacity: function(element) { + return $tx(element).getStyle('opacity'); + }, + + /** + * 요소의 opacity style 속성을 셋팅한다. + * @function + */ + setOpacity: function(element, value) { + element = $tx(element); + element.style.opacity = (value == 1 || value === '') ? '' : (value < 0.00001) ? 0 : value; + return element; + }, + + applyCSSText: function(targetDocument, cssText) { + var styleElement = targetDocument.createElement('style'); + styleElement.setAttribute("type", "text/css"); + if (styleElement.styleSheet) { // IE + styleElement.styleSheet.cssText = cssText; + } else { // the other + styleElement.textContent = cssText; + } + targetDocument.getElementsByTagName('head')[0].appendChild(styleElement); + } + +}); +(function() { + + if ($tx.msie_nonstd) { + $tx.getStyle = function (element, style) { + element = $tx(element); + style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize(); + var value = element.style[style]; + if (!value && element.currentStyle) + value = element.currentStyle[style]; + if (style == 'opacity') { + if (value = ($tx.getStyle(element, 'filter') || '').match(/alpha\(opacity=(.*)\)/)) + if (value[1]) + return parseFloat(value[1]) / 100; + return 1.0; + } + if (value == 'auto') { + if ((style == 'width' || style == 'height') && ($tx.getStyle(element, 'display') != 'none')) { + return element['offset' + style.capitalize()] + 'px'; + } + return _NULL; + } + return value; + }; + } + + if ($tx.msie_nonstd) { + $tx.setOpacity = function (element, value) { + element = $tx(element); + var filter = $tx.getStyle(element, 'filter'), style = element.style; + if (value == 1 || value === '') { + style.filter = filter.replace(/alpha\([^\)]*\)/gi, ''); + return element; + } else if (value < 0.00001) + value = 0; + style.filter = filter.replace(/alpha\([^\)]*\)/gi, '') + + 'alpha(opacity=' + + (value * 100) + + ')'; + return element; + }; + } + + if ($tx.gecko) { + $tx.extend($tx, { + setOpacity: function(element, value) { + element = $tx(element); + element.style.opacity = (value == 1) ? 0.999999 : (value === '') ? '' : (value < 0.00001) ? 0 : value; + return element; + } + }); + } + + + // json2.js helper functions + $tx.JSONHelper = { + /** + * JSON.stringify 시에 문자열을 encodeURIComponent 처리 하여준다. + * @example JSON.stringify(object, $tx.JSONHelper.encodeURIComponentReplacer); + */ + encodeURIComponentReplacer: function (key, value) { + if (typeof value === 'string') { + if (!isStringifiedArray(value)) { + return encodeURIComponent(value); + } + } + return value; + }, + /** + * JSON.parse 시에 문자열을 decodeURIComponent 처리 하여준다. + * @example JSON.parse(object, $tx.JSONHelper.decodeURIComponentReviver); + */ + decodeURIComponentReviver: function (key, value) { + if (typeof value === 'string') { + if (!isStringifiedArray(value)) { + return decodeURIComponent(value); + } else { + // "{ \"string\": \"[1,2,3]\" }" 의 경우 => { "string": [1, 2, 3] } 으로 파싱된다. + // WHY??? + try { + // "[말머리]" 와 같은 값은 파싱 중 오류가 발생한다. 이런 경우는 무시하고 value를 그대로 반환하도록 한다. #FTDUEDTR-1432 + return JSON.parse(value, arguments.callee); + } catch(ignore) {} + } + } + return value; + } + }; + + // 이 문자열이 "[1, 3, 4]" 와 같이 배열을 Stringify 한 것인지 확인한다 + var isStringifiedArray = function (str) { + if (str.charAt(0) == "[" && str.charAt(str.length - 1) == "]") { + try{ + JSON.parse(str); + return true; + }catch (ignore) {} + } + return false; + }; +})(); + +//position +(function() { + $tx.extend($tx, /** @lends $tx */ { + /** + * 요소의 최상위 요소까지의 offset position 을 더한 값을 리턴한다. + * @function + */ + cumulativeOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + return [valueL, valueT]; + }, + /** + * 요소의 최상위 요소까지의 offset position 을 더한 값을 리턴한다. + * 상위 요소가 body이거나 position이 relative 또는 absolute 인 경우 계산을 중지한다. + * @function + */ + positionedOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + if (element) { + if (element.tagName == 'BODY') + break; + var p = $tx.getStyle(element, 'position'); + if (p == 'relative' || p == 'absolute') + break; + } + } while (element); + return [valueL, valueT]; + }, + /** + * element의 면적(dimensions)을 반환. 반환된 값은 두개의 프라퍼티(height 와 width)를 가지는 객체이다. + * @function + */ + getDimensions: function(element) { + var display = $tx.getStyle(element, 'display'); + if (display != 'none' && display != _NULL) // Safari bug + return {width: element.offsetWidth, height: element.offsetHeight}; + + // All *Width and *Height properties give 0 on elements with display none, + // so enable the element temporarily + var els = element.style; + var originalVisibility = els.visibility; + var originalPosition = els.position; + var originalDisplay = els.display; + els.visibility = 'hidden'; + els.position = 'absolute'; + els.display = 'block'; + var originalWidth = element.clientWidth; + var originalHeight = element.clientHeight; + els.display = originalDisplay; + els.position = originalPosition; + els.visibility = originalVisibility; + return {width: originalWidth, height: originalHeight}; + }, + + /** + * 요소의 최상위 요소까지의 offset position 을 더한 값을 리턴한다. + * 상위 요소가 body이거나 position이 relative 또는 absolute 인 경우 계산을 중지한다. + * left, top, right, bottom 값을 리턴한다. + * @function + */ + getCoords : function(e, useOffset) { + var uo = useOffset || false; + var w = e.offsetWidth; + var h = e.offsetHeight; + var coords = { "left": 0, "top": 0, "right": 0, "bottom": 0 }; + var p; + while(e){ + coords.left += e.offsetLeft || 0; + coords.top += e.offsetTop || 0; + e = e.offsetParent; + if(uo){ + if(e){ + if(e.tagName == "BODY"){break;} + p = $tx.getStyle(e, "position"); + if(p !== "static"){break;} + } + } + } + coords.right = coords.left + w; + coords.bottom = coords.top + h; + return coords; + }, + + getCoordsTarget: function(element){ + return this.getCoords(element, _TRUE); + } + + }); + + + // Safari returns margins on body which is incorrect if the child is absolutely + // positioned. For performance reasons, redefine Position.cumulativeOffset for + // KHTML/WebKit only. + if ($tx.webkit) { + $tx.cumulativeOffset = function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + if (element.offsetParent == _DOC.body) + if ($tx.getStyle(element, 'position') == 'absolute') + break; + element = element.offsetParent; + } while (element); + return [valueL, valueT]; + }; + } + +})(); + +//events +(function () /** @lends $tx */ { + $tx.extend($tx, { + /** @field backspace key */ + KEY_BACKSPACE: 8, + /** @field tab key */ + KEY_TAB: 9, + /** @field return key */ + KEY_RETURN: 13, + /** @field esc key */ + KEY_ESC: 27, + /** @field left key */ + KEY_LEFT: 37, + /** @field up key */ + KEY_UP: 38, + /** @field right key */ + KEY_RIGHT: 39, + /** @field down key */ + KEY_DOWN: 40, + /** @field delete key */ + KEY_DELETE: 46, + /** @field home key */ + KEY_HOME: 36, + /** @field end key */ + KEY_END: 35, + /** @field pageup key */ + KEY_PAGEUP: 33, + /** @field pagedown key */ + KEY_PAGEDOWN: 34, + /** + * 이벤트의 target 또는 srcElement 를 반환 + * @function + */ + element: function(event) { + return $tx(event.target || event.srcElement); + }, + /** + * 마우스 왼쪽 버튼을 클릭시 true값 반환 + * @function + */ + isLeftClick: function(event) { + return (((event.which) && (event.which == 1)) || + ((event.button) && (event.button == 1))); + }, + /** + * 페이지에서 마우스 포인터의 x측 좌표값 반환 + * @function + */ + pointerX: function(event) { + var eventDoc = $tx.element(event).ownerDocument||_DOC; + var doc = eventDoc.documentElement; + var body = eventDoc.body; + return event.pageX || (event.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 )); + }, + /** + * 페이지에서 마우스 포인터의 y측 좌표값 반환 + * @function + */ + pointerY: function(event) { + var eventDoc = $tx.element(event).ownerDocument||_DOC; + var doc = eventDoc.documentElement; + var body = eventDoc.body; + return event.pageY || (event.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 )); + }, + /** + * 이벤트의 디폴트 행위를 취소하고 위임을 연기하기 위해 이 함수를 사용 + * @function + */ + stop: function(event) { + if (event.preventDefault) { + event.preventDefault(); + event.stopPropagation(); + } else { + event.returnValue = _FALSE; + event.cancelBubble = _TRUE; + } + }, + /** + * 이벤트가 시작된 노드로부터 상위로 순회하며 주어진 태그이름을 갖는 첫번째 노드를 찾는다. + * find the first node with the given tagName, starting from the + * node the event was triggered on; traverses the DOM upwards + * @function + */ + findElement: function(event, tagName) { + var element = $tx.element(event); + while (element.parentNode && + (!element.tagName || !element.tagName.toUpperCase || + (element.tagName.toUpperCase() != tagName.toUpperCase()))) + element = element.parentNode; + return element; + }, + observers: _FALSE, + _observeAndCache: function(element, name, observer, useCapture) { + if (!this.observers) + this.observers = []; + if (element.addEventListener) { + this.observers.push([element, name, observer, useCapture]); + element.addEventListener(name, observer, useCapture); + } else if (element.attachEvent) { + this.observers.push([element, name, observer, useCapture]); + element.attachEvent('on' + name, observer); + } + }, + + simulateEvent: function(elem, eventName, event) { + var observers = $tx.observers; + if (!observers) { + return; + } + for (var i = 0, length = observers.length; i < length; i++) { + var observer = observers[i]; + if (observer && observer[1] === eventName && observer[0] === elem) { +// if (observer && observer[1] === eventName && $tom.include(observer[0], elem)) { + observer[2](event); + } + } + }, + + unloadCache: function() { + if (!$tx.observers) + return; + for (var i = 0, length = $tx.observers.length; i < length; i++) { + $tx.stopObserving.apply(this, $tx.observers[i]); + $tx.observers[i][0] = _NULL; + } + $tx.observers = _FALSE; + }, + /** + * 이벤트를 위한 이벤트 핸들러 함수를 추가 + * @function + * @param {Object} element 요소객체 또는 아이디 + * @param {String} name 이벤트 명 + * @param {Function} observer 이벤트를 다루는 함수 + * @param {Boolean} useCapture true라면, capture내 이벤트를 다루고 false라면 bubbling 내 이벤트를 다룬다. + */ + observe: function(element, name, observer, useCapture) { + element = $tx(element); + useCapture = useCapture || _FALSE; + if (name == 'keypress' /*&& ($tx.webkit || element.attachEvent)*/) { + name = 'keydown'; + } + $tx._observeAndCache(element, name, observer, useCapture); + }, + /** + * 이벤트로부터 이벤트 핸들러를 제거 + * @function + * @param {Object} element 요소객체 또는 아이디 + * @param {String} name 이벤트 명 + * @param {Function} observer 이벤트를 다루는 함수 + * @param {Boolean} useCapture true라면, capture내 이벤트를 다루고 false라면 bubbling 내 이벤트를 다룬다. + */ + stopObserving: function(element, name, observer, useCapture) { + element = $tx(element); + useCapture = useCapture || _FALSE; + if (name == 'keypress' /*&& + ($tx.webkit || element.attachEvent)*/) + name = 'keydown'; + if (element.removeEventListener) { + element.removeEventListener(name, observer, useCapture); + } else if (element.detachEvent) { + try { + element.detachEvent('on' + name, observer); + } catch (e) { + } + } + } + }); + // prevent memory leaks in IE + if ($tx.msie) { + $tx.observe(window, 'unload', $tx.unloadCache, _FALSE); + } +})(); + +(function() { + $tx.extend(Object, /** @lends Object */ { + /** + * object 를 복사 + * @function + */ + clone: function(object) { + return Object.extend({}, object); + } + }); + + $tx.extend($tx, { + isPrimitiveType: function(data) { + var primitiveTypes = new $tx.Set("string", "number", "boolean", "date", "function"); + return primitiveTypes.contains(typeof data); + }, + deepcopy: function(preset, service) { + var _dest = preset; + if(!service) { + return _dest; + } + for(var _name in service) { + switch(typeof(service[_name])) { + case 'string': + case 'number': + case 'boolean': + case 'date': + case 'function': + _dest[_name] = service[_name]; + break; + default: + if (service[_name]) { + if (service[_name].constructor == Array) { + _dest[_name] = [].concat(service[_name]); + } else { + _dest[_name] = _dest[_name] || {}; + this.deepcopy(_dest[_name], service[_name]); + } + } else { + _dest[_name] = _NULL; + } + break; + } + } + return _dest; + }, + defaults: function(dest, source){ + for(var name in source){ + if(dest[name] === _UNDEFINED){ + dest[name] = source[name]; + } + } + } + }); +})(); + +(function () { + $tx.extend(String, /** @lends String */{ + /** + * value 를 문자열로 만들어 반환한다. value 가 null 이면 빈문자열을 반환한다. + * @function + */ + interpret: function(value) { + return value == _NULL ? '' : String(value); + }, + /** + * @field + */ + specialChar: { + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '\\': '\\\\' + } + }); + $tx.extend(String.prototype, /** @lends String.prototype */{ + /** + * 현재 문자열에서 패턴 문자열을 찾은 결과의 문자열을 반환하고 대체 문자열이나 패턴에 일치하는 문자열을 가진 배열을 전달하는 대체함수를 호출한 결과로 대체한다. + * 대체물이 문자열일때, #{n}과 같은 특별한 템플릿 형태의 토큰을 포함할수 있다. + * 여기서 n이라는 값은 정규표현식 그룹의 인덱스이다. + * #{0}는 완전히 일치하면 대체될것이고 #{1}는 첫번째 그룹, #{2}는 두번째이다. + * @function + */ + gsub: function(pattern, replacement) { + var result = '', source = this, match; + replacement = arguments.callee.prepareReplacement(replacement); + while (source.length > 0) { + if (match = source.match(pattern)) { + result += source.slice(0, match.index); + result += String.interpret(replacement(match)); + source = source.slice(match.index + match[0].length); + } else { + result += source, source = ''; + } + } + return result; + }, + /** + * 문자열 앞,뒤의 공백을 제거 + * @function + */ + strip: function() { + return this.replace(/^\s+/, '').replace(/\s+$/, ''); + }, + /** + * 문자열 중 태그 를 삭제 + * @function + */ + stripTags: function() { + return this.replace(/<\/?[^>]+>/gi, ''); + }, + /** + * url query string 을 json 으로 만들어 반환한다. separator 를 & 대신 다른 값을 사용할 수 있다. + * @function + */ + toQueryParams: function(separator) { + var match = this.strip().match(/([^?#]*)(#.*)?$/); + if (!match) return {}; + + var _hash = {}; + var _lastkey = _NULL; + match[1].split(separator || '&').each(function(pair) { + var _key = _NULL, _value = _NULL; + var _matches = pair.match(/([\w_]+)=(.*)/); + if(_matches) { + _lastkey = _key = decodeURIComponent(_matches[1]); + if(_matches[2]) { + _value = decodeURIComponent(_matches[2]); + } + } else if(_lastkey) { + _key = _lastkey; + _value = _hash[_key]; + _value += '&' + decodeURIComponent(pair); + } else { + return; + } + if (_key in _hash) { + if (_hash[_key].constructor != Array) + _hash[_key] = [_hash[_key]]; + _hash[_key].push(_value); + } else { + _hash[_key] = _value; + } + }); + return _hash; + }, + /** + * 문자열을 배열로 반환한다. + * @function + */ + toArray: function() { + return this.split(''); + }, + /** + * count 만큼 문자열을 반복하여 이어 붙인다. + * @function + */ + times: function(count) { + var result = ''; + for (var i = 0; i < count; i++) + result += this; + return result; + }, + /** + * -(하이픈)으로 분리된 문자열을 camelCaseString으로 변환 + * @function + */ + camelize: function() { + var parts = this.split('-'), len = parts.length; + if (len == 1) + return parts[0]; + var camelized = this.charAt(0) == '-' ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) : parts[0]; + for (var i = 1; i < len; i++) + camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); + return camelized; + }, + /** + * 첫번째 글자를 대문자로 변환 + * @function + */ + capitalize: function() { + return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); + }, + /** + * 문자열이 주어진 패턴을 포함하면 true + * @function + */ + include: function(pattern) { + return this.indexOf(pattern) > -1; + }, + /** + * 빈문자열이면 true + * @function + */ + empty: function() { + return this == ''; + }, + /** + * 공백문자열이면 true + * @function + */ + blank: function() { + return /^\s*$/.test(this); + } + }); + String.prototype.gsub.prepareReplacement = function(replacement) { + if (typeof replacement == 'function') + return replacement; + var template = new Template(replacement); + return function(match) { + return template.evaluate(match); + }; + }; + ////// + $tx.extend(String.prototype, /** @lends String.prototype */{ + /** + * 문자열 앞,뒤의 공백을 제거 + * @function + */ + trim: function() { + return this.replace(/(^\s*)|(\s*$)/g, ""); + }, + /** + * 정규표현식에서 사용되는 메타문자를 이스케이프해서 반환한다. + * @function + */ + getRegExp: function() { + return this.replace(/\\/g, "\\\\").replace(/\./g, "\\.").replace(/\//g, "\\/").replace(/\?/g, "\\?").replace(/\^/g, "\\^").replace(/\)/g, "\\)").replace(/\(/g, "\\(").replace(/\]/g, "\\]").replace(/\[/g, "\\[").replace(/\$/g, "\\$").replace(/\+/g, "\\+").replace(/\|/g, "\\|").replace(/&/g, "(&|&)"); + }, + /** + * 문자열을 정수형으로 반환한다. 숫자가 아닌 문자열은 0 + * @function + */ + toNumber: function() { + return (isNaN(this) ? 0 : parseInt(this, 10)); + }, + /** + * 문자열을 부동소수점 형태로 반환한다. 숫자가 아닌 문자열은 0 + * @function + */ + toFloat: function() { + return (isNaN(this) ? 0 : parseFloat(this)); + }, + /** + * 문자열의 길이를 반환 + * @function + */ + getRealLength: function() { + var str = this; + var idx = 0; + for (var i = 0; i < str.length; i++) { + idx += (escape(str.charAt(i)).charAt(1) == "u") ? 2 : 1; + } + return idx; + }, + /** + * 문자열이 주어진 길이보다 길면 자르고 마지막에 ... 를 붙인다. + * @function + */ + cutRealLength: function(length) { + var str = this; + var idx = 0; + for (var i = 0; i < str.length; i++) { + idx += (escape(str.charAt(i)).charAt(1) == "u") ? 2 : 1; + if (idx > length) { + return str.substring(0, i - 3).concat("..."); + } + } + return str; + }, + /** + * @deprecated + */ + getCut: function(length) { + return this.cutRealLength(length); + }, + /** + * 문자열에 px 가 있으면 잘라내고 반환한다. + * @function + */ + parsePx: function() { + if (this == _NULL || this.length == 0) + return 0; + else if (this.indexOf("px") > -1) + return this.substring(0, this.indexOf("px")).toNumber(); + else + return this.toNumber(); + }, + /** + * 문자열에 px 를 붙여서 반환한다. + * @function + */ + toPx: function() { + if (this.indexOf("px") > -1) { + return this + ""; + } else { + return this + "px"; + } + }, + /** + * 픽셀값으로 사용 가능한 문자열인지 boolean 으로 반환 ( 공백 허용안함 ) + * @function + */ + isPx: function(){ + var str = this; + if ( str.trim() == "" ){ + return false; + } else if( str.indexOf("px") != -1 ){ + str = this.parsePx(); + } + return !isNaN(str); + }, + isPercent: function(){ + var str = this.trim(); + return parseInt(str, 10)+'%' === str; + }, + /** + * 바이트를 계산하여 단위를(KB, MB) 붙여서 반환한다. + * @function + */ + toByteUnit: function() { + return this.toNumber().toByteUnit(); + }, + /** + * 숫자로된 문자열을 천단위로 쉼표(,)를 붙인다. + * @function + */ + toCurrency: function() { + var amount = this; + for (var i = 0; i < Math.floor((amount.length - (1 + i)) / 3); i++) { + amount = amount.substring(0, amount.length - (4 * i + 3)) + "," + amount.substring(amount.length - (4 * i + 3)); + } + return amount; + }, + /** + * source를 문자열 끝까지 찾아서 target으로 치환한다. + * @function + */ + replaceAll: function(source, target) { + source = source.replace(new RegExp("(\\W)", "g"), "\\$1"); + target = target.replace(new RegExp("\\$", "g"), "$$$$"); + return this.replace(new RegExp(source, "gm"), target); + }, + underscore :function () { + return this.replace(/::/g, '/') + .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2') + .replace(/([a-z\d])([A-Z])/g, '$1_$2') + .replace(/-/g, '_') + .toLowerCase(); + } + }); +})(); + +(function() { + /** + * @name Number + * @class + */ + $tx.extend(Number.prototype, /** @lends Number.prototype */{ + /** + * 숫자로된 문자열이 주어진 길이보다 짧으면 앞부분에 0 으로 채워넣어서 반환한다. + * @function + * @param {Number} length 반환되는 문자열의 최소 길이 + * @param {Number} radix 표기될 진수. optional. 기본 10진수 + */ + toPaddedString: function(length, radix) { + var string = this.toString(radix || 10); + return '0'.times(length - string.length) + string; + }, + /** + * + * @function + */ + toTime: function() { + return Math.floor(this / 60).toString().toPaddedString(2) + ":" + (this % 60).toString().toPaddedString(2); + }, + /** + * 바이트를 계산하여 단위를(KB, MB) 붙여서 반환한다. + * @function + */ + toByteUnit: function() { + var number; + var units = ['GB', 'MB', 'KB']; + if (this == 0) { + return "0" + units[2]; + } + for (var i = 0; i < units.length; i++) { + number = this / Math.pow(1024, 3 - i); + if (number < 1) { + continue; + } + return (Math.round(number * 10) / 10) + units[i]; + } + return "1" + units[2]; + }, + /** + * px를 붙인다. + * @function + */ + toPx: function() { + return this.toString() + "px"; + }, + /** + * 그대로 반환한다. + * @function + */ + parsePx: function() { + return this + 0; + }, + /** + * 숫자형은 무조건 px로 사용 가능하다. + */ + isPx: function(){ + return _TRUE; + }, + /** + * 문자열을 정수형으로 반환한다. 숫자가 아닌 문자열은 0 + * @function + */ + toNumber: function() { + return this + 0; + }, + /** + * 천단위로 쉼표(,)를 붙인다. + * @function + */ + toCurrency: function() { + return this.toString().toCurrency(); + }, + /** + * 정규표현식에서 사용되는 메타문자를 이스케이프해서 반환한다. + * @function + */ + getRegExp: function() { + return this.toString().getRegExp(); + } + }); +})(); + +(function() { + $tx.extend(Array.prototype, /** @lends Array.prototype */{ + each: function(iterator) { + if (_WIN['DEBUG']) { + for (var i = 0, length = this.length; i < length; i++) { + iterator(this[i]); + } + } else { + try { + for (var i = 0, length = this.length; i < length; i++) { + iterator(this[i]); + } + } catch (e) { + if (e != $break) { + throw e; + } + } + } + + return this; + }, + indexOf: function(value) { + for (var i = 0; i < this.length; i++) { + if (this[i] == value) { + return i; + } + } + return -1; + }, + map: function(f) { + for (var b = [], i = 0, n = this.length; i < n; ++i) { + b[i] = f(this[i]); + } + return b; + }, + /** + * @deprecated use contains() + */ + include: function(object) { + return this.contains(object); + }, + contains: function(item) { + return this.indexOf(item) >= 0; + }, + /** + * 집합의 각각의 요소내 propertyName에 의해 명시된 프라퍼티에 값을 가져가고 Array객체로 결과를 반환한다. + * @function + */ + pluck: function(property) { + var results = []; + this.each(function(value) { + results.push(value[property]); + }); + return results; + }, + /** + * 배열 내에서 조건을 만족하는 첫번째 요소를 리턴한다. + * @function + * @param {function} filterFn 조건 함수. 조건에 만족하는 경우 true 리턴, 아닌 경우 false를 리턴한다. + * @return {object} + */ + find: function(filterFn) { + for (var i = 0, len = this.length; i < len; i++) { + var value = this[i]; + if (filterFn(value, i)) { + return value; + } + } + return _NULL; + }, + /** + * 배열 내에서 조건에 만족하는 요소들을 추출한다. + * @function + * @param {function} filterFn 조건 함수. 조건에 만족하는 경우 true 리턴, 아닌 경우 false를 리턴한다. + * @return {Array} + */ + findAll: function(filterFn) { + var results = []; + for (var i = 0, len = this.length; i < len; i++) { + var value = this[i]; + if (filterFn(value, i)) { + results.push(value); + } + } + return results; + }, + /** + * iterator함수를 사용하여 집합의 모든 요소를 조합한다. + * 호출된 iterator는 accumulator인자에서 이전 반복의 결과를 전달한다. + * 첫번째 반복은 accumulator인자내 initialValue를 가진다. 마지막 결과는 마지막 반환값이다. + * @function + */ + inject: function(array, iterator) { + for (var i = 0, len = this.length; i < len; i++) { + var value = this[i]; + array = iterator(array, value, i); + } + return array; + }, + /** + * 인자의 리스트에 포함된 요소를 제외한 배열을 반환. 이 메소드는 배열 자체를 변경하지는 않는다. + * @function + */ + without: function() { + var values = $A(arguments); + return this.findAll(function(value) { + return !values.include(value); + }); + }, + /** + * 배열의 마지막 요소를 반환한다. + * @function + */ + last: function() { + return this[this.length - 1]; + }, + /** + * 기복이 없고, 1차원의 배열을 반환한다. 이 함수는 배열이고 반환된 배열내 요소를 포함하는 배열의 각 요소를 찾음으로써 수행된다. + * @function + */ + flatten: function() { + return this.inject([], function(array, value) { + return array.concat(value && value.constructor == Array ? value.flatten() : [value]); + }); + }, + /** + * 배열의 요소가 null 이나 빈문자열이면 제거한다. + * @function + */ + compact: function() { + return this.findAll(function(value) { + return (value != _NULL) && (value != ''); + }); + }, + /** + * 배열의 요소의 값 중 중복되는 값은 제거한다. + * @function + */ + uniq: function(sorted) { + return this.inject([], function(array, value, index) { + if (0 == index || (sorted ? array.last() != value : !array.contains(value))) + array.push(value); + return array; + }); + }, + /** + * 배열의 특정요소값을 추출하여 json객체(map)을 만든다. + * @function + */ + toMap: function(property) { + var results = {}; + this.each(function(value) { + results[value[property]] = value; + }); + return results; + } + }); + /** + * @deprecated use Array.prototype.findAll + */ + Array.prototype.select = Array.prototype.findAll; + /** + * @deprecated use Array.prototype.find + */ + Array.prototype.detect = Array.prototype.find; + + /** + * array like object(length와 index를 이용한 요소 접근이 가능)를 Array object로 변환한다. + * @example + * var arrayLikeObject = document.getElementsByTagName('img'); + * var arrayObject = $A(arrayLikeObject); + */ + _WIN.$A = function(arrayLikeObject) { + if (!arrayLikeObject) { + return []; + } + if (typeof arrayLikeObject.toArray === "function") { + return arrayLikeObject.toArray(); + } else { + var array = []; + for (var i = 0, len = arrayLikeObject.length; i < len; i++) { + array.push(arrayLikeObject[i]); + } + return array; + } + }; + + $tx.Set = function (/* comma seperated elements */) { + var args = arguments; + for (var i = 0, len = args.length; i < len; i++) { + this[args[i]] = _TRUE; + } + }; + $tx.Set.prototype.contains = function (element) { + return element in this; + }; + + $tx.objectToQueryString = function(obj) { + var queryString = []; + for (var key in obj) if (obj.hasOwnProperty(key)) { + var value = obj[key]; + if (value === _NULL || value === _UNDEFINED) { // 다른 falsy value 들은 값으로 출력되어야 한다. + value = ""; + } + queryString.push(encodeURIComponent(key) + "=" + encodeURIComponent(value)); + } + return queryString.join("&"); + }; +})(); + +// crossbrowser +(function() { + if (typeof(HTMLElement) != _UNDEFINED+'') { +// HTMLElement.prototype.innerText; + var hElementProto = HTMLElement.prototype; + var hElementGrandProto = hElementProto.__proto__ = { + __proto__: hElementProto.__proto__ + }; + if (HTMLElement.prototype.__defineSetter__) { + hElementGrandProto.__defineSetter__("innerText", function(sText) { + this.textContent = sText; + }); + } + if (HTMLElement.prototype.__defineGetter__) { + hElementGrandProto.__defineGetter__("innerText", function() { + return this.textContent; + }); + } + } + + if (typeof(XMLDocument) != _UNDEFINED+'') { + var XMLDoc = XMLDocument; + if (XMLDoc.prototype.__defineGetter__) { + XMLDoc.prototype.__defineGetter__("xml", function() { + return (new XMLSerializer()).serializeToString(this); + }); + } + } + if (typeof(Node) != _UNDEFINED+'') { + if (Node.prototype && Node.prototype.__defineGetter__) { + Node.prototype.__defineGetter__("xml", function() { + return (new XMLSerializer()).serializeToString(this); + }); + } + } + // Simple Implementation of + // setProperty() and selectNodes() and selectSingleNode() + // for FireFox [Mozilla] + if (typeof(_DOC.implementation) != _UNDEFINED+'') { + if (_DOC.implementation.hasFeature("XPath", "3.0")) { + if (typeof(XMLDoc) != _UNDEFINED+'') { + XMLDoc.prototype.selectNodes = function(cXPathString, xNode) { + if (!xNode) { + xNode = this; + } + var defaultNS = this.defaultNS; + var aItems = this.evaluate(cXPathString, xNode, { + normalResolver: this.createNSResolver(this.documentElement), + lookupNamespaceURI: function(prefix) { + switch (prefix) { + case "dflt": + return defaultNS; + default: + return this.normalResolver.lookupNamespaceURI(prefix); + } + } + }, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, _NULL); + var aResult = []; + for (var i = 0; i < aItems.snapshotLength; i++) { + aResult[i] = aItems.snapshotItem(i); + } + return aResult; + }; + XMLDoc.prototype.setProperty = function(p, v) { + if (p == "SelectionNamespaces" && v.indexOf("xmlns:dflt") == 0) { + this.defaultNS = v.replace(/^.*=\'(.+)\'/, "$1"); + } + }; + XMLDoc.prototype.defaultNS; + // prototying the XMLDocument + XMLDoc.prototype.selectSingleNode = function(cXPathString, xNode) { + if (!xNode) { + xNode = this; + } + var xItems = this.selectNodes(cXPathString, xNode); + if (xItems.length > 0) { + return xItems[0]; + } else { + return _NULL; + } + }; + XMLDoc.prototype.createNode = function(nNodeType, sNodeName, sNameSpace) { + if (nNodeType == 1) + return this.createElementNS(sNameSpace, sNodeName); + else //Etc Not Use + + return _NULL; + }; + } + if (typeof(Element) != _UNDEFINED+'') { + Element.prototype.selectNodes = function(cXPathString) { + if (this.ownerDocument.selectNodes) { + return this.ownerDocument.selectNodes(cXPathString, this); + } else { + throw "For XML Elements Only"; + } + }; + // prototying the Element + Element.prototype.selectSingleNode = function(cXPathString) { + if (this.ownerDocument.selectSingleNode) { + return this.ownerDocument.selectSingleNode(cXPathString, this); + } else { + throw "For XML Elements Only"; + } + }; + Element.prototype.text; + var elementProto = Element.prototype; + var elementGrandProto = elementProto.__proto__ = { + __proto__: elementProto.__proto__ + }; + if (Element.prototype.__defineSetter__) { + elementGrandProto.__defineSetter__("text", function(text) { + this.textContent = text; + }); + } + if (Element.prototype.__defineGetter__) { + elementGrandProto.__defineGetter__("text", function() { + return this.textContent; + }); + } + + if ( _WIN.origElement ) { + _WIN.origElement.prototype.selectNodes = Element.prototype.selectNodes; + _WIN.origElement.prototype.selectSingleNode = Element.prototype.selectSingleNode; + } + } + } + } +})(); + + +_WIN.$tx = $tx; \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/lib/xgetty.js b/src/main/webapp/daumeditor/js/lib/xgetty.js new file mode 100644 index 0000000..9c9ce28 --- /dev/null +++ b/src/main/webapp/daumeditor/js/lib/xgetty.js @@ -0,0 +1,165 @@ +/** + * XMLGetty - Very Very Simple XML Dom Selector Engine By XPath + * - xpath + */ +(function(){ + + var XMLGetty = function(node){ + this.selectSingleNode = function(path) { + if(!node) { + return _NULL; + } + return node.selectSingleNode(path); + }; + this.selectNodes = function(path) { + if(!node) { + return []; + } + return node.selectNodes(path); + }; + this.getAttributeNode = function(name) { + if(!node) { + return _NULL; + } + return node.getAttributeNode(name); + }; + this.hasChildNodes = function() { + if(!node) { + return _FALSE; + } + return node.hasChildNodes(); + }; + this.text = node? (node.textContent || node.text) : _NULL; + this.type = node? node.nodeType : 0; + this.name = (node && node.nodeType == 1)? (node.nodeName || "") : ""; + return this; + }; + + XMLGetty.prototype = { + 'getValueOrDefault': function(val, defval) { + if (val === "") { + return defval; + } else { + if (typeof(defval) === 'number') { + return (isNaN(val) ? 0 : parseInt(val)); + } else if (typeof(defval) === 'boolean') { + return !!val; + } else { + return val; + } + } + }, + + 'xText': function(defval){ + defval = defval || ""; + var val = this.text; + val = (val || "").trim(); + + return this.getValueOrDefault(val, defval); + }, + 'xAttr': function(name, defval){ + defval = defval || ""; + var attr = this.getAttributeNode(name); + var val = (!attr) ? "" : attr.nodeValue.trim(); + + return this.getValueOrDefault(val, defval); + }, + 'xGet': function(path){ + return xGetty(this, path); + }, + 'xGets': function(path){ + return xGetties(this, path); + } + }; + + var ieXmlParsers = [ + "MSXML2.DOMDocument.6.0", + "MSXML2.DOMDocument.5.0", + "MSXML2.DOMDocument.4.0", + "MSXML4.DOMDocument", + "MSXML3.DOMDocument", + "MSXML2.DOMDocument", + "MSXML.DOMDocument", + "Microsoft.XmlDom" + ]; + /** + * xCreate : Get XML DOM From XML Text + * @example + * var _xmlDoc = xCreate("hopeserver"); + * + * @param {string} text - responseText + * @return node + * extend function as xText, xAttr, xGet, xGets + */ + _WIN.xCreate = function(text) { + if($tx.msie) { + var xObj = (function() { + var _xObj = _NULL; + for(var i=0; i'); + } +} \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/popuputil.js b/src/main/webapp/daumeditor/js/popuputil.js new file mode 100644 index 0000000..ab9ffbc --- /dev/null +++ b/src/main/webapp/daumeditor/js/popuputil.js @@ -0,0 +1,274 @@ +// Height auto resizing +_WIN.autoResizeHeight = function ( fixedWidth, heightOffset) { + var win = window.top; + if (typeof fixedWidth == 'number') { + //fixedWidth += $tx.gecko ? 16 : 0; + var __STATUSBAR_SIZE = 50; + var __SCROLLBAR_SIZE = 30; + var __ASSUMPTION_MIN_HEIGHT = 300; + if ( !heightOffset ) heightOffset = 0; + + + var dl = self.document.documentElement; + + var diff = {}, pos = {x:0, y:0}; + var left = (win.screenLeft)?win.screenLeft:win.screenX; + var top = (win.screenTop)?win.screenTop:win.screenY; + + win.resizeTo( fixedWidth, __ASSUMPTION_MIN_HEIGHT); + + var contentScreentHeight = (dl.clientHeight == dl.scrollHeight && dl.scrollHeight != dl.offsetHeight )?dl.offsetHeight:dl.scrollHeight; + var contentScreentWidth = (dl.clientWidth == dl.scrollWidth && dl.scrollWidth != dl.offsetWidth )?dl.offsetWidth:dl.scrollWidth; + if(contentScreentHeight > dl.clientHeight) { + diff.height = contentScreentHeight - dl.clientHeight; + }else{ // for chrome -_- + diff.width = 8; + diff.height = dl.clientHeight - contentScreentHeight + 35; + } + pos.y = Math.min(screen.availHeight - contentScreentHeight - top - __STATUSBAR_SIZE,0) ; + pos.x = Math.min(screen.availWidth - contentScreentWidth - left - __SCROLLBAR_SIZE,0); + + if ( pos.x || pos.y ) { + if (!$tx.chrome) { + win.moveBy(pos.x, pos.y); + } + win.resizeTo( fixedWidth, __ASSUMPTION_MIN_HEIGHT ); + } + setTimeout(function() { + win.resizeBy(0, diff.height + heightOffset); + },20) + } else { + setTimeout(function() { + var obj = fixedWidth; + if(!obj)obj = document.getElementsByTagName('HTML')[0]; + var doc = document.getElementsByTagName('HTML')[0]; + var clientW = doc.clientWidth||doc.scrollWidth; + var clientH = doc.clientHeight||doc.scrollHeight; + var offsetW = obj.offsetWidth||obj.scrollWidth; + var offsetH = obj.offsetHeight||obj.scrollHeight; + //alert( clientW + " : " + clientH + " / " + offsetW + " : " + offsetH ) + var gapWidth = offsetW - clientW ; + var gapHeight = offsetH - clientH; + if(gapWidth || gapHeight) { + win.resizeBy(gapWidth,gapHeight); + } + }, 100); + } +}; + +_WIN.Querystring = function (query) { + + this.params = new Object(); + this.get = function(key, defaultValue) { + if (defaultValue == _NULL) { + defaultValue = _NULL; + } + var value = this.params[key]; + if (value == _NULL) { + value = defaultValue; + } + return value; + }; + this.getUTF8 = function(key, defaultValue) { + if (defaultValue == _NULL) { + defaultValue = _NULL; + } + var value = unescape(this.params[key]); + if (value == _NULL) { + value = defaultValue; + } + return value; + }; + + var qs; + if (query) { + qs = query; + }else { + qs = location.search.substring(1, location.search.length) + } + + if (qs.length == 0) { + return; + } + + qs = qs.replace(/\+/g, ' '); + var args = qs.split('&'); + + for (var i = 0; i < args.length; i++) { + var value; + var pair = args[i].split('='); + var name = unescape(pair[0]); + + if (pair.length == 2) { + value = pair[1]; + } else { + value = name; + } + this.params[name] = value; + } +}; + +_WIN.qs = new Querystring(); + +_WIN.closeWindow = function () { + completeAttach(); + + top.opener = self; + top.close(); + + var _opener; + if (opener && !opener.closed) { + _opener = opener; + }else{ + _opener = parent.opener; + } + if(_opener.Editor) { + _opener.Editor.focus(); + } else { + _opener.focus(); + } +}; + +_WIN.stripTags = function (str) { + return str.replace(/<\/?[^>]+>/gi, ''); +}; + +_WIN.getAttacher = function (name) { + return PopupUtil.getOpener().Editor.getSidebar().getAttacher(name); +}; + +_WIN.getEmbeder = function (name) { + return PopupUtil.getOpener().Editor.getSidebar().getEmbeder(name); +}; + +_WIN.registerAction = function (attacher) { + if(!attacher) { + return; + } + window.execAttach = attacher.attachHandler; +}; + +_WIN.registerSearch = function (searcher) { + if(!searcher) { + return; + } + window.execSearch = searcher.insertHandler; +}; + +_WIN.registerEmded = function (embeder) { + if(!embeder) { + return; + } + window.execEmbed = embeder.embedHandler; +}; + +_WIN.modifyResult = function () {}; //For Theme +_WIN.completeAttach = function () {}; //For Theme + +_WIN.existEntry = function (attacher) { + if(!attacher) { + return _FALSE; + } + return attacher.existEntry(); +}; + +_WIN.getFirstEntryData = function (attacher) { + if(!attacher) { + return _FALSE; + } + return attacher.getFirstEntryData(); +}; +_WIN.getAttrOfElement = function ( elementStr, attrName ) { + var regExp = new RegExp(attrName+"=['\"]?([^\"'>]*)[\"' ]","i"); + var result = regExp.exec( elementStr ); + + if ( result) { + return result[1]; + }else{ + return _NULL; + } +}; +_WIN.getParamValOfObjectTag = function ( objectStr, paramName ) { + var regExp = new RegExp("]*)name=['\"]"+paramName+"['\"]([^>]*)>","gi"); + var result = regExp.exec(objectStr, "gi"); + var value = _NULL; + + if ( result ) { + regExp = new RegExp("value=['\"]([^>'\"]*)['\"]", "gi"); + value = regExp.exec( result[0] ); + if ( value ) { + return value[1]; + } + } + + return _NULL; +}; +_WIN.PopupUtil = { + getOpener : function() { + var _opener; + if(opener && opener.Editor) { + _opener = opener; + } else if(parent.opener && parent.opener.Editor) { + _opener = parent.opener; + } else if(opener.opener && opener.opener.Editor) { + _opener = opener.opener; + } + return _opener; + } +}; + +_WIN.getDateFormat = function (date, format) { + date = date ? date.trim() : ''; + if ((date.length != 8) || (date.indexOf('0') == 0)) return ''; + var year = date.substr(0, 4) + (format || '년 '); + var _m = (date.substr(4, 2).indexOf('0') == 0) ? date.substr(5, 1) : date.substr(4, 2); + var _d = (date.substr(6, 2).indexOf('0') == 0) ? date.substr(7, 1) : date.substr(6, 2); + var month = (_m != '0') ? _m + (format || '월 ') : ''; + var day = ( _d != '0') ? (_d + (format ? '' : '일')) : ''; + return year + month + day; +}; + +_WIN.getDashedDateFormat = function (date) { + date = date.trim(); + if (date.length != 8 || date.indexOf('00') == 0) return ''; + var yy = removeZero(date.substr(0, 4), ''); + var mm = removeZero(date.substr(4, 2), '-'); + var dd = removeZero(date.substr(6, 2), '-'); + return yy + mm + dd; +}; + +_WIN.removeZero = function (number, fmt) { + return (number.indexOf('00') == 0) ? '' : fmt + number; +}; + +_WIN.getYearFormat = function (date) { + date = date.trim() || ''; + if (date.length != 8) return ""; + return date.substr(0, 4) + '년 '; +}; + +_WIN.getDayFormat = function (date) { + try { + date = date.trim(); + if (date.length != 8) return date; + var d = new Date(date.substr(0, 4), date.substr(4, 2) - 1, date.substr(6, 2)); + var dayFormat = ['일', '월', '화', '수', '목', '금', '토']; + return dayFormat[d.getDay()]; + } catch(e) {} + return ''; +}; + +_WIN.stripBracket = function (text) { + var splitText = text.trim().split(','); + var result = []; + splitText.each(function(txt) { + result.push(txt.replace(/\[\[[\w]*\]\]/, '')); + }); + return result.join(', '); +}; + +_WIN.getFieldJson = function (name, value) { + if (value) + return {name: name, value: value.stripTags()}; + return _NULL; +}; diff --git a/src/main/webapp/daumeditor/js/scopeVariable.js b/src/main/webapp/daumeditor/js/scopeVariable.js new file mode 100644 index 0000000..c23f9f5 --- /dev/null +++ b/src/main/webapp/daumeditor/js/scopeVariable.js @@ -0,0 +1,11 @@ +/** + * Application scope variable + * + */ +var _DOC = document, + _WIN = window, + _DOC_EL = _DOC.documentElement, + _FALSE = false, + _TRUE = true, + _NULL = null, + _UNDEFINED; \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/attachbox.js b/src/main/webapp/daumeditor/js/trex/attachbox.js new file mode 100644 index 0000000..938dbdc --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/attachbox.js @@ -0,0 +1,203 @@ + +TrexConfig.addSidebar('attachbox', { + show: _FALSE, + destroy: _FALSE +}); + +/** + * Trex.AttachBox + * Trex.Attachment instance들이 저장되는 class + * @class + * @extends Trex.EntryBox + */ +Trex.AttachBox = Trex.Class.create({ + /** @ignore */ + $extend: Trex.EntryBox, + isChecked: _FALSE, + initialize: function() { + + }, + checkAvailableCapacity: function() { //Before Popup + return _TRUE; + }, + getAvailableCapacity: function() { //Within Flash + return _TRUE; + }, + checkInsertableSize: function() { //Before Attach + return _TRUE; + } +}); + +Trex.install("editor.getAttachBox & sidebar.getAttachments", + function(editor, toolbar, sidebar, canvas, config){ + var _attachBox = new Trex.AttachBox(config, editor); + sidebar.entryboxRegistry['attachbox'] = _attachBox; + editor.getAttachBox = function() { + return _attachBox; + }; + sidebar.getAttachments = _attachBox.getEntries.bind(_attachBox); + } +); + +Trex.register("filter > attachers", + function(editor) { + var _attachBox = editor.getAttachBox(); + var _docparser = editor.getDocParser(); + _docparser.registerFilter( + 'filter/attachments', { + 'text@load': function(contents){ + var entries = _attachBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('text@load', contents); + } + contents = entry.getChangedContent(contents, entry.regLoad, ""); + }); + return contents; + }, + 'source@load': function(contents){ + var entries = _attachBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('source@load', contents); + } + contents = entry.getChangedContent(contents, entry.regLoad, entry.dispText); + }); + return contents; + }, + 'html@load': function(contents){ + var entries = _attachBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('html@load', contents); + } + contents = entry.getChangedContent(contents, entry.regLoad, entry.dispHtml); + }); + return contents; + }, + 'text4save': function(contents){ + var entries = _attachBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('text4save', contents); + } + contents = entry.getChangedContent(contents, entry.regText, ""); + }); + return contents; + }, + 'source4save': function(contents){ + var entries = _attachBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('source4save', contents); + } + contents = entry.getChangedContent(contents, entry.regText, entry.saveHtml, ["id", "class"]); + }); + return contents; + }, + 'html4save': function(contents){ + var entries = _attachBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('html4save', contents); + } + contents = entry.getChangedContent(contents, entry.regHtml, entry.saveHtml, ["id", "class"]); + }); + return contents; + }, + 'text2source': function(contents){ + return contents; + }, + 'text2html': function(contents){ + return contents; + }, + 'source2text': function(contents){ + var entries = _attachBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('source2text', contents); + } + contents = entry.getChangedContent(contents, entry.regText, ""); + }); + return contents; + }, + 'source2html': function(contents){ + var entries = _attachBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('source2html', contents); + } + contents = entry.getChangedContent(contents, entry.regText, entry.dispHtml); + }); + return contents; + }, + 'html2text': function(contents){ + var entries = _attachBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('html2text', contents); + } + contents = entry.getChangedContent(contents, entry.regHtml, ""); + }); + return contents; + }, + 'html2source': function(contents){ + var entries = _attachBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('html2source', contents); + } + contents = entry.getChangedContent(contents, entry.regHtml, entry.dispText, ["id", "class"]); + }); + return contents; + } + } + ); + } +); + +Trex.module("push history @when entrybox has changes", + function(editor, toolbar, sidebar, canvas) { + var _attachBox = editor.getAttachBox(); + + _attachBox.observeJob(Trex.Ev.__ENTRYBOX_ENTRY_REMOVED, function(entry) { + canvas.history.saveHistory( + { deleted: _FALSE }, + { deleted: _TRUE }, + function(data) { + entry.deletedMark = data.deleted; + _attachBox.fireJobs(Trex.Ev.__ENTRYBOX_ENTRY_REFRESH, entry); + } + ); + }); + /* + * IE에서는 canvas.execute 가 setTimeout 을 통하여 실행이 되기 때문에 + * 이하 실행되어야 하는 로직과 순서가 뒤바뀌는 문제가 있다. + * saveHistory, injectHistory 와 같이 쌍으로 실행이 되며, + * 순서 보장이 중요한 작업의 경우에 이를 맞춰주기 위해 뒤에 실행되어야 하는 로직도 + * setTimeout 을 이용한다. + */ + var runOrRunLaterIfIE = function(fn) { + if ($tx.msie) { + setTimeout(function() { + fn(); + }, 0); + } else { + fn(); + } + }; + + _attachBox.observeJob(Trex.Ev.__ENTRYBOX_ENTRY_ADDED, function(entry) { + runOrRunLaterIfIE(function() { + canvas.history.injectHistory( + { deleted: _TRUE }, + { deleted: _FALSE }, + function(data) { + entry.deletedMark = data.deleted; + _attachBox.fireJobs(Trex.Ev.__ENTRYBOX_ENTRY_REFRESH, entry); + } + ); + }); + }); + } +); diff --git a/src/main/webapp/daumeditor/js/trex/attachbox/attachbox_ui.js b/src/main/webapp/daumeditor/js/trex/attachbox/attachbox_ui.js new file mode 100644 index 0000000..0f42c4e --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/attachbox/attachbox_ui.js @@ -0,0 +1,424 @@ +TrexMessage.addMsg({ + '@attacher.ins': "삽입", + '@attacher.del': "삭제", + '@attacher.preview.image': "#iconpath/pn_preview.gif", + '@attacher.delete.confirm': "삭제하시면 본문에서도 삭제됩니다. 계속하시겠습니까?", + '@attacher.delete.all.confirm': "모든 첨부 파일을 삭제하시겠습니까? 삭제하시면 본문에서도 삭제됩니다.", + '@attacher.exist.alert': "이미 본문에 삽입되어 있습니다." +}); + +Trex.install("attachbox.onAttachBoxInitialized @if config.sidebar.attachbox.show = true", function(editor, toolbar, sidebar, canvas, config) { + var attachbox = editor.getAttachBox(); + if (config.sidebar.attachbox.show == _TRUE) { + Object.extend(attachbox, Trex.I.AttachBox); + attachbox.onAttachBoxInitialized(config, canvas, editor); + } +}); +Trex.I.AttachBox = { + useBox: _TRUE, + isDisplay: _FALSE, + lastSelectedEntry: _NULL, + onAttachBoxInitialized: function(config, canvas) { + var _entryBox = this; + this.canvas = canvas; + + var _initializedId = ((config.initializedId) ? config.initializedId : ""); + this.elBox = $must("tx_attach_div" + _initializedId, "Trex.I.AttachBox"); + + this.elList = $must("tx_attach_list" + _initializedId, "Trex.I.AttachBox"); + var _elPreview = $must('tx_attach_preview' + _initializedId, "Trex.I.AttachBox"); + this.elPreviewKind = $tom.collect(_elPreview, "p"); + var _elPreviewImg = $tom.collect(_elPreview, "img"); + this.elPreviewImg = _elPreviewImg; + this.imageResizer = new Trex.ImageResizer(_elPreviewImg, { + maxWidth: 147, + maxHeight: 108, + defImgUrl: TXMSG("@attacher.preview.image"), + onComplete: function(width, height) { //vertical positioning + _elPreviewImg.style.marginTop = Math.floor((108 - height) / 2).toPx(); + } + }); + + this.elDelete = $tom.collect("#tx_attach_delete" + _initializedId + " a"); + $tx.observe(this.elDelete, 'click', function() { + if (config.sidebar.attachbox.confirmForDeleteAll) { + _entryBox.onDeleteAll(false); + } else { + _entryBox.onDeleteAll(true); + } + }); + + if (typeof showAttachBox == "function") { //NOTE: 첨부박스가 보여질 때 실행할 서비스 콜백 + this.observeJob(Trex.Ev.__ATTACHBOX_SHOW, function() { + showAttachBox(); + }); + } + if (typeof hideAttachBox == "function") { //NOTE: 첨부박스가 감춰질 때 실행할 서비스 콜백 + this.observeJob(Trex.Ev.__ATTACHBOX_HIDE, function() { + hideAttachBox(); + }); + } + + var _elProgress = $must('tx_upload_progress' + _initializedId, 'Trex.I.AttachBox'); + this.elProgress = _elProgress; + this.elProgressPercent = $tom.collect(_elProgress, "div"); + this.elProgressTicker = $tom.collect(_elProgress, "p"); + + this.observeJob(Trex.Ev.__ENTRYBOX_ENTRY_ADDED, function(entry) { + _entryBox.registerEntryNode(entry); + _entryBox.displayBox(); + }); + this.observeJob(Trex.Ev.__ENTRYBOX_ENTRY_MODIFIED, function(entry) { + _entryBox.modifyEntryNode(entry); + _entryBox.refreshPreview(); + }); + this.observeJob(Trex.Ev.__ENTRYBOX_ENTRY_REMOVED, function(entry) { + _entryBox.removeEntryNode(entry); + _entryBox.displayBox(); + if (_entryBox.lastSelectedEntry && _entryBox.lastSelectedEntry.key == entry.key) { + _entryBox.refreshPreview(); + } + + }); + this.observeJob(Trex.Ev.__ENTRYBOX_ALL_ENTRY_REMOVED, function() { + _entryBox.datalist.each(function(entry) { + _entryBox.removeEntryNode(entry, _TRUE); + }); + _entryBox.displayBox(); + if (_entryBox.lastSelectedEntry) { + _entryBox.refreshPreview(); + } + }); + this.observeJob(Trex.Ev.__ENTRYBOX_ENTRY_REFRESH, function(entry) { + _entryBox.displayBox(); + _entryBox.refreshEntryNode(entry); + }); + + var _elUploadedSize = $tx('tx_attach_up_size' + _initializedId), _elMaximumSize = $tx('tx_attach_max_size' + _initializedId), _elGroupUsedSize = $tx('tx_attach_group_used_size' + _initializedId), _elGroupMaximumSize = $tx('tx_attach_group_max_size' + _initializedId); + + this.observeJob(Trex.Ev.__ENTRYBOX_CAPACITY_UPDATE, function() { + var capacity = config.sidebar.capacity; + if (capacity.show == _FALSE) { + return; + } + + if (_elUploadedSize) { + _elUploadedSize.innerText = capacity.uploaded.toByteUnit(); + } + if (_elMaximumSize) { + // maximum을 안쓰고 available을 사용하는 이유는 group 값 이용시 group.used의 사용여하에 따라 최대치가 달라지기 때문 + _elMaximumSize.innerText = capacity.available.toByteUnit(); + } + if (capacity.group) { + if (_elGroupUsedSize) { + _elGroupUsedSize.innerText = (capacity.group.used + capacity.uploaded).toByteUnit(); + } + if (_elGroupMaximumSize) { + _elGroupMaximumSize.innerText = capacity.group.maximum.toByteUnit(); + } + } + }); + + // canvas에서 제거된 첨부파일은 첨부박스에는 1차로는 남아있기 때문에 아래와 같은 삭제 과정이 필요하지 않다 + // canvas.observeJob(Trex.Ev.__CANVAS_PANEL_DELETE_SOMETHING, function(ev){ + // // 데이터중에 존재하지 stage에 존재하지 않는 entry는 박스에서 바로 제거 + // _entryBox.datalist.each(function (entry) { + // if (entry.type =='image' && entry.actor.name == 'image' && entry.existStage == false) { + // entry.execRemove(); + // } + // }); + // _entryBox.refreshPreview(); + // }); + }, + onDeleteAll: function(force) { + if (this.datalist.length === 0) { + return; + } + if (!force && !confirm(TXMSG("@attacher.delete.all.confirm"))) { + return; + } + this.datalist.each(function(entry) { + if (entry.deletedMark == _FALSE) { + entry.execRemove(); + } + }); + // this.imageResizer.execResize(TXMSG("@attacher.preview.image")); + this.initPreviewImage(); + }, + checkDisplay: function() { + return this.isDisplay; + }, + setDisplay: function(isDisplay) { + this.isDisplay = isDisplay; + }, + displayBox: function() { + var isDisplay = _FALSE; + for (var i = 0; i < this.datalist.length; i++) { + if (this.datalist[i].deletedMark == _FALSE) { + isDisplay = _TRUE; + } + } + //var isDisplay = (this.datalist.length > 0); + if (this.isDisplay == isDisplay) { + return; + } + if (isDisplay) { + $tx.show(this.elBox); + this.fireJobs(Trex.Ev.__ATTACHBOX_SHOW, _TRUE); + } else { + $tx.hide(this.elBox); + this.fireJobs(Trex.Ev.__ATTACHBOX_HIDE, _FALSE); + } + this.isDisplay = isDisplay; + }, + registerEntryNode: function(entry) { + var _elData = tx.li({ + className: "type-" + entry.type + }); + if (entry.actor.boxonly) { + $tx.addClassName(_elData, "tx-boxonly"); + } + this.elList.appendChild(_elData); + entry.elData = _elData; + + entry.makeSelection = function(isPreviewed) { + if (isPreviewed) { + this.showEntryThumb(entry); + } else { + this.hideEntryThumb(entry); + } + } +.bind(this); + + //NOTE: only blog cuz iframe area + $tx.observe(_elData, 'mouseover', this.onEntryMouseOver.bind(this, entry)); + $tx.observe(_elData, 'mouseout', this.onEntryMouseOut.bind(this, entry)); + + var _elRow = tx.dl(); + _elData.appendChild(_elRow); + + var _elName = tx.dt({ + className: "tx-name", + unselectable: "on" + }, entry.boxAttr.name); //파일명 + entry.elName = _elName; + _elRow.appendChild(_elName); + $tx.observe(_elData, 'click', function(e) { + var _el = $tx.element(e); + if (_el.className == "tx-delete" || _el.className == "tx-insert") { + return; + } + if (e.ctrlKey) { + this.clickEntryWithCtrl(entry); + } else if (e.shiftKey) { + this.clickEntryWithShift(entry); + } else { + this.clickEntry(entry); + } + if (entry.actor.name == 'image') { //NOTE: get image scale + if (!entry.data.width || !entry.data.height) { + new Trex.ImageScale(entry.data); + } + } + } +.bind(this), _FALSE); + + var _elButton = tx.dd({ + className: "tx-button" + }); //버튼 + _elRow.appendChild(_elButton); + + var _elDelete = tx.a({ + className: "tx-delete" + }, TXMSG("@attacher.del")); //삭제 + _elButton.appendChild(_elDelete); + $tx.observe(_elDelete, 'click', function() { + if (!confirm(TXMSG("@attacher.delete.confirm"))) { + return; + } + entry.execRemove(); + }, _FALSE); + + + var _elInsert = tx.a({ + className: "tx-insert" + }, TXMSG("@attacher.ins")); //삽입 + entry.elInsert = _elInsert; + _elButton.appendChild(_elInsert); + $tx.observe(_elInsert, 'click', function() { + if (entry.existStage && !entry.actor.config.multipleuse) { + alert(TXMSG("@attacher.exist.alert")); + } else { + entry.execAppend(); + } + }, _FALSE); + + + }, + changeState: function(entry) { + var _existStage = entry.existStage; + if (_existStage && !entry.actor.config.multipleuse) { + $tx.addClassName(entry.elData, "tx-existed"); + } else { + $tx.removeClassName(entry.elData, "tx-existed"); + } + }, + modifyEntryNode: function(entry) { + entry.elName.innerText = entry.boxAttr.name; + }, + removeEntryNode: function(entry, force) { + if (force) { + entry.elData.parentNode.removeChild(entry.elData); + } else if (entry.deletedMark) { + $tx.hide(entry.elData); + } + }, + refreshEntryNode: function(entry) { + if (entry.deletedMark) { + $tx.hide(entry.elData); + } else { + $tx.show(entry.elData); + } + }, + refreshPreview: function() { + // reload last selected entry + for (var i = 0, l = this.datalist.length - 1; i < l; ++i) { + var entry = this.datalist[i]; + if (this.lastSelectedEntry && this.lastSelectedEntry.key == entry.key && entry.deleteMark == false) { + this.setPreivewImage(entry); + return _TRUE; + } + } + + // reselect + for (var i = 0, l = this.datalist.length - 1; i < l; ++i) { + var entry = this.datalist[i]; + if (entry.deletedMark == false && $tx.hasClassName(entry.elData, "tx-clicked")) { + this.setPreivewImage(entry); + return _TRUE; + } + } + + // init + this.initPreviewImage(); + return _FALSE; + }, + setPreivewImage: function(entry) { + this.imageResizer.execResize(entry.boxAttr.image); + this.lastSelectedEntry = entry; + }, + initPreviewImage: function() { + this.imageResizer.execResize(TXMSG("@attacher.preview.image")); + this.lastSelectedEntry = _NULL; + }, + showEntryThumb: function(entry) { + $tx.addClassName(entry.elData, "tx-clicked"); + $tx.removeClassName(entry.elData, "tx-hovered"); + }, + hideEntryThumb: function(entry) { + $tx.removeClassName(entry.elData, "tx-clicked"); + }, + onEntryMouseOver: function(entry) { + $tx.addClassName(entry.elData, "tx-hovered"); + }, + onEntryMouseOut: function(entry) { + $tx.removeClassName(entry.elData, "tx-hovered"); + }, + startUpload: function() { + this.elProgressPercent.style.width = "0".toPx(); + $tx.setStyle(this.elList, { + opacity: 0.3 + }); + $tx.show(this.elProgress); + }, + doUpload: function(percent) { + var progressWidth = 300; + this.elProgressPercent.style.width = Math.floor(progressWidth * (isNaN(percent) ? 0 : parseFloat(percent) * 0.01)).toPx(); + this.elProgressTicker.innerText = Math.floor((isNaN(percent) ? 0 : parseFloat(percent))) + "%"; + }, + endUpload: function() { + $tx.hide(this.elProgress); + $tx.setStyle(this.elList, { + opacity: 1 + }); + }, + clickEntry: function(entry) { + if (this.lastSelectedEntry) { + if (this.lastSelectedEntry.key == entry.key) { + return; + } + this.datalist.each(function(entry) { + entry.makeSelection(_FALSE); + }); + } + this.elPreviewKind.className = ((entry.boxAttr.className) ? entry.boxAttr.className : ""); + entry.makeSelection(_TRUE); + this.setPreivewImage(entry); + }, + clickEntryWithCtrl: function(entry) { + if ($tx.hasClassName(entry.elData, 'tx-clicked')) { + entry.makeSelection(_FALSE); + this.refreshPreview(); + } else { + this.elPreviewKind.className = ((entry.boxAttr.className) ? entry.boxAttr.className : ""); + entry.makeSelection(_TRUE); + this.setPreivewImage(entry); + } + }, + clickEntryWithShift: function(entry) { + if ($tx.hasClassName(entry.elData, 'tx-clicked')) { + entry.makeSelection(_FALSE); + this.lastSelectedEntry = _NULL; + } else { + var idx = this.getIndexOf(entry); + var targetIdx; + if (this.lastSelectedEntry) { + targetIdx = this.getIndexOf(this.lastSelectedEntry); + } + + var from = targetIdx, to = idx; + if (idx == targetIdx) { + from = to = idx; + } else if (idx < targetIdx) { + from = idx; + to = targetIdx; + } + + this.elPreviewKind.className = ((entry.boxAttr.className) ? entry.boxAttr.className : ""); + for (var i = from; i < to + 1; i++) { + this.datalist[i].makeSelection(_TRUE); + } + this.setPreivewImage(entry); + } + }, + getIndexOf: function(entry) { + var i, matched; + for (i = 0; i < this.datalist.length; i++) { + if (this.datalist[i] === entry) { + matched = _TRUE; + break; + } + } + return matched ? i : -1; + }, + getSelectedList: function(attachType) { + var _list = []; + var _source; + if (attachType) { + _source = this.getAttachments(attachType); + } else { + _source = this.datalist; + } + _source.each(function(entry) { + if ($tx.hasClassName(entry.elData, "tx-clicked")) { + _list.push(entry); + } + }); + return _list; + }, + removeSelection: function(datalist) { + datalist.each(function(data) { + $tx.removeClassName(data.elData, "tx-clicked"); + }) + } +}; diff --git a/src/main/webapp/daumeditor/js/trex/attachbox/filecapacity.js b/src/main/webapp/daumeditor/js/trex/attachbox/filecapacity.js new file mode 100644 index 0000000..6d668b4 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/attachbox/filecapacity.js @@ -0,0 +1,248 @@ +Trex.install("attachbox.onFileCapacityInitialized @if sidebar.capacity.show = true", + function(editor, toolbar, sidebar, canvas, config){ + var attachbox = editor.getAttachBox(); + if (config.sidebar.capacity.show === _TRUE) { + Object.extend(attachbox, Trex.I.FileCapacity); + attachbox.onFileCapacityInitialized(config, canvas); + } + } +); +Trex.module("attachbox.updateCapacity on Trex.Ev.__ATTACHBOX_SHOW", + function(editor/*, toolbar, sidebar, canvas, config*/) { + var attachbox = editor.getAttachBox(); + attachbox.observeJob(Trex.Ev.__ATTACHBOX_SHOW, function() { + attachbox.updateCapacity(); + }); + } +); + +TrexConfig.addSidebar('capacity', + { + show: _TRUE, + maximum: 3145728, //3M <= 1024 + filemaximum: _NULL, + filter: { + use: '', //sound,movie + sound: { + title: 'sound file', + maximum: 3145728, + extensions: ",mp3,wav,ogg,wma,mp4,ape,wmv,asf,ra,ram," + }, + movie: { + title: 'movie file', + maximum: 3145728, + extensions: ",wmv,mpg,avi," + } + } + } +); +Trex.I.FileCapacity = { + onFileCapacityInitialized: function(config, canvas) { + var _initializedId = (config.initializedId) ? config.initializedId : ""; + var _fileConfig = config.sidebar.capacity; + + //#FTDUEDTR-1260 + //아래 부분이 소스상 전혀 사용되는 부분이 없어서 일단 주석처리하였습니다. + //this.elList = $must("tx_attach_list" + _initializedId, "Trex.I.FileCapacity"); + + _fileConfig.uploaded = 0; //Initialize capacity + _fileConfig.available = _fileConfig.maximum; //Remaining capacity + _fileConfig.uploadedFileNum = 0; //Uploaded file number. + + var _setCapacity = function(name, size) { + size = parseInt(size, 10); + if ( isNaN(size) || _fileConfig[name] == _UNDEFINED ){ + return _FALSE; // invalid setting + } + + if( _fileConfig.group && name == 'available' ){ + _fileConfig[name] = Math.min(size, _fileConfig.maximum, _fileConfig.group.maximum - _fileConfig.group.used); //사용가능한 용량 - 그룹용량 포함 + } else { + _fileConfig[name] = size; + } + + return _fileConfig[name]; + }; + + this.checkAvailableCapacity = function() { //Before Popup override + return (_fileConfig.uploaded < _fileConfig.available); + }; + this.checkInsertableSize = function(attachSize) { //Before Attach override + return (parseInt(_fileConfig.uploaded, 10) + parseInt(attachSize, 10) <= parseInt(_fileConfig.available, 10)); + }; + + /** + * Gets capacity by attachment type + * @memberOf Trex.AttachBox.prototype + * @alias getCapacity + * @param {Object} name + */ + this.getCapacity = function(name) { + return (_fileConfig[name] || 0); + }; + + /** + * Change available capacity + * @memberOf Trex.AttachBox.prototype + * @alias changeAvailableCapacity + * @param {Number} size + */ + this.changeAvailableCapacity = function(size){ + if ( _setCapacity("available", size ) ){ + capacityUpdateEvent(); + return size; + } + + return _FALSE; + }; + + /** + * Change maximum capacity + * @memberOf Trex.AttachBox.prototype + * @alias changeMaximumCapacity + * @param {Number} size + */ + this.changeMaximumCapacity = function(size){ + if ( _setCapacity("maximum", size ) ){ + return size; + } + return _FALSE; + }; + + /** + * Change one file maximum capacity + * @memberOf Trex.AttachBox.prototype + * @alias changeFileMaximumCapacity + * @param {Number} size + */ + this.changeFileMaximumCapacity = function(size){ + if ( _setCapacity("filemaximum", size ) ){ + return size; + } + return _FALSE; + }; + + this.updateCapacity = function() { + capacityUpdateEvent(); + } + + /** + * Resets uploaded file count & size + * + * @memberOf Trex.AttachBox.prototype + * @alias empty + */ + var _setAttachSize = function(fileSize) { + var uploaded = _fileConfig.uploaded + fileSize.toNumber(); + if( uploaded < 0 ){ + uploaded = 0; + } + _fileConfig.uploaded = uploaded; + }; + var decreaseCapacity = function(fileSize) { + _setAttachSize(-1 * fileSize); + _fileConfig.uploadedFileNum -= 1; + }; + var increaseCapacity = function(fileSize){ + _setAttachSize(fileSize); + _fileConfig.uploadedFileNum += 1; + }; + + var _filters = {}; + if(_fileConfig.filter.use.length > 0) { + _fileConfig.filter.use.split(",").each(function(filterName) { + if(_fileConfig.filter[filterName]) { + _filters[filterName] = Object.extend({}, _fileConfig.filter[filterName]); + } + }); + } + this.getFiltersNameByExt = function(ext) { + var _filterNames = []; + for(var _filterName in _filters) { + if(_filters[_filterName].extensions.indexOf("," + ext.toLowerCase() + ",") > -1) { + _filterNames.push(_filterName); + } + } + return _filterNames; + }; + this.getFilterExtensions = function(filterName) { + if (_filters[filterName]) { + return _filters[filterName].extensions; + }else { + return _NULL; + } + }; + this.getFilterMaximum = function(filterName) { + if (_filters[filterName]) { + return _filters[filterName].maximum; + }else { + return _NULL; + } + }; + this.getUploadedSizeByFilter = function(filterName) { + var _uploadedSize = 0; + var _extensions = _filters[filterName].extensions; + this.datalist.each(function(entry) { + if (entry.data && entry.data.filename) { + var _ext = entry.data.filename.split(".").pop().toLowerCase(); + if (_extensions.indexOf("," + _ext + ",") > -1) { + _uploadedSize += entry.data.filesize; + } + } + }); + return _uploadedSize; + }; + + //그룹용량사용 + if(_fileConfig.group) { + //사용가능한 용량 - 그룹용량 포함 + _setCapacity("available", Math.min(_fileConfig.maximum, _fileConfig.group.maximum - _fileConfig.group.used) ); + } + this.getGroupCapacity = function(name){ + return ((_fileConfig.group)? (_fileConfig.group[name] || 0): 0); + }; + + this.observeJob(Trex.Ev.__ENTRYBOX_ENTRY_ADDED, function(entry){ + if(entry.actor.isCheckSize) { + increaseCapacity(entry.data.filesize || 0); + capacityUpdateEvent(); + } + }); + this.observeJob(Trex.Ev.__ENTRYBOX_ENTRY_REMOVED, function(entry){ + if(entry.actor.isCheckSize) { + decreaseCapacity(entry.data.filesize || 0); + capacityUpdateEvent(); + } + }); + this.observeJob(Trex.Ev.__ENTRYBOX_ALL_ENTRY_REMOVED, function() { + _fileConfig.uploaded = 0; + _fileConfig.uploadedFileNum = 0; + capacityUpdateEvent(); + }); + this.observeJob(Trex.Ev.__ENTRYBOX_ENTRY_REFRESH, function(entry) { + if (!entry.actor.isCheckSize) { + return; + } + var size = entry.data.filesize || 0; + if (entry.deletedMark) { + decreaseCapacity(size); + } else { + increaseCapacity(size); + } + capacityUpdateEvent(); + }); + + var self = this; + var capacityUpdateEvent = function(){ + // 필요한 정보만 넘겨 줘야할까? _fileConfig를 그냥 넘겨도 될까?? + var senddata = { + uploaded: _fileConfig.uploaded, + available: _fileConfig.available, + maximum: _fileConfig.maximum, + uploadedFileNum: _fileConfig.uploadedFileNum, + group: _fileConfig.group + }; + self.fireJobs(Trex.Ev.__ENTRYBOX_CAPACITY_UPDATE, senddata); + }; + } +}; diff --git a/src/main/webapp/daumeditor/js/trex/attacher.js b/src/main/webapp/daumeditor/js/trex/attacher.js new file mode 100644 index 0000000..757c1f5 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/attacher.js @@ -0,0 +1,174 @@ +/** + * @filewoverview + * attacher.js - 첨부 관련 source로 이 소스에서 존재하는 Attacher들을 직접 생성한다. + * Editor가 생성될때 initialize된다. + */ + +TrexMessage.addMsg({ + '@attacher.can.modify.alert': "기존에 등록된 #{title}을(를) 수정할 수 있는 화면으로 이동합니다.", + '@attacher.can.modify.confirm': "#{title}은(는) 하나만 등록이 가능합니다.\n다시 올리시면 기존의 #{title}이(가) 삭제됩니다. 계속하시겠습니까?", + '@attacher.insert.alert': "에디터 상태에서만 삽입할 수 있습니다.", + '@attacher.capacity.alert': "용량을 초과하였습니다.", + '@attacher.size.alert': "용량을 초과하여 더이상 등록할 수 없습니다." +}); + +Trex.install("sidebar.getAttacher & sidebar.getUploadAdaptor", + function(editor, toolbar, sidebar) { + var _attachers = sidebar.attachers = {}; + + /** + * memberOf Trex.Sidebar.prototype + * @param {Object} name + */ + sidebar.getAttacher = function(name) { + if(_attachers[name] != _NULL) { + return _attachers[name]; + } else if(arguments.length == 0){ + return _attachers; + }else{ + return _NULL; + } + }; + + } +); + +Trex.register("new attachers", + function(editor, toolbar, sidebar, canvas, config) { + var _attachBox = editor.getAttachBox(); + var _attachers = sidebar.attachers; + + for(var i in Trex.Attacher) { + var _name = Trex.Attacher[i]['__Identity']; + if(_name){ + _attachers[_name] = new Trex.Attacher[i](editor, _attachBox, config); + } + } + + if (_attachers["file"]) { + sidebar.getUploadAdaptor = function(){ + return _attachers["file"].getAdaptor(); + }; + } + } +); + +/** + * Class Trex.Attacher + * + * @abstract + * @class + * @extends Trex.Actor + * @param {Object} editor + * @param {Object} entryBox + * @param {Object} config + */ +Trex.Attacher = Trex.Class.draft(/** @lends Trex.Attacher.prototype */{ + /** @ignore */ + $extend: Trex.Actor, + canModified: _FALSE, + canResized: _FALSE, + initialize: function(editor, entryBox, config) { + this.editor = editor; + this.canvas = editor.getCanvas(); + this.entryBox = entryBox; + + var _config = this.config = TrexConfig.getAttacher(this.constructor.__Identity, config); + if(config.pvpage && !!_config.usepvpage) { + this.pvUrl = TrexConfig.getUrl(config.pvpage, { "pvname": this.name }); + } + this.boxonly = ((_config.boxonly != _NULL)? _config.boxonly: _FALSE); + this.isMultiple = ((_config.multiple != _NULL)? _config.multiple: _FALSE); + this.isCheckSize = ((_config.checksize != _NULL)? _config.checksize: _FALSE); + this.wysiwygonly = ((_config.wysiwygonly != _NULL)? _config.wysiwygonly: _TRUE); + this.pastescope = _config.pastescope; + + if (this.oninitialized) { + this.oninitialized(config); + } + this.attachHandler = this.attachHandler.bind(this); + }, + /** + * Attacher를 실행, 첨부를 하기 위한 popup window를 띄워주거나 필요한 action을 수행한다. + * @param {String} param - 팝업을 띄울때 추가할 파라미터 문자열 + * @function + */ + execute: function(param) { + if(this.wysiwygonly && !this.canvas.isWYSIWYG()) { + alert(TXMSG("@attacher.insert.alert")); + return; + } + + if(this.isCheckSize && !this.entryBox.checkAvailableCapacity()) { + alert(TXMSG("@attacher.capacity.alert")); + return; + } + + if(!this.checkInsertable()) { + if(this.canModified) { + var _jstObj = new Template( TXMSG("@attacher.can.modify.alert") ); + alert( _jstObj.evaluate( {title : this.title})); + } else { + var _jstObj = new Template( TXMSG("@attacher.can.modify.confirm") ); + if(!confirm(_jstObj.evaluate({ title : this.title }))) { + return; + } + } + } + if(this.clickHandler) { + this.clickHandler(); + } else { + try { + var _url = this.config.popPageUrl; + if(param) { + _url = _url + ((_url.indexOf("?") > -1) ? "&" : "?") + param; + } + var isDocumentDomainDeclaredExplicitly = (document.location.hostname != document.domain); + if (isDocumentDomainDeclaredExplicitly) { + _url = _url + ((_url.indexOf("?") > -1) ? "&" : "?") + "xssDomain=" + document.domain; + } + + _url = (this.pvUrl? this.pvUrl + ((this.pvUrl.indexOf("?") > -1) ? "&" : "?") + "u="+escape(_url): _url); + var win = _WIN.open(_url, "at" + this.name, this.config.features); + win.focus(); + } catch (e) {} + } + }, + /** + * Argument의 data를 이용해서 editor에 첨부하며, Attacher type에 때라 data의 format은 다르다. + * @function + * @param {Object} data + * @param {Object} attachmentType - optional + */ + attachHandler: function(data, attachmentType) { + if(this.checkInsertable()) { + if(this.isCheckSize && !this.entryBox.checkInsertableSize(data.filesize)) { + alert(TXMSG("@attacher.size.alert")); + return; + } + this.execAttach(data, attachmentType); + } else { + this.execReattach(data, attachmentType); + } + }, + createEntry: function(data, type) { + return this.createAttachment(data, type); + }, + createAttachment: function(data, type) { + var _attachmentType = this.constructor.__Identity; + if(type){ + _attachmentType = type; + } + return new Trex.Attachment[_attachmentType.capitalize()](this, data); + }, + checkInsertable: function() { + if (this.isMultiple) { + return _TRUE; + } + + var list = this.getDatalist().findAll(function(entry) { + return entry.deletedMark != _TRUE; + }); + return list.length === 0; + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/attacher/file.js b/src/main/webapp/daumeditor/js/trex/attacher/file.js new file mode 100644 index 0000000..250bb36 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/attacher/file.js @@ -0,0 +1,220 @@ +/** + * @fileoverview + * File 업로드 관련 Source + * Trex.Tool.File - UI, + * Trex.Attacher.File, + * Trex.Attachment.File, + * default configuration를 포함하고 있다. + */ +TrexConfig.addTool( + "file", + { + disabledonmobile: _TRUE, + wysiwygonly: _TRUE, + sync: _FALSE, + status: _FALSE + } +); + +TrexMessage.addMsg({ + '@file.title': "파일" +}); + +/** + * Trex.Tool.File + * @class + * @extends Trex.Tool + */ +Trex.Tool.File = Trex.Class.create({ + /** ignore */ + $const: { + __Identity: 'file' + }, + /** ignore */ + $extend: Trex.Tool, + oninitialized: function() { + var _editor = this.editor; + this.weave.bind(this)( + new Trex.Button(this.buttonCfg), + _NULL, + function() { + _editor.getSidebar().getAttacher("file").execute(); + } + ); + } +}); + +TrexConfig.addAttacher( + "file", + { + multiple: _TRUE, + multipleuse: _FALSE, + checksize: _TRUE, + boxonly: _FALSE, + wysiwygonly: _FALSE, + features: { left:250, top:65, width:450, height:404 }, + popPageUrl: "#host#path/pages/trex/file.html" + }, + function(root){ + var _config = TrexConfig.getAttacher("file", root); + _config.popPageUrl = TrexConfig.getUrl(_config.popPageUrl); + _config.features = TrexConfig.getPopFeatures(_config.features); + } +); + +/** + * Trex.Attacher.File + * @class + * @extends Trex.Attacher + */ +Trex.Attacher.File = Trex.Class.create({ + /** @ignore */ + $const: { + __Identity: 'file' + }, + /** @ignore */ + $extend: Trex.Attacher, + name: 'file', + title: TXMSG("@file.title"), + canModified: _TRUE, + canResized: _FALSE, + oninitialized: function() { + }, + getKey: function(data) { + return data.key || data.attachurl; + }, + /** + * data를 editor에 맞게 parsing할때 불리는 methond + * @memberOf Trex.Attacher.File.prototype + * @param {Object} data + */ + getDataForEntry: function(data) { + if(!data.dispElId) { + data.dispElId = Trex.Util.getDispElId(); + } + var _seq = ((data.tmpSeq)? this.entryBox.syncSeq(data.tmpSeq): this.entryBox.newSeq()); + var _ext = data.filename.split(".").pop().toLowerCase(); + var _thumburl; + switch(_ext){ + case "jpg": + case "gif": + case "png": + case "bmp": + _thumburl = data.attachurl.replace("/attach/", "/thumbnail/"); + break; + default : + _thumburl = Trex.Util.thumburl(_ext); + } + var _data = Object.extend({ + dataSeq: _seq, + thumburl: _thumburl, + prevurl: Trex.Util.prevurl(data.filename.split(".").pop().toLowerCase()) + }, data); //NOTE: Cuz IE + return _data; + } +}); + +/** + * Trex.Attachment.File + * + * @example + * data = { + * attachurl: "string", + * filename: "string", + * filesize: number, + * filemime: "string" + * } + * @class + * @extends Trex.Attachment + */ +Trex.Attachment.File = Trex.Class.create({ + /** @ignore */ + $const: { + __Identity: 'file' + }, + /** @ignore */ + $extend: Trex.Attachment, + getFieldAttr: function(data) { + return { + name: 'tx_attach_file', + value: [data.attachurl, data.filesize, data.filename].join('|') + }; + }, + getBoxAttr: function(data) { + var _nameMaxLength = 56; + var _filename = data.filename; + if(_filename.getRealLength() > _nameMaxLength) { + if (/\./.test(_filename)) { + var _nameArr = _filename.split("."); + var _ext = _nameArr.pop().cutRealLength(_nameMaxLength - 4); + var _name = _nameArr.join(".").cutRealLength(_nameMaxLength - 1 - _ext.length); + _filename = _name + "." + _ext; + } else { + _filename = _filename.cutRealLength(_nameMaxLength); + } + } + return { + name: _filename + " (" + data.filesize.toByteUnit() + ")", + image: data.thumburl + }; + }, + /** + * object의 style 값을 가져온다. + * @function + */ + getObjectStyle: function(data) { + var _objstyle = {}; + if(this.actor.config.objstyle) { + _objstyle = Object.extend(_objstyle, this.actor.config.objstyle); + } + if(data.imagealign) { + var _objectStyle = { + "L": Trex.Tool.AlignLeft, + "C": Trex.Tool.AlignCenter, + "FL": Trex.Tool.AlignRight, + "FR": Trex.Tool.AlignFull + }[data.imagealign]; + if (_objectStyle && _objectStyle.__TextModeProps && _objectStyle.__TextModeProps['image']) { + _objstyle = Object.extend(_objstyle, _objectStyle.__TextModeProps['button']['style']); + } + } + return _objstyle; + }, + /** + * object를 감싸고 있는 paragraph tag 의 style 값을 가져온다. + * @function + */ + getParaStyle: function(data) { + var _parastyle = Object.extend({}, this.actor.config.parastyle || this.actor.config.defaultstyle); + if(data.imagealign) { + var _objectStyle = { + "L": Trex.Tool.AlignLeft, + "C": Trex.Tool.AlignCenter, + "FL": Trex.Tool.AlignFull, + "FR": Trex.Tool.AlignRight + }[data.imagealign]; + if (_objectStyle && _objectStyle.__TextModeProps && _objectStyle.__TextModeProps['paragraph']) { + _parastyle = Object.extend(_parastyle, _objectStyle.__TextModeProps['paragraph']['style']); + } + } + return _parastyle; + }, + getSaveHtml: function(data) { + return " " + data.filename + ""; + }, + getDispHtml: function(data) { + return ""; + }, + getDispText: function(data) { + return "[" + TXMSG("@file.title") + ":" + data.dataSeq + "]"; + }, + getRegLoad: function(data) { + return new RegExp("<(?:a|A)\\s*href=\"?" + data.attachurl.getRegExp() + "[^\"]*\"?[^>]*><(?:img|IMG)[^>]*\/?>[\\S\\s]*?<\/(?:a|A)>", "gm"); + }, + getRegHtml: function(data) { + return new RegExp("<(?:button|BUTTON)[^>]*id=\"?" + data.dispElId + "\"?[^>]*>[\\S\\s]*?" + data.attachurl.getRegExp() + "[\\S\\s]*?<\/(?:button|BUTTON)>", "gm"); + }, + getRegText: function(data) { + return new RegExp("\\[" + TXMSG("@file.title") + ":" + data.dataSeq + "\\]", "gm"); + } +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/attacher/image.js b/src/main/webapp/daumeditor/js/trex/attacher/image.js new file mode 100644 index 0000000..10ada57 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/attacher/image.js @@ -0,0 +1,223 @@ +/** + * @imageoverview + * Image 업로드 관련 Source + * Trex.Tool.Image - UI, + * Trex.Attacher.Image, + * Trex.Attachment.Image, + * default configuration를 포함하고 있다. + */ +TrexConfig.addTool( + "image", + { + disabledonmobile: _TRUE, + wysiwygonly: _TRUE, + sync: _FALSE, + status: _FALSE + } +); + +TrexMessage.addMsg({ + '@image.title': "사진" +}); + +Trex.Tool.Image = Trex.Class.create({ + $const: { + __Identity: 'image' + }, + $extend: Trex.Tool, + oninitialized: function() { + var _editor = this.editor; + this.weave.bind(this)( + new Trex.Button(this.buttonCfg), + _NULL, + function() { + _editor.getSidebar().getAttacher("image").execute(); + } + ); + } +}); + +TrexConfig.addAttacher( + "image", + { + multiple: _TRUE, + multipleuse: _FALSE, + checksize: _TRUE, + boxonly: _FALSE, + wysiwygonly: _TRUE, + objattr: {}, + features: { left:250, top:65, width:797, height:644 }, + popPageUrl: "#host#path/pages/trex/image.html" + }, + function(root){ + var _config = TrexConfig.getAttacher("image", root); + _config.popPageUrl = TrexConfig.getUrl(_config.popPageUrl); + _config.features = TrexConfig.getPopFeatures(_config.features); + } +); + +/** + * Trex.Attacher.Image + * @class + * @extends Trex.Attacher + */ +Trex.Attacher.Image = Trex.Class.create({ + $const: { + __Identity: 'image' + }, + $extend: Trex.Attacher, + name: 'image', + title: TXMSG("@image.title"), + canModified: _FALSE, + canResized: _TRUE, + matchRegexStartTag: /<(\w+)/,// 첨부시에 dispHtml을 기준으로 속성 및 스타일을 적용 할 태그를 찾을 때 사용 + oninitialized: function() { + + }, + getKey: function(data) { + return data.imageurl; + }, + getDataForEntry: function(data) { + data.imageurl = this.encodeSpaceInUrl(data.imageurl); + data.originalurl = this.encodeSpaceInUrl(data.originalurl); + data.attachurl = this.encodeSpaceInUrl(data.attachurl); + data.thumburl = data.thumburl || data.imageurl.replace(/\/image\//gm, '/P150x100/'); + + if(!data.dispElId) { + data.dispElId = Trex.Util.getDispElId(); + } + var _seq = ((data.tmpSeq)? this.entryBox.syncSeq(data.tmpSeq): this.entryBox.newSeq()); + var _data = Object.extend({ + dataSeq: _seq + }, data); //NOTE: Cuz IE + return _data; + }, + createEntry: function(data, type) { + return this.createAttachment(data, type); + }, + encodeSpaceInUrl: function(url){ + if ( !url ) { + return ; + } + + return url.replace(/ /g, "%20"); + }, + execAttach: function(data, type) { + var _entry = this.createEntry(this.getDataForEntry(data), type); + _entry.execRegister(); + }, + execReload: function(data, content, type) { + var _entry = this.createEntry(this.getDataForEntry(data, content), type); + _entry.execReload(); + } +}); + +/** + * Trex.Attachment.Image + * + * @example + * data = { + * thumburl: "string", + * imageurl: "string", + * filename: "string", + * filesize: number + * } + * @class + * @extends Trex.Attachment + */ +Trex.Attachment.Image = Trex.Class.create({ + $const: { + __Identity: 'image' + }, + $extend: Trex.Attachment, + getFieldAttr: function(data) { + return { + name: 'tx_attach_image', + value: [data.thumburl, data.imageurl, data.originalurl, data.exifurl, data.filename, data.filesize].join('|') + }; + }, + getBoxAttr: function(data) { + var _rectangle = data.width ? data.width + "x" + data.height + " / " : ""; + return { + name: data.filename + " (" + _rectangle + data.filesize.toByteUnit() + ")", + image: data.thumburl + }; + }, + getObjectAttr: function(data) { + var _objattr = Object.extend({}, this.actor.config.objattr); + if(data.width) { + if(!_objattr.width || _objattr.width > data.width) { + _objattr.width = data.width; + } + } else { + _objattr.width = _NULL; + } + if(data.height) { + if(!_objattr.height || _objattr.height > data.height) { + _objattr.height = data.height; + } + } else { + _objattr.height = _NULL; + } + return _objattr; + }, + /** + * object의 style 값을 가져온다. + * @function + */ + getObjectStyle: function(data) { + var _objstyle = {}; + if(this.actor.config.objstyle) { + _objstyle = Object.extend(_objstyle, this.actor.config.objstyle); + } + if(data.imagealign) { + var _objectStyle = { + "L": Trex.Tool.AlignLeft, + "C": Trex.Tool.AlignCenter, + "FL": Trex.Tool.AlignRight, + "FR": Trex.Tool.AlignFull + }[data.imagealign]; + if (_objectStyle && _objectStyle.__ImageModeProps && _objectStyle.__ImageModeProps['image']) { + _objstyle = Object.extend(_objstyle, _objectStyle.__ImageModeProps['image']['style']); + } + } + return _objstyle; + }, + /** + * object를 감싸고 있는 paragraph tag 의 style 값을 가져온다. + * @function + */ + getParaStyle: function(data) { + var _parastyle = Object.extend({}, this.actor.config.parastyle || this.actor.config.defaultstyle); + if(data.imagealign) { + var _objectStyle = { + "L": Trex.Tool.AlignLeft, + "C": Trex.Tool.AlignCenter, + "FL": Trex.Tool.AlignRight, + "FR": Trex.Tool.AlignFull + }[data.imagealign]; + if (_objectStyle && _objectStyle.__ImageModeProps && _objectStyle.__ImageModeProps['paragraph']) { + _parastyle = Object.extend(_parastyle, _objectStyle.__ImageModeProps['paragraph']['style']); + } + } + return _parastyle; + }, + getSaveHtml: function(data) { + return ""; + }, + getDispHtml: function(data) { + return ""; + }, + getDispText: function(data) { + return ""; + }, + getRegLoad: function(data) { + return new RegExp("<(?:img|IMG)[^>]*src=\"?" + data.imageurl.getRegExp() + "\"?[^>]*\/?>", "gim"); + }, + getRegHtml: function(data) { + return new RegExp("<(?:img|IMG)[^>]*src=\"?" + data.imageurl.getRegExp() + "\"?[^>]*\/?>", "gim"); + }, + getRegText: function(data) { + return new RegExp("<(?:img|IMG)[^>]*src=\"?" + data.imageurl.getRegExp() + "\"?[^>]*\/?>", "gim"); + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/attachment.js b/src/main/webapp/daumeditor/js/trex/attachment.js new file mode 100644 index 0000000..003ec1b --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/attachment.js @@ -0,0 +1,205 @@ +/** + * @fileoverview + * attachments.js + * + */ +TrexMessage.addMsg({ + '@attacher.only.wysiwyg.alert': "에디터 상태에서만 본문에 삽입할 수 있습니다.\n에디터모드에서 첨부박스의 썸네일을 클릭해서 삽입할 수 있습니다." +}); +/** + * Trex.Attachment + * 첨부된 data를 wrapping하는 class + * + * @abstract + * @class + * @extends Trex.Entry + * + * @param {Object} actor + * @param {Object} data + */ +Trex.Attachment = Trex.Class.draft(/** @lends Trex.Attachment.prototype */{ + /** @ignore */ + $extend: Trex.Entry, + isChecked: _FALSE, + focused: _FALSE, + attrs: { + align: "left" + }, + initialize: function(actor, data) { + this.actor = actor; + this.canvas = actor.canvas; + this.entryBox = actor.entryBox; + + this.type = this.constructor.__Identity; + this.setProperties(data); + + if (this.oninitialized) { + this.oninitialized(actor, data); + } + }, + /** + * focused 값을 설정한다. + * @function + */ + setFocused: function(focused) { + if (this.focused !== focused) { + this.focused = focused; + } + }, + /** + * existStage 값을 설정한다. + * @function + */ + setExistStage: function(existStage) { //just attachments~ + /** + * attachment가 content에 존재하는지 확인할 때 사용되는 속성 + */ + this.existStage = existStage; + if (this.entryBox.changeState) { + this.entryBox.changeState(this); + } + }, + /** + * content에서 attachment를 지운다. + * @function + */ + remove: function() { + var _content = this.canvas.getContent(); + if (this.canvas.isWYSIWYG()) { + if (_content.search(this.regHtml) > -1) { + _content = _content.replace(this.regHtml, ""); + this.canvas.setContent(_content); + } + } else { + if (_content.search(this.regText) > -1) { + _content = _content.replace(this.regText, ""); + this.canvas.setContent(_content); + } + } + }, + /** + * attachment HTML을 에디터 본문에 붙여넣는다. + * @function + */ + register: function() { + if (Editor.getSidebar().addOnlyBox) { + return; + } + var _actor = this.actor; + if (_actor.boxonly) { + return; + } + + if (this.canvas.isWYSIWYG()) { + var _pastescope = this.pastescope; + var _dispHtml = this.dispHtml; + var objectElemTagName = "img"; + var findRegex = this.matchRegexStartTag;// /<(\w+)/ + var matched = _dispHtml.match(findRegex); + //for other elements(Exam: button of file attachment). + if (matched && matched[1]) { + objectElemTagName = matched[1]; + } + if (this.objectStyle) { + var objectElemeReg = new RegExp("<" + objectElemTagName + " ", "i"); + _dispHtml = _dispHtml.replace(objectElemeReg, "<" + objectElemTagName + " style=\"" + Trex.Util.toStyleString(this.objectStyle) + "\" "); + } + if (this.objectAttr) { + _dispHtml = _dispHtml.replace(objectElemeReg, "<" + objectElemTagName + " " + Trex.Util.toAttrString(this.objectAttr) + " "); + } + var _style = this.paragraphStyle || {}; + if ($tx.webkit) { + this.canvas.getPanel('html').el.focus(); // FTDUEDTR-1281 + } + this.canvas.execute(function(processor) { + processor.moveCaretWith(_pastescope); + processor.pasteContent(_dispHtml, _TRUE, { + 'style': _style + }); + }); + } else { + if (this.actor.wysiwygonly) { + alert(TXMSG("@attacher.only.wysiwyg.alert")); + } else { + this.canvas.getProcessor().insertTag('', this.dispText); + } + } + }, + /** + * 인자로 받은 old regex로 attachment를 식별해서 HTML을 교체한다. + * @function + */ + replace: function(oldReg) { + var _canvas = this.canvas; + var _content = _canvas.getContent(); + var _actor = this.actor; + if (!_actor.boxonly) { + if (_canvas.isWYSIWYG()) { + if (_content.search(oldReg.regHtml) > -1) { + _content = _content.replace(oldReg.regHtml, this.dispHtml); + _canvas.setContent(_content); + } else { + _canvas.pasteContent(this.dispHtml, _TRUE); + } + } else { + if (_content.search(oldReg.regText) > -1) { + _content = _content.replace(oldReg.regText, ""); + _canvas.setContent(_content); + } + alert(TXMSG("@attacher.only.wysiwyg.alert")); + } + } + }, + /** + * attachment 관련하여 필요한 속성을 this 객체에 할당한다. + * @function + */ + setProperties: function(data) { + var _data = data; + this.data = _data; + this.key = this.actor.getKey(_data) || 'K' + Trex.Util.generateKey(); + this.field = this.getFieldAttr(_data); + this.boxAttr = this.getBoxAttr(_data); + + this.objectAttr = this.getObjectAttr.bind(this)(_data); + this.objectStyle = this.getObjectStyle.bind(this)(_data); + this.paragraphStyle = this.getParaStyle.bind(this)(_data); + + this.saveHtml = this.getSaveHtml.bind(this)(_data); + this.dispHtml = this.getDispHtml.bind(this)(_data); + this.dispText = this.getDispText.bind(this)(_data); + this.regLoad = this.getRegLoad.bind(this)(_data); + this.regHtml = this.getRegHtml.bind(this)(_data); + this.regText = this.getRegText.bind(this)(_data); + }, + refreshProperties: function() { + this.setProperties(this.data); + }, + /** + * object의 attribute 값을 가져온다. + * @function + */ + getObjectAttr: function() { + return this.actor.config.objattr; + }, + getObjectStyle: function() { + var objstyle = {}; + if (this.actor.config.objstyle) { + objstyle = Object.extend(objstyle, this.actor.config.objstyle); + } + return objstyle; + }, + getParaStyle: function(data) { + var parastyle = Object.extend({}, this.actor.config.parastyle || this.actor.config.defaultstyle); + return parastyle; + }, + updateEntryElement: function(targetElement) { + if (!targetElement) { + return; + } + + var tempNode = _DOC.createElement('div'); + tempNode.innerHTML = this.dispHtml; + targetElement.innerHTML = $tom.first(tempNode).innerHTML; + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/canvas.js b/src/main/webapp/daumeditor/js/trex/canvas.js new file mode 100644 index 0000000..6393410 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/canvas.js @@ -0,0 +1,926 @@ +/** + * @fileOverview + * 컨텐츠를 가지고 있는 편집 영역을 수정, 관리하는 Trex.Canvas 관련 Source로 + * 대부분 각 panel들에게 행동들을 위임한다. + * 편집 영역 = panel = TextPanel, HtmlPanel, WysiwygPanel + */ +(function(Trex) { + var QUERY_TRIGGER_KEYCODES = new $tx.Set(13, 8, 32, 33, 34, 37, 38, 39, 40, 46); + var shouldTriggerQuery = function(keyCode) { + return QUERY_TRIGGER_KEYCODES.contains(keyCode); + }; + + TrexConfig.add({ + "canvas": { + doctype: "auto", // edge + mode: ["text", "html", "source"], + styles: { + color: "#333333", + fontFamily: "돋움", + fontSize: "9pt", + backgroundColor: "#ffffff", + lineHeight: "1.5", + padding: "8px" + }, + pMarginZero: true, + selectedMode: "html", + readonly: _FALSE, + initHeight: 400, + minHeight: 200, + ext: 'html', + param: "", + newlinepolicy: "p", + showGuideArea: _TRUE, + convertingText: _TRUE, + escapeTextModeContents: _TRUE, + removeTextModeBr: _FALSE, + respectVisibilityInDesign: _TRUE + } + }, function(root) { + var _config = TrexConfig.get('canvas', root); + var _evConfig = root.events; + _config.initializedId = root.initializedId || ''; + _config.useHotKey = _evConfig.useHotKey; + var _switcher = TrexConfig.getTool('switcher', root); + if (Trex.available(_switcher, "switcher" + _config.initializedId)) { + _config.mode = _switcher.options.pluck("data"); + } + var _fontfamily = TrexConfig.getTool('fontfamily', root); + if (Trex.available(_fontfamily, "fontfamily" + _config.initializedId)) { + if(_fontfamily.webfont && _fontfamily.webfont.use) { + _config.webfont = _fontfamily.webfont; + _config.webfont.options.each(function(element) { + element.url = TrexConfig.getUrl(element.url); + }); + } + } + var _resizer = TrexConfig.get('resizer', root); + if (_resizer) { + _config.minHeight = _resizer.minHeight; + } + /** + * 에디터통합 버전으로 한메일 배포시에는 + * 윗줄 주석해제, 아랫줄 삭제 + */ + //_config.wysiwygUrl = TrexConfig.getUrl(["#host#path/pages/daumx/", "wysiwyg_", (_config.serviceWysiwyg || "" ), ((_config.doctype == "html") ? "html" : "xhtml"), ".", (_config.ext ? _config.ext : "html"), "?prefix=" + root.initializedId, "&", _config.param].join("")); + _config.wysiwygUrl = TrexConfig.getUrl([(_config.wysiwygPath || "#host#path/pages/daumx/"), "wysiwyg_", (_config.serviceWysiwyg || "" ), ((_config.doctype == "html") ? "html" : "xhtml"), ".", (_config.ext ? _config.ext : "html"), "?prefix=" + root.initializedId, "&", _config.param].join("")); + + /** + * doctype 결정기준 + */ + if (_config.doctype == 'auto') { + if ($tx.msie && $tx.msie_quirks) { + _config.doctype = 'quirks'; + } else { + _config.doctype = 'edge'; + } + } + + }); + + TrexConfig.add({ + "size": { + + } + }); + /** + * 컨텐츠를 가지고 있는 편집 영역을 수정, 관리하는 Trex.Canvas 객체로
      + * 대부분 각 panel들에게 행동들을 위임한다.
      + * 각각의 panel들은 해당 Processor들을 포함한다.
      + * 편집 영역 = panel = TextPanel, HtmlPanel, WysiwygPanel + * + * @class + * @extends Trex.I.JobObservable Trex.I.KeyObservable + * @param {Object} editor + * @param {Object} config + */ + Trex.Canvas = Trex.Class.create( /** @lends Trex.Canvas.prototype */{ + /** @ignore */ + $const: { + /** @name Trex.Canvas.__TEXT_MODE */ + __TEXT_MODE: "text", + /** @name Trex.Canvas.__HTML_MODE */ + __HTML_MODE: "source", + /** @name Trex.Canvas.__WYSIWYG_MODE */ + __WYSIWYG_MODE: "html", + __WYSIWYG_PADDING: 8, + __IMAGE_PADDING: 5 + }, + /** @ignore */ + $mixins: [Trex.I.JobObservable, Trex.I.KeyObservable, Trex.I.ElementObservable, Trex.I.MouseoverObservable], + /** Editor instance */ + editor: _NULL, + /** Canvas Dom element, Generally $tx('tx_canvas') */ + elContainer: _NULL, + /** Canvas Config */ + config: _NULL, + /** History Instance for redo/undo */ + history: _NULL, + /** + * Panels 객체 + * @private + * @example + * canvas.panels['html'] + * canvas.panels['source'] + * canvas.panels['text'] + */ + panels: _NULL, + initialize: function(editor, rootConfig) { + + this.editor = editor; + var _config = this.config = TrexConfig.get('canvas', rootConfig); + var _initializedId = ((rootConfig.initializedId) ? rootConfig.initializedId : ""); + + this.elContainer = $tx("tx_canvas" + _initializedId); + this.wysiwygEl = $tx("tx_canvas_wysiwyg_holder" + _initializedId); + this.sourceEl = $tx("tx_canvas_source_holder" + _initializedId); + this.textEl = $tx("tx_canvas_text_holder" + _initializedId); + + this.initConfig(rootConfig); + this.createPanel(); + this.history = new Trex.History(this, _config); + this.setCanvasSize({ + height: _config.initHeight + }); + }, + initConfig: function(rootConfig) { + var _config = this.config; + /** + * root config를 얻어온다. + * @private + * @returns {Object} root config + */ + this.getRootConfig = function() { + return rootConfig; + }; + + /** + * Canvas의 config를 가져온다. + * @returns {Object} config + */ + this.getConfig = function() { + return _config; + }; + + /** + * wysiwyg panel의 스타일 config를 가져온다. + * @param {String} name - 스타일명 optional + * @returns {Object} 스타일 config + * @example + * canvas.getStyleConfig(); + */ + this.getStyleConfig = function(name) { + if(name) { + return _config.styles[name]; + } else { + return _config.styles; + } + }; + + var _sizeConfig = TrexConfig.get('size', rootConfig); + this.measureWrapWidth = function() { + _sizeConfig.wrapWidth = this.getContainerWidth(); // TODO FTDUEDTR-1214 + }; + this.measureWrapWidth(); + if(!_sizeConfig.contentWidth) { + _sizeConfig.contentWidth = _sizeConfig.wrapWidth; + } + _sizeConfig.contentPadding = _config.styles.padding.parsePx(); //15 + + /** + * canvas size 관련 config를 얻어온다. + * @returns {Object} size config + */ + this.getSizeConfig = function() { + return _sizeConfig; + }; + }, + getContainerWidth: function() { + return $tx.getDimensions(this.elContainer).width; + }, + /** + * Panels 객체들을 초기화한다. + * @private + */ + createPanel: function() { + var _canvas = this; + var _config = this.config; + this.panels = {}; + this.mode = _config.selectedMode || Trex.Canvas.__WYSIWYG_MODE; + if (this._isForceTextMode()) { + this.mode = Trex.Canvas.__TEXT_MODE; + } + var _panelCreater = { + "text": function(_config) { + return new Trex.Canvas.TextPanel(_canvas, _config); + }, + "source": function(_config) { + return new Trex.Canvas.HtmlPanel(_canvas, _config); + }, + "html": function(_config) { + return new Trex.Canvas.WysiwygPanel(_canvas, _config); + } + }; + _config.mode.each(function(name) { + if (_panelCreater[name]) { + _canvas.panels[name] = _panelCreater[name](_config); + } + }); + for(var _p in _canvas.panels) { + if (this.mode == _p) { + _canvas.panels[_p].show(); + } else { + _canvas.panels[_p].hide(); + } + } + _canvas.observeJob('canvas.panel.iframe.load', function(panelDoc) { + _canvas.fireJobs(Trex.Ev.__IFRAME_LOAD_COMPLETE, panelDoc); + }); + }, + _isForceTextMode: function() { + // 기존에는 아래의 조건이었으나 모바일에서의 호환은 아직 문제가 많아 제한함. 20140430 + // ($tx.ios && $tx.ios_ver < 5) || ($tx.android && $tx.android_ver < 3) + return $tx.ios || $tx.android; + }, + /** + * Canvas의 mode를 바꾸는것으로, 현재 활성화되어있는 panel을 변경한다. + * @param {String} newMode - 변경 할 mode에 해당하는 문자열 + * @example + * editor.getCanvas().changeMode('html'); + * editor.getCanvas().changeMode('source'); + * editor.getCanvas().changeMode('text'); + */ + changeMode: function(newMode) { + var _editor = this.editor; + var oldMode = this.mode; + if (oldMode == newMode) { + return; + } + if (this._isForceTextMode() && oldMode == Trex.Canvas.__TEXT_MODE) { + return; + } + var _oldPanel = this.panels[oldMode]; + var _newPanel = this.panels[newMode]; + if (!_oldPanel || !_newPanel) { + throw new Error("[Exception]Trex.Canvas : not suppored mode"); + } + var _oldContent = _oldPanel.getContent(); + var _content = _editor.getDocParser().getContentsAtChangingMode(_oldContent, oldMode, newMode); + if (oldMode == Trex.Canvas.__WYSIWYG_MODE) { //NOTE: #FTDUEDTR-366 + if ($tx.msie_ver === 8) { + _oldPanel.hide(); + } //prevent black screen from youtube iframe. #FTDUEDTR-1272 + _oldPanel.setContent(""); + try { + this.focusOnTop(); + }catch(e){} + } + try { //#FTDUEDTR-1111 + _newPanel.setContent(_content); + } catch (error) { + alert(' - Error: ' + error.message + '\n에디터 타입 변경에 실패하였습니다.\n잘못된 HTML이 있는지 확인해주세요.'); + _oldPanel.setContent(_oldContent); + _oldPanel.show(); + return; + } + this.mode = newMode; + this.fireJobs(Trex.Ev.__CANVAS_MODE_CHANGE, oldMode, newMode); + _newPanel.setPanelHeight(_oldPanel.getPanelHeight()); + _newPanel.show(); + _oldPanel.hide(); + // FF2 bug:: When display is none, designMode can't be set to on + try { + if (newMode == "html" && !this.getPanel("html").designModeActivated && $tx.gecko) { + this.getPanel("html").el.contentDocument.designMode = "on"; + this.getPanel("html").designModeActivated = _TRUE; + } + } catch (e) { + throw e; + } + }, + /** + * 현재 panel에 포커스를 준다. + */ + focus: function() { + this.panels[this.mode].focus(); + }, + /** + * 본문의 처음으로 캐럿을 옮긴다. - Only Wysiwyg + */ + focusOnTop: function() { + this.getProcessor().focusOnTop(); + }, + /** + * 본문의 마지막으로 캐럿을 옮긴다. - Only Wysiwyg + */ + focusOnBottom: function() { + this.getProcessor().focusOnBottom(); + }, + /** + * canvas의 position을 가져온다. + * @returns {Object} position = { x: number, y:number } + */ + getCanvasPos: function() { + var _position = $tx.cumulativeOffset(this.elContainer); + return { + 'x': _position[0], + 'y': _position[1] + }; + }, + /** + * canvas의 height를 변경한다. + * @param {String} size (px) + * @example + * canvas.setCanvasSize({ + * height: "500px" + * }); + */ + setCanvasSize: function(size) { + if (this.panels[this.mode] && size.height) { + this.panels[this.mode].setPanelHeight(size.height); + } else { + throw new Error("[Exception]Trex.Canvas : argument has no property - size.height "); + } + }, + /** + * @Deprecated use isWYSIWYG() + */ + canHTML: function() { + return this.isWYSIWYG(); + }, + isWYSIWYG: function () { + return this.mode === Trex.Canvas.__WYSIWYG_MODE; + }, + /** + * panel 객체를 가져온다. + * @param {String} mode - 가져올 panel 모드명 + * @returns {Object} - parameter에 해당하는 Panel + * @example + * this.getPanel('html').designModeActivated = true; + */ + getPanel: function(mode) { + if (this.panels[mode]) { + return this.panels[mode]; + } else { + return _NULL; + } + }, + /** + * 현재 활성화되어있는 panel 객체를 가져온다. + * @returns {Object} - 활성화되어있는 panel 객체 + */ + getCurrentPanel: function() { + if (this.panels[this.mode]) { + return this.panels[this.mode]; + } else { + return _NULL; + } + }, + /** + * 현재 활성화되어있는 panel의 processor을 가져온다. + * @returns {Object} - 활성화되어있는 panel의 processor 객체 + */ + getProcessor: function(mode) { + if ( !mode ){ + return this.panels[this.mode].getProcessor(); + }else{ + return this.panels[mode].getProcessor(); + } + }, + /** + * 본문의 내용을 가져온다 + * @returns {String} + */ + getContent: function() { + var _content = this.panels[this.mode].getContent(); + if(_content) { + _content = _content.replace(Trex.__WORD_JOINER_REGEXP, ""); //NOTE: 서비스의 DB charset이 euc-kr 계열일 경우 문제가 있음. + } + return _content; + }, + /** + * 현재 Wysiwyg 영역의 수직 스크롤 값을 얻어온다. - Only Wysiwyg + * @function + * @returns {Number} 수직 스크롤 값 + * @see Trex.Canvas.WysiwygPanel#getScrollTop + */ + getScrollTop: function() { + if(!this.isWYSIWYG()) { + return 0; + } + return this.panels[this.mode].getScrollTop(); + }, + /** + * Wysiwyg 영역의 수직 스크롤 값을 셋팅한다. - Only Wysiwyg + * @function + * @param {Number} scrollTop - 수직 스크롤 값 + * @see Trex.Canvas.WysiwygPanel#setScrollTop + */ + setScrollTop: function(scrollTop) { + if(!this.isWYSIWYG()) { + return; + } + this.panels[this.mode].setScrollTop(scrollTop); + }, + /** + * 현재 활성화된 panel에 컨텐츠를 주어진 문자열로 수정한다. + * @param {String} content - 컨텐츠 + */ + setContent: function(content) { + this.panels[this.mode].setContent(content); + this.includeWebfontCss(content); + }, + /** + * panel에 컨텐츠를 주어진 문자열로 초기화한다. + * @param {String} content - 컨텐츠 + */ + initContent: function(content) { + this.history.initHistory({ + 'content': content + }); + this.panels[this.mode].setContent(content); + this.includeWebfontCss(content); + this.fireJobs(Trex.Ev.__CANVAS_DATA_INITIALIZE, Trex.Canvas.__WYSIWYG_MODE, _NULL); + /* //NOTE: 메일은 수정이 없음. 답장 전달의 경우에는 본문 상단에 포커싱이 가도록. + if ( $tx.gecko ){ + var me = this; + setTimeout( function(){ + me.focusOnBottom(); + },500) + }else{ + this.focusOnBottom(); + } + */ + }, + /** + * 컨텐츠를 파싱하여 사용되고 있는 웹폰트가 있으면, 웹폰트 css를 로딩한다. - Only Wysiwyg + * @param {string} content + * @see Trex.Canvas.WysiwygPanel#includeWebfontCss + */ + includeWebfontCss: function(content) { + if(!this.isWYSIWYG()) { + return; + } + return this.panels[this.mode].includeWebfontCss(content); + }, + /** + * 본문에 사용된 웹폰트명 목록을 리턴한다. - Only Wysiwyg + * @function + * @returns {Array} 사용하고 있는 웹폰트명 목록 + * @see Trex.Canvas.WysiwygPanel#getUsedWebfont + */ + getUsedWebfont: function() { + if(!this.isWYSIWYG()) { + return []; + } + return this.panels[this.mode].getUsedWebfont(); + }, + /** + * 자바스크립트를 동적으로 실행한다 - Only Wysiwyg + * @param {String} scripts - 자바스크립트 문자열 + */ + runScript: function(scripts) { + if(!this.isWYSIWYG()) { + return []; + } + this.panels[this.mode].runScript(scripts); + }, + /** + * 자바스크립트 소스를 로딩하여 동적으로 실행한다 - Only Wysiwyg + * @param {String} url - 자바스크립트 url + */ + importScript: function(url, callback) { + if(!this.isWYSIWYG()) { + return []; + } + this.panels[this.mode].importScript(url, callback); + }, + /** + * 선택된 영역의 상태 값을 알기위해 주어진 함수를 실행시킨다. - Only Wysiwyg + * @param {Function} handler - 주어진 함수 + * @example + * var _data = canvas.query(function(processor) { + * return processor.queryCommandState('bold'); + * }); + */ + query: function(handler) { + if(!this.isWYSIWYG()) { + return _NULL; + } + var _processor = this.getProcessor(); + /* Block Scrolling + if($tx.msie) { + _processor.focus(); + } + */ + return handler(_processor); + }, + /** + * 선택된 영역에 주어진 handler를 실행시킨다. + * @param {Function} handler - 주어진 함수 + * @example + * canvas.execute(function(processor) { + * processor.execCommand('bold', _NULL); + * }); + */ + execute: function(handler) { + var _history = this.history; + var _processor = this.getProcessor(); + if (this.isWYSIWYG()) { + this.getPanel('html').ensureFocused(); + if (_processor.restoreRange) { + setTimeout(function () { //NOTE: #FTDUEDTR-435 + _processor.restoreRange(); + handler(_processor); + _history.saveHistory(); + _processor.restore(); + }, 0); + } else { + _processor.focus(); + handler(_processor); + _history.saveHistory(); + _processor.restore(); + } + } else { + handler(_processor); + } + }, + /** + * caret을 주어진 위치로 이동한다. - Only Wysiwyg
      + * aaa.bbb - bbb라는 클래스를 가진 aaa 노드의 다음에 커서를 이동한다. + * @param {String} scope + */ + moveCaret: function(scope) { + if(!scope) { + return; + } + if(!this.isWYSIWYG()) { + return; + } + this.getProcessor().moveCaretWith(scope); + }, + /** + * 선택한 영역에 HTML 컨텐츠를 삽입한다. + * @param {String} content - 삽입하고자 하는 HTML 컨텐츠 + * @param {Boolean} newline - 현재 영역에서 한줄을 띄운 후 삽입할지 여부 true/_FALSE + * @param {Object} wrapStyle - wrapper 노드에 적용할 스타일,
      + * newline이 true 일 경우에만 의미를 갖는다. + */ + pasteContent: function(content, newline, wrapStyle) { + newline = newline || _FALSE; + this.execute(function(processor) { + processor.pasteContent(content, newline, wrapStyle); + }); + }, + /** + * 선택한 영역에 노드를 삽입한다. - Only Wysiwyg + * @param {Array|Element} node - 삽입하고자 하는 노드 배열 또는 노드 + * @param {Boolean} newline - 현재 영역에서 한줄을 띄운 후 삽입할지 여부 true/_FALSE + * @param {Object} wrapStyle - wrapper 노드에 적용할 스타일,
      + * newline이 true 일 경우에만 의미를 갖는다. + */ + pasteNode: function(node, newline, wrapStyle) { + if (!this.isWYSIWYG()) { + return; + } + newline = newline || _FALSE; + this.execute(function(processor) { + processor.pasteNode(node, newline, wrapStyle); + }); + }, + /** + * 현재 활성화된 panel에 스타일을 적용한다. + * @param {Object} styles - 적용할 스타일 + */ + addStyle: function(styles) { + this.panels[this.mode].addStyle(styles); + }, + /** + * 스타일명으로 현재 활성화된 panel의 스타일 값을 얻어온다. + * @param {String} name - 스타일명 + * @returns {String} 해당 스타일 값 + */ + getStyle: function(name) { + return this.panels[this.mode].getStyle(name); + }, + /** + * 특정 노드의 Wysiwyg 영역에서의 상대 위치를 얻어온다. - Only Wysiwyg + * @function + * @param {Element} node - 특정 노드 + * @returns {Object} position 객체 = { + * x: number, + * y: number, + * width: number, + * height: number + * } + */ + getPositionByNode: function(node) { + if(!this.isWYSIWYG()) { + return { + x: 0, + y: 0, + width: 0, + height: 0 + }; + } + return this.panels[this.mode].getPositionByNode(node); + }, + + + + onKeyDown: function(event) { + var p = this.getProcessor(); + var doc = this.getCurrentPanel().getDocument(); + function getNodeAndOffsetAtSel(){ + var rng = goog.dom.Range.createFromBrowserSelection(doc.getSelection? doc.getSelection():p.getSel()); + var node = rng.getStartNode(); + var offset = rng.getStartOffset(); + return {node: node, + offset: offset} + } + var where = getNodeAndOffsetAtSel(); + this.fireJobs(Trex.Ev.__CANVAS_PANEL_KEYDOWN, event); + var prev = null; + if(event.keyCode == Trex.__KEY.BACKSPACE && p.isCollapsed() && (prev = $tom.prevNodeUntilTagName(where.node, where.offset, 'table')) && $tom.isTagName(prev, 'table')){ + $tx.stop(event); + this.fireJobs(Trex.Ev.__CANVAS_PANEL_BACKSPACE_TABLE, prev); + } + if (this.config.useHotKey) { + this.fireKeys(event); + } + if($tx.msie&&$tx.msie_ver==11&&event.keyCode == Trex.__KEY.ENTER){ + setTimeout(this._ie11Enterbug.bind(this), 20); + } + }, + + _ie11Enterbug: function(){ + var p = this.getProcessor(); + if(p.isCollapsed()){ + var doc = this.getCurrentPanel().getDocument(); + var rng = goog.dom.Range.createFromBrowserSelection(doc.getSelection? doc.getSelection():p.getSel()); + var node = rng.getStartNode(); + //node.textContents + //ie9+ + if(node&&node.nodeType===1&&(node.textContent.replace(/[ \f\n\r\t\v]/g,'')==='')){ + var dummy = p.newDummy(false); + rng.insertNode(dummy, true); + rng.select(); + } + + } + }, + + onKeyUp: function(event) { + var keyCode = event.keyCode+''; + + if (shouldTriggerQuery(keyCode)) { + this.getProcessor().clearDummy(); + } + + this.history.saveHistoryByKeyEvent(event); + + try { + this.mayAttachmentChanged = _TRUE; + this.fireJobs(Trex.Ev.__CANVAS_PANEL_KEYUP, event); + if (this.isWYSIWYG() && shouldTriggerQuery(keyCode)) { + this.triggerQueryStatus(); + } + if (keyCode === Trex.__KEY.DELETE || keyCode === Trex.__KEY.BACKSPACE) { //NOTE: (Del/Backspace) keys를 눌러 본문에서 무엇인가가 삭제되었다고 생각될 경우 첨부들의 싱크를 확인한다. + this.fireJobs(Trex.Ev.__CANVAS_PANEL_DELETE_SOMETHING); + } + } catch(ignore) { + } + }, + + onMouseOver: function(event) { + try { + this.fireMouseover($tx.element(event)); + this.fireJobs(Trex.Ev.__CANVAS_PANEL_MOUSEOVER, event); + } catch (ignore) { + } + }, + + onMouseMove: function(event) { + try { + this.fireJobs(Trex.Ev.__CANVAS_PANEL_MOUSEMOVE, event); + } catch (ignore) { + } + }, + + onMouseOut: function(event) { + try { + this.fireJobs(Trex.Ev.__CANVAS_PANEL_MOUSEOUT, event); + } catch (ignore) { + } + }, + + onMouseDown: function(event) { + this.getProcessor().clearDummy(); + try { + this.fireElements($tx.element(event)); + } catch(ignore) { + } + this.fireJobs(Trex.Ev.__CANVAS_PANEL_MOUSEDOWN, event); + var history = this.history; + history.saveHistoryIfEdited(); + }, + + onMouseUp: function(event) { + try { + var self = this; + self.fireJobs(Trex.Ev.__CANVAS_PANEL_MOUSEUP, event); + setTimeout(function() { + var googRange = self.getProcessor().createGoogRange(); + if (googRange) { + self.fireJobs(Trex.Ev.__CANVAS_PANEL_QUERY_STATUS, googRange); + } + }, 20); + } catch(ignore) { + } + }, + + mayAttachmentChanged: _FALSE, + + onClick: function(event) { + this.fireJobs(Trex.Ev.__CANVAS_PANEL_CLICK, event); + }, + + onDoubleClick: function(event) { + this.fireJobs(Trex.Ev.__CANVAS_PANEL_DBLCLICK, event); + }, + + onScroll: function(event) { + this.fireJobs(Trex.Ev.__CANVAS_PANEL_SCROLLING, event); + }, + + onPaste: function(event) { + this.fireJobs(Trex.Ev.__CANVAS_PANEL_PASTE, event); + }, + + // TODO rename query status 라는 말 말고 다른 말 없을까? + triggerQueryStatus: function() { + this.cancelReservedQueryStatusTrigger(); + this.reserveQueryStatusTrigger(); + }, + + reserveQueryStatusTrigger: function() { + var self = this; + this.reservedQueryStatusTrigger = setTimeout(function() { + var googRange = self.getProcessor().createGoogRange(); + if (googRange) { + self.fireJobs(Trex.Ev.__CANVAS_PANEL_QUERY_STATUS, googRange); + self.fireElements(self.getProcessor().getNode()); + } + }, 20); // IE의 경우 canvas.execute 에서 setTimeout 처리 하기 때문에, execute 뒤에 부르는 syncProperty가 그 뒤에 실행되게 하려고 20ms 딜레이 준다.... + }, + + cancelReservedQueryStatusTrigger: function() { + if (this.reservedQueryStatusTrigger) { + clearTimeout(this.reservedQueryStatusTrigger); + } + }, + + /** + * @depreacated use canvas.triggerQueryStatus(); + */ + syncProperty: function() { + this.triggerQueryStatus(); + } + }); + +})(Trex); + +Trex.module("bind canvas events for close external menus", + function(editor, toolbar, sidebar, canvas/*, config*/) { + var _shouldCloseMenus = function () { + editor.fireJobs(Trex.Ev.__SHOULD_CLOSE_MENUS); + }; + canvas.observeJob(Trex.Ev.__CANVAS_PANEL_CLICK, _shouldCloseMenus); + canvas.observeJob(Trex.Ev.__CANVAS_SOURCE_PANEL_CLICK, _shouldCloseMenus); + canvas.observeJob(Trex.Ev.__CANVAS_TEXT_PANEL_CLICK, _shouldCloseMenus); + } +); + +Trex.module("make getter for 'iframeheight' and 'iframetop' size", + function(editor, toolbar, sidebar, canvas/*, config*/) { + var _iframeHeight = 0; + var _iframeTop = 0; + + function resetIframeAttributes() { + var _wysiwygPanel = canvas.getPanel(Trex.Canvas.__WYSIWYG_MODE); + _iframeHeight = _wysiwygPanel.getPanelHeight().parsePx(); + var _position = $tom.getPosition(_wysiwygPanel.el); + _iframeTop = _position.y; + } + + // canvas resize + canvas.observeJob(Trex.Ev.__CANVAS_HEIGHT_CHANGE, function(height) { + resetIframeAttributes(); + }); + canvas.observeJob(Trex.Ev.__CANVAS_FULL_SCREEN_CHANGE, function() { + resetIframeAttributes(); + }); + canvas.observeJob(Trex.Ev.__CANVAS_NORMAL_SCREEN_CHANGE, function() { + resetIframeAttributes(); + }); + canvas.observeJob('canvas.apply.background', function() { + resetIframeAttributes(); + }); + canvas.observeJob('canvas.apply.letterpaper', function() { + resetIframeAttributes(); + }); + canvas.reserveJob(Trex.Ev.__IFRAME_LOAD_COMPLETE, function() { + resetIframeAttributes(); + },300); + + // attachbox change ui + var attachbox = editor.getAttachBox(); + attachbox.observeJob(Trex.Ev.__ATTACHBOX_FULLSCREEN_SHOW, function() { + resetIframeAttributes(); + }); + attachbox.observeJob(Trex.Ev.__ATTACHBOX_FULLSCREEN_HIDE, function() { + resetIframeAttributes(); + }); + + // window resize + $tx.observe(_WIN, 'resize', function(){ + resetIframeAttributes(); + }); + + // create interface + canvas.getIframeHeight = function(){ + return _iframeHeight; + }; + canvas.getIframeTop = function(){ + return _iframeTop; + }; + } +); + +Trex.module("sync attachment data periodically", function(editor, toolbar, sidebar, canvas/*, config*/) { + setTimeout(function() { + setInterval(function() { + if (canvas.mayAttachmentChanged) { + // TODO 굳이 event 를 이용할 필요없이 바로 호출해줘도 될 것 같다. + canvas.fireJobs(Trex.Ev.__CANVAS_PANEL_DELETE_SOMETHING); + canvas.mayAttachmentChanged = _FALSE; + } + }, 3000); + }, 10000); +}); + +Trex.module("synchronize the font style when caret is in end of paragraph", function(editor, toolbar, sidebar, canvas/*, config*/) { + // only gecko #FTDUEDTR-1415 + $tx.gecko && canvas.observeJob(Trex.Ev.__CANVAS_PANEL_MOUSEUP, function(ev){ + if (canvas.isWYSIWYG()) { + var clickEl = ev.target; + var isParagraph = clickEl instanceof HTMLParagraphElement; + var isHtml = clickEl instanceof HTMLHtmlElement; + if (!isParagraph && !isHtml) { + return; + } + + var processor = canvas.getProcessor(); + var x = ev.pageX, + y = ev.pageY; + + var caret = processor.doc.caretPositionFromPoint(x, y); + var node = caret && caret.offsetNode; + var des = node && $tom.descendants(node, '#text'); + if (!des || !des.length) { + return; + } + + var lastTextNode = des[des.length-1]; + if (lastTextNode) { + var newRange = processor.createGoogRangeFromNodes(lastTextNode, lastTextNode.length, lastTextNode, lastTextNode.length); + newRange.select(); + } + } + }); +}); + +// FTDUEDTR-1431 +Trex.module("apply respectVisibilityInDesign for old IE", function(editor, toolbar, sidebar, canvas, config) { + var isOldIE = ($tx.msie && ($tx.msie_docmode < 9)); + isOldIE && canvas.observeJob(Trex.Ev.__CANVAS_MODE_CHANGE, function(oldMode, newMode){ + changeVisibilityValue(); + }); + isOldIE && canvas.observeJob(Trex.Ev.__IFRAME_LOAD_COMPLETE, function(ev){ + changeVisibilityValue(); + }); + + var COMMAND_API = 'RespectVisibilityInDesign'; + function changeVisibilityValue() { + if (canvas.isWYSIWYG()) { + var processor = canvas.getProcessor(); + var state = processor.doc.queryCommandState(COMMAND_API); + var configFlag = canvas.config.respectVisibilityInDesign; + + if (state != configFlag) { + processor.doc.execCommand(COMMAND_API, false, configFlag); + console.log('RespectVisibilityInDesign ', configFlag); + } + } + } +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/common/button.js b/src/main/webapp/daumeditor/js/trex/common/button.js new file mode 100644 index 0000000..d8a993c --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/common/button.js @@ -0,0 +1,765 @@ +/** + * @fileoverview + * 에디터에서 사용되는 button의 모음 + * + */ + +Trex.MarkupTemplate.add( + 'button.itsnew', 'new' +); + +Trex.MarkupTemplate.add( + 'button.select.text', '#{data}' +); + +/** + * 일반적인 동작의 버튼 객체로, 특화된 버튼은 이 클래스를 상속받아 사용한다.
      + * 해당 엘리먼트는 미리 DOM에 있어야 하며, __borderClasses에 지정된 클래스이름을 가져야한다. + * + * @class + * @param {Object} config + * + * @example + *
      + * 예제 + *
      + * + * new Trex.Button({ + * id: 'tx_example', + * wysiwygonly: _TRUE, + * sync: false, + * status: false + * }); + */ +Trex.Button = Trex.Class.create(/** @lends Trex.Button.prototype */{ + /** @ignore */ + $const: { + __borderClasses: { + 'tx-btn-trans': _TRUE, + 'tx-btn-lbg': _TRUE, + 'tx-btn-bg': _TRUE, + 'tx-btn-rbg': _TRUE, + 'tx-btn-lrbg': _TRUE, + 'tx-slt-tlbg': _TRUE, + 'tx-slt-tbg': _TRUE, + 'tx-slt-trbg': _TRUE, + 'tx-slt-blbg': _TRUE, + 'tx-slt-bbg': _TRUE, + 'tx-slt-brbg': _TRUE, + 'tx-slt-31bg': _TRUE, + 'tx-slt-31lbg': _TRUE, + 'tx-slt-31rbg': _TRUE, + 'tx-slt-70lbg': _TRUE, + 'tx-slt-70bg': _TRUE, + 'tx-slt-59bg': _TRUE, + 'tx-slt-42bg': _TRUE, + 'tx-slt-56bg': _TRUE, + 'tx-btn-nlrbg': _TRUE, + 'tx-btn-43lrbg': _TRUE, + 'tx-btn-52lrbg': _TRUE, + 'tx-btn-57lrbg': _TRUE, + 'tx-btn-71lrbg': _TRUE, + 'tx-btn-48lbg': _TRUE, + 'tx-btn-48rbg': _TRUE, + 'tx-btn-30lrbg': _TRUE, + 'tx-btn-46lrbg': _TRUE, + 'tx-btn-67lrbg': _TRUE, + 'tx-btn-49lbg': _TRUE, + 'tx-btn-58bg': _TRUE, + 'tx-btn-46bg': _TRUE, + 'tx-btn-49rbg': _TRUE, + 'tx-btn-widget': _TRUE, + 'tx-btn-widget-tbg': _TRUE, + 'tx-btn-widget-brbg': _TRUE + }, + addBorderClass: function(className){ + Trex.Button.__borderClasses[className] = _TRUE; + }, + getBorderClass: function(el){ + var _classes = $tx.classNames(el); + for(var i =0; i < _classes.length; i++){ + var _class = _classes[i]; + var _matched = Trex.Button.__borderClasses[_class]; + if(_matched){ + return _class; + } + } + } + }, + /** + * 상태가 있는지 여부 + */ + hasState: _NULL, + /** + * disabled 상태인지 여부 + */ + isDisabled: _NULL, + /** + * 메뉴가 있는 버튼의 경우 선택된 값 (ex: font-family tool에서 '궁서'를 선택하면 lastValue는 'Gungsuh,궁서'이다.) + */ + lastValue: _NULL, + /** + * 메뉴가 있는 버튼의 경우 선택된 메뉴항목의 레이블 + */ + lastText: _NULL, + /** + * 버튼 dom element + */ + elButton: _NULL, + /** + * 버튼의 아이콘 dom element + */ + elIcon: _NULL, + /** + * 버튼의 배경 이미지 클래스이름 + */ + borderClass: _NULL, + /** + * 버튼의 실행 command function + * @function + */ + _command: function(){}, + /** + * 버튼을 실행하면 호출 될 command function을 지정한다. + * @private + * @function + */ + setCommand: function(cmd){ + this._command = cmd; + }, + initialize: function(config) { //only superclass + var _config = this.config = config; + if (_config.borderClass) { + Trex.Button.addBorderClass(_config.borderClass); + } + + this.itsNew = !!_config.itsnew; + this.hasState = !!_config.status; //pushed status + this.isDisabled = _FALSE; + this.lastValue = _config.selectedValue || _NULL; + + if ( config.el ){ + this.elButton = config.el; + }else{ + var _elementId = _config.id || "tx_" + _config.identity; + this.elButton = $must(_elementId + (_config.initializedId || "")); + } + var _elButton = this.elButton; + + var _elIcon = this.elIcon = $tom.collect(_elButton, "a"); + if (!_elIcon) { + throw new Error("[Exception]Trex.Button : can't find elIcon for button '"+ _elementId +"'"); + } + this.borderClass = Trex.Button.getBorderClass(_elButton); + + if(this.oninitialized){ + this.oninitialized.bind(this)(_config); + } + this.generate(); + + if(this.itsNew) { + $tom.append(_elIcon, Trex.MarkupTemplate.get('button.itsnew').evaluateAsDom({})); + } + + if (_config.selectedValue && this.setValue) { + this.setValue(_config.selectedValue); + } + if (_config.selectedText && this.setText) { + this.setText(_config.selectedText); + } + if ( _config.selectedState && this.setState ){ + this.setState( _config.selectedState ); + } + }, + /** + * 버튼의 이벤트에 handler function 을 걸어준다. + * @function + */ + generate: function() { + var _elIcon = this.elIcon; + this.hdlMouseDown = this.onMouseDown.bindAsEventListener(this); + this.hdlMouseOver = this.onMouseOver.bindAsEventListener(this); + this.hdlMouseOut = this.onMouseOut.bindAsEventListener(this); + this.hdlKeydown = this.onKeyDown.bindAsEventListener(this); + this.hdlClick = this.onClick.bindAsEventListener(this); + + $tx.observe(_elIcon, 'mousedown', this.hdlMouseDown); + $tx.observe(_elIcon, 'mouseover', this.hdlMouseOver); + $tx.observe(_elIcon, 'mouseout', this.hdlMouseOut); + $tx.observe(_elIcon, 'keydown', this.hdlKeydown); + $tx.observe(_elIcon, 'click', this.hdlClick); + + if (this.ongenerated) { + this.ongenerated.bind(this)(this.config); + } + }, + /** + * 버튼에 추가된 이벤트를 제거한다. + * @function + */ + removeHandler: function(){ + if( !this.hdlMouseDown ){ + return; + } + var _elIcon = this.elIcon; + $tx.stopObserving(_elIcon, 'mousedown', this.hdlMouseDown); + $tx.stopObserving(_elIcon, 'mouseover', this.hdlMouseOver); + $tx.stopObserving(_elIcon, 'mouseout', this.hdlMouseOut); + $tx.stopObserving(_elIcon, 'keydown', this.hdlKeydown); + $tx.stopObserving(_elIcon, 'click', this.hdlClick); + }, + /** + * 버튼의 border class 이름을 가져온다. + * @function + * @returns {String} css class name 또는 'undefined' + */ + getCurrentBorderClass: function(el){ + var _classes = $tx.classNames(el); + + for(var i =0; i < _classes.length; i++){ + var _class = _classes[i]; + if(_class.indexOf(this.borderClass) != -1){ + return _class; + } + } + return _UNDEFINED+''; + }, + /** + * 버튼의 css class 를 초기상태로 변경한다. + * @function + */ + normalState: function(){ + var _currBorderClass = this.getCurrentBorderClass(this.elButton); + if(_currBorderClass == this.borderClass) { + return; + } + $tx.removeClassName(this.elButton, _currBorderClass); + $tx.addClassName(this.elButton, this.borderClass); + }, + /** + * 버튼의 css class 를 mouse over 상태로 변경한다. + * @function + */ + hoveredState: function(){ + var _currBorderClass = this.getCurrentBorderClass(this.elButton); + $tx.removeClassName(this.elButton, _currBorderClass); + $tx.addClassName(this.elButton, this.borderClass + '-hovered'); + this.decreaseZindex(); + }, + /** + * 버튼의 css class 를 눌려있는 상태로 변경한다. + * @function + */ + pushedState: function(){ + var _currBorderClass = this.getCurrentBorderClass(this.elButton); + $tx.removeClassName(this.elButton, _currBorderClass); + $tx.addClassName(this.elButton, this.borderClass + '-pushed'); + }, + /** + * 버튼의 현재 상태를 반환한다. + * @function + * @return {String} 'normal', 'pushed', 'hovered' + */ + currentState: function(){ + var _currBorderClass = this.getCurrentBorderClass(this.elButton); + var cs = "normal"; + if(_currBorderClass.indexOf('-pushed') != -1){ + cs = "pushed"; + }else if(_currBorderClass.indexOf('-hovered') != -1){ + cs = "hovered"; + } + return cs; + }, + /** + * 버튼이 눌린 상태인지 아닌지 판단한다. + * @function + * @return {boolean} 눌린 상태(pushed)이면 true, 아니면 false + */ + isPushed: function(){ + return ("pushed" == this.currentState()); + }, + /** + * 메뉴가 있는 버튼인지 판단한다. + * @function + * @return {boolean} 메뉴가 있으면 true, 아니면 false + */ + hasMenu: function(){ + return this.tool ? !!(this.tool.menu) : _FALSE; + }, + /** + * 버튼을 누르면 normal state 또는 pushed state로 변경한다. + * @function + */ + onMouseDown: function(ev) { + if(ev){ + $tx.stop(ev); + } + if(this.isDisabled) { + return; + } + if(this.hasMenu() || this.hasState){ + if (this._command(ev) === _FALSE) { + return; + } + }else{ + this.evsessionstarted = _TRUE; + } + if (this.isPushed()) { + this.normalState(); + } else { + this.pushedState(); + } + }, + /** + * 마우스 커서를 버튼영역 위에 올리면 hovered state로 변경한다. + * @function + */ + onMouseOver: function() { + if(this.isDisabled || this.isPushed()) { + return; + } + this.hoveredState(); + }, + /** + * 마우스 커서가 버튼영역 바깥으로 나가면 normal state로 변경한다. + * @function + */ + onMouseOut: function() { + if(this.evsessionstarted){ + this.normalState(); + this.evsessionstarted = _FALSE; + } + if(this.isDisabled || this.isPushed()){ + return; + } + this.normalState(); + }, + /** + * 버튼을 클릭하면 command function을 실행하고 normal state로 변경한다. + * @function + */ + onClick: function(ev) { + if(ev){ + $tx.stop(ev); + } + if(this.isDisabled) { + return; + } + if(!this.hasState){ + this._command(); + this.normalState(); + this.evsessionstarted = _FALSE; + } + }, + /** + * event keyCode가 13이면 onMouseDown(), onClick() 을 실행한다. + * @function + */ + onKeyDown: function(ev){ + if(ev.keyCode === 13){ + this.onMouseDown(ev); + this.onClick(ev); + } + }, + /** + * command function 실행 후 lastValue, lastText의 값을 업데이트 한다. + * @function + */ + updateAfterCommand: function(value, text){ + this.setValueAndText(value, text); + this.normalState(); + }, + /** + * lastValue, lastText의 값을 설정한다. + * @function + */ + setValueAndText: function(value, text){ + this.setValue(value); + this.setText(text); + }, + /** + * lastValue 값을 설정한다. + * @function + */ + setValue: function(value) { + if(value) { + this.lastValue = value; + } + }, + /** + * lastText 값을 설정한다. + * @function + */ + setText: function(text) { + this.lastText = text; + }, + /** + * lastValue 값을 가져온다. + * @function + * @return {String} + */ + getValue: function() { + return this.lastValue; + }, + /** + * lastText 값을 가져온다. + * @function + * @return {String} + */ + getText: function() { + return this.lastText; + }, + /** + * pushed에서 normal state로 또는 그 반대로 상태를 변경한다. + * @function + */ + setState: function(push) { + if (push) { + this.pushedState(); + } else { + this.normalState(); + } + }, + /** + * 아이콘 element 의 css class 를 설정한다. + * @function + */ + setClassName: function(className) { + this.elIcon.className = className; + }, + /** + * 버튼을 사용불가 상태로 변경한다. + * @function + */ + disable: function() { + if(this.elButton) { + this.isDisabled = _TRUE; + $tx.addClassName(this.elButton, "tx-disable"); + } + }, + /** + * 버튼을 사용가능 상태로 변경한다. + * @function + */ + enable: function() { + if(this.elButton) { + this.isDisabled = _FALSE; + $tx.removeClassName(this.elButton, "tx-disable"); + } + }, + /** + * 버튼을 normal state로 변경한다. + * @function + */ + release: function() { + if(this.isDisabled) { + return; + } + if(this.hasMenu() || !this.hasState){ + this.normalState(); + } + }, + /** + * 버튼의 zindex 크게 만든다. + * @function + */ + increaseZindex: function(){ + var zIndexValue = 10; + if( $tom.parent(this.elButton)){ + $tx.setStyle( $tom.parent(this.elButton), { zIndex: zIndexValue}); + } + }, + /** + * 버튼의 zindex 작게 만든다. + * @function + */ + decreaseZindex: function(){ + var zIndexValue = 4; + if( $tom.parent(this.elButton)){ + $tx.setStyle( $tom.parent(this.elButton), { zIndex: zIndexValue}); + } + } +}); + +/** + * Trex.Button.Select + * + * @extends Trex.Button + * @class + */ +Trex.Button.Select = Trex.Class.create(/** @lends Trex.Button.Select.prototype */{ + /** @ignore */ + $extend: Trex.Button, + /** + * 버튼에 화살표 버튼이 더 붙어 있을 경우 화살표 버튼에 event handler function 을 걸어준다. + * @function + */ + ongenerated: function(){ + Trex.MarkupTemplate.get('button.select.text').evaluateToDom({ + 'data': $tom.getText(this.elIcon) + }, this.elIcon); + this.elText = $tom.collect(this.elIcon, 'span'); + + var _elArrow = $tom.collect(this.elButton, "a.tx-arrow"); + if(_elArrow) { + $tx.observe(_elArrow, 'mousedown', this.onMouseDown.bindAsEventListener(this)); + $tx.observe(_elArrow, 'mouseover', this.onArrowMouseOver.bindAsEventListener(this)); + $tx.observe(_elArrow, 'mouseout', this.onArrowMouseOut.bindAsEventListener(this)); + $tx.observe(_elArrow, 'click', this.onClick.bindAsEventListener(this)); + } + }, + /** + * 메뉴에서 선택된 값의 레이블을 설정한다. + * @function + */ + setText: function(text) { + this.elText.innerText = text; + }, + /** + * 마우스 커서를 버튼영역 위에 올리면 hovered state로 변경한다. + * @function + */ + onArrowMouseOver: function() { + if(this.isDisabled || this.isPushed()) { + return; + } + this.hoveredState(); + }, + /** + * 마우스 커서가 버튼영역 바깥으로 나가면 normal state로 변경한다. + * @function + */ + onArrowMouseOut: function() { + if(this.isDisabled || this.isPushed()) { + return; + } + this.normalState(); + } +}); + +/** + * Trex.Button.Splits + * + * @extends Trex.Button + * @class + */ +Trex.Button.Splits = Trex.Class.create(/** @lends Trex.Button.Splits.prototype */{ + /** @ignore */ + $extend: Trex.Button, + ongenerated: function(){ + var _elButton = this.elButton; + var _elArrow = this.elArrow = $tom.collect(_elButton, "a.tx-arrow"); + if(!_elArrow) { + throw new Error("[Exception]Trex.Button.Splits : not exist element(a.tx-arrow)"); + } + $tx.observe(_elArrow, 'mousedown', this.onArrowMouseDown.bindAsEventListener(this)); + $tx.observe(_elArrow, 'mouseover', this.onArrowMouseOver.bindAsEventListener(this)); + $tx.observe(_elArrow, 'mouseout', this.onArrowMouseOut.bindAsEventListener(this)); + $tx.observe(_elArrow, 'click', this.onArrowClick.bindAsEventListener(this)); + }, + /** + * 화살표 버튼의 css class 를 mouse over 상태로 변경한다. + * @function + */ + arrowHoveredState: function(){ + var _currBorderClass = this.getCurrentBorderClass(this.elButton); + $tx.removeClassName(this.elButton, _currBorderClass); + $tx.addClassName(this.elButton, this.borderClass + '-arrow-hovered'); + }, + /** + * 화살표 버튼의 css class 를 pushed 상태로 변경한다. + * @function + */ + arrowPushedState: function(){ + var _currBorderClass = this.getCurrentBorderClass(this.elButton); + $tx.removeClassName(this.elButton, _currBorderClass); + $tx.addClassName(this.elButton, this.borderClass + '-arrow-pushed'); + }, + /** + * 버튼을 누르면 상태를 변경하고 command를 실행한다. 버튼 옆에 있는 화살표의 상태를 본다. + * @function + */ + onMouseDown: function() { + if(this.isDisabled) { + return; + } + if(this.isPushed()){ + this._command(); + this.normalState(); + this.commandexecuted = _TRUE; + }else{ + this.pushedState(); + this.commandexecuted = _FALSE; + this.evsessionstarted = _TRUE; + } + }, + /** + * tool의 execute를 실행하고 normal state로 변경한다. + * @function + */ + onClick: function(ev) { + if(ev){ + $tx.stop(ev); + } + if(this.isDisabled) { + return; + } + if(!this.commandexecuted){ + this.tool.execute(this.lastValue, this.lastText); + this.evsessionstarted = _FALSE; + }else{ + this.commandexecuted = _FALSE; + } + this.normalState(); + }, + /** + * 화살표를 pushed state 로 변경하거나 normal state로 변경한다. + * @function + */ + onArrowMouseDown: function() { + if(this.isDisabled) { + return; + } + if (this._command() === _FALSE) { + return; + } + if(this.isPushed()){ + this.normalState(); + }else{ + this.arrowPushedState(); + } + }, + /** + * @function + */ + onArrowClick: function(ev) { + if(ev){ + $tx.stop(ev); + } + if(this.isDisabled) { + return; + } + }, + /** + * 화살표 버튼의 css class 를 mouse over 상태로 변경한다. + * @function + */ + onArrowMouseOver: function() { + if(this.isDisabled || this.isPushed()) { + return; + } + this.arrowHoveredState(); + }, + /** + * 화살표 버튼의 css class 를 normal 상태로 변경한다. + * @function + */ + onArrowMouseOut: function() { + if(this.isDisabled || this.isPushed()) { + return; + } + if(this.commandexecuted){ + this.commandexecuted = _FALSE; + } + this.normalState(); + } +}); + +/** + * Trex.Button.Toggle + * + * @extends Trex.Button + * @class + */ +Trex.Button.Toggle = Trex.Class.create(/** @lends Trex.Button.Toggle.prototype */{ + /** @ignore */ + $extend: Trex.Button, + /** + * pushed 또는 normal state로 변경한다. + * @function + */ + setValue: function(selected) { + if (selected) { + this.pushedState(); + } else { + this.normalState(); + } + } +}); + +/** + * Trex.Button.Widget + * + * @extends Trex.Button.Select + * @class + */ +Trex.Button.Widget = Trex.Class.create(/** @lends Trex.Button.Widget.prototype */{ + /** @ignore */ + $extend: Trex.Button.Select, + /** + * lastText 값을 설정한다. + * @function + */ + setText: function(text) { + this.elIcon.innerText = text; + if ( this.lastText ){ + $tx.removeClassName( this.elIcon, this.lastText ); + } + + $tx.addClassName( this.elIcon, text ); + this.lastText = text; + }, + /** + * 버튼에 menu와 menu handler를 설정한다. + * @function + */ + setMenu: function(menu, handler) { + this.hasState = _TRUE; + var _button = this; + + menu.setCommand(function() { + var success = handler.apply(this, arguments); + _button.updateAfterCommand.apply(_button, arguments); + return success; + }); + + _button.setCommand( + function() { + if(!_button.isPushed()) { + var _lastvalue = _button.getValue(); + menu.show(_lastvalue); + } else { + menu.hide(); + } + return _TRUE; + } + ); + } +}); + +/** + * Trex.Button.ColorWidget + * + * @extends Trex.Button.Widget + * @class + */ +Trex.Button.ColorWidget = Trex.Class.create(/** @lends Trex.Button.ColorWidget.prototype */{ + /** @ignore */ + $extend: Trex.Button.Widget, + /** + * lastValue 값을 설정한다. + * @function + */ + setValue: function(value){ + $tx.setStyle( this.elIcon.parentNode, {'backgroundColor': value}); + this.lastValue = value; + }, + /** + * do nothing + * @function + */ + setText: function(){ + // do Nothing + } +}); + diff --git a/src/main/webapp/daumeditor/js/trex/common/menu.js b/src/main/webapp/daumeditor/js/trex/common/menu.js new file mode 100644 index 0000000..e7edfe5 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/common/menu.js @@ -0,0 +1,734 @@ +/** + * @fileoverview + * 에디터에서 사용되는 menu의 모음 + */ + +TrexMessage.addMsg({ + '@menu.pallete.enter': "입력", + '@menu.pallete.more': "더보기" +}); +/** + * 일반적인 동작의 메뉴 객체로, 특화된 메뉴는 이 클래스를 상속받아 사용한다.
      + * 해당 엘리먼트는 미리 DOM에 있어야 한다. + * tool에서 사용된다. + * + * @class + * @param {Object} config + * + * @example + * Trex.Menu.Example = Trex.Class.create({ + * $extend: Trex.Menu, + * ongenerated: function(config) { + * //TODO + * }, + * onregenerated: function(config) { + * //TODO + * } + * }); + * + * new Trex.Menu({ + * id: 'tx_example_menu', + * options: [ + * { label: '옵션1', title: '옵션1', data: 'option1' }, + * { label: '옵션2', title: '옵션1', data: 'option2' } + * ] + * }); + */ +Trex.Menu = Trex.Class.create(/** @lends Trex.Menu.prototype */{ + $mixins: [Trex.I.JobObservable], + isInit: _FALSE, + isDisplayed: _FALSE, + _command: function(){}, + /** + * menu에 command를 설정한다. + * @private + * @function + */ + setCommand: function(cmd){ + this._command = cmd; + }, + initialize: function(config) { + var _config = this.config = config; + + var _elMenu; + if(_config.el) { + _elMenu = _config.el; + if(!_elMenu) { + throw new Error("[Exception]Trex.Menu : not exist element(" + _config.el + ")"); + } + } else { + var _elementId = _config.id; + var _initializedId = ((_config.initializedId)? _config.initializedId: ""); + if (!_elementId) { + if (!_config.identity) { + throw new Error("[Exception]Trex.Menu : not exist config - id"); + } + _elementId = "tx_" + _config.identity + "_menu"; + } + _elMenu = $tx(_elementId + _initializedId); + if(!_elMenu) { + throw new Error("[Exception]Trex.Menu : not exist element(" + _elementId + ")"); + } + } + this.elMenu = _elMenu; + + if(_config.top){ + _elMenu.style.top = _config.top + 'px'; + } + if(_config.left){ + _elMenu.style.left = _config.left + 'px'; + } + + if(this.oninitialized) { + this.oninitialized.bind(this)(config); + } + if (this.ongenerated) { + this.generateHandler = this.ongenerated.bind(this); + } + if (this.onregenerated) { + this.regenerateHandler = this.onregenerated.bind(this); + } + }, + /** + * menu를 DOM을 생성한다. + * @function + */ + generate: function(initValue) { + if (this.generateHandler) { + var _config = this.config; + this.generateHandler(_config, initValue); + } + }, + /** + * menu를 재생성한다. + * @function + */ + regenerate: function(initValue) { + if (this.initHandler) { + this.initHandler(); + } + if (this.regenerateHandler) { + var _config = this.config; + this.regenerateHandler(_config, initValue); + } + }, + /** + * menu option 중에서 유효한 값만 걸러낸다. + * @function + */ + getValidOptions: function(config) { + return config.options.findAll(function(option) { + return !option.expired; + }); + }, + /** + * menu 에서 선택된 항목에 대한 command를 실행한다. + * @function + */ + onSelect: function() { + var args = $A(arguments); + var ev = args.shift(); + this._command.apply(this, args); //가변적인 arguments를 위해 + this.hide(); + $tx.stop(ev); + }, + /** + * menu 에서 취소를 누르면 menu 를 닫는다. + * @function + */ + onCancel: function() { + if(this.cancelHandler) { + this.cancelHandler(); + } + this.hide(); + }, + /** + * menu 가 열린 상태인지 확인한다. + * @function + * @return {boolean} 열려있으면 true, 아니면 false + */ + visible: function() { + return this.isDisplayed; + }, + /** + * menu 를 연다. this.generate() 또는 this.regenerate() function을 호출한다. + * @function + */ + show: function(initValue) { + $tx.show(this.elMenu); + if(this.isInit) { + this.regenerate(initValue); + } else { + if(!!this.config.listseturl) { + this.lazyGenerate(initValue); + } else { + this.generate(initValue); + this.isInit = _TRUE; + this.regenerate(initValue); + } + } + if(this.showSpecial) { //NOTE: 메뉴가 보여질 때 추가적으로 실행할 액션, ex) URL넣기에서 focus를 줄 때 + this.showSpecial(); + } + this.isDisplayed = _TRUE; + this.fireJobs(Trex.Ev.__MENU_LAYER_SHOW, { + detail: { + menu: this + } + }); + }, + lazyGenerate: function(initValue) { + var _menu = this; + new (Trex.Class.create({ + $mixins: [Trex.I.JSRequester], + initialize: function() { + this.importScript( + _menu.config.listseturl, + 'utf-8', + _DOC, + function() { + _menu.generate(); + _menu.isInit = _TRUE; + _menu.regenerate(initValue); + } + ); + } + }))(); + }, + /** + * menu 를 닫는다. + * @function + */ + hide: function() { + $tx.hide(this.elMenu); + this.isDisplayed = _FALSE; + this.fireJobs(Trex.Ev.__MENU_LAYER_HIDE, { + detail: { + menu: this + } + }); + }, + /** + * menu 를 열거나 닫는다. + * @function + */ + toggle: function() { + if( this.isDisplayed ){ + this.hide(); + }else{ + this.show(); + } + }, + /** + * menu 를 닫는다. + * @function + */ + release: function(ev) { + if(!this.isInit) { + return; + } + this.hide(ev); + } +}); + +Trex.MarkupTemplate.add( + 'menu.select', + '
        #{items}
      ' +); +Trex.MarkupTemplate.add( + 'menu.select.item', + '
    • #{label}
    • ' +); + +/** + * Trex.Menu.Select + * as fontfamily, fontsize + * + * @extends Trex.Menu + * @class + * @param {Object} config + */ +Trex.Menu.Select = Trex.Class.create(/** @lends Trex.Menu.Select.prototype */{ + /** @ignore */ + $extend: Trex.Menu, + /** + * menu를 생성한다. + * @function + */ + generate: function() { + /* + [{ + label: "string", + title: "string", + data: "string", + klass: "string" + }] + */ + var _config = this.config; + var _optionz = this.getValidOptions(_config); + + var _elList = this.generateList(_optionz); + $tom.insertFirst(this.elMenu, _elList); + + if (this.generateHandler) { + this.generateHandler(_config); + } + if (this.ongeneratedList) { + this.generateList = this.ongeneratedList.bind(this); + } + if (this.ongeneratedListItem) { + this.generateListItem = this.ongeneratedListItem.bind(this); + } + }, + + /** + * menu 의 list markup 을 만들고 event handler 를 연결한다. + * @function + */ + generateList: function(optionz) { + var _elGroup = Trex.MarkupTemplate.get("menu.select").evaluateAsDom({ + 'items': this.generateListItem(optionz) + }); + + var _elItemList = $tom.collectAll(_elGroup, "li a"); + for (var i=0; i < optionz.length; i++) { + var _option = optionz[i]; + var _elItem = _elItemList[i]; + $tx.observe(_elItem, "click", this.onSelect.bindAsEventListener(this, _option.data, _option.title)); + } + return _elGroup; + }, + /** + * menu 의 list item markup 생성한다. + * @function + * @return {String} HTML markup + */ + generateListItem: function(option) { + var result = []; + for(var i=0; i < option.length; i++) { + result.push(Trex.MarkupTemplate.get("menu.select.item").evaluate(option[i])); + } + return result.join(""); + }, + /** + * menu 의 list item 이 선택되었을 때 command 를 실행한다. + * @function + */ + onSelect: function() { + var _args = $A(arguments); + var _ev = _args.shift(); + this._command.apply(this, _args); + this.hide(); + $tx.stop(_ev); + } +}); + +Trex.MarkupTemplate.add( + 'menu.items', [ + '', + ' #{for:row}', + ' #{for:col}#{/for:col}', + ' #{/for:row}', + '
      ', + '', + '#{if:image!=""}#{/if:image}', + '#{if:image=""}#{data}#{/if:image}', + '', + '
      ' + ].join("") +); + +Trex.MarkupTemplate.add( + 'menu.list', [ + '
      ', + '
      ', + ' #{items}', + '
      ', + '
      ' + ].join("") +); + +/** + * Trex.Menu.List + * as horizontalrule, lineheight, quote, textbox + * + * @extends Trex.Menu + * @class + * @param {Object} config + */ +Trex.Menu.List = Trex.Class.create(/** @lends Trex.Menu.List.prototype */{ + /** @ignore */ + $extend: Trex.Menu, + /** + * menu를 생성한다. + * @function + */ + generate: function() { + var _config = this.config; + /* + [{ + data: "string", + klass: "string" + }] + */ + var _optionz = this.getValidOptions(_config); + this.cols = _config.cols || 1; + this.rows = _config.rows || _optionz.length; + + var _elList = this.generateList(_optionz); + $tom.insertFirst(this.elMenu, _elList); + + if (this.ongeneratedList) { + this.generateList = this.ongeneratedList.bind(this); + } + if (this.ongeneratedListItem) { + this.generateListItem = this.ongeneratedListItem.bind(this); + } + + if (this.generateHandler) { + this.generateHandler(_config); + } + }, + /** + * menu 의 list markup 을 만들고 mouse event handler 를 연결한다. + * @function + */ + generateList: function(options) { + var _options = Trex.MarkupTemplate.splitList(this.rows, this.cols, options); + var _elList = Trex.MarkupTemplate.get('menu.list').evaluateAsDom({ + 'items': Trex.MarkupTemplate.get('menu.items').evaluate(_options) + }); + + $tx.observe(_elList, "click", this.onSelect.bindAsEventListener(this)); + $tx.observe(_elList, 'mouseover', this.onItemMouseOver.bindAsEventListener(this)); + $tx.observe(_elList, 'mouseout', this.onItemMouseOut.bindAsEventListener(this)); + + return _elList; + }, + /** + * menu 항목에 mouse over 할 때 hover state 의 style class 를 적용한다. + * @function + */ + onItemMouseOver: function(ev) { + var _el = $tx.findElement(ev, 'span'); + if (_el.tagName && _el.tagName.toLowerCase() == 'span') { + $tx.addClassName(_el, "tx-item-hovered"); + } + $tx.stop(ev); + }, + /** + * menu 항목에 mouse out 할 때 hover state 의 style class 를 해제한다. + * @function + */ + onItemMouseOut: function(ev) { + var _el = $tx.findElement(ev, 'span'); + if (_el.tagName && _el.tagName.toLowerCase() == 'span') { + $tx.removeClassName(_el, "tx-item-hovered"); + } + $tx.stop(ev); + }, + /** + * menu 의 항목이 선택되었을 때 command 를 실행한다. + * @function + */ + onSelect: function(ev) { + var _el = $tx.findElement(ev, 'span'); + if (_el.tagName && _el.tagName.toLowerCase() == 'span') { + var _data; + if(_el.firstChild && _el.firstChild.nodeType == 1 && _el.firstChild.tagName.toLowerCase() == 'img') { + _data = $tom.getAttribute(_el.firstChild, "data") || ""; + } else { + _data = _el.innerText; + } + this._command(_data); + this.hide(); + } + $tx.stop(ev); + } +}); + +Trex.MarkupTemplate.add( + 'menu.matrix', [ + '
      ', + '
        ', + ' #{for:matrices}
      • #{title}
      • #{/for:matrices}', + '
      ', + '
      ', + ' #{for:matrices}
      ', + ' #{items}', + '
      #{/for:matrices}', + '
      ', + '
      ' + ].join("") +); + +/** + * Trex.Menu.Matrix + * as emoticon + * + * @extends Trex.Menu + * @class + * @param {Object} config + */ +Trex.Menu.Matrix = Trex.Class.create(/** @lends Trex.Menu.Matrix.prototype */{ + /** @ignore */ + $extend: Trex.Menu, + /** + * menu를 생성한다. + * @function + */ + generate: function() { + var _config = this.config; + /* + rows: number, + cols: number, + matrices: [{ + title: "string", + options: ["string", ...] + }] + + */ + var _matrices = this.matrices = _config.matrices.findAll(function(matrix) { + return !matrix.onlyIE || $tx.msie; + }); + this.cols = _config.cols || 10; + this.rows = _config.rows || 5; + + var _elList = this.generateMatrix(_matrices); + $tom.insertFirst(this.elMenu, _elList); + + if (this.ongeneratedList) { + this.generateList = this.ongeneratedList.bind(this); + } + if (this.ongeneratedListItem) { + this.generateListItem = this.ongeneratedListItem.bind(this); + } + + if (this.generateHandler) { + this.generateHandler(_config); + } + + this.showTab(); + }, + /** + * menu를 재생성한다. + * @function + */ + regenerate: function() { + this.showTab(); + if (this.regenerateHandler) { + var _config = this.config; + this.regenerateHandler(_config); + } + }, + /** + * menu를 열 때 디폴트 Tab 혹은 최근에 열었던 Tab 을 보여준다. + * @function + */ + showTab: function() { + var listItemToShow = this.lastElList; + var titleItemToShow = this.lastElTitleItem; + + var isFirstTime = (!listItemToShow || !titleItemToShow); + if (isFirstTime) { + listItemToShow = this.defaultElListItem; + titleItemToShow = this.defaultElTitleItem; + } + + this.onTitleClick(_NULL, titleItemToShow, listItemToShow); + }, + + /** + * 격자무늬 형태의 menu 항목을 생성하고 mouse event handler 를 연결한다. + * @function + */ + generateMatrix: function(matrices) { + var _menu = this; + + var _cols = this.cols; + var _rows = this.rows; + matrices.each(function(matrix) { + var _options = Trex.MarkupTemplate.splitList(_rows, _cols, matrix.options); + matrix['items'] = Trex.MarkupTemplate.get('menu.items').evaluate(_options); + }); + + var _elInner = Trex.MarkupTemplate.get('menu.matrix').evaluateAsDom({ + 'matrices': matrices + }); + + var _elLists = $tom.collectAll(_elInner, 'div.tx-menu-matrix-listset div.tx-menu-matrix-list'); + var _elTitles = $tom.collectAll(_elInner, 'ul.tx-menu-matrix-title li'); + + var defaultIndex = function() { + for (var i = 0, length = matrices.length; i < length; i++) { + if (matrices[i].defaultshow) { + return i; + } + } + return 0; + }(); + this.defaultElListItem = _elLists[defaultIndex]; + this.defaultElTitleItem = _elTitles[defaultIndex]; + + for (var i = 0; i < matrices.length; i++) { + var _elList = _elLists[i]; + $tx.observe(_elList, "click", _menu.onSelect.bindAsEventListener(_menu)); + $tx.observe(_elList, 'mouseover', _menu.onItemMouseOver.bindAsEventListener(_menu)); + $tx.observe(_elList, 'mouseout', _menu.onItemMouseOut.bindAsEventListener(_menu)); + + var _elTitle = _elTitles[i]; + $tx.observe(_elTitle, "click", _menu.onTitleClick.bindAsEventListener(_menu, _elTitle, _elList)); + } + return _elInner; + }, + /** + * menu 의 group title tab 에 대한 event handler를 연결한다. + * @function + */ + onTitleClick: function(ev, elTitleItem, elList) { + if (this.lastElList != elList) { + $tx.show(elList); + if (this.lastElList) { + $tx.hide(this.lastElList); + } + this.lastElList = elList; + + if (this.lastElTitleItem) { + $tx.removeClassName(this.lastElTitleItem, 'tx-selected'); + } + $tx.addClassName(elTitleItem, 'tx-selected'); + this.lastElTitleItem = elTitleItem; + } + if (ev) { + $tx.stop(ev); + } + }, + /** + * menu 항목에 mouse over 하면 hovered state css class 를 적용한다. + * @function + */ + onItemMouseOver: function(ev) { + var _el = $tx.findElement(ev, 'span'); + if (_el.tagName && _el.tagName.toLowerCase() == 'span') { + $tx.addClassName(_el,"tx-item-hovered"); + } + $tx.stop(ev); + }, + /** + * menu 항목에 mouse out 하면 hovered state css class 를 해제한다. + * @function + */ + onItemMouseOut: function(ev) { + var _el = $tx.findElement(ev, 'span'); + if (_el.tagName && _el.tagName.toLowerCase() == 'span') { + $tx.removeClassName(_el, "tx-item-hovered"); + } + $tx.stop(ev); + }, + /** + * menu 의 list item 이 선택되었을 때 command 를 실행한다. + * @function + */ + onSelect: function(ev) { + var _el = $tx.findElement(ev, 'span'); + if (_el.tagName && _el.tagName.toLowerCase() == 'span') { + this._command(_el.innerText); + this.hide(); + } + $tx.stop(ev); + } +}); + +Trex.MarkupTemplate.add( + 'menu.colorPallete', [ + '
      ', + '
        ', + '
          ', + '

          @menu.pallete.enter

          ', + '
          ', + '

          @menu.pallete.more

          ', + '
          ', + '
          ', + '
          ', + '
          ', + '
          ', + '
          ', + '
          ' + ].join("") +); + +/** + * Trex.Menu.ColorPallete + * + * @extends Trex.Menu + * @class + * @param {Object} config + */ +Trex.Menu.ColorPallete = Trex.Class.create(/** @lends Trex.Menu.ColorPallete.prototype */{ + /** @ignore */ + $extend: Trex.Menu, + /** @ignore */ + $mixins: [ + Trex.I.ColorPallete + ], + /** + * menu를 생성한다. + * @function + */ + generate: function() { + var _config = this.config; + + var _elMenu = this.elMenu; + Trex.MarkupTemplate.get("menu.colorPallete").evaluateToDom({}, _elMenu); + + var _transCfg = _config.thumbs.transparent; + _config.thumbs.transparent = Object.extend(_config.thumbs.transparent, { + image: TrexConfig.getIconPath(_transCfg.image), + thumb: TrexConfig.getIconPath(_transCfg.thumb), + thumbImage: TrexConfig.getIconPath(_transCfg.thumbImage) + }); + + if(!this.hookEvent) { + throw new Error("[Exception]Trex.Menu.ColorPallete : not implement function(hookEvent)"); + } + this.hookEvent(_config); + + if (this.generateHandler) { + this.generateHandler(_config); + } + + this.bindEvents(); + }, + /** + * menu 의 list item(color) 이 선택되었을 때 command 를 실행한다. + * @function + */ + onSelect: function() { + var _args = $A(arguments); + var _ev = _args.shift(); + this._command.apply(this, _args); + this.remainColor(_args); + this.hide(); + $tx.stop(_ev); + }, + /** + * menu 의 list item(color) 이 선택되었을 때 선택 한 color value 를 input box에 남긴다. + * this.onSelect function 에서 호출한다. + * @function + */ + remainColor: function(color) { + if(color) { + this.setColorValueAtInputbox(color); + } + }, + bindEvents: function() { + var self = this; + $tx.observe(this.elMore, 'click', function(ev){ + self.fireJobs(Trex.Ev.__MENU_LAYER_CHANGE_SIZE, { + detail: { + menu: self + } + }); + }); + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/common/menuback.js b/src/main/webapp/daumeditor/js/trex/common/menuback.js new file mode 100644 index 0000000..3f1e4ff --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/common/menuback.js @@ -0,0 +1,114 @@ +$tx.msie && Trex.module("add menu layer shield for IE flash object", function(editor, toolbar, sidebar, canvas/*, config*/) { + + /** + * IE에서 object의 wmode=window에 대응하여 iframe을 메뉴 레이어 하단에 삽입한다. + */ + Trex.MarkupTemplate.add( + 'menu.shield', [ + '
          ', + '', + '
          ' + ].join("") + ); + + /** + * 각 메뉴 레이어에 추가되는 요소 + */ + var MenuShieldEntry = Trex.Class.create({ + initialize: function (id, menuEl) { + this.id = id; + this.menuEl = menuEl; + this.shieldEl = Trex.MarkupTemplate.get('menu.shield').evaluateAsDom({}); + }, + show: function() { + this.update(); + $tom.insertAt(this.shieldEl, this.menuEl); + $tx.show(this.shieldEl); + }, + hide: function() { + $tx.hide(this.shieldEl); + $tom.remove(this.shieldEl); + }, + update: function() { + var style = { + "width": this.menuEl.offsetWidth.toPx(), + "height": this.menuEl.offsetHeight.toPx(), + "left": $tx.getStyle(this.menuEl, 'left'), + "top": $tx.getStyle(this.menuEl, 'top') + }; + $tx.setStyle(this.shieldEl, style); + }, + destroy: function() { + this.id = _NULL; + this.menuEl = _NULL; + this.shieldEl = _NULL; + } + }); + + /** + * 레이어 추가/삭제/갱신을 위한 컨트롤러 + */ + var MenuShield = Trex.Class.create({ + initialize: function() { + this.entry = {}; + }, + show: function(id, menu) { + var trg = this.entry[id]; + if (!trg) { + console.log('show', id, this.entry); + var entry = new MenuShieldEntry(id, menu); + this.entry[id] = trg = entry; + } + trg.show(); + }, + hide: function(id) { + var trg = this.entry[id]; + if (trg) { + console.log('hide', id, this.entry); + trg.hide(); + trg.destroy(); + delete this.entry[id]; + } + }, + updateAll: function() { + var cache = this.entry; + setTimeout(function(){ + for(var p in cache) { + if(cache.hasOwnProperty(p)) { + cache[p].update(); + } + } + }, 1); + } + }); + + var shield = new MenuShield(); + + function getMenuId(menu) { + var id; + try { + if (menu.config.id) { + id = menu.config.id + menu.config.initializedId; + } else { + id = menu.config.el.className; + } + } catch(e) { + id = 'unknown'; + } + return id; + } + + toolbar.observeJob(Trex.Ev.__MENU_LAYER_SHOW, function(ev){ + var menu = ev.detail.menu; + shield.show(getMenuId(menu), menu.elMenu); + }); + + toolbar.observeJob(Trex.Ev.__MENU_LAYER_HIDE, function(ev){ + var menu = ev.detail.menu; + shield.hide(getMenuId(menu)); + }); + + toolbar.observeJob(Trex.Ev.__MENU_LAYER_CHANGE_SIZE, function(ev){ + shield.updateAll(); + }); +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/config.js b/src/main/webapp/daumeditor/js/trex/config.js new file mode 100644 index 0000000..e3cb0ed --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/config.js @@ -0,0 +1,436 @@ +var textboxOption = function( data, padding, bgcolor, border ){ + return { + data: data, + style: { + padding:padding, backgroundColor:bgcolor, border:border + } + }; +}; +Trex.__CONFIG_COMMON = { + thumbs: { + options:[ + {color:"#FF0000"}, {color:"#FF5E00"}, {color:"#FFBB00"}, {color:"#FFE400"}, {color:"#ABF200"}, {color:"#1FDA11"}, {color:"#00D8FF"}, {color:"#0055FF"}, {color:"#0900FF"}, {color:"#6600FF"}, {color:"#FF00DD"}, {color:"#FF007F"}, {color:"#000000"}, {color:"#FFFFFF"}, + {color:"#FFD8D8"}, {color:"#FAE0D4"}, {color:"#FAECC5"}, {color:"#FAF4C0"}, {color:"#E4F7BA"}, {color:"#CEFBC9"}, {color:"#D4F4FA"}, {color:"#D9E5FF"}, {color:"#DAD9FF"}, {color:"#E8D9FF"}, {color:"#FFD9FA"}, {color:"#FFD9EC"}, {color:"#F6F6F6"}, {color:"#EAEAEA"}, + {color:"#FFA7A7"}, {color:"#FFC19E"}, {color:"#FFE08C"}, {color:"#FAED7D"}, {color:"#CEF279"}, {color:"#B7F0B1"}, {color:"#B2EBF4"}, {color:"#B2CCFF"}, {color:"#B5B2FF"}, {color:"#D1B2FF"}, {color:"#FFB2F5"}, {color:"#FFB2D9"}, {color:"#D5D5D5"}, {color:"#BDBDBD"}, + {color:"#F15F5F"}, {color:"#F29661"}, {color:"#F2CB61"}, {color:"#E5D85C"}, {color:"#BCE55C"}, {color:"#86E57F"}, {color:"#5CD1E5"}, {color:"#6699FF"}, {color:"#6B66FF"}, {color:"#A366FF"}, {color:"#F261DF"}, {color:"#F261AA"}, {color:"#A6A6A6"}, {color:"#8C8C8C"}, + {color:"#CC3D3D"}, {color:"#CC723D"}, {color:"#CCA63D"}, {color:"#C4B73B"}, {color:"#9FC93C"}, {color:"#47C83E"}, {color:"#3DB7CC"}, {color:"#4174D9"}, {color:"#4641D9"}, {color:"#7E41D9"}, {color:"#D941C5"}, {color:"#D9418D"}, {color:"#747474"}, {color:"#5D5D5D"}, + {color:"#980000"}, {color:"#993800"}, {color:"#997000"}, {color:"#998A00"}, {color:"#6B9900"}, {color:"#2F9D27"}, {color:"#008299"}, {color:"#003399"}, {color:"#050099"}, {color:"#3D0099"}, {color:"#990085"}, {color:"#99004C"}, {color:"#4C4C4C"}, {color:"#353535"}, + {color:"#670000"}, {color:"#662500"}, {color:"#664B00"}, {color:"#665C00"}, {color:"#476600"}, {color:"#22741C"}, {color:"#005766"}, {color:"#002266"}, {color:"#030066"}, {color:"#290066"}, {color:"#660058"}, {color:"#660033"}, {color:"#212121"}, {color:"#000000"} + ], + transparent: { + color: "transparent", + border: "#999999", + image: "#iconpath/ic_transparent4.gif?v=2", + thumb: "#iconpath/txt_transparent.gif?v=2", + thumbImage:"#iconpath/color_transparent_prev.gif?v=2" + } + }, + textbox: { + options: [ + textboxOption('txc-textbox1', '10px', '#ffffff', '1px solid #f7f7f7'), + textboxOption('txc-textbox2', '10px', '#eeeeee', '1px solid #eeeeee'), + textboxOption('txc-textbox3', '10px', '#fefeb8', '1px solid #fefeb8'), + textboxOption('txc-textbox4', '10px', '#fedec7', '1px solid #fedec7'), + textboxOption('txc-textbox5', '10px', '#e7fdb5', '1px solid #e7fdb5'), + textboxOption('txc-textbox6', '10px', '#dbe8fb', '1px solid #dbe8fb'), + + textboxOption('txc-textbox7', '10px', '#ffffff', '1px dashed #cbcbcb'), + textboxOption('txc-textbox8', '10px', '#eeeeee', '1px dashed #c1c1c1'), + textboxOption('txc-textbox9', '10px', '#fefeb8', '1px dashed #f3c534'), + textboxOption('txc-textbox10', '10px', '#fedec7', '1px dashed #fe8943'), + textboxOption('txc-textbox11', '10px', '#e7fdb5', '1px dashed #9fd331'), + textboxOption('txc-textbox12', '10px', '#dbe8fb', '1px dashed #79a5e4'), + + textboxOption('txc-textbox13', '10px', '#ffffff', '1px solid #cbcbcb'), + textboxOption('txc-textbox14', '10px', '#eeeeee', '1px solid #c1c1c1'), + textboxOption('txc-textbox15', '10px', '#fefeb8', '1px solid #f3c534'), + textboxOption('txc-textbox16', '10px', '#fedec7', '1px solid #fe8943'), + textboxOption('txc-textbox17', '10px', '#e7fdb5', '1px solid #9fd331'), + textboxOption('txc-textbox18', '10px', '#dbe8fb', '1px solid #79a5e4'), + + textboxOption('txc-textbox19', '10px', '#ffffff', '3px double #cbcbcb'), + textboxOption('txc-textbox20', '10px', '#eeeeee', '3px double #c1c1c1'), + textboxOption('txc-textbox21', '10px', '#fefeb8', '3px double #f3c534'), + textboxOption('txc-textbox22', '10px', '#fedec7', '3px double #fe8943'), + textboxOption('txc-textbox23', '10px', '#e7fdb5', '3px double #9fd331'), + textboxOption('txc-textbox24', '10px', '#dbe8fb', '3px double #79a5e4') + ] + } +}; + +/** + * 에디터 전반적인 설정을 관리하는 클래스로 각 함수를 static 하게 접근할 수 있다. + * + * @class + */ +var TrexConfig = function() { + //preset < daumx < project < page + var __IS_SETUP = _FALSE; + var __POST_PROCESSOR = []; + var __TREX_PARAM = {}; + var __TREX_CONFIGURE = { + cdnHost: "//s1.daumcdn.net/editor", + cmnHost: "http://editor.daum.net", + wrapper: "tx_trex_container", + form: 'tx_editor_form', + txIconPath: "images/icon/editor/", + txDecoPath: "images/deco/contents/", + params: [], + events: { + preventUnload: _TRUE, + useHotKey: _TRUE + }, + save: { }, + adaptor: { }, + toolbar: { }, + sidebar: { + attachbox: { }, + embeder: { }, + attacher: { }, + searcher: { } + }, + plugin: { } + }; + + var _createAnchors = function() { + return { + "Tool": __TREX_CONFIGURE.toolbar, + "Sidebar": __TREX_CONFIGURE.sidebar, + "Plugin": __TREX_CONFIGURE.plugin, + "Adaptor": __TREX_CONFIGURE.adaptor, + "Save": __TREX_CONFIGURE.save, + "Attacher": __TREX_CONFIGURE.sidebar.attacher, + "Embeder": __TREX_CONFIGURE.sidebar.embeder, + "Searcher": __TREX_CONFIGURE.sidebar.searcher + }; + }; + + var _addParameter = function(tname, pname) { + if (__IS_SETUP) { + throw new Error("configure is already setup (addParameter)") + } + __TREX_PARAM[tname] = pname; + }; + + var _trexConfig = /** @lends TrexConfig */{ + /** + * url을 에디터 설정값과 주어진 파라미터 값으로 변환하여 넘겨준다. + * @function + * @param {String} url - url + * @param {Object} params - 키,값 쌍으로 이루어진 데이터 + * @returns {String} 변환된 url + * @example + * TrexConfig.getUrl("#host#path/pages/trex/image.html?username=#username", { + * 'username': 'daumeditor' + * }); + */ + getUrl: function(url, params) { + if(typeof url !== 'string') { return url; }; + var loader = _WIN['EditorJSLoader'] || opener && opener['EditorJSLoader'] || (PopupUtil && PopupUtil.getOpener()['EditorJSLoader']); + url = url.replace(/#host#path\/pages\//g, loader.getPageBasePath()); + url = url.replace(/#host/g, __TREX_CONFIGURE["txHost"]); + url = url.replace(/#path\/?/g, __TREX_CONFIGURE["txPath"]); + url = url.replace(/#cdnhost/g, __TREX_CONFIGURE["cdnHost"]); + url = url.replace(/#cmnhost/g, __TREX_CONFIGURE["cmnHost"]); + + for(var _name in __TREX_PARAM) { + url = url.replace(new RegExp("#".concat(_name), "g"), __TREX_CONFIGURE[__TREX_PARAM[_name]]); + } + + if(params) { + for(var name in params) { + url = url.replace(new RegExp("#".concat(name), "g"), params[name]); + } + } + + return url; + }, + /** + * 팝업창을 띄울때 옵션을 문자열로 만들어 넘겨준다. + * @function + * @param {Object} features - 키,값 쌍으로 이루어진 데이터 + * @returns {String} 옵션 문자열 + * @example + * TrexConfig.getPopFeatures({ left:250, top:65, width:797, height:644 }); + */ + getPopFeatures: function(features) { + if(features == _NULL) return _NULL; + if(typeof(features) === "string") { //redefine + return features; + } + var popFeatures = []; + ["toolbar", "location", "directories", "menubar"].each(function(name) { + popFeatures.push(name + "=" + (features[name] || "no")); + }); + ["scrollbars", "resizable"].each(function(name) { + popFeatures.push(name + "=" + (features[name] || "yes")); + }); + ["width", "height"].each(function(name) { + popFeatures.push(name + "=" + (features[name] || "500")); + }); + ["left", "top"].each(function(name) { + popFeatures.push(name + "=" + (features[name] || "100")); + }); + return popFeatures.join(","); + }, + /** + * 컨텐츠 삽입용 이미지의 상위 url을 넘겨준다.
          + * txDecoPath 값이 셋팅된 경우는 해당 url을 넘겨준다. + * @function + * @param {String} url - url + * @param {String} subpath - 하위 디렉터리 (optional) + * @returns {String} 변환된 컨텐츠 삽입용 이미지url + */ + getDecoPath: function(url) { + return url.replace(/#decopath\/?/, this.getUrl(__TREX_CONFIGURE["txDecoPath"])); + }, + /** + * 에디터에서 사용되는 이미지의 상위 url을 넘겨준다.
          + * txIconPath 값이 셋팅된 경우는 해당 url을 넘겨준다. + * @function + * @param {String} url - url + * @param {String} subpath - 하위 디렉터리 (optional) + * @returns {String} 에디터에서 사용되는 이미지url + */ + getIconPath: function(url) { + return url.replace(/#iconpath\/?/, this.getUrl(__TREX_CONFIGURE["txIconPath"])); + }, + /** + * 에디터 로딩이 완료되면 설정값을 셋업시키는 함수로 + * postprocessing로 등록된 함수들을 실행하며 + * 이후에는 설정값을 추가할 수 없다. + * @private + * @function + * @param {Object} config - new Editor() 할 때 입력한 설정값 + * @returns {Object} 셋업된 설정값 + */ + setup: function(config) { + $tx.deepcopy(__TREX_CONFIGURE, config); + + __TREX_CONFIGURE.params.each(function(name) { + _addParameter(name, name); + }); + __POST_PROCESSOR.each(function(fn) { + fn(__TREX_CONFIGURE); + }); + + __IS_SETUP = _TRUE; + + this.setupVersion(); + return __TREX_CONFIGURE; + }, + setupVersion: function() { + // 다른 곳에서 txVersion 을 사용할 수도 있기에 호환을 위해 txVersion 추가 + __TREX_CONFIGURE.txVersion = Editor.version; + }, + /** + * 파라미터를 추가한다.
          + * 파라미터란 getUrl 할 때 기본으로 변환할 키,값들을 정의해놓은 데이터 + * @function + * @param {String} tname - url에 포함될 id + * @param {String} pname - 설정값에 존재하는 id + * @example + * TrexConfig.addParameter('host', 'txHost'); + */ + addParameter: function(tname, pname) { + _addParameter(tname, pname); + }, + /** + * 주어진 설정값을 deep copy로 복사한다. + * @function + * @param {Object} config - 주어진 설정값 + */ + clone: function(config) { + return $tx.deepcopy({}, config); + }, + /** + * 주어진 설정값에 새로운 설정값들을 deep copy로 복사한다. + * @function + * @param {Object} config - 첫번째 인자는 주어진 설정값, 그 이후는 새로운 설정값들 + * @example + * TrexConfig.merge(config, { 'id': 'tx_happy' }, { 'options': [1,2,3] }); + */ + merge: function() { + var _config = {}; + $A(arguments).each(function(source) { + $tx.deepcopy(_config, source); + }); + return _config; + } + }; + + /** + * 주어진 설정값을 root 설정값에 추가한다. + * @name add + * @memberOf TrexConfig + * @function + * @param {Object} config - 주어진 설정값 + * @param {Function} postprocessing - 에디터가 로딩된 후 처리할 함수 (optional) + */ + _trexConfig["add"] = function(config, postprocessing) { + if (__IS_SETUP) { + throw new Error("configure is already setup (mergeConfig)") + } + $tx.deepcopy(__TREX_CONFIGURE, config); + if(postprocessing) { + __POST_PROCESSOR.push(postprocessing); + } + }; + /** + * 주어진 키로 설정값을 리턴한다. + * @name get + * @memberOf TrexConfig + * @function + * @param {String} key - 주어진 키 + */ + _trexConfig["get"] = function(key) { + return __TREX_CONFIGURE[key]; + }; + + /** + * 주어진 키로 주어진 설정값을 root/toolbar 아래에 추가한다. + * @name addTool + * @memberOf TrexConfig + * @function + * @param {String} key - 주어진 키값 + * @param {Object} config - 주어진 설정값 + * @param {Function} postprocessing - 에디터가 로딩된 후 처리할 함수 (optional) + */ + /** + * 주어진 키로 주어진 설정값을 root/sidebar 아래에 추가한다. + * @name addSidebar + * @memberOf TrexConfig + * @function + * @param {String} key - 주어진 키값 + * @param {Object} config - 주어진 설정값 + * @param {Function} postprocessing - 에디터가 로딩된 후 처리할 함수 (optional) + */ + /** + * 주어진 키로 주어진 설정값을 root/plugin 아래에 추가한다. + * @name addPlugin + * @memberOf TrexConfig + * @function + * @param {String} key - 주어진 키값 + * @param {Object} config - 주어진 설정값 + * @param {Function} postprocessing - 에디터가 로딩된 후 처리할 함수 (optional) + */ + /** + * 주어진 키로 주어진 설정값을 root/adaptor 아래에 추가한다. + * @name addAdaptor + * @memberOf TrexConfig + * @function + * @param {String} key - 주어진 키값 + * @param {Object} config - 주어진 설정값 + * @param {Function} postprocessing - 에디터가 로딩된 후 처리할 함수 (optional) + */ + /** + * 주어진 키로 주어진 설정값을 root/save 아래에 추가한다. + * @name addSave + * @memberOf TrexConfig + * @function + * @param {String} key - 주어진 키값 + * @param {Object} config - 주어진 설정값 + * @param {Function} postprocessing - 에디터가 로딩된 후 처리할 함수 (optional) + */ + /** + * 주어진 키로 주어진 설정값을 root/sidebar/attacher 아래에 추가한다. + * @name addAttacher + * @memberOf TrexConfig + * @function + * @param {String} key - 주어진 키값 + * @param {Object} config - 주어진 설정값 + * @param {Function} postprocessing - 에디터가 로딩된 후 처리할 함수 (optional) + */ + /** + * 주어진 키로 주어진 설정값을 root/sidebar/embeder 아래에 추가한다. + * @name addEmbeder + * @memberOf TrexConfig + * @function + * @param {String} key - 주어진 키값 + * @param {Object} config - 주어진 설정값 + * @param {Function} postprocessing - 에디터가 로딩된 후 처리할 함수 (optional) + */ + /** + * 주어진 키로 주어진 설정값을 root/sidebar/searcher 아래에 추가한다. + * @name addSearcher + * @memberOf TrexConfig + * @function + * @param {String} key - 주어진 키값 + * @param {Object} config - 주어진 설정값 + * @param {Function} postprocessing - 에디터가 로딩된 후 처리할 함수 (optional) + */ + var _addConfig = function(key, config, postprocessing) { + if (__IS_SETUP) { + throw new Error("configure is already setup (mergeConfig)") + } + this[key] = this[key] || {}; + $tx.deepcopy(this[key], config); + if(postprocessing) { + __POST_PROCESSOR.push(postprocessing); + } + }; + + /** + * 주어진 키로 root/toolbar[key]의 설정값을 리턴한다. + * @name getTool + * @memberOf TrexConfig + * @function + * @param {String,Object} key - 주어진 키 + */ + /** + * 주어진 키로 root/sidebar[key]의 설정값을 리턴한다. + * @name getSidebar + * @memberOf TrexConfig + * @function + * @param {String,Object} key - 주어진 키 + */ + /** + * 주어진 키로 root/adaptor[key]의 설정값을 리턴한다. + * @name getAdaptor + * @memberOf TrexConfig + * @function + * @param {String,Object} key - 주어진 키 + */ + /** + * 주어진 키로 root/save[key]의 설정값을 리턴한다. + * @name getSave + * @memberOf TrexConfig + * @function + * @param {String,Object} key - 주어진 키 + */ + /** + * 주어진 키로 root/sidebar/attacher[key]의 설정값을 리턴한다. + * @name getAttacher + * @memberOf TrexConfig + * @function + * @param {String,Object} key - 주어진 키 + */ + /** + * 주어진 키로 root/sidebar/embeder[key]의 설정값을 리턴한다. + * @name getEmbeder + * @memberOf TrexConfig + * @function + * @param {String,Object} key - 주어진 키 + */ + /** + * 주어진 키로 root/sidebar/searcher[key]의 설정값을 리턴한다. + * @name getSearcher + * @memberOf TrexConfig + * @function + * @param {String,Object} key - 주어진 키 + */ + var _getConfig = function(key) { + return this[key]; + }; + + var _anchors = _createAnchors(); + for(var _name in _anchors) { + _trexConfig["add" + _name] = _addConfig.bind(_anchors[_name]); + _trexConfig["get" + _name] = _getConfig.bind(_anchors[_name]); + } + + return _trexConfig; + +}(); + +_WIN.TrexConfig = TrexConfig; \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/configbuilder.js b/src/main/webapp/daumeditor/js/trex/configbuilder.js new file mode 100644 index 0000000..823e467 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/configbuilder.js @@ -0,0 +1,32 @@ +var EditorConfigBuilder = function (defaultConfigObject /* optional */) { + this.config = defaultConfigObject || {}; +}; + +EditorConfigBuilder.prototype.set = function (path, value) { + var splitedPath = path.split("."); + var lastKey = splitedPath[splitedPath.length - 1]; + + var curObj = this.config; + for (var i = 0; i < splitedPath.length - 1; i++) { + var key = splitedPath[i]; + if (!curObj[key]) { + curObj[key] = {}; + } + curObj = curObj[key]; + } + + if ($tx.isPrimitiveType(value)) { + curObj[lastKey] = value; + } else { + if (!curObj[lastKey]) { + curObj[lastKey] = {}; + } + $tx.deepcopy(curObj[lastKey], value); + } +}; + +EditorConfigBuilder.prototype.getConfig = function () { + return this.config; +}; + +_WIN.EditorConfigBuilder = EditorConfigBuilder; \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/docparser.js b/src/main/webapp/daumeditor/js/trex/docparser.js new file mode 100644 index 0000000..d43c92e --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/docparser.js @@ -0,0 +1,146 @@ +Trex.install("editor.getDocParser", + function(editor, toolbar, sidebar, canvas, config){ + var _docparser = new Trex.Docparser(editor, sidebar, config); + editor.getDocParser = function() { + return _docparser; + }; + } +); + +Trex.Docparser =Trex.Class.create( { + initialize : function(editor, sidebar, config){ + this.editor = editor; + this.sidebar = sidebar; + this.config = config; + }, + filters: {}, + /** + * register contents converting filter + * + * original = DB에 저장되는 컨텐츠 + * html = wysiwyg 모드에서 보이는 컨텐츠 + * source = source 모드에서 보이는 컨텐츠 + * text = text 모드에서 보이는 컨텐츠 + * + * @example + * editor.getDocParser().registerFilter( + 'filter/converting', { + 'text@load': function(contents){ // orginal -> text + return contents; + }, + 'source@load': function(contents){ // orginal -> source + return contents; + }, + 'html@load': function(contents){ // orginal -> html + return contents; + }, + 'text4save': function(contents){ // text -> orginal + return contents; + }, + 'source4save': function(contents){ // source -> orginal + return contents; + }, + 'html4save': function(contents){ // html -> orginal + return contents; + }, + 'text2source': function(contents){ // text -> source + return contents; + }, + 'text2html': function(contents){ // text -> html + return contents; + }, + 'source2text': function(contents){ // source -> text + return contents; + }, + 'source2html': function(contents){ // source -> html + return contents; + }, + 'html2text': function(contents){ // html -> text + return contents; + }, + 'html2source': function(contents){ // html -> source + return contents; + } + } + ); + */ + registerFilter: function(name, filter){ + this.filters[name] = filter; + }, + getFilter: function(name){ + return this.filters[name]; + }, + executeFilters: function (cmd, contents) { + var filters = this.filters; + ["before " + cmd, cmd, "after " + cmd].each(function (cmd) { + var name, filter; + for (name in filters) { + if (filters.hasOwnProperty(name)) { + filter = filters[name]; + if (filter[cmd]) { + contents = filter[cmd](contents); + } + } + } + }); + return contents; + }, + getContentsAtChangingMode: function(contents, oldMode, newMode) { + if (oldMode == newMode) { + return contents; + } + contents = contents.trim() || ""; + return this.executeFilters(oldMode.concat("2").concat(newMode), contents); + }, + convertAtLoad: function(contents, editorMode, inputMode) { // For Display + /* + * DB에 저장된 컨텐츠 + * > original, text + */ + if(inputMode == 'original') { //original 컨텐츠 변환 + contents = this.executeFilters(editorMode.concat('@load'), contents); + } else { //그외 모드, 자동저장은 변환없이 저장됨. + if(editorMode != inputMode) { + contents = this.executeFilters(inputMode.concat("2").concat(editorMode), contents); + } + } + return contents; + }, + convertAtSave: function(contents, editorMode, outputMode) { // For Save + if (outputMode == 'original') { //original 컨텐츠 변환 + contents = this.executeFilters(editorMode.concat('4save'), contents); + } else { //그외 모드, 자동저장은 변환없이 저장됨. + if (editorMode != outputMode) { + contents = this.executeFilters(editorMode.concat("2").concat(outputMode), contents); + } + } + return contents; + }, + /* 외부에서 참조할 컨텐츠 변환 필터명 시작 */ + text2source: function(contents) { + return this.executeFilters("text2source", contents); + }, + text2html: function(contents) { + if (contents === "") { + return $tom.EMPTY_PARAGRAPH_HTML; + } + return this.executeFilters("text2html", contents); + }, + source2text: function(contents) { + return this.executeFilters("source2text", contents); + }, + source2html: function(contents) { + if (contents === "") { + return $tom.EMPTY_PARAGRAPH_HTML; + } + return this.executeFilters("source2html", contents); + }, + html2text: function(contents) { + return this.executeFilters("html2text", contents); + }, + html2source: function(contents) { + return this.executeFilters("html2source", contents); + } + /* 외부에서 참조할 컨텐츠 변환 필터명 끝 */ + } +); diff --git a/src/main/webapp/daumeditor/js/trex/editor.js b/src/main/webapp/daumeditor/js/trex/editor.js new file mode 100644 index 0000000..30bbc2a --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/editor.js @@ -0,0 +1,443 @@ +/** + * @fileoverview + * DaumEitor의 Entrypoint역할을 하는 source로 Trex.Editor, Editor 를 포함 + */ + +/** + * 실제 Editor Implementation, 하지만 Editor 생성 시에는 Class Editor를 사용한다 + * + * {@link Editor} + * @class + * @param {Object} config + */ +Trex.Editor = Trex.Class.create( /** @lends Trex.Editor.prototype */{ + /** @ignore */ + $mixins: [Trex.I.JobObservable, Trex.I.KeyObservable], + toolbar: _NULL, + sidebar: _NULL, + canvas: _NULL, + config: _NULL, + initialConfig: _NULL, + initialize: function(config) { + this.initialConfig = config; + var _editor = this, _config = this.config = TrexConfig.setup(config); + var _canvas = this.canvas = new Trex.Canvas(_editor, _config); + var _toolbar = this.toolbar = new Trex.Toolbar(_editor, _config); + var _sidebar = this.sidebar = new Trex.Sidebar(_editor, _config); + Trex.invokeInstallation(_editor, _toolbar, _sidebar, _canvas, _config); + + /* common key event */ + var _evConfig = _config.events; + var _keyDownHandler = function(ev) { + if (_evConfig.useHotKey) { + _editor.fireKeys(ev); + } + }; + $tx.observe(_DOC, "keydown", _keyDownHandler.bindAsEventListener(this), _FALSE); + + _canvas.observeJob(Trex.Ev.__IFRAME_LOAD_COMPLETE, function() { + //for hanmail iframe load log. + var iframeLoadCompleteTime = new Date().getTime(); + var secTime = Math.round((iframeLoadCompleteTime - Editor.initStartTime) / 100) / 10; + _editor.fireJobs(Trex.Ev.__IFRAME_LOADING_TIME, secTime);//TODO unresolved + + var _initializedId = _editor.getInitializedId(); + var _elLoading = $tx("tx_loading" + _initializedId); + if (!_elLoading) { + return; + } + if (_canvas.mode != Trex.Canvas.__WYSIWYG_MODE) { + _canvas.fireJobs(Trex.Ev.__CANVAS_MODE_INITIALIZE, Trex.Canvas.__WYSIWYG_MODE, _canvas.mode); + } + $tx.hide(_elLoading); + }); + Trex.invokeRegisters(_editor, _toolbar, _sidebar, _canvas, _config); + Trex.invokeModules(_editor, _toolbar, _sidebar, _canvas, _config); + }, + /** + * Get toolbar instance + * @see Trex.Toolbar + */ + getToolbar: function() { + return this.toolbar; + }, + /** + * Get sidebar instance + * @see Trex.Sidebar + */ + getSidebar: function() { + return this.sidebar; + }, + /** + * Get canvas instance + * @see Trex.Canvas + */ + getCanvas: function() { + return this.canvas; + }, + getUsedWebfont: function() { + return this.canvas.getUsedWebfont(); + }, + /** + * Get config instance + */ + getConfig: function() { + return this.config; + }, + getInitialConfig: function () { + return this.initialConfig; + }, + getParam: function(name) { + var _params = {}, _config = this.config; + _config.params.each(function(name) { + if (_config[name]) { + _params[name] = _config[name]; + } + }); + return _params[name]; + }, + getWrapper: function() { + if (!this.initialConfig.wrapper) { + throw new Error('`wrapper` config variable should be provided'); + } + return $must(this.initialConfig.wrapper); + }, + getInitializedId: function() { + return this.initialConfig.initializedId || ""; + }, + saveEditor: function() { + this.setDisableUnloadHandler(); + this.getSaver().submit(); + }, + loadEditor: function(data) { + this.getSaver().load(data); + }, + /** + * Editor에서 작성된 저장하기 위해 parsing된 글의 내용을 가져온다. + * @see Trex.Canvas#getContent + */ + getContent: function() { + return this.getSaver().getContent(); + }, + /** + * Editor에 첨부된 첨부데이터 리스트를 가져온다. + * * @see Trex.Sidebar#getAttachments + */ + getAttachments: function(type, all) { + return this.getSaver().getAttachments(type, all); + }, + /** + * Editor에 삽입된 Embed데이터 리스트를 가져온다. + * * @see Trex.Sidebar#getEmbeddedData + */ + getEmbeddedData: function(type) { + return this.getSaver().getEmbeddedData(type); + }, + /** + * Editor에 첨부된 정보첨부 리스트를 가져온다. + * * @see Trex.Sidebar#getResults + */ + getResults: function(type) { + return this.getSaver().getResults(type); + }, + /** + * autosaver의 현재 사용중인 key를 가져온다. + * * @see Trex.Autosaver#getCurSeq + */ + getAutosaveSeq: function(){ + return (this.getAutoSaver && this.getAutoSaver()) ? this.getAutoSaver().getCurSeq() : "0"; + } +}); +// Binds helper functions for Editor +(function() { + /** + * Editor + * + * @example + * new Editor({ + * txService: 'sampleService', + * txHost: 'sample.daum.net', + * txPath: 'sampleService', + * initializedId: 'stringValue', + * form: 'tx_editor_form'+"$!initializedId" + * }); + * + * @extends Trex.Editor + * @class + * @param {Object} config + */ + _WIN.Editor = Trex.Class.create({ + /** @ignore */ + $const: { + __ACTIVE: _FALSE, + __PANEL_LOADED: _FALSE, + __EDITOR_LOADED: _FALSE, + __MULTI_LIST: [], + __SELECTED_INDEX: 0 + }, + _initEditor: function (_editor, config) { + Editor.__EDITOR_LOADED = _FALSE; + Editor.__PANEL_LOADED = _FALSE; + _editor = new Trex.Editor(config); + var _initializedId = _editor.getInitializedId(); + if (_initializedId != _NULL) { + var idx = _initializedId == "" ? 0 : _initializedId; + Editor.__MULTI_LIST[idx] = _editor; + Editor.__SELECTED_INDEX = idx; + } + Object.extend(Editor, _editor); + Editor.__EDITOR_LOADED = _TRUE; + Editor.__ACTIVE = _TRUE; + }, + initialize: function(config) { + //for hanmail iframe load log. + if (Trex.hmailLogging) { + Trex.hmailLogging(config); + } + Editor.initStartTime = new Date().getTime(); + + var _editor = null; + + if (_WIN['DEBUG']) { + this._initEditor(_editor, config); + } else { + try { + this._initEditor(_editor, config); + } catch (e) { + if (_editor) { + _editor.fireJobs(Trex.Ev.__RUNTIME_EXCEPTION, e); + } else { + throw 'failed to initialize editor. caused by ' + e; + } + throw e; + } + } + } + }); + /** + * 글을 수정할 때 저장된 글을 불러온다. + * @param {Object} data - 에디트에 로드할 내용/첨부파일 값 + * @example + * Editor.modify({ + * content:'<p>content example</p>' or $tx('tx_content') + * attachments: [ + * {attacher: 'image', + * data: { + * thumburl: "http://cfile163.uf.daum.net/P150x100/0126A20248BFAFF72D2229", + * imageurl: "http://cfile163.uf.daum.net/image/0126A20248BFAFF72D2229", + * originalurl: "http://cfile163.uf.daum.net/original/0126A20248BFAFF72D2229", + * exifurl: "http://cfile163.uf.daum.net/info/0126A20248BFAFF72D2229", + * attachurl: "http://cfile163.uf.daum.net/attach/0126A20248BFAFF72D2229", + * filename: "Tree.jpg", + * filesize: "155833" + * } + * }] + * }); + */ + Editor.modify = function(data) { + if (Editor.__PANEL_LOADED && Editor.__EDITOR_LOADED) { + if (this.loadEditor) { + this.loadEditor(data); + } + } else { + setTimeout(this.modify.bind(this, data), 10); + } + }; + /** + * Editor 생성 후 자동저장된 Content를 불러올 경우 사용한다. + * @param {Object} data + * @example + * Editor.restore( + * {content: 'string', + * attachments: [{Object}]}); + */ + Editor.restore = function(data) { + if (Editor.__PANEL_LOADED && Editor.__EDITOR_LOADED) { + if(this.getAutoSaver && this.getAutoSaver()) { + this.getAutoSaver().load(data); + } + } else { + setTimeout(this.restore.bind(this, data), 10); + } + }; + /** + * 글 저장시 사용한다. + * @example + * <a onclick="Editor.save();return _FALSE;" href="#">save</a> + */ + Editor.save = function() { + if (Editor.__PANEL_LOADED && Editor.__EDITOR_LOADED) { + if (this.saveEditor) { + this.saveEditor(); + } + } else { + setTimeout(this.saveEditor.bind(this), 10); + } + return _FALSE; + }; + /** + * Canvas의 최근 focus가 있던 영역에 focus를 준다. + * 예를들어, 이미지를 첨부하는 팝업창에서 작업을 완료 후 팝업창을 닫고 에디터에 최근의 focus를 준다. + */ + Editor.focus = function() { + if (Editor.__PANEL_LOADED && Editor.__EDITOR_LOADED) { + var _canvas = this.getCanvas(); + if (_canvas) { + _canvas.focus(); + } + } else { + setTimeout(this.focus.bind(this), 10); + } + return _FALSE; + }; + /** + * Canvas의 맨 위에 focus를 준다. + * @see Canvas#focusOnTop + */ + Editor.focusOnTop = function() { + if (Editor.__PANEL_LOADED && Editor.__EDITOR_LOADED) { + var _canvas = this.getCanvas(); + if (_canvas) { + _canvas.focusOnTop(); + } + } else { + setTimeout(this.focusOnTop.bind(this), 10); + } + return _FALSE; + }; + /** + * Canvas의 맨 아래에 focus를 준다. + * @see Canvas#focusOnBottom + */ + Editor.focusOnBottom = function() { + if (Editor.__PANEL_LOADED && Editor.__EDITOR_LOADED) { + var _canvas = this.getCanvas(); + if (_canvas) { + _canvas.focusOnBottom(); + } + } else { + setTimeout(this.focusOnBottom.bind(this), 10); + } + return _FALSE; + }; + /** + * Editor가 있는 page를 나갈 경우 beforeunload eventlistener를 실행 시키지 도록 설정한다. + * 예를들면, Editor에서 글을 작성 중에 새로고침했을 경우 경고창을 안뜨게 한다. + */ + Editor.permitUnload = function() { + if (Editor.__PANEL_LOADED && Editor.__EDITOR_LOADED) { + this.setDisableUnloadHandler(); + } else { + setTimeout(this.permitUnload.bind(this), 500); + } + }; + /** + * Editor와 Iframe이 정상적으로 생성 된후 argument로 지정된 function을 실행 시킨다. + * @param {Function} fn + * @example + * Editor.onPanelLoadComplete(function(){ + * Editor.focus(); + * }); + */ + Editor.onPanelLoadComplete = function(fn) { + if (Editor.__PANEL_LOADED == _TRUE && Editor.__EDITOR_LOADED == _TRUE) { + if (fn) { + fn(); + } + } else { + setTimeout(Editor.onPanelLoadComplete.bind(Editor, fn), 500); + } + }; + /** + * 동일한 Page에 Editor가 여러개 생성됬을 경우, 다른 Editor를 지정한다. + * @param {Object} toIndex + */ + Editor.switchEditor = function (toIndex) { + Editor.__SELECTED_INDEX = toIndex; + Object.extend(Editor, Editor.__MULTI_LIST[toIndex]); + }; + /* 에디터가 여러개 있을 때 async로 불러오는 모듈에서 호출하는 에디터를 찾기 위함. */ + Editor.editorForAsyncLoad = Editor; + /* 에디터가 여러개 있을 때 모든 에디터에 적용하기 위함 */ + Editor.forEachEditor = function (fn) { + var indexName, list= Editor.__MULTI_LIST; + for (indexName in list) { + if (list.hasOwnProperty(indexName)) { + fn(list[indexName]); + } + } + }; + /** + * focus on form + * @param {String} name - focus를 줄 form의 name 속성 값 + * @example + * Editor.focusOnForm("tx_article_title"); + */ + Editor.focusOnForm = function(name) { + if (Editor.__PANEL_LOADED && Editor.__EDITOR_LOADED) { + _WIN.focus(); + var _form = Editor.getForm(); + if (_form.getElementByName(name)) { + _form.getElementByName(name).focus(); + } + } else { + setTimeout(Editor.focusOnForm.bind(Editor, name), 500); + } + return _FALSE; + }; + /** + * 파일함에서 export된 데이터를 에디터에 삽입한다. attachment만 삽입된다. + * @param {Object} data - 에디트에 로드할 내용/첨부파일 값 + * @example + * Editor.fromHdrive( + [{attacher: 'image', + * data: { + * thumburl: "http://cfile163.uf.daum.net/P150x100/0126A20248BFAFF72D2229", + * imageurl: "http://cfile163.uf.daum.net/image/0126A20248BFAFF72D2229", + * originalurl: "http://cfile163.uf.daum.net/original/0126A20248BFAFF72D2229", + * exifurl: "http://cfile163.uf.daum.net/info/0126A20248BFAFF72D2229", + * attachurl: "http://cfile163.uf.daum.net/attach/0126A20248BFAFF72D2229", + * filename: "Tree.jpg", + * filesize: "155833" + * } + * }] + */ + Editor.fromHdrive = function(data) { + var attachments = []; + for (var i = 0; i < data.length; i++) { + attachments.push(data[i]); + } + var modifyData = { + content: "", + attachments: attachments + }; + + if (Editor.__PANEL_LOADED && Editor.__EDITOR_LOADED) { + if (this.loadEditor) { + this.loadEditor(modifyData); + var _entries = Editor.getAttachBox().datalist; + for (var j = 0; j < _entries.length; j++) { + _entries[j].execAppend(); + } + } + } else { + setTimeout(this.fromHdrive.bind(this, data), 10); + } + }; + Editor.refreshSize = function () { + this.canvas.fireJobs(Trex.Ev.__CANVAS_WRAP_WIDTH_CHANGE); + //TODO.azki height..??? + }; + /** + * deprecated - use Editor.switchEditor, 동일한 Page에 Editor가 여러개 생성됬을 경우, 다른 Editor를 지정한다. + * @function + * @deprecated since ver 1.2, use Editor.switchEditor + */ + Editor.prototype.switchEditor = Editor.switchEditor; + /** + * deprecated - use Editor.focusOnForm, focus on form + * @function + * @deprecated since ver 1.2, Use Editor.focusOnForm + */ + Editor.prototype.focusOnForm = Editor.focusOnForm; +})(); diff --git a/src/main/webapp/daumeditor/js/trex/embedentry.js b/src/main/webapp/daumeditor/js/trex/embedentry.js new file mode 100644 index 0000000..f5a088b --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/embedentry.js @@ -0,0 +1,53 @@ +/** + * Trex.EmbedEntry + * 삽입된 embed들을 wrapping하는 class + * @class + * @extends Trex.Entry + * + * @param {Object} actor + * @param {Object} data + * + * 1.5 되면서 IE에서는 변환하지 않음 +*/ +Trex.EmbedEntry = Trex.Class.create({ + $extend: Trex.Entry, + attrs: { + align: "left" + }, + initialize: function(actor, data) { + this.actor = actor; + this.canvas = actor.canvas; + this.entryBox = actor.entryBox; + + this.setProperties(data); + }, + register: function() { + if(this.canvas.isWYSIWYG()) { + var _style = this.actor.config.defaultstyle; + if(_style){ + this.canvas.pasteContent(this.dispHtml, _TRUE, { + 'style': _style + }); + }else{ + this.canvas.pasteContent(this.dispHtml, _TRUE); + } + } else { + this.canvas.getProcessor().insertTag('', this.dispText); + } + }, + setProperties: function(data) { + this.type = this.constructor.__Identity; + + var _data = this.data = data; + this.key = _data.key; + + this.dispHtml = this.getDispHtml(_data); + this.saveHtml = this.dispText = this.getDispText(_data); //NOTE: embeder들은 dispText와 saveHtml가 같다. + this.regHtml = this.getRegHtml(_data); + this.regLoad = this.regText = this.getRegText(_data); //NOTE: embeder들은 dispText와 saveHtml가 같다. + }, + refreshProperties: function() { + this.setProperties(this.data); + } +}); + diff --git a/src/main/webapp/daumeditor/js/trex/embeder.js b/src/main/webapp/daumeditor/js/trex/embeder.js new file mode 100644 index 0000000..7c31d15 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/embeder.js @@ -0,0 +1,286 @@ +TrexMessage.addMsg({ + '@embeder.alert': "에디터 상태에서만 삽입할 수 있습니다." +}); + +/** + * Trex.EmbedBox + * 본문에 삽입한 embed들이 저장되는 class + * + * @class + * @extends Trex.EntryBox + * @param {Object} config + * @param {Object} canvas + * @param {Object} editor + */ +Trex.EmbedBox = Trex.Class.create({ + /** @ignore */ + $extend: Trex.EntryBox, + initialize: function() { + } +}); + +Trex.install("editor.getEmbedBox & sidebar.getEmbeder & sidebar.getEmbeddedData", + function(editor, toolbar, sidebar, canvas, config){ + var _embedBox = new Trex.EmbedBox(config, canvas, editor); + + sidebar.entryboxRegistry['embedbox'] = _embedBox; + editor.getEmbedBox = function() { + return _embedBox; + }; + sidebar.getEmbeddedData = _embedBox.getEntries.bind(_embedBox); + + var _embeders = sidebar.embeders = {}; + sidebar.getEmbeder = function(name) { + if(_embeders[name] != _NULL) { + return _embeders[name]; + } else if(arguments.length == 0){ + return _embeders; + }else{ + return _NULL; + } + }; + } +); + +Trex.register("new embeders", + function(editor, toolbar, sidebar, canvas, config){ + var _embedBox = editor.getEmbedBox(); + var _embeders = sidebar.embeders; + + for(var i in Trex.Embeder) { + var _name = Trex.Embeder[i]['__Identity']; + if (_name) { + if(!toolbar.tools[_name]){ +// console.log(["No tool '",_name,"', but Embeder '", _name,"' is initialized."].join("")); + } + _embeders[_name] = new Trex.Embeder[i](editor, _embedBox, config); + } + } + } +); + +Trex.Embeder = Trex.Class.draft({ + $extend: Trex.Actor, + canResized: _FALSE, + initialize: function(editor, entryBox, config) { + this.editor = editor; + this.canvas = editor.getCanvas(); + this.entryBox = entryBox; + + var _config = this.config = TrexConfig.getEmbeder(this.constructor.__Identity, config); + if(config.pvpage && !!_config.usepvpage) { + this.pvUrl = TrexConfig.getUrl(config.pvpage, { "pvname": this.name }); + } + this.wysiwygonly = ((_config.wysiwygonly != _NULL)? _config.wysiwygonly: _TRUE); + this.pastescope = _config.pastescope; + + this.embedHandler = this.embedHandler.bind(this); + + //NOTE: Cuz Specific Case + if (this.oninitialized) { + this.oninitialized.bind(this)(config); + } + }, + execute: function() { + if(this.wysiwygonly && !this.canvas.isWYSIWYG()) { + alert(TXMSG("@embeder.alert")); + return; + } + + if(this.clickHandler) { + this.clickHandler(); + } else { + try { + var _url = this.config.popPageUrl; + var isDocumentDomainDeclaredExplicitly = (document.location.hostname != document.domain); + if (isDocumentDomainDeclaredExplicitly) { + _url = _url + ((_url.indexOf("?") > -1) ? "&" : "?") + "xssDomain=" + document.domain; + } + + _url = (this.pvUrl? this.pvUrl + ((this.pvUrl.indexOf("?") > -1) ? "&" : "?") + "u="+escape(_url): _url); + var win = _WIN.open(_url, "at" + this.name, this.config.features); + win.focus(); + } catch (e) {} + } + }, + embedHandler: function(data) { + this.execAttach(data); + }, + createEntry: function(data, type) { + var _embeddedItemType = this.constructor.__Identity; + if(type){ + _embeddedItemType = type; + } + return new Trex.EmbedEntry[_embeddedItemType.capitalize()](this, data); + }, + execAttach: function(data) { + var _pastescope = this.pastescope; + var _html = this.getCreatedHtml(data); + var _style = this.config.parastyle || this.config.defaultstyle || {}; + this.canvas.execute(function(processor) { + processor.moveCaretWith(_pastescope); + processor.pasteContent(_html, _TRUE, _style); + }); + }, + execReattach: function(/*data, type*/) { + }, + execReload: function(/*data, type*/) { + }, + getReloadContent: function(data, content) { + if(!data.dispElId) { + return content; + } + var _html = this.getCreatedHtml(data); + var _reg = new RegExp("<(?:img|IMG)[^>]*id=\"?" + data.dispElId + "\"?[^>]*\/?>", "gm"); + if(content.search(_reg) > -1) { + return content.replace(_reg, _html); + } + return content; + } +}); + + +Trex.register("filter > embeder", + function(editor) { + var _embedBox = editor.getEmbedBox(); + var _docparser = editor.getDocParser(); + _docparser.registerFilter( + 'filter/embeder', { + 'text@load': function(contents){ + var entries = _embedBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('text@load', contents); + } + contents = entry.getChangedContent(contents, entry.regLoad, ""); + }); + return contents; + }, + 'source@load': function(contents){ + var entries = _embedBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('source@load', contents); + } + contents = entry.getChangedContent(contents, entry.regLoad, entry.dispText); + }); + return contents; + }, + 'html@load': function(contents){ + var entries = _embedBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('html@load', contents); + } + contents = entry.getChangedContent(contents, entry.regLoad, entry.dispHtml); + }); + return contents; + }, + 'text4save': function(contents){ + var entries = _embedBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('text4save', contents); + } + contents = entry.getChangedContent(contents, entry.regText, ""); + }); + return contents; + }, + 'source4save': function(contents){ + var entries = _embedBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('source4save', contents); + } + contents = entry.getChangedContent(contents, entry.regText, entry.saveHtml, ["id", "class"]); + }); + return contents; + }, + 'html4save': function(contents){ + var entries = _embedBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('html4save', contents); + } + contents = entry.getChangedContent(contents, entry.regHtml, entry.saveHtml, ["id", "class"]); + }); + return contents; + }, + 'text2source': function(contents){ + return contents; + }, + 'text2html': function(contents){ + return contents; + }, + 'source2text': function(contents){ + var entries = _embedBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('source2text', contents); + } + contents = entry.getChangedContent(contents, entry.regText, ""); + }); + return contents; + }, + 'source2html': function(contents){ + var entries = _embedBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('source2html', contents); + } + contents = entry.getChangedContent(contents, entry.regText, entry.dispHtml); + }); + return contents; + }, + 'html2text': function(contents){ + var entries = _embedBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('html2text', contents); + } + contents = entry.getChangedContent(contents, entry.regHtml, ""); + }); + return contents; + }, + 'html2source': function(contents){ + var entries = _embedBox.datalist; + entries.each(function(entry) { + if (entry.loadDataByContent) { + entry.loadDataByContent('html2source', contents); + } + contents = entry.getChangedContent(contents, entry.regHtml, entry.dispText, ["id", "class"]); + }); + return contents; + } + } + ); + } +); +Trex.module("embad entry data", function (editor, toolbar, sidebar, canvas, config) { + var _embedBox = editor.getEmbedBox(); + var _embeders = sidebar.embeders; + editor.observeJob(Trex.Ev.__EDITOR_LOAD_DATA_BEGIN, function(jsonData) { + _embedBox.empty(); + var content = jsonData.content; + function setEmbedEntrys(embedEntrys, contents) { //NOTE: data format = JSON + embedEntrys = embedEntrys || []; + contents = contents || ""; + embedEntrys.each(function(embedEntry){ + try { + var _actor = _embeders[embedEntry.embeder]; + if(_actor) { + _actor.execReload(embedEntry.data, contents, embedEntry.type); + } + } catch(ignore) { + // 첨부데이터 일부를 정상적으로 불러오지 못했습니다. + console.error("첨부데이터 일부를 정상적으로 불러오지 못했습니다:", ignore); + } + }); + } + for(var name in _embeders){ + if(_embeders[name]["onloadData"]){ + setEmbedEntrys(_embeders[name]["onloadData"](content),content) + } + } + }); +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/embeder/media.js b/src/main/webapp/daumeditor/js/trex/embeder/media.js new file mode 100644 index 0000000..a4e8470 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/embeder/media.js @@ -0,0 +1,497 @@ +TrexConfig.addTool( + "media", + { + wysiwygonly: _TRUE, + sync: _FALSE, + status: _FALSE + } +); + +TrexMessage.addMsg({ + '@media.title': "멀티미디어", + '@media.prev.url': "#iconpath/spacer2.gif?v=2", + '@media.prev.url.tvpot': "#iconpath/img_multi_tvpot.gif?v=2", + '@media.prev.url.wmp': "#iconpath/spacer2.gif?v=2" +}); + +Trex.Tool.Media = Trex.Class.create({ + $const: { + __Identity: 'media' + }, + $extend: Trex.Tool, + oninitialized: function() { + var _editor = this.editor; + this.weave.bind(this)( + new Trex.Button(this.buttonCfg), + _NULL, + function() { + _editor.getSidebar().getEmbeder("media").execute(); + } + ); + } +}); + +TrexConfig.addEmbeder( + "media", + { + wysiwygonly: _TRUE, + useCC: _FALSE, + features: { + left:250, + top:65, + width:458, + height:568, + resizable:"yes" + }, + popPageUrl: "#host#path/pages/trex/multimedia.html", + allowNetworkingFilter: _FALSE, + allowNetworkingSites: [] + }, + function(root) { + var _config = root.sidebar.embeder.media; + _config.popPageUrl = TrexConfig.getUrl(_config.popPageUrl); + _config.features = TrexConfig.getPopFeatures(_config.features); + } +); + +(function() { + + Trex.Embeder.Media = Trex.Class.create({ + $const: { + __Identity: 'media' + }, + $extend: Trex.Embeder, + name: 'media', + title: TXMSG("@media.title"), + canResized: _TRUE, + getCreatedHtml: function(data){ + var _source = data.code || this.makeSourceByUrl(data.url); + return convertToHtml(_source); + }, + getDataForEntry: function(){ + //This function is not needed anymore but absence may generate initializing error. So remained... + }, + makeSourceByUrl: function(url) { + var ext = this.getUrlExt(url); + var size = getDefaultSizeByUrl(url); + + switch (ext) { + case "swf": + return this.generateHTMLForFlash(url, size); + case "mp3": + case "wma": + case "asf": + case "asx": + case "mpg": + case "mpeg": + case "wmv": + case "avi": + return this.generateHTMLForMoviePlayer(url, size); + case "mov": + return this.generateHTMLForQuicktime(url, size); + case 'jpg': + case 'bmp': + case 'gif': + case 'png': + return this.generateHTMLForImage(url, size); + default: + var iframeHtml = this.generateHTMLIfIframeSource(url, size); + if (iframeHtml) { + return iframeHtml; + } + + return this.generateHTMLForDefaultEmbed(url, size); + } + }, + getUrlExt: function(url) { + return url.split(".").pop().split("?")[0].toLowerCase(); + }, + getAllowScriptAccess: function(url) { + var allowScriptAccessAttr = " allowScriptAccess='never'"; + if (this.config.allowNetworkingFilter && isAllowNetworkingSite(url, this.config) == _FALSE) { + allowScriptAccessAttr += " allowNetworking='internal'"; + } + return allowScriptAccessAttr; + }, + generateHTMLForDefaultEmbed: function (url, size) { + return ""; + }, + generateHTMLForImage: function (url, size) { + return ""; + }, + generateHTMLForFlash: function (url, size) { + return ""; + }, + generateHTMLForMoviePlayer: function (url, size) { + return ""; + }, + generateHTMLForQuicktime: function (url, size) { + return ""; + }, + generateHTMLIfIframeSource: function(url, size) { + var tvpotKey = getTvPotKey(url); + if (tvpotKey) { + return ""; + } + + var youtubeMovieKey = getYouTubeMovieKey(url); + if (youtubeMovieKey) { + return ""; + } + + return _NULL; + } + }); + + Trex.register("filter > media ", function(editor, toolbar, sidebar){ + var _config = sidebar.embeders.media.config; + editor.getDocParser().registerFilter('filter/embeder/media', { + 'text@load': function(contents){ + return contents; + }, + 'source@load': function(contents){ + return convertToHtml(contents); + }, + 'html@load': function(contents){ + return convertToHtml(contents); + }, + 'text4save': function(contents){ + return contents; + }, + 'source4save': function(contents){ + contents = convertFromHtml(contents); + contents = addFlashOptAllowNetworking(contents, _config); + return contents; + }, + 'html4save': function(contents){ + contents = convertFromHtml(contents); + contents = addFlashOptAllowNetworking(contents, _config); + return contents; + }, + 'text2source': function(contents){ + return contents; + }, + 'text2html': function(contents){ + return contents; + }, + 'source2text': function(contents){ + return contents; + }, + 'source2html': function(contents){ + return convertToHtml(contents); + }, + 'html2text': function(contents){ + return convertFromHtml(contents); + }, + 'html2source': function(contents){ + return convertFromHtml(contents); + } + }); + }); + + function isAllowNetworkingSite(url, config) { + var _matchs, host, i, len; + host = ""; + _matchs = /[\/]*\/\/([^\/]+)\//i.exec(url); + if (_matchs && _matchs[1]) { + host = _matchs[1]; + } + len = config.allowNetworkingSites.length; + for (i = 0; i < len; i += 1) { + if (host == config.allowNetworkingSites[i].host) { + return _TRUE; + } + } + return _FALSE; + } + + function addFlashOptAllowNetworking (content, config) { + var filteredContent; + if (config.allowNetworkingFilter == _FALSE) { + return content; + } + filteredContent = content.replace(/(]*>)((?:\n|.)*?)(<\/object>)/gi, function(match, start, param, end) { + var _matchs, _matchsForUrl; + var isBlockContent = _FALSE; + _matchs = /data[\s]*=[\s"']*(http:\/\/[^\/]+\/)[^("'\s)]+/i.exec(start); + if(_matchs && _matchs.length == 2) { + _matchsForUrl = _matchs[1]; + if (isAllowNetworkingSite(_matchsForUrl, config) === _FALSE){ + isBlockContent = _TRUE; + } + } + _matchs = /]*=[^\w]*movie[^\w]+[^>]*>/i.exec(param); + if (_matchs && _matchs[0]) { + _matchsForUrl = /\s+value=["']?([^\s"']*)["']?/i.exec(_matchs[0]); + if (_matchsForUrl && _matchsForUrl[1]) { + if (isAllowNetworkingSite(_matchsForUrl[1], config) === _FALSE) { + isBlockContent = _TRUE; + } + } + } + _matchs = /]*=[^\w]*src[^\w]+[^>]*>/i.exec(param); + if (_matchs && _matchs[0]) { + _matchsForUrl = /\s+value=["']?([^\s"']*)["']?/i.exec(_matchs[0]); + if (_matchsForUrl && _matchsForUrl[1]) { + if (isAllowNetworkingSite(_matchsForUrl[1], config) === _FALSE) { + isBlockContent = _TRUE; + } + } + } + if (isBlockContent === _TRUE) { + param = param.replace(/]*=[^\w]*allowNetworking[^\w]+[^>]*>/i, ""); + param = ''.concat(param); + } + return start + param + end; + }); + filteredContent = filteredContent.replace(/(]*)(><\/embed>|\/>)/gi, function(match, start, attr, end) { //NOTE: #FTDUEDTR-1071 -> #FTDUEDTR-1105 + var _matchs = /\s+src=["']?([^\s"']*)["']?/i.exec(attr); + if (_matchs && _matchs[1]) { + if (isAllowNetworkingSite(_matchs[1], config)) { + return start + attr + end; + } + } + attr = attr.replace(/\s+allowNetworking=["']?[\w]*["']?/i, "").concat(' allowNetworking="internal"'); + return start + attr + end; + }); + return filteredContent; + } + + function convertFromHtml(content){ + var _matchs; + var _regLoad = new RegExp("<(?:img|IMG)[^>]*txc-media[^>]*\/?>", "gim"); + var tempContent = content; + + while ((_matchs = _regLoad.exec(tempContent)) != _NULL) { + var _html = _matchs[0]; + var _source = getSourceByExt(_html); + if (!$tx.msie && _source.indexOf("$") > -1) { + _source = _source.replace(/\$/g, "$$$$"); + } + content = content.replace(_html, _source); + } + + return content; + } + + function convertToHtml(content) { + if ($tx.msie) { //NOTE: #FTDUEDTR-366 + #FTDUEDTR-372 -> #FTDUEDTR-403 + if ($tx.msie_ver < 10) { + content = content.replace(/]*src=("|'|)https?:\/\/www\.youtube\.com\/embed\/(\w+)\1[^>]*><\/iframe>/i, function (html, quote, vid) { + var matched, width, height; + matched = html.match(/\swidth=['"]?(\d+)/); + width = (matched && matched[1]) || "560"; + matched = html.match(/\sheight=['"]?(\d+)/); + height = (matched && matched[1]) || "315"; + return ''; + }); + } + if(/]*type=['"]application\/x-shockwave-flash['"][^>]*>/i.test(content) &&!/]*type=['"]application\/x-shockwave-flash['"][^>]*>/i.test(content)) { + var index = content.indexOf('>'); + content = content.substring(0,index)+ ' type="application\/x-shockwave-flash"' + content.substring(index); + } +// content = content.replace(/(]*>)((?:\n|.)*?)(<\/object>)/gi, function(match, start, param, end) { +// param = param.replace(/]*=[^\w]*wmode[^\w]+[^>]*>/i, ""); +// param = param.replace(/]*=[^\w]*play[^\w]+[^>]*>/i, ""); +// param = ''.concat(param); +// return start + param + end; +// }); +// content = content.replace(/(]*)(>)/gi, function (match, start, attr, end) { +// attr = attr.replace(/\s+wmode=("|'|)\w*\1/i, ''); +// attr += ' wmode=transparent'; +// return start + attr + end; +// }); + + return content; + } else { + var _matchs, _source, _html, _embed; + var tempContent = content; + + /* Substitute ]*>[\\S\\s]*?(<(?:embed|EMBED)[^>]*src=[^>]*>)[\\S\\s]*?<\/(?:script)>", "gim"); + while ((_matchs = _regScript.exec(tempContent)) != _NULL) { + _source = _matchs[0]; + _html = _source.replace(/]*>[\\S\\s]*?(<(?:embed|EMBED)[^>]*src=[^>]*>)[\\S\\s]*?<\/(?:object|OBJECT)>", "gim"); + while ((_matchs = _regLoad.exec(tempContent)) != _NULL) { + _source = _matchs[0]; + _embed = _matchs[1]; + _html = getHtmlByExt(_source, _embed); + content = content.replace(_source, _html); + } + + _regLoad = new RegExp("<(?:embed|EMBED)[^>]*src=[^>]*(?:\/?>|><\/(?:embed|EMBED)>)", "gim"); + while ((_matchs = _regLoad.exec(tempContent)) != _NULL) { + _source = _matchs[0]; + _embed = _matchs[0]; + _html = getHtmlByExt(_source, _embed); + content = content.replace(_source, _html); + } + + content = content.replace(/"; + } + + function getSourceByExt(html) { + var _attrs = Trex.Util.getAllAttributes(html); + var _longdesc = _attrs['ld']; + if(!_longdesc || _longdesc.length == 0) { + return ""; + } + var _width = _attrs['width']; + var _height = _attrs['height']; + var _source = decodeURIComponent(_longdesc); + + var _embed = _source; + if(_source.indexOf("object") > -1 || _source.indexOf("OBJECT") > -1) { + var _matchs; + var _regLoad = new RegExp("<(?:embed|EMBED)[^>]*src=[^>]*(?:\/?>|><\/(?:embed|EMBED)>)", "gim"); + while ((_matchs = _regLoad.exec(_source)) != _NULL) { + _embed = _matchs[0]; + } + } + + _attrs = Trex.Util.getAllAttributes(_embed); + var _url = _attrs['src']; + var _size = getDefaultSizeByUrl(_url); + if(isNaN(_width)) { + _source = Trex.String.changeAttribute(_source, "width", _width, _size.width); + } else { + _source = Trex.String.changeAttribute(_source, "width", _width, _width); + } + if(isNaN(_height)) { + _source = Trex.String.changeAttribute(_source, "height", _height, _size.height); + } else { + _source = Trex.String.changeAttribute(_source, "height", _height, _height); + } + return _source; + } + + function getTvPotKey(url) { + return (url.match(/http:\/\/tvpot\.daum\.net\/v\/(.{23})/) || [])[1]; + } + + function getYouTubeMovieKey(url) { + return (url.match(/(?:http:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=)?(.+)/) || [])[1]; + } + + function getDefaultSizeByUrl(url) { + var _width, _height; + if(url.indexOf("api.bloggernews.media.daum.net/static/recombox1") > -1) { + _width = 400; + _height = 80; + } else if(url.indexOf("flvs.daum.net/flvPlayer") > -1) { + _width = 502; + _height = 399; + } else if(url.indexOf('youtube') != -1 || url.indexOf('youtu.be') != -1 || url.indexOf('tvpot.daum.net') != -1) { + var size = TrexConfig.get('size'); + if (size.contentWidth > 640) { + _width = 640; + _height = 360; + } else { + _width = 560; + _height = 315; + } + // else 853x480 + } else { + var _ext = url.split(".").pop().split("?")[0].toLowerCase(); + switch (_ext) { + case "mp3": + case "wma": + case "asf": + case "asx": + _width = 280; + _height = 45; + break; + case "mpg": + case "mpeg": + case "wmv": + case "avi": + _width = 320; + _height = 285; + break; + default: + _width = 400; + _height = 300; + break; + } + } + return { + width: _width, + height: _height + }; + } + + function getPreviewByUrl(url) { + var _class = ""; + var _image = ""; + if(url.indexOf("api.bloggernews.media.daum.net/static/recombox1") > -1) { + _class = ""; + _image = TXMSG("@media.prev.url"); + } else if(url.indexOf("flvs.daum.net/flvPlayer") > -1) { + _class = " txc-media-tvpot"; + _image = TXMSG("@media.prev.url.tvpot"); + } else { + var _ext = url.split(".").pop().split("?")[0].toLowerCase(); + switch (_ext) { + case "mp3": + case "wma": + case "asf": + case "asx": + _class = " txc-media-wmp"; + _image = TXMSG("@media.prev.url.wmp"); + break; + case "mpg": + case "mpeg": + case "wmv": + case "avi": + _class = " txc-media-wmp"; + _image = TXMSG("@media.prev.url.wmp"); + break; + default: + _class = ""; + _image = TXMSG("@media.prev.url"); + break; + } + } + return { + className: _class, + imageSrc: _image + }; + } + +})(); diff --git a/src/main/webapp/daumeditor/js/trex/entryproxy.js b/src/main/webapp/daumeditor/js/trex/entryproxy.js new file mode 100644 index 0000000..b782586 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/entryproxy.js @@ -0,0 +1,77 @@ +Trex.install("editor.getEntryProxy", + function(editor, toolbar, sidebar, canvas, config){ + var _entryproxy = new Trex.EntryProxy(editor, sidebar, config); + editor.getEntryProxy = function() { + return _entryproxy; + }; + } +); + +Trex.EntryProxy =Trex.Class.create( { + initialize : function(editor, sidebar, config){ + this.editor = editor; + this.sidebar = sidebar; + this.config = config; + }, + /** + * For loadEntriesAtRestore, loadEntriesAtModify + */ + commands: {}, + registerCommand: function(name, command){ + this.commands[name] = command; + }, + getcommand: function(name){ + return this.commands[name]; + }, + executeCommand: function(cmd, data){ + for(var i in this.commands){ + var command = this.commands[i]; + if(command[cmd]){ + command[cmd](data); + } + } + }, + setAttachments: function(attachments, contents) { //NOTE: data format = JSON + attachments = attachments || []; + contents = contents || ""; + + var _entrybox = this.editor.getAttachBox(); + _entrybox.empty(); + + var _actors = this.sidebar.getAttacher(); + attachments.each(function(attachment){ + try { + var _actor = _actors[attachment.attacher]; + if(_actor) { + _actor.execReload(attachment.data, contents, attachment.type); + } + } catch(ignore) { + // 첨부데이터 일부를 정상적으로 불러오지 못했습니다. + console.error("첨부데이터 일부를 정상적으로 불러오지 못했습니다:", ignore); + } + }); + }, + getAttachments: function(attachments, all) { + all = !!all; + var _attachments = []; + attachments.each(function(attachment){ + if(attachment.deletedMark) { + return; + } + if(all || attachment.existStage) { + _attachments.push({ + type: attachment.type, + attacher: attachment.actor.name, + existStage: attachment.existStage, + data: Object.extend(attachment.data, { + tmpSeq: attachment.dataSeq + }) //html mode + }); + } + }); + return _attachments; + } +} ); + + + diff --git a/src/main/webapp/daumeditor/js/trex/eval.js b/src/main/webapp/daumeditor/js/trex/eval.js new file mode 100644 index 0000000..d9a8cf4 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/eval.js @@ -0,0 +1,7 @@ +window.txEval = function(source, target){ + if (typeof source == "function") { + return source.call(target || this); + } else if (typeof source == "string") { + return (target) ? target.eval(source) : this.eval(source); + } +}; \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/event.js b/src/main/webapp/daumeditor/js/trex/event.js new file mode 100644 index 0000000..52b0ddc --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/event.js @@ -0,0 +1,469 @@ +/** + * @fileoverview + * 사용자 정의 이벤트를 미리 정의 + */ + +(function(Trex) { + /** + * @namespace + * @name Trex.Ev + */ + Trex.Ev = /** @lends Trex.Ev */ { + /** wysiwyg mode */ + __EDITOR_PANEL_MOUSEDOWN: 'editor.panel.mousedown', + /** + * Editor에 데이터의 셋팅이 시작되면 발생하는 이벤트 + * @example + * editor.observeJob(Trex.Ev.__EDITOR_LOAD_DATA_BEGIN, function(ev) { + * }); + */ + __EDITOR_LOAD_DATA_BEGIN: 'editor.load.data.begin', + /** + * Editor에 데이터의 셋팅이 완료되면 발생하는 이벤트 + * @example + * editor.observeJob(Trex.Ev.__EDITOR_LOAD_DATA_END, function(ev) { + * }); + */ + __EDITOR_LOAD_DATA_END: 'editor.load.data.end', + /** + * wysiwyg 영역에 발생하는 keydown 이벤트 + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_PANEL_KEYDOWN, function(ev) { + * }); + */ + __CANVAS_PANEL_KEYDOWN: 'canvas.panel.keydown', + /** + * wysiwyg 영역에 발생하는 keyup 이벤트 + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_PANEL_KEYUP, function(ev) { + * }); + */ + __CANVAS_PANEL_KEYUP: 'canvas.panel.keyup', + /** + * wysiwyg 영역에 발생하는 mousedown 이벤트
          + * Element Observer 보다 늦게 실행되며, mouseclick 보다 앞서 실행된다. + * 경우에 따라 상위 엘리먼트까지 탐색하여 실행하는 Element Observer를 사용한다. + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_PANEL_MOUSEDOWN, function(ev) { + * //execute function + * }); + * canvas.observeElement({ tag: "img", klass: "txc-image" }, function(element) { + * //execute function with element + * }); + */ + __CANVAS_PANEL_MOUSEDOWN: 'canvas.panel.mousedown', + /** + * wysiwyg 영역에 발생하는 mouseup 이벤트 + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_PANEL_MOUSEUP, function(ev) { + * }); + */ + __CANVAS_PANEL_MOUSEUP: 'canvas.panel.mouseup', + /** + * wysiwyg 영역에 발생하는 mouseover 이벤트
          + * wysiwyg 영역에서 마우스를 움직일 때마다 발생하므로 과하게 사용하지 않도록 한다. + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_PANEL_MOUSEOVER, function(ev) { + * }); + */ + __CANVAS_PANEL_MOUSEOVER: 'canvas.panel.mouseover', + /** + * wysiwyg 영역에 발생하는 mouseout 이벤트
          + * wysiwyg 영역에서 마우스를 움직일 때마다 발생하므로 과하게 사용하지 않도록 한다. + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_PANEL_MOUSEOUT, function(ev) { + * }); + */ + __CANVAS_PANEL_MOUSEOUT: 'canvas.panel.mouseout', + /** + * wysiwyg 영역에 발생하는 movemove 이벤트
          + * wysiwyg 영역에서 마우스를 움직일 때마다 발생하므로 과하게 사용하지 않도록 한다. + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_PANEL_MOUSEMOVE, function(ev) { + * }); + */ + __CANVAS_PANEL_MOUSEMOVE: 'canvas.panel.mousemove', + /** + * wysiwyg 영역에 발생하는 click 이벤트 + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_PANEL_CLICK, function(ev) { + * }); + */ + __CANVAS_PANEL_CLICK: 'canvas.panel.click', + /** + * wysiwyg 영역에서 발생하는 더블클릭 이벤트
          + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_PANEL_DBLCLICK, function(ev) { + * }); + */ + __CANVAS_PANEL_DBLCLICK: 'canvas.panel.dbclick', + /** + * wysiwyg 영역에서 발생하는 붙여넣기 이벤트
          + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_PANEL_PASTE, function() { + * }); + */ + __CANVAS_PANEL_PASTE: 'canvas.panel.paste', + /** + * wysiwyg 영역에서 발생하는 스크롤 변경 이벤트
          + * 이 이벤트는 wysiwyg 영역의 스크롤 높이가 변경되거나 위치가 변경될 경우 발생한다. + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_PANEL_SCROLLING, function(ev) { + * }); + */ + __CANVAS_PANEL_SCROLLING: 'canvas.panel.scrolling', + /** + * wysiwyg 영역이 로드되었을 경우 발생하는 사용자 정의 이벤트 + * @example + * canvas.observeJob(Trex.Ev.__IFRAME_LOAD_COMPLETE, function(ev) { + * }); + */ + __IFRAME_LOAD_COMPLETE: 'iframe.load.complete', + /** + * wysiwyg 영역이 loading 되기까지 걸린시간을 알리는 이벤트 + */ + __IFRAME_LOADING_TIME: 'iframe.loading.time', + /** + * HTML모드(소스모드) 영역에서 발생하는 click 이벤트 + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_SOURCE_PANEL_CLICK, function(ev) { + * }); + */ + __CANVAS_SOURCE_PANEL_CLICK: 'canvas.source.panel.click', + /** + * HTML모드(소스모드) 영역에서 발생하는 keydown 이벤트 + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_SOURCE_PANEL_KEYDOWN, function(ev) { + * }); + */ + __CANVAS_SOURCE_PANEL_KEYDOWN: 'canvas.source.panel.mousedown', + /** + * HTML모드(소스모드) 영역에서 발생하는 mousedown 이벤트 + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_SOURCE_PANEL_MOUSEDOWN, function(ev) { + * }); + */ + __CANVAS_SOURCE_PANEL_MOUSEDOWN: 'canvas.source.panel.mousedown', + /** + * 텍스트모드 영역에서 발생하는 click 이벤트 + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_TEXT_PANEL_CLICK, function(ev) { + * }); + */ + __CANVAS_TEXT_PANEL_CLICK: 'canvas.text.panel.click', + /** + * 모드가 변경될 때 발생하는 사용자 정의 이벤트 + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_MODE_CHANGE, function(from, to) { + * //from - 변경되기 전 모드 + * //to - 변경되고난 후 모드 + * }); + */ + __CANVAS_MODE_CHANGE: 'canvas.mode.change', + /** + * 전체화면용 canvas로 변경 시 발생 + */ + __CANVAS_FULL_SCREEN_CHANGE: 'canvas.fullscreen.change', + /** + * 일반화면용 canvas로 변경 시 발생 + */ + __CANVAS_NORMAL_SCREEN_CHANGE: 'canvas.normalscreen.change', + /** + * 툴바의 버튼이 눌렸을 경우 발생하는 사용자 정의 이벤트 + * @example + * canvas.observeJob(Trex.Ev.__TOOL_CLICK, function(identity) { + * //identity - tool의 Identity(bold, aligncenter...) + * }); + */ + __TOOL_CLICK: 'toolbar.button.click', + /** + * 툴이 단축키에 의해 실행 되었을 경우 발생 + */ + __TOOL_SHORTCUT_KEY: 'toolbar.shortcut', + /** + * Editor.save()가 호출되었을 경우 발생하는 사용자 정의 이벤트
          + * 실제 form이 submit이 되기 전에 발생한다. + * @example + * canvas.observeJob(Trex.Ev.__ON_SUBMIT, function(editor) { + * //editor - editor 객체 + * }); + */ + __ON_SUBMIT: "editor.submit", + /** + * 에디터 래퍼의 너비가 변경된 후 발생하는 사용자 정의 이벤트 + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_WRAP_WIDTH_CHANGE, function() { + * }); + */ + __CANVAS_WRAP_WIDTH_CHANGE: 'canvas.wrap.width.change', + /** + * 에디터의 높이가 변경된 후 발생하는 사용자 정의 이벤트 + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_HEIGHT_CHANGE, function(height) { + * //height - 변경된 높이 + * }); + */ + __CANVAS_HEIGHT_CHANGE: 'canvas.height.change', + /** + * wysiwyg 영역에서 키이벤트나 마우스이벤트가 발생할 경우 발생하는 사용자 정의 이벤트
          + * 주로 툴바 버튼의 상태를 표시할 때에 사용한다. + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_PANEL_QUERY_STATUS, function() { + * }); + */ + __CANVAS_PANEL_QUERY_STATUS: 'canvas.panel.style.change', + /** + * wysiwyg 영역에서 delete 키가 눌렸을 경우 발생하는 사용자 정의 이벤트
          + * 주로 컨텐츠와 동기화를 맞추기 위해 사용한다. + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_PANEL_DELETE_SOMETHING, function() { + * }); + */ + __CANVAS_PANEL_DELETE_SOMETHING: 'canvas.panel.delkey.press', + /** + * Entry Box에 Entry가 추가되었을 때 발생하는 사용자 정의 이벤트 + * @example + * attachbox.observeJob(Trex.Ev.__ENTRYBOX_ENTRY_ADDED, function(entry) { + * //생성된 entry 객체를 인자로 받는다. + * }); + */ + __ENTRYBOX_ENTRY_ADDED: 'entrybox.entryadded', + /** + * wysiwyg 영역에서 backspace 키가 눌렸을 경우 발생하는 사용자 정의 이벤트
          + * 테이블 삭제를 위해 사용한다. + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_PANEL_BACKSPACE_TABLE, function() { + * }); + */ + __CANVAS_PANEL_BACKSPACE_TABLE: 'canvas.panel.backspace.table', + /** + * Entry Box의 Entry가 수정되었을 때 발생하는 사용자 정의 이벤트 + * @example + * attachbox.observeJob(Trex.Ev.__ENTRYBOX_ENTRY_MODIFIED, function(entry) { + * //수정된 entry 객체를 인자로 받는다. + * }); + */ + __ENTRYBOX_ENTRY_MODIFIED: 'entrybox.entrymodified', + /** + * Entry Box에서 Entry가 제거되었을 때 발생하는 사용자 정의 이벤트 + * @example + * attachbox.observeJob(Trex.Ev.__ENTRYBOX_ENTRY_REMOVED, function(entry) { + * //삭제될 entry 객체를 인자로 받는다. + * }); + */ + __ENTRYBOX_ENTRY_REMOVED: 'entrybox.entryremoved', + /** + * Entry Box에서 모든 Entry가 제거되었을 때 발생하는 사용자 정의 이벤트 + * @example + * attachbox.observeJob(Trex.Ev.__ENTRYBOX_ALL_ENTRY_REMOVED, function() { + * }); + */ + __ENTRYBOX_ALL_ENTRY_REMOVED: 'entrybox.removed.all.perfectly', + /** + * Entry Box에서 Entry의 추가/수정/삭제로 capacity가 변경 될 때 발생하는 사용자 정의 이벤트 + * @example + * attachbox.observeJob(Trex.Ev.__ENTRYBOX_CAPACITY_UPDATE, function(capacity) { + * }); + */ + __ENTRYBOX_CAPACITY_UPDATE: 'entrybox.capacity.update', + /** + * Attach Box가 보여질 때 발생하는 사용자 정의 이벤트 + * @example + * attachbox.observeJob(Trex.Ev.__ATTACHBOX_SHOW, function() { + * }); + */ + __ATTACHBOX_SHOW: 'attachbox.show', + /** + * Attach Box가 감춰질 때 발생하는 사용자 정의 이벤트 + * @example + * attachbox.observeJob(Trex.Ev.__ATTACHBOX_HIDE, function() { + * }); + */ + __ATTACHBOX_HIDE: 'attachbox.hide', + /** + * fullscreen 상태에서 Attach Box가 보여질 때 발생하는 사용자 정의 이벤트 + * @example + * attachbox.observeJob(Trex.Ev.__ATTACHBOX_FULLSCREEN_SHOW, function() { + * }); + */ + __ATTACHBOX_FULLSCREEN_SHOW: 'attachbox.fullscreen.show', + /** + * fullscreen 상태에서 Attach Box가 감춰질 때 발생하는 사용자 정의 이벤트 + * @example + * attachbox.observeJob(Trex.Ev.__ATTACHBOX_FULLSCREEN_HIDE, function() { + * }); + */ + __ATTACHBOX_FULLSCREEN_HIDE: 'attachbox.fullscreen.hide', + /** + * 에디터 페이지를 벗어나기 전에 발생하는 사용자 정의 이벤트 + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_BEFORE_UNLOAD, function() { + * }); + */ + __CANVAS_BEFORE_UNLOAD: 'canvas.unload', + /** + * 각 첨부가 추가될 때 발생하는 사용자 정의 이벤트
          + * entry가 생성되고 본문에 삽입이 완료되고 호출된다. + * 실제로는 entry 부분이 첨부의 Identity(image, movie, media...)로 대체된다. + * @abstract + * @example + * canvas.observeJob('canvas.movie.added', function(entry) { + * //생성된 entry 객체를 인자로 받는다. + * }); + */ + __CANVAS_ENTRY_ADDED: 'canvas.entry.added', + /** + * 툴을 이용해 wysiwyg에 요소가 삽입이 될 때 발생하는 사용자 정의 이벤트 + * @abstract + * @example + * toolbar.observeJob('cmd.textbox.added', function(node) { + * //필요에 따라 만들어진 요소 엘리먼트 + * }); + */ + __COMMAND_NODE_ADDED: 'cmd.entry.added', + /** + * 왼쪽 정렬을 실행하고서 발생하는 사용자 정의 이벤트 + * @private + */ + __CMD_ALIGN_LEFT: 'align.left', + /** + * 가운데 정렬을 실행하고서 발생하는 사용자 정의 이벤트 + * @private + */ + __CMD_ALIGN_CENTER: 'align.center', + /** + * 오른쪽 정렬을 실행하고서 발생하는 사용자 정의 이벤트 + * @private + */ + __CMD_ALIGN_RIGHT: 'align.right', + /** + * 양쪽 정렬을 실행하고서 발생하는 사용자 정의 이벤트 + * @private + */ + __CMD_ALIGN_FULL: 'align.full', + /** + * 이미지 왼쪽 정렬을 실행하고서 발생하는 사용자 정의 이벤트 + * @private + */ + __CMD_ALIGN_IMG_LEFT: 'align.img.left', + /** + * 이미지 가운데 정렬을 실행하고서 발생하는 사용자 정의 이벤트 + * @private + */ + __CMD_ALIGN_IMG_CENTER: 'align.img.center', + /** + * 이미지 왼쪽흐름 정렬을 실행하고서 발생하는 사용자 정의 이벤트 + * @private + */ + __CMD_ALIGN_IMG_FLOAT_LEFT: 'align.img.floatleft', + /** + * 이미지 오른쪽흐름 정렬을 실행하고서 발생하는 사용자 정의 이벤트 + * @private + */ + __CMD_ALIGN_IMG_FLOAT_RIGHT: 'align.img.floatright', + /** + * 툴바의 축소를을 실행하고 발생하는 사용자 정의 이벤트 + */ + __CMD_ADVANCED_FOLD: 'toolbar.advanced.fold', + /** + * 툴바의 확장을 실행하고 발생하는 사용자 정의 이벤트 + */ + __CMD_ADVANCED_SPREAD: 'toolbar.advanced.spread', + /** + * table 의 border 를 조정하는 세가지 속성중에 한가지가 변경될 때 발생함. + * border 의 세가지 속성: cellslinecolor, cellslineheight, cellslinestyle. + * @private + */ + __TOOL_CELL_LINE_CHANGE: 'tool.cell.line.change', + /** + * 에디터 로딩할 때 현재 모드와 config의 모드가 다를 때 발생하는 사용자 정의 이벤트 + * @private + */ + __CANVAS_MODE_INITIALIZE: 'canvas.mode.initialize', + /** + * 에디터 로딩할 때 컨텐츠를 초기화한 후 발생하는 사용자 정의 이벤트 + * @private + */ + __CANVAS_DATA_INITIALIZE: 'canvas.load.data', + /** + * Attach Box의 ENTRY의 상태가 변경될 때 발생하는 사용자 정의 이벤트 + * @private + */ + __ENTRYBOX_ENTRY_REFRESH: 'entrybox.entryrefresh', + /** + * 정보첨부가 삽입될 때 발생하는 사용자 정의 이벤트 + * @private + */ + __PASTE_SEARCHRESULT: 'trex.paste.info', + /** + * 에디터에서 런타임에러가 났을 때 발생하는 사용자 정의 이벤트 + * @private + */ + __RUNTIME_EXCEPTION: "editor.runtime.exception", + /** + * 에디터 장애 로그를 남길 때 발생하는 사용자 정의 이벤트
          + * 로그를 전송한 후 실행 된다. + * @private + */ + __REPORT_TO_MAGPIE: "editor.report.magpie", + /** + * 자동저장 리스트를 열 때 발생하는 사용자 정의 이벤트 + * @private + */ + __SHOULD_CLOSE_MENUS: "editor.shouldclosemenus", + /** + * wysiwyg 영역에서 발생하는 이미지의 더블클릭 이벤트
          + * @example + * canvas.observeJob(Trex.Ev.__CANVAS_IMAGE_PLACEHOLDER_DBLCLICK, function(ev) { + * }); + */ + __CANVAS_IMAGE_PLACEHOLDER_DBLCLICK: 'canvas.image.placeholder.dbclick', + /** + * 툴바의 레이어형 메뉴가 화면에 표시되면 호출. + */ + __MENU_LAYER_SHOW: 'menu.layer.show', + /** + * 툴바의 레이어형 메뉴가 화면에 사라지면 호출. + */ + __MENU_LAYER_HIDE: 'menu.layer.hide', + /** + * 툴바의 레이어형 메뉴의 크기가 변경되면 호출. + */ + __MENU_LAYER_CHANGE_SIZE: 'menu.layer.change.size' + + }; +})(Trex); + +/** @namespace */ +var TrexEvent = { + /** + * fires observer for target element + * @param {Object} el + * @param {Object} handles + */ + fire: function(el, handles){ + if (el && el.tagName) { + var fn = handles[el.tagName.toLowerCase()]; + if (fn) { + fn(el, handles); + }else { + TrexEvent.propagateToParent(el, handles); + } + }else { + console.log("Not Supported Type : " + el); + } + }, + propagateToParent : function(element, handles){ + var _el = element.parentNode; + if(_el && _el.tagName && _el.tagName.toLowerCase ){ + var fn = handles[_el.tagName.toLowerCase()]; + if(fn){ + fn(_el, handles); + }else{ + TrexEvent.propagateToParent(_el, handles); + } + } + }, + stopPropagation : function(){ } +}; + diff --git a/src/main/webapp/daumeditor/js/trex/filters/converting.js b/src/main/webapp/daumeditor/js/trex/filters/converting.js new file mode 100644 index 0000000..acb5619 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/filters/converting.js @@ -0,0 +1,209 @@ + +Trex.register("filter > mode change", function(editor, toolbar, sidebar, canvas, config) { + + /* -> Text Convert */ + function toText(html) { + // FTDUEDTR-1360 + var filterList = [ + [Trex.__WORD_JOINER_REGEXP, ""], // word_joiner 제거 + //모든 태그 속성제거 + [new RegExp("<(\\/?[a-z]+)[^>]*>", "gi"), "<$1>"], + //모든 태그 줄바꿈 제거 + [new RegExp("\\n\\s*", "g"), ""], + //head, script, style, 주석 제거 + [new RegExp(".*?<\\/head>", "gi"), ""], // delete + [new RegExp(".*?<\\/s" + "cript>", "gi"), ""], + [new RegExp("' + + '' + + '' + + $tom.EMPTY_PARAGRAPH_HTML + + ''; + +})(); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/panels/wysiwyg/webfontloader.js b/src/main/webapp/daumeditor/js/trex/panels/wysiwyg/webfontloader.js new file mode 100644 index 0000000..1de2116 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/panels/wysiwyg/webfontloader.js @@ -0,0 +1,79 @@ +(function() { + /** + * 웹폰트를 로딩하기 위한 클래스로 WysiwygPanel 내부에서만 사용된다. + * @private + * @class + */ + Trex.WebfontLoader = Trex.Class.create({ + initialize: function(doc, config) { + this.doc = doc; + this.styleCnt = 0; + this.defWebfont = config.styles.fontFamily; + this.useWebfont = (config.webfont && config.webfont.use); + this.webfontCfg = config.webfont || []; + this.elStyleSheet = this.getStyleSheet(); + }, + + load: function(content) { + if (!$tx.msie) { + return; + } + if (!content) { + return; + } + if (!this.useWebfont) { + return; + } + + var _matchs = []; + content += " // font-family:" + this.defWebfont; + content.replace(/font-family\s*:\s*(\w*)/gi, function(full, name) { + _matchs.push(name); + return full; + }); + if (_matchs.length == 0) { + return; + } + + var _loader = this; + setTimeout(function() { + var _matchedSource = _matchs.uniq().join("||"); + _loader.webfontCfg.options.each(function(item) { + if (item.url && _matchedSource.indexOf(item.data) > -1) { + _loader.imports(item); + } + }); + }, 10); + }, + + getUsed: function() { + if (!$tx.msie) { + return []; + } + var _result = []; + if (!this.useWebfont) { + return _result; + } + this.webfontCfg.options.each(function(item) { + if (!item.url) { + _result.push(item.data); + } + }); + return _result; + }, + + getStyleSheet: function() { + return this.doc.styleSheets[this.styleCnt++]; + }, + + imports: function(item) { + try { + this.elStyleSheet.addImport(item.url, 2); + } catch(e) { + this.elStyleSheet = this.getStyleSheet(); + this.elStyleSheet.addImport(item.url, 2); + } + item.url = _NULL; + } + }); +})(); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/panels/wysiwyg/wysiwygrelative.js b/src/main/webapp/daumeditor/js/trex/panels/wysiwyg/wysiwygrelative.js new file mode 100644 index 0000000..e543b61 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/panels/wysiwyg/wysiwygrelative.js @@ -0,0 +1,37 @@ +(function() { + var __SCROLL_WIDTH = 16; + /** + * wysiwyg 영역에서의 특정 노드의 상대 위치를 계산하기 위한 클래스로 WysiwygPanel 내부에서만 사용된다. + * @private + * @class + */ + Trex.WysiwygRelative = Trex.Class.create({ + initialize: function(iframe) { + this.iframe = iframe; + }, + getRelative: function(node) { + var _relatives = { x:0, y:0, width:0, height:0 }; + var doc = this.iframe.contentWindow.document; + if (node) { + var _position = $tom.getPosition(node, _TRUE); + var _frameHeight = $tom.getHeight(this.iframe); + var _scrollTop = $tom.getScrollTop(doc); + + if (_position.y + _position.height < _scrollTop || _position.y > _scrollTop + _frameHeight) { + return _relatives; + } else { + var _frameLeft = 0; //Holder 기준 + var _frameTop = 0; //Holder 기준 + var _frameWidth = $tom.getWidth(this.iframe); + var _scrollLeft = $tom.getScrollLeft(doc); + + _relatives.x = _frameLeft + ((_scrollLeft > 0) ? 0 : _position.x); + _relatives.width = Math.min(_frameWidth - _position.x - __SCROLL_WIDTH, _position.width - ((_scrollLeft > 0) ? _scrollLeft - _position.x : 0)); + _relatives.height = _position.height; + _relatives.y = _position.y - _scrollTop + _frameTop; + } + } + return _relatives; + } + }); +})(); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/panels/wysiwygpanel.js b/src/main/webapp/daumeditor/js/trex/panels/wysiwygpanel.js new file mode 100644 index 0000000..4d83ab2 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/panels/wysiwygpanel.js @@ -0,0 +1,565 @@ +(function() { + /** + * wysiwyg 영역의 컨텐츠를 수정, 관리하기 위한 클래스로, + * 편집 영역에 해당하는 iframe 객체에 접근하여 이벤트를 부여하거나 속성 값들을 읽거나 변경한다. + * + * @class + * @extends Trex.Canvas.BasedPanel + * @param {Object} canvas + * @param {Object} config - canvas의 config + */ + Trex.Canvas.WysiwygPanel = Trex.Class.create(/** @lends Trex.Canvas.WysiwygPanel.prototype */{ + /** @ignore */ + $extend: Trex.Canvas.BasedPanel, + + + /** @ignore */ + $const: { + /** @name Trex.Canvas.WysiwygPanel.__MODE */ + __MODE: Trex.Canvas.__WYSIWYG_MODE, + EVENT_BINDING_DELAY: 500 + }, + + + initialize: function(canvas, canvasConfig) { + this.$super.initialize(canvas, canvasConfig); + + this.canvasConfig = canvasConfig; + this.iframe = this.el; + this.wysiwygWindow = this.iframe.contentWindow; + this.onceWysiwygFocused = false; + + var self = this; + var iframeLoader = new Trex.WysiwygIframeLoader(this.iframe, canvasConfig.wysiwygCatalystUrl, canvasConfig.doctype); + iframeLoader.load(function(doc) { + self.wysiwygDoc = doc; + + self.initializeSubModules(doc); + installHyperscript(self.wysiwygWindow, self.wysiwygDoc); + self.makeEditable(); + self.applyBodyStyles(self.canvasConfig.styles); + self.applyCustomCssText(self.canvasConfig.customCssText); + self.clearContent(); + self.bindEvents(canvas); + Editor.__PANEL_LOADED = _TRUE; + + $tx.observe(self.wysiwygWindow, 'focus', function onWysiwygFocused() { + if (!self.onceWysiwygFocused) { + self.onceWysiwygFocused = true; + } + }); + if ($tx.msie_nonstd) { + var htmlEl = self.wysiwygDoc.getElementsByTagName('html'); + if (htmlEl && htmlEl[0]) { + $tx.observe(htmlEl[0], 'click', function (event) { + var target = $tx.element(event); + if (canvas.canHTML() && htmlEl[0] == target) { + self.focus(); + } + }); + } + } + canvas.fireJobs(Trex.Ev.__IFRAME_LOAD_COMPLETE, doc); + }); + + }, + _bodyHeight : 0, + _bodyContentHeight : 0, + + initializeSubModules: function(doc) { + var win = this.wysiwygWindow; + this.processor = new Trex.Canvas.ProcessorP(win, doc); + this.webfontLoader = new Trex.WebfontLoader(doc, this.canvasConfig); + }, + + + /** + * WYSIWYG 영역 iframe을 편집 가능한 상태로 변경한다. + */ + makeEditable: function () { + if (this.canvasConfig.readonly) { + return; + } + + if (this.wysiwygDoc.body.contentEditable) { + this.wysiwygDoc.body.contentEditable = _TRUE; + } else { + var self = this; + setTimeout(function () { + try { + self.wysiwygDoc.designMode = "On"; + if ($tx.gecko) { + self.wysiwygDoc.execCommand("enableInlineTableEditing", _FALSE, _FALSE); + } + } catch (e) { + self.designModeActivated = _FALSE; + } + }, 10); + } + }, + + /** + * panel의 이름을 리턴한다. + * @function + * @returns {String} 'html' + */ + getName: function() { + return this.constructor.__MODE; + }, + + + /** + * wysiwyg 영역의 window 객체를 넘겨준다. + * @function + * @returns {Element} wysiwyg 영역의 window 객체 + */ + getWindow: function() { + return this.wysiwygWindow; + }, + + + /** + * wysiwyg 영역의 document 객체를 넘겨준다. + * @function + * @returns {Element} wysiwyg 영역의 document 객체 + */ + getDocument: function() { + return this.wysiwygDoc; + }, + + + /** + * wysiwyg 영역에 쓰여진 컨텐츠를 얻어온다. + * @function + * @returns {String} 컨텐츠 문자열 + */ + getContent: function() { + return this.wysiwygDoc.body.innerHTML; + }, + + + /** + * wysiwyg 영역의 컨텐츠를 주어진 문자열로 수정한다. + * @function + * @param {String} contentHTML - 컨텐츠 + */ + setContent: function(contentHTML) { + contentHTML = this.doPreFilter(contentHTML); + this.setBodyHTML(contentHTML); + this.doPostFilter(this.wysiwygDoc.body); + }, + + doPreFilter: function(contentHTML) { + if (contentHTML) { + contentHTML = removeWordJoiner(contentHTML); + contentHTML = preventRemovingNoScopeElementInIE(contentHTML); + } + return contentHTML; + }, + + setBodyHTML: function(content) { + this.wysiwygDoc.body.innerHTML = content || $tom.EMPTY_PARAGRAPH_HTML; + }, + + doPostFilter: function(body) { + makeEmptyParagraphVisibleInIE(body); + }, + + + /** + * 편집 문서 body의 HTML을 모두 지우고 기본 마크업을 세팅한다. + */ + clearContent: function() { + this.setContent(""); + }, + + + /** + * 현재 wysiwyg 영역의 수직 스크롤 값을 얻어온다. + * @function + * @returns {Number} 수직 스크롤 값 + */ + getScrollTop: function() { + return $tom.getScrollTop(this.wysiwygDoc); + }, + + + /** + * wysiwyg 영역의 수직 스크롤 값을 셋팅한다. + * @function + * @param {Number} scrollTop - 수직 스크롤 값 + */ + setScrollTop: function(scrollTop) { + $tom.setScrollTop(this.wysiwygDoc, scrollTop); + }, + + + /** + * 현재 wysiwyg 영역의 수평 스크롤 값을 얻어온다. + * @function + * @returns {Number} 수평 스크롤 값 + */ + getScrollLeft: function() { + return $tom.getScrollLeft(this.wysiwygDoc); + }, + + + /** + * 생성된 Processor 객체를 리턴한다. + * @function + * @returns {Object} Processor 객체 + */ + getProcessor: function() { + return this.processor; + }, + + + /** + * 만약 processor 객체가 준비되었다면 processor 객체를 argument로 넘기며 주어진 함수를 수행한다. + * @param fn {function} processor 객체를 argument로 받아 실행할 함수 + */ + ifProcessorReady: function(fn) { + if (this.processor) { + fn(this.processor); + } + }, + + + /** + * 스타일명으로 wysiwyg 영역의 스타일 값을 얻어온다. + * @function + * @param {String} name - 스타일명 + * @returns {String} 해당 스타일 값 + */ + getStyle: function(name) { + return $tx.getStyle(this.wysiwygDoc.body, name); + }, + + + /** + * wysiwyg 영역에 스타일을 적용한다. + * @function + * @param {Object} styles - 적용할 스타일 + */ + addStyle: function(styles) { + $tx.setStyleProperty(this.wysiwygDoc.body, styles); + }, + + + /** + * 주어진 문서의 body element 에 CSS 속성을 지정한다. 단 폰트 관련 속성은 제외한다. + * @param doc {HTMLDocument} + * @param styles {Object} key: value 형태의 CSS property 모음 + */ + setBodyStyle: function(doc, styles) { + var excluded = excludeNotAllowed(styles); + $tx.setStyleProperty(doc.body, excluded); + }, + + + /** + * 주어진 문서에 폰트 관련 CSS 속성을 지정한다 + * @param doc {HTMLDocument} + * @param styles {Object} key: value 형태의 CSS property 모음 + */ + setFontStyle: function(doc, styles) { + var extendedStyles = Object.extend(styles, { + 'browser': $tx.browser, + 'pMarginZero': this.canvasConfig.pMarginZero ? "true" : "false" + }); + var cssText = new Template([ + "#{if:pMarginZero=='true'}p { margin:0; padding:0; }#{/if:pMarginZero}", + "body, td, button { color:#{color}; font-size:#{fontSize}; font-family:#{fontFamily}; line-height:#{lineHeight}; }", + "a, a:hover, a:link, a:active, a:visited { color:#{color}; }", + "div.txc-search-border { border-color:#{color}; }", + "div.txc-search-opborder { border-color:#{color}; }", + "img.tx-unresizable { width: auto !important; height: auto !important; }", + "button a { text-decoration:none #{if:browser=='firefox'}!important#{/if:browser}; color:#{color} #{if:browser=='firefox'}!important#{/if:browser}; }" + ].join("\n")).evaluate(extendedStyles); + $tx.applyCSSText(doc, cssText); + }, + + + applyBodyStyles: function(styles) { + var doc = this.wysiwygDoc; + try { + this.setFontStyle(doc, styles); + this.setBodyStyle(doc, styles); + } catch(e) { + } + }, + + applyCustomCssText: function (cssText) { + if (!cssText) { + return; + } + var doc = this.wysiwygDoc; + try { + $tx.applyCSSText(doc, cssText); + } catch (ignore) {} + }, + + setRule: function (selector, value) { + var styleElem, sheet, rules; + try { + styleElem = this.wysiwygDoc.getElementById("txStyleForSetRule"); + sheet = styleElem.sheet ? styleElem.sheet : styleElem.styleSheet; + rules = sheet.cssRules ? sheet.cssRules : sheet.rules; + if (sheet.insertRule) { // all browsers, except IE before version 9 + if (0 < rules.length) { + sheet.deleteRule(0); + } + if (selector) { + sheet.insertRule(selector + "{" + value + "}", 0); + } + } else { // Internet Explorer before version 9 + if (sheet.addRule) { + if (0 < rules.length) { + sheet.removeRule(0); + } + if (selector) { + sheet.addRule(selector, value, 0); + } + } + } + } catch (ignore) {} + }, + + /** + * iframe에서 발생하는 각종 event 들을 observing 하기 시작한다. + */ + bindEvents: function(canvas) { + var eventBinder = new Trex.WysiwygEventBinder(this.wysiwygWindow, this.wysiwygDoc, canvas, this.processor); + setTimeout(function() { + eventBinder.bindEvents(); + }, this.constructor.EVENT_BINDING_DELAY); // why delay 500ms? + }, + + + /** + * panel 엘리먼트를 가지고 온다. + * @function + */ + getPanel: function(config) { + var id = config.initializedId || ""; + return $must("tx_canvas_wysiwyg" + id, "Trex.Canvas.WysiwygPanel"); + }, + //#1454 + setHeightBody: function(height){ + var body = this.wysiwygWindow.document.body; + var marginPaddingTop = parseInt($tx.getStyle(body, 'margin-top')) + parseInt($tx.getStyle(body, 'padding-top')); + var marginPaddingBottom = parseInt($tx.getStyle(body, 'margin-bottom')) + parseInt($tx.getStyle(body, 'padding-bottom')); + height = parseInt(height) - marginPaddingTop - marginPaddingBottom; + body.style.height = height.toPx(); + this._bodyHeight = height; + }, + + setPanelHeight: function(height) { + var self = this; + function timesTry(n){ + if(n === 0) return; + try{ + self.setHeightBody(height); + }catch(e){ + setTimeout(timesTry.bind(this, n-1), 30); + } + } + //초기화 중에 body가 초기화 되지 않았기 때문에 body가 오류날 확률이 있음. 10번 시도 하는 로직 추가 + timesTry(10); + self.$super.setPanelHeight(height); + }, + + + /** + * panel 엘리먼트를 감싸고 있는 wrapper 엘리먼트를 가지고 온다. + * @function + */ + getHolder: function(config) { + var id = config.initializedId || ""; + return $must("tx_canvas_wysiwyg_holder" + id, "Trex.Canvas.WysiwygPanel"); + }, + + + /** + * wysiwyg 영역에 포커스를 준다. + * @function + */ + focus: function() { + this.ifProcessorReady(function(processor) { + processor.focus(); + }); + }, + + ensureFocused: function () { + if (!this.onceWysiwygFocused) { + this.onceWysiwygFocused = true; + this.focus(); + } + }, + + /** + * wysiwyg panel을 보이게한다. + * @function + */ + show: function() { + this.$super.show(); + this.ifProcessorReady(function(processor) { + setTimeout(function() { + try { + processor.focusOnTop(); //한메일에서 모드 변경시 focus 제일 위로 가게함.. (주의: 현재 다른 서비스는 Bottom 으로 되어있음) + } catch(e) { + } + }, 100); + }); + }, + + + /** + * wysiwyg panel을 감춘다. + * @function + */ + hide: function() { + this.ifProcessorReady(function(processor) { + processor.blur(); + }); + this.$super.hide(); + }, + + + /** + * 컨텐츠를 파싱하여 사용되고 있는 웹폰트가 있으면, 웹폰트 css를 로딩한다.
          + * 로딩속도를 향상시키기 위해 본문을 파싱하여 웹폰트를 사용할 경우에만 동적으로 웹폰트 CSS를 호출한다. + * @function + * @param {String} content - 컨텐츠 + */ + includeWebfontCss: function(content) { + this.webfontLoader.load(content); + }, + + + /** + * 본문에 사용된 웹폰트명 목록을 리턴한다. + * @function + * @returns {Array} 사용하고 있는 웹폰트명 목록 + */ + getUsedWebfont: function() { + return this.webfontLoader.getUsed(); + }, + + + /** + * 특정 노드의 wysiwyg 영역에서의 상대 위치를 얻어온다. + * @function + * @param {Element} node - 특정 노드 + * @returns {Object} position 객체 { x: number, y: number, width: number, height: number } + */ + getPositionByNode: function(node) { + var wysiwygRelative = new Trex.WysiwygRelative(this.iframe); + return wysiwygRelative.getRelative(node); + } + }); + + function excludeNotAllowed(style) { + var notAllowed = ["color", "fontSize", "fontFamily", "lineHeight"]; + var excluded = Object.clone(style); + for (var i = 0; i < notAllowed.length; i++) { + delete excluded[notAllowed[i]]; + } + return excluded; + } + + function removeWordJoiner(content) { + return content.replace(Trex.__WORD_JOINER_REGEXP, ""); + } + + /* + * NOTE: FTDUEDTR-900 + */ + function preventRemovingNoScopeElementInIE(markup) { + if ($tx.msie) { + markup = markup.replace(/( 

          를 + * 사용하는 데, 편집시에는  가 빈칸 한칸으로서 자리를 차지하여 걸리적 거리므로 이를 제거하여 준다. + * 이와 같이 contentEditable 환경에서   를 주었다가 빼면 빈 엘리먼트임에도 불구하고 문단으로서 높이를 유지한다. + * + * 의문 1. + * 그런데 LI는 왜 하는 걸까 -_-^ + * 의문 2. + *

          를 하나의 문단으로 여기고 높이를 잡아주는 게 맞을까? 글 조회시에는 표시 되지 않을텐데... + * 편집시와 조회시 불일치 발생한다. + * 참고 이슈 #FTDUEDTR-1121 + * 의문 3. + * 저장시 빈 문단에  를 다시 넣어주는 듯 한데, 어디서 해주는 걸까 + * @param body + */ + function makeEmptyParagraphVisibleInIE(body) { + if ($tx.msie_nonstd) { + var pNodes = $tom.collectAll(body, 'p,li'); + for (var i = 0, len = pNodes.length; i < len; i++) { + var node = pNodes[i]; + if ($tom.getLength(node) === 0 && node.tagName.toLowerCase() !== 'p') { //#FTDUEDTR-1121 + try { + node.innerHTML = ' '; + } catch(ignore) { + } + } + if ($tom.getLength(node) === 1 && node.innerHTML === ' ') { + node.innerHTML = ''; + } + } + } + } +})(); + +Trex.module("canvas set focus on mousedown event. only IE.", + function(editor, toolbar, sidebar, canvas, config) { + if (!$tx.msie_std) { + return; + } + + canvas.observeJob(Trex.Ev.__CANVAS_PANEL_MOUSEUP, function(ev){ + if ($tx.isLeftClick(ev)) { + var tagName = $tx.element(ev).tagName; + if (tagName.toLocaleLowerCase() == 'html') { + canvas.focusOnBottom(); + } + } + }); +}); + +Trex.module("auto body resize", + function(editor, toolbar, sidebar, canvas, config){ + canvas.observeJob(Trex.Ev.__IFRAME_LOAD_COMPLETE, function() { + var beforeHTML = ''; + var bodyHeight = 0; + var _panel = canvas.getPanel('html'); + bodyHeight = _panel._bodyHeight; + canvas.observeJob('canvas.height.change', function(h){ + bodyHeight = parseInt(_panel._bodyHeight); + }); + + function _resize(){ + if(!canvas.isWYSIWYG()) return; + var _doc = _panel.getDocument(); + var _body = _doc.body; + var _html = _body.innerHTML; + if(beforeHTML === _html) return; + beforeHTML = _html; + _body.style.height = ''; + var _h = $tx.getDimensions(_body).height; + _panel._bodyContentHeight = _h; + if(_h + * 포커스된 document가 변경되거나 DOM 조작을 하더라도 선택 영역이 유지되도록 하는 객체로
          + * native range 객체에 있는 5가지 프로퍼티만 저장한다.
          + * 주로 Processor와 연관된 객체에서 호출하며,
          + * processor.getBookmark()를 통해서 bookmark를 얻어서 사용한다.
          + * + * @class + */ +Trex.Canvas.Bookmark = Trex.Class.create(/** @lends Trex.Canvas.Bookmark.prototype */{ + startContainer: _NULL, + startOffset: 0, + endContainer: _NULL, + endOffset: 0, + initialize: function(processor) { + this.processor = processor; + this.win = processor.win; + this.doc = processor.doc; + this.dummy = function() { + return processor.newDummy(); + }; + }, + /** + * 시작위치와 끝위치를 동일하게 북마크를 수정한다. + * @param {Boolean} toStart - 위치, 시작 = true + * @example + * bookmark.collapse(true); + */ + collapse: function (toStart) { + if (toStart) { + this.updateEnd(this.startContainer, this.startOffset); + } else { + this.updateStart(this.endContainer, this.endOffset); + } + }, + /** + * native range 객체로 북마크를 수정한다. + * @param {Object} rng - native range 객체 + * @example + * bookmark.save(range); + */ + save: function(rng) { + this.updateStart(rng.startContainer, rng.startOffset); + this.updateEnd(rng.endContainer, rng.endOffset); + }, + /** + * 특정 노드의 앞과 뒤로 북마크를 수정한다. + * @param {Element} node - 특정 노드 + * @example + * bookmark.saveAroundNode(node); + */ + saveAroundNode: function (node) { + this.updateStartBefore($tom.top(node)); + this.updateEndAfter($tom.bottom(node)); + }, + /** + * 특정 노드의 처음으로 북마크를 수정한다. + * @param {Element} node - 특정 노드 + * @example + * bookmark.saveIntoFirst(node); + */ + saveIntoFirst: function(node) { + var _node = $tom.top(node); + this.updateEndBefore(_node); + this.collapse(_FALSE); + }, + /** + * 특정 노드의 마지막으로 북마크를 수정한다. + * @param {Element} node - 특정 노드 + * @example + * bookmark.saveIntoLast(node); + */ + saveIntoLast: function(node) { + var _node = $tom.bottom(node); + this.updateEndBefore(_node); + this.collapse(_FALSE); + }, + /** + * 특정 노드의 이전으로 북마크를 수정한다. + * @param {Element} node - 특정 노드 + * @example + * bookmark.saveNextTo(node); + */ + savePreviousTo: function(node) { + if($tom.previous(node)) { + var _node = $tom.top($tom.previous(node)); + this.updateEndAfter(_node); + } else { + this.updateEndBefore(node); + } + this.collapse(_FALSE); + }, + /** + * 특정 노드의 다음으로 북마크를 수정한다. + * @param {Element} node - 특정 노드 + * @example + * bookmark.saveNextTo(node); + */ + saveNextTo: function(node) { + if($tom.next(node)) { + var _node = $tom.top($tom.next(node)); + this.updateEndBefore(_node); + } else { + this.updateEndAfter(node); + } + this.collapse(_FALSE); + }, + /** + * marker node로 북마크를 수정한다. + * @param {Object} marker - marker 객체 + * @example + * bookmark.saveWithMarker(marker); + */ + saveWithMarker: function(marker) { + if (marker.checkCollapsed()) { //collapsed + this.updateEndAfter(marker.endMarker); + this.collapse(_FALSE); + } else { + this.updateStartBefore(marker.startMarker); + this.updateEndAfter(marker.endMarker); + } + }, + /** + * txSelection가지고 저장된 북마크를 선택한다. + * @param {Object} txSelection - txSelection 객체 + * @example + * bookmark.select(txSelection); + */ + select: function(txSel) { + if (this.isValid()) { + var _rng = txSel.createTextRange(); + try { + txSel.setStart(_rng, this.startContainer, this.startOffset); + txSel.setEnd(_rng, this.endContainer, this.endOffset); + } catch (e) { + console.log(e) + } + txSel.selectRange(_rng); + } + this.reset(); + }, + isValid: function() { + return this.isValidStartContainer() && this.isValidEndContainer(); + }, + isValidStartContainer: function() { + return this.doc.body === $tom.body(this.startContainer); + }, + isValidEndContainer: function() { + return this.doc.body === $tom.body(this.endContainer); + }, + /** + * @private + * 시작 관련 프로퍼티를 특정 위치로 지정한다. + * @param {Element} node - 특정 부모 노드 + * @param {Number} offset - 노드의 옵셋 + * @example + * bookmark.updateStart(node, 1); + */ + updateStart: function(node, offset) { + this.startContainer = node; + this.startOffset = offset; + }, + /** + * @private + * 시작 관련 프로퍼티를 특정 위치로 이전으로 지정한다. + * @param {Element} node - 특정 노드 + * @example + * bookmark.updateStartBefore(node); + */ + updateStartBefore: function(node) { + var _tNode = this.dummy(); + $tom.insertAt(_tNode, node); + + this.startContainer = _tNode; + this.startOffset = 0; + }, + /** + * @private + * 시작 관련 프로퍼티를 특정 위치로 다음으로 지정한다. + * @param {Element} node - 특정 노드 + * @example + * bookmark.updateStartAfter(node); + */ + updateStartAfter: function(node) { + var _tNode = this.dummy(); + $tom.insertNext(_tNode, node); + + this.startContainer = _tNode; + this.startOffset = 0; + }, + /** + * @private + * 끝 관련 프로퍼티를 특정 위치로 지정한다. + * @param {Element} node - 특정 부모 노드 + * @param {Number} offset - 노드의 옵셋 + * @example + * bookmark.updateEnd(node, 1); + */ + updateEnd: function(node, offset) { + this.endContainer = node; + this.endOffset = offset; + }, + /** + * @private + * 끝 관련 프로퍼티를 특정 위치로 이전으로 지정한다. + * @param {Element} node - 특정 노드 + * @example + * bookmark.updateEndBefore(node); + */ + updateEndBefore: function(node) { + var _tNode = this.dummy(); + if (node.nodeName && node.nodeName.toUpperCase() == "P" && !node.nodeValue) { // Note: 마지막 조건( !node.nodeValue)은 무의미한데.. + $tom.append(node, _tNode); + }else { + $tom.insertAt(_tNode, node); + } + + this.endContainer = _tNode; + this.endOffset = _tNode.length; + }, + /** + * @private + * 끝 관련 프로퍼티를 특정 위치로 다음으로 지정한다. + * @param {Element} node - 특정 노드 + * @example + * bookmark.updateEndAfter(node); + */ + updateEndAfter: function(node) { + var _tNode = this.dummy(); + $tom.insertNext(_tNode, node); + + this.endContainer = _tNode; + this.endOffset = _tNode.length; + }, + /** + * @private + * 북마크를 초기화한다. + * @returns {Boolean} - collapse 여부 + * @example + * bookmark.reset(); + */ + reset: function() { + this.startContainer = _NULL; + this.startOffset = 0; + this.endContainer = _NULL; + this.endOffset = 0; + } +}); + \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/processor/marker.js b/src/main/webapp/daumeditor/js/trex/processor/marker.js new file mode 100644 index 0000000..594b0df --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/marker.js @@ -0,0 +1,147 @@ +/** + * @fileOverview + * Wysiwyg 영역의 DOM 조작을 하기전에 선택된 영역의 시작과 끝에 marker를 삽입하여 + * DOM 조작을 보다 용이하게 하는 객체로 Processor#execWithMarker 에서 사용된다. + */ +Trex.I.Marker = {}; + +Trex.I.Marker.Standard = /** @lends Trex.Canvas.Marker.prototype */{ + /** + * 선택된 영역의 시작과 끝에 marker를 삽입한다. + * @example + * marker.paste(); + */ + paste: function() { + var _rng = this.processor.getRange(); + + var _endContainer = _rng.endContainer; + var _startContainer = _rng.startContainer; + if (_endContainer.nodeType == 9) { //NOTE: #FTDUEDTR-919 + _endContainer = this.processor.doc.body; + _startContainer = this.processor.doc.body; + } + + var _endMarker = this.endMarker = this.processor.create('span', { id: "tx_end_marker" }); + var _endOffset = _rng.endOffset; + + if (_endContainer.nodeType == 3) { + _endContainer.splitText(_endOffset); + _endContainer.parentNode.insertBefore(_endMarker, _endContainer.nextSibling); + } else { + _endContainer.insertBefore(_endMarker, _endContainer.childNodes[_endOffset]); + } + + var _startMarker = this.startMarker = this.processor.create('span', { id: "tx_start_marker" }); + var _startOffset = _rng.startOffset; + + if(_startContainer.nodeType == 3) { + _startContainer.splitText(_startOffset); + _startContainer.parentNode.insertBefore(_startMarker, _startContainer.nextSibling); + } else { + _startContainer.insertBefore(_startMarker, _startContainer.childNodes[_startOffset]); + } + }, + /** + * 삽입된 마커를 제거한다. + * @example + * marker.remove(); + */ + remove: function() { + $tom.remove(this.startMarker); + $tom.remove(this.endMarker); + } +}; + + +Trex.I.Marker.Trident = /** @lends Trex.Canvas.Marker.prototype */{ + /** + * 선택된 영역의 시작과 끝에 marker를 삽입한다. + * @example + * marker.paste(); + */ + paste: function() { + this.clear(); + + var _rng = this.processor.getRange(); + var _cnxt = this.processor.doc.body; + + var _rng1 = _rng.duplicate(); + _rng1.collapse(_TRUE); + _rng1.pasteHTML(''); + this.startMarker = $tom.collect(_cnxt, '#tx_start_marker'); + + var _rng2 = _rng.duplicate(); + _rng2.collapse(_FALSE); + _rng2.pasteHTML(''); + this.endMarker = $tom.collect(_cnxt, '#tx_end_marker'); + }, + /** + * @private + * 기존에 삽입된 마커를 모두 제거한다. + * @example + * marker.remove(); + */ + clear: function() { + var _cnxt = this.processor.doc.body; + $tom.remove($tom.collect(_cnxt, '#tx_start_marker')); + $tom.remove($tom.collect(_cnxt, '#tx_end_marker')); + }, + /** + * 삽입된 마커를 제거한다. + * @example + * marker.remove(); + */ + remove: function() { + $tom.remove(this.startMarker); + $tom.remove(this.endMarker); + } +}; + +/** + * Wysiwyg 영역의 DOM 조작을 하기전에 선택된 영역의 시작과 끝에 marker를 삽입하여
          + * DOM 조작을 보다 용이하게 하는 객체로
          + * browser에 따라 필요한 함수들을 mixin한다.
          + * Processor#execWithMarker 에서만 사용된다.
          + * + * @example + * var _marker = new Trex.Canvas.Marker(processor); + * processor.bookmarkTo(); + * try { + * _marker.paste(); + * _marker.backup(); + * handler(_marker); + * } catch(e) { + * } finally { + * _marker.remove(); + * } + * @class + * @param {Object} processor - Processor 객체 + */ +Trex.Canvas.Marker = Trex.Class.create(/** @lends Trex.Canvas.Marker.prototype */{ + /** @ignore */ + $mixins: [ + (($tx.msie_nonstd)? Trex.I.Marker.Trident: Trex.I.Marker.Standard) + ], + initialize: function(processor) { + this.processor = processor; + }, + /** + * 마커를 삽입한 후 북마크를 수정한다. + * @example + * marker.backup(); + */ + backup: function() { + this.processor.bookmarkWithMarker(this); + }, + /** + * @private + * 선택된 영역이 collapse인지 여부를 리턴한다. + * @returns {Boolean} - 선택된 영역이 collapse인지 여부 + * @example + * marker.checkCollapsed(); + */ + checkCollapsed: function() { + return ($tom.next(this.startMarker) == this.endMarker); //collapsed + } +}); + diff --git a/src/main/webapp/daumeditor/js/trex/processor/p/processor_gecko_p.js b/src/main/webapp/daumeditor/js/trex/processor/p/processor_gecko_p.js new file mode 100644 index 0000000..98f5bbf --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/p/processor_gecko_p.js @@ -0,0 +1,4 @@ + +Trex.I.Processor.GeckoP = { + +}; diff --git a/src/main/webapp/daumeditor/js/trex/processor/p/processor_presto_p.js b/src/main/webapp/daumeditor/js/trex/processor/p/processor_presto_p.js new file mode 100644 index 0000000..aada984 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/p/processor_presto_p.js @@ -0,0 +1,4 @@ + +Trex.I.Processor.PrestoP = { + +}; diff --git a/src/main/webapp/daumeditor/js/trex/processor/p/processor_standard_p.js b/src/main/webapp/daumeditor/js/trex/processor/p/processor_standard_p.js new file mode 100644 index 0000000..0d70d67 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/p/processor_standard_p.js @@ -0,0 +1,61 @@ + +Trex.I.Processor.StandardP = { + putBogusParagraph: function() { + var _body = this.doc.body; + var _lastChild = $tom.last(_body); + if (_lastChild && $tom.kindOf(_lastChild, 'p')) { + return; + } + var _newChild = this.newParagraph('p'); + if($tom.kindOf(_lastChild, "br")) { + $tom.replace(_lastChild, _newChild); + } else { + $tom.append(_body, _newChild); + } + } +}; + + +Trex.module("put bogus paragraph @when any key event fires", + function(editor, toolbar, sidebar, canvas) { //NOTE: #FTDUEDTR-695 + if($tx.msie_nonstd) { + return; + } + if (canvas.config.newlinepolicy == "p") { + canvas.reserveJob(Trex.Ev.__CANVAS_PANEL_KEYUP, function(){ + if (!canvas.isWYSIWYG()) { + return; + } + var _processor = canvas.getProcessor(); + _processor.putBogusParagraph(); + }, 10); + } + } +); + +Trex.module("interrupt enter key action @ wysiwyg panel", function(editor, toolbar, sidebar, canvas/*, config*/) { + var _config = TrexConfig.get('canvas'); + if (_config.newlinepolicy != "p") { + return; + } + + canvas.observeKey({ + ctrlKey: _FALSE, + altKey: _FALSE, + shiftKey: _FALSE, + keyCode: Trex.__KEY.ENTER + }, function(ev) { + if (!canvas.isWYSIWYG()) { + return; + } + var _processor = canvas.getProcessor(); + try { + _processor.getTxSel().collapse(_FALSE); + _processor.controlEnterByParagraph(ev); + } catch(e) { + if (e == $propagate) { + throw e; + } + } + }); +}); diff --git a/src/main/webapp/daumeditor/js/trex/processor/p/processor_trident_p.js b/src/main/webapp/daumeditor/js/trex/processor/p/processor_trident_p.js new file mode 100644 index 0000000..167476c --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/p/processor_trident_p.js @@ -0,0 +1,4 @@ + +Trex.I.Processor.TridentP = { + +}; diff --git a/src/main/webapp/daumeditor/js/trex/processor/p/processor_trident_standard_p.js b/src/main/webapp/daumeditor/js/trex/processor/p/processor_trident_standard_p.js new file mode 100644 index 0000000..bf8d38c --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/p/processor_trident_standard_p.js @@ -0,0 +1,4 @@ + +Trex.I.Processor.TridentStandardP = { + +}; diff --git a/src/main/webapp/daumeditor/js/trex/processor/p/processor_webkit_p.js b/src/main/webapp/daumeditor/js/trex/processor/p/processor_webkit_p.js new file mode 100644 index 0000000..cc75865 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/p/processor_webkit_p.js @@ -0,0 +1,4 @@ + +Trex.I.Processor.WebkitP = { + +}; \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/processor/processor.js b/src/main/webapp/daumeditor/js/trex/processor/processor.js new file mode 100644 index 0000000..949dd10 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/processor.js @@ -0,0 +1,382 @@ + +(function() { + var BlockRangeIterator = Trex.Class.create({ + initialize: function(processor, patterns, start, end) { + this.processor = processor; + this.start = start; + this.end = end || this.start; + this.current = this.start; + + this.wTranslator = $tom.translate(patterns).extract('%wrapper'); + this.pTranslator = $tom.translate(patterns).extract('%paragraph'); + }, + hasNext: function() { + return !!this.current; + }, + next: function() { + var _current = this.current; + _current = this.find(_current); + + var _next = _current; + + if ($tom.include(_current, this.end)) { + _next = _NULL; + } else { + while(_next && !$tom.next(_next)) { + _next = $tom.parent(_next); + if($tom.isBody(_next)) { + _next = _NULL; + } + } + if(_next) { + _next = $tom.next(_next); + } + } + if (_next == this.end) { + _next = _NULL; + } + this.current = _next; + return _current; + }, + find: function(node) { + var _bNode; + var _node = node; + + if(!$tom.hasContent(_node)) { + return _node; + } + + while(_node) { + _bNode = _node; + if($tom.isBody(_node)) { + break; + } + + if($tom.kindOf(_node, this.wTranslator.getExpression())) { + return _node; + } + + if($tom.kindOf(_node, '%wrapper,%outergroup')) { + _node = $tom.descendant(_bNode, this.pTranslator.getExpression()); + if(_node) { + return _node; + } + _node = $tom.descendant(_bNode, '%paragraph'); + if(_node) { + _bNode = _node; + break; + } + } + + if($tom.kindOf(_node, this.pTranslator.getExpression())) { + return _node; + } + if(_node.nextSibling && _node.nodeType == 3) { + // BlockIterator 이니까 TextNode 는 찾는 대상이 아님. + _node = _node.nextSibling; + } else { + _node = _node.parentNode; + } + } + var _innerName = $tom.paragraphOf($tom.getName(_bNode)); + var _wNode = this.processor.newNode(_innerName); + var _pNodes = $tom.extract(_bNode, node, '%text,%inline,img,object,embed,hr'); + $tom.wrap(_wNode, _pNodes); + this.processor.stuffNode(_wNode); + return _wNode; + } + }); + + Object.extend(Trex.I.Processor.Standard, /** @lends Trex.Canvas.Processor.prototype */{ + /** + * @private + * 선택한 영역안에 있는 노드 중에 패턴을 만족하는 블럭 노드들을 리턴한다. + * @param {String} pattern - 수집할 노드 패턴 조건 + * @param {Element} start - 시작하는 노드(#tx_start_marker) + * @param {Element} end - 끝나는 노드(#tx_end_marker) + * @returns {Array} - 선택한 영역안에 있는 노드 중에 패턴을 만족하는 노드들 + * @example + * processor.getBlockRangeIterator('div,p,li', node, node); + */ + getBlockRangeIterator: function(pattern, start, end) { + return new BlockRangeIterator(this, pattern, start, end); + } + }); +})(); + +(function() { + var InlineRangeIterator = Trex.Class.create({ + initialize: function(processor, patterns, start, end) { + this.processor = processor; + this.start = start; + this.end = end || this.start; + this.current = this.start; + + this.iTranslator = $tom.translate(patterns).extract('%inline'); + }, + hasNext: function() { + return !!this.current; + }, + next: function() { + var _current = this.current; + _current = this.find(_current); + + var _next = _current; + if (_current == this.end) { + _next = _NULL; + } else { + while(_next && !$tom.next(_next)) { + _next = $tom.parent(_next); + if($tom.isBody(_next)) { + _next = _NULL; + } + } + if(_next) { + _next = $tom.next(_next); + } + } + if ($tom.include(_next, this.end)) { + _next = $tom.top(_next, _TRUE); + } + this.current = _next; + return _current; + }, + find: function(node) { + var _node = node; + if($tom.kindOf(_node, '%paragraph,%outergroup,%block') || $tom.isBody(_node)) { + var _bNode = _node; + _node = $tom.top(_bNode, _TRUE); + if(!_node) { + var _innerName = $tom.inlineOf(); + var _iNode = this.processor.create(_innerName); + $tom.append(_bNode, _iNode); + return _iNode; + } + } + + if($tom.kindOf(_node, 'br')) { + return _node; + } else if(!$tom.hasContent(_node)) { + return _node; + } + + if($tom.kindOf(_node, this.iTranslator.getExpression())) { + return _node; + } + + var _innerName = $tom.inlineOf(); + var _iNode = this.processor.create(_innerName); + $tom.insertAt(_iNode, _node); + if(_node) { + $tom.append(_iNode, _node); + } + return _iNode; + } + }); + + Object.extend(Trex.I.Processor.Standard, /** @lends Trex.Canvas.Processor.prototype */{ + /** + * @private + * 선택한 영역안에 있는 노드 중에 패턴을 만족하는 인라인 노드들을 리턴한다. + * @param {String} pattern - 수집할 노드 패턴 조건 + * @param {Element} start - 시작하는 노드(#tx_start_marker) + * @param {Element} end - 끝나는 노드(#tx_end_marker) + * @returns {Array} - 선택한 영역안에 있는 노드 중에 패턴을 만족하는 노드들 + * @example + * processor.getInlineRangeIterator('span,font,a', node, node); + */ + getInlineRangeIterator: function(pattern, start, end) { + return new InlineRangeIterator(this, pattern, start, end); + } + }); +})(); + +(function() { + var __CACHING_DOC = _NULL; + var __CACHING_NODE = {}; + var __CACHING_PARAGRAPH = {}; + Object.extend(Trex.I.Processor.Standard, /** @lends Trex.Canvas.Processor.prototype */{ + /** + * 노드를 생성하여 리턴한다. 캐싱을 사용하여 이미 생성했던 노드는 복사한다. + * @private + * @param {String} name - 노드명 + * @example + * processor.newNode('div'); + */ + newNode: function(name) { + if(__CACHING_DOC != this.doc) { + __CACHING_NODE = {}; + __CACHING_DOC = this.doc; + } + if(!__CACHING_NODE[name]) { + __CACHING_NODE[name] = this.win[name](); + } + return $tom.clone(__CACHING_NODE[name], _FALSE); + }, + /** + * 텍스트 노드를 생성한다. + * @private + * @param {String} text - 텍스트내용 + */ + newText: function(text) { + return this.doc.createTextNode(text); + }, + /** + * 노드를 생성하여 리턴한다. 캐싱을 사용하여 이미 생성했던 노드는 복사한다. + * @private + * @param {String} name - 노드명 + * @example + * processor.newParagraph('p'); + */ + newParagraph: function(name) { + if(__CACHING_DOC != this.doc) { + __CACHING_PARAGRAPH = {}; + __CACHING_DOC = this.doc; + } + if(!__CACHING_PARAGRAPH[name]) { + __CACHING_PARAGRAPH[name] = this.stuffNode(this.newNode(name)); + } + return $tom.clone(__CACHING_PARAGRAPH[name], _TRUE); + } + }); +})(); + + +(function() { + var __CACHING_DOC = _NULL; + var __CACHING_NODE = _NULL; + var __HAS_DUMMY = _FALSE; + var __TEXT_GC_LIST = []; + + Object.extend(Trex.I.Processor.Standard, /** @lends Trex.Canvas.Processor.prototype */{ + /** + * 빈 텍스트 노드를 생성한다. + * @private + * @param {Boolean} keep - 계속 유지할 것인지 여부 optional + */ + newDummy: function(keep) { + if(__CACHING_DOC != this.doc) { + __CACHING_NODE = _NULL; + __TEXT_GC_LIST = []; + __CACHING_DOC = this.doc; + } + if(!__CACHING_NODE) { + __CACHING_NODE = this.doc.createTextNode(Trex.__WORD_JOINER); + } + var _dummy = $tom.clone(__CACHING_NODE); + if(!keep) { + __TEXT_GC_LIST.push(_dummy); + __HAS_DUMMY = _TRUE; + } +// try { +// throw new Error(); +// } catch (e) { +// console.log((++newDummyCalled) + "\n" + e.stack); +// } + return _dummy; + }, + /** + * 생성된 빈 텍스트 노드들을 삭제한다. + * @private + */ + /* TODO + * Bug : __TEXT_GC_LIST에 저장된 dummy를 splitText를 하면, reference가 사라지는 효과가 발생한다. + * dummy를 넣기 위한 splitText 부분을 수정할 필요가 있다. + * startConatiner를 지우면 (현재까지 확인된 바에 따르면) Chrome에서는 커서가 사라지고 더 이상 range를 가져오지 못하게 된다. + */ + clearDummy: function() { + if (!__HAS_DUMMY) { + return; + } + var range, startNode; + try { + range = this.createGoogRange(); + startNode = range && range.getStartNode(); + } catch (ignore4ie678) {} + + var remained = _NULL; +// console.log(__TEXT_GC_LIST.length); + for (var i = 0, len = __TEXT_GC_LIST.length-1; i < len; i++) { + try { + var _dummy = __TEXT_GC_LIST.shift(); +// console.log(!!(_dummy && _dummy.nodeValue)) + if (_dummy && _dummy.nodeValue) { + if (_dummy.nodeValue == Trex.__WORD_JOINER) { + if (startNode != _dummy) { +// console.log('remove'); + $tom.remove(_dummy); + } else { + remained = _dummy; + } + } else { +// console.log('replace'); + _dummy.nodeValue = _dummy.nodeValue.replace(Trex.__WORD_JOINER_REGEXP, ""); + } + } else { +// console.log("this's not dummy"); + } + } catch(e) { + } + } + remained && __TEXT_GC_LIST.splice(0, 0, remained); + __HAS_DUMMY = _FALSE; + } + }); +})(); + +/** + * Wysiwyg 영역의 컨텐츠를 조작하기 위해 사용되며,
          + * browser와 newlinepolicy에 따라 필요한 함수들을 mixin한다.
          + * 이 객체를 통해서 Bookmark, txSelection, Marker 객체에 접근한다.
          + * canvas.getProcessor()를 통해서 얻거나
          + * canvas.execute(), canvas.query()를 통해서 processor를 얻어서 사용한다.
          + * + * @abstract + * @class + * @param {Object} win - Wysiwyg 영역의 window 객체 + * @param {Object} doc - Wysiwyg 영역의 document 객체 + * + * @example + * canvas.execute(function(processor) { + * processor.pasteContent('', _FALSE); + * }); + * + * var value = canvas.query(function(processor) { + * return processor.getText(); + * }); + * + * var _processor = canvas.getProcessor(); + * _processor.focusOnTop(); + */ +Trex.Canvas.Processor = Trex.Class.draft({ + /** @ignore */ + $mixins: [ + Trex.I.Processor.Standard, + (($tx.msie_nonstd)? Trex.I.Processor.Trident: {}), + (($tx.msie_std)? Trex.I.Processor.TridentStandard: {}), + (($tx.gecko)? Trex.I.Processor.Gecko: {}), + (($tx.webkit)? Trex.I.Processor.Webkit: {}), + (($tx.presto)? Trex.I.Processor.Presto: {}) + ] +}); + +/** + * newlinepolicy가 p인 Wysiwyg Processor + * @class + * @extends Trex.Canvas.Processor + * @param {Object} win - Wysiwyg 영역의 window 객체 + * @param {Object} doc - Wysiwyg 영역의 document 객체 + */ +Trex.Canvas.ProcessorP = Trex.Class.create({ + /** ignore */ + $extend: Trex.Canvas.Processor, + /** @ignore */ + $mixins: [ + Trex.I.Processor.StandardP, + (($tx.msie_nonstd)? Trex.I.Processor.TridentP: {}), + (($tx.msie_std)? Trex.I.Processor.TridentStandardP: {}), + (($tx.gecko)? Trex.I.Processor.GeckoP: {}), + (($tx.webkit)? Trex.I.Processor.WebkitP: {}), + (($tx.presto)? Trex.I.Processor.PrestoP: {}) + ] +}); diff --git a/src/main/webapp/daumeditor/js/trex/processor/processor_gecko.js b/src/main/webapp/daumeditor/js/trex/processor/processor_gecko.js new file mode 100644 index 0000000..f6f093f --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/processor_gecko.js @@ -0,0 +1,19 @@ +Trex.I.Processor.Gecko = { + /** + * Paragraph 를 채운다. + * @private + * @param {Node} node - paragraph 노드 + */ + stuffNode: function(node) { + return $tom.stuff(node, this.newNode('br')); + }, + /** + * @private + * @memberOf Trex.Canvas.ProcessorP + * Gecko에서 newlinepolicy가 p일 경우 Enter Key 이벤트가 발생하면 실행한다. + * @param {Event} ev - Enter Key 이벤트 + */ + controlEnterByParagraph: function() { + throw $propagate; + } +}; diff --git a/src/main/webapp/daumeditor/js/trex/processor/processor_presto.js b/src/main/webapp/daumeditor/js/trex/processor/processor_presto.js new file mode 100644 index 0000000..5cfa4f5 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/processor_presto.js @@ -0,0 +1,19 @@ +Trex.I.Processor.Presto = { + /** + * Paragraph 를 채운다. + * @private + * @param {Node} node - paragraph 노드 + */ + stuffNode: function(node) { + return $tom.stuff(node, this.newNode('br')); + }, + /** + * @private + * @memberOf Trex.Canvas.ProcessorP + * Presto에서 newlinepolicy가 p일 경우 Enter Key 이벤트가 발생하면 실행한다. + * @param {Event} ev - Enter Key 이벤트 + */ + controlEnterByParagraph: function(ev) { + throw $propagate; + } +}; diff --git a/src/main/webapp/daumeditor/js/trex/processor/processor_standard.js b/src/main/webapp/daumeditor/js/trex/processor/processor_standard.js new file mode 100644 index 0000000..8b00b25 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/processor_standard.js @@ -0,0 +1,782 @@ +/** + * @fileOverview + * Wysiwyg 영역의 컨텐츠를 조작하기 위해 사용되는 공통되는 Processor 정의 + */ +Trex.I.Processor = {}; +Trex.I.Processor.Standard = /** @lends Trex.Canvas.Processor.prototype */{ + txSelection: _NULL, + isRangeInsideWysiwyg: _FALSE, + lastRange: _NULL, + initialize: function(win, doc) { + this.win = win; + this.doc = doc; + + this.txSelection = new Trex.Canvas.Selection(this); + this.bookmark = new Trex.Canvas.Bookmark(this); + }, + /** + * Trex.Canvas.Selection 객체를 리턴한다. + * @returns {Object} - Trex.Canvas.Selection 객체 + * @example + * processor.getTxSel(); + */ + getTxSel: function() { + return this.txSelection; + }, + /** + * native selection object를 리턴한다. + * @returns {Object} - native selection 객체 + * @example + * processor.getSel(); + */ + getSel: function(){ + return this.txSelection.getSel(); + }, + /** + * native range object를 리턴한다. + * @returns {Object} - native range 객체 + * @example + * processor.getRange(); + */ + getRange: function() { + return this.txSelection.getRange(); + }, + /** + * Trex.Canvas.Bookmark 객체를 리턴한다. + * @returns {Object} - Trex.Canvas.Bookmark 객체 + * @example + * processor.getBookmark(); + */ + getBookmark: function() { + return this.bookmark; + }, + /** + * 선택된 영역의 collapse 여부(선택된 영역이 있는지 여부)를 리턴한다. + * @returns {Boolean} - collapse 여부 + * @see Trex.Canvas.Selection#isCollapsed + * @example + * processor.isCollapsed(); + */ + isCollapsed: function() { + return this.txSelection.isCollapsed(); + }, + /** + * 선택된 영역의 노드를 리턴한다. + * @returns {Element} - 선택된 영역의 노드 + * @see Trex.Canvas.Selection#getNode + * @example + * processor.getNode(); + */ + getNode: function() { + return this.txSelection.getNode(); + }, + /** + * 선택된 영역의 컨트롤 노드(img,object,hr,table,button)를 리턴한다. + * @returns {Element} - 선택된 영역의 노드 + * @see Trex.Canvas.Selection#getControl + * @example + * processor.getControl(); + */ + getControl: function(){ + return this.txSelection.getControl(); + }, + /** + * 선택된 영역이 컨트롤 노드인지 여부를 리턴한다. + * @returns {Boolean} - 컨트롤 노드인지 여부 + * @see Trex.Canvas.Selection#hasControl + * @example + * processor.hasControl(); + */ + hasControl: function(){ + return this.txSelection.hasControl(); + }, + /** + * 컨트롤 노드를 선택한다. + * @param {Element} node - 컨트롤 노트 + * @example + * txSelection.selectControl(node); + */ + selectControl: function(node){ + return this.txSelection.selectControl(node); + }, + /** + * 선택된 영역의 텍스트 데이터를 리턴한다. + * @returns {String} - 선택된 영역의 텍스트 데이터 + * @see Trex.Canvas.Selection#getText + * @example + * processor.getText(); + */ + getText: function(){ + return this.txSelection.getText(); + }, + /** + * 선택된 영역이 텍스트 데이터 영역의 어떤 위치인지를 리턴한다. + * @returns {Number} - 텍스트 데이터 영역의 어떤 위치인지
          + * 텍스트의 처음 : $tom.__POSITION.__START_OF_TEXT : -1
          + * 텍스트의 중간 : $tom.__POSITION.__MIDDLE_OF_TEXT : 0
          + * 텍스트의 마지막 : $tom.__POSITION.__END_OF_TEXT : 1 + * @see Trex.Canvas.Selection#compareTextPos + * @example + * processor.compareTextPos(); + */ + compareTextPos: function() { + return this.txSelection.compareTextPos(); + }, + /** + * 현재 선택된 영역에서 조건에 맞는 노드를 리턴한다. + * @param {Function, String} filter - 조건을 나타내는 함수 또는 문자열 + * @returns {Element} - 조건에 맞는 노드 + * @example + * processor.findNode(function() { return 'p,div'; }); + * processor.findNode('%paragraph'); + */ + findNode: function(filter) { + try { + return $tom.find(this.getNode(), filter); + } catch(e) { + return _NULL; + } + }, + /*-------- processor - query style start --------*/ + /** + * 특정한 노드의 특정한 스타일 값을 얻어온다. + * @param {Element} node - 특정 노드 + * @param {String} styleName - 스타일 명 + * @returns {String} - 스타일 값 + * @example + * processor.queryStyle(node, 'textAlign'); + */ + queryStyle: function(node, styleName) { + if(!node) { + return _NULL; + } + styleName = ((styleName == 'float')? ((node.style.styleFloat === _UNDEFINED)? 'cssFloat': 'styleFloat'): styleName); + if(node.style && node.style[styleName]) { + return node.style[styleName]; + } else if(node.currentStyle && node.currentStyle[styleName]) { + return node.currentStyle[styleName]; + } else if(_WIN.getComputedStyle) { + var targetNode = node; + while($tom.isText(targetNode)){ + targetNode = targetNode.parentNode; + } + var win = $tom.getWindow(this.doc); + var _cssStyle = win.getComputedStyle(targetNode, _NULL); + return ((_cssStyle)? _cssStyle[styleName] : _NULL); + } + return _NULL; + }, + /** + * 특정한 노드의 특정한 속성 값을 얻어온다. + * @param {Element} node - 특정 노드 + * @param {String} attrName - 속성 명 + * @returns {String} - 속성 값 + * @example + * processor.queryAttr(node, 'align'); + */ + queryAttr: function(node, attrName) { + if(!node) { + return _NULL; + } + return $tom.getAttribute(node, attrName); + }, + /** + * 선택된 영역의 native queryCommandState 값을 얻어온다. + * @param {String} command - 커맨드 명 + * @returns {Boolean} - 해당 영역이 커맨드 상태인지 여부 + * @example + * processor.queryCommandState('bold'); + */ + queryCommandState: function(command) { + try { + return this.doc.queryCommandState(command); + } catch(e) { return _FALSE; } + }, + /** + * 선택된 영역의 native queryCommandValue 값을 얻어온다. + */ + queryCommandValue: function(command) { + try { + return this.doc.queryCommandValue(command); + } catch(e) { + return ""; + } + }, + /*-------- processor - query style end --------*/ + /** + * 선택된 영역에 native execCommand를 실행시킨다. + * @param {String} command - 커맨드 명 + * @param {String} data - 데이터 값 + * @example + * processor.execCommand('forecolor', '#333'); + */ + execCommand: function(command, data) { + if ($tx.gecko) { + // Firefox는 styleWithCSS 기본값이 true + try { + this.doc.execCommand('styleWithCSS', _FALSE, _FALSE); + } catch(e) {} + } + try { + this.doc.execCommand(command, _FALSE, data); + } catch(e) {} + }, + /*-------- processor - marker start --------*/ + /** + * 선택된 영역에 주어진 handler를 실행시킨다. + * 주로 외부에서 processor를 이용해 DOM조작을 할 경우에 사용된다. + * @param {Funtion} handler - 해당 영역에 실행할 함수 + * @example + * processor.execWithMarker(function(marker) { + * $tom.insertAt(node, marker.endMarker); + * }); + */ + execWithMarker: function(handler) { + var _marker = new Trex.Canvas.Marker(this); + this.bookmarkTo(); + try { + _marker.paste(); + _marker.backup(); + handler(_marker); + } catch(e) { + console.log(e, e.stack) + } finally { + _marker.remove(); + } + }, + /*-------- processor - marker end --------*/ + /*--------------------- focus, movecaret ----------------------*/ + /** + * wysiwyg 영역에 포커스를 준다. + * @example + * processor.focus(); + */ + focus: function() { + this.doc.body.focus(); + }, + /** + * wysiwyg 영역에 포커스를 뺀다. + * @example + * processor.blur(); + */ + blur: function() { + _WIN.focus(); //NOTE: by focused on parent window, editor will be blured + }, + /** + * 본문의 처음으로 캐럿을 옮긴다. + * @example + * processor.focusOnTop(); + */ + focusOnTop: function() { + this.focus(); + this.selectFirstText(this.doc.body); + this.doc.body.scrollTop = 0; //NOTE: only html, not xhtml + }, + selectFirstText: function(node) { + var firstNode = $tom.top(node); + var range = this.createGoogRangeFromNodes(firstNode, 0, firstNode, 0); + range.select(); + }, + /** + * 본문의 마지막으로 캐럿을 옮긴다. + * @example + * processor.focusOnBottom(); + */ + focusOnBottom: function() { + this.focus(); + this.moveCaretTo(this.doc.body, _FALSE); + this.doc.body.scrollTop = this.doc.body.scrollHeight; //NOTE: only html, not xhtml + }, + /** + * 특정 노드로 캐럿을 옮긴다. + * @param {Element} node - 특정 노드 + * @param {Boolean} toStart - 위치, 시작 = true + * @example + * processor.moveCaretTo(node, true); + */ + moveCaretTo: function(node, toStart) { + if(!node) { + return; + } + this.focus(); + this.bookmarkInto(node, toStart); + this.bookmark.select(this.txSelection); + }, + /** + * 특정 노드의 바깥으로 캐럿을 옮긴다. + * @param {String} scope - 특정 노드 패턴 + * @example + * processor.moveCaretWith(scope); + */ + moveCaretWith: function(scope) { + if(!scope) { return; } + var _elOuter = this.findNode(scope); + if(_elOuter) { + this.focus(); + this.bookmark.saveNextTo(_elOuter); + this.bookmark.select(this.txSelection); + } + }, + /** + * 특정 노드를 감싸 선택한다. + * @param {Element} node - 특정 노드 + * @example + * processor.selectAround(node); + */ + selectAround: function(node) { + if(!node) { + return; + } + this.focus(); + this.bookmark.saveAroundNode(node); + this.bookmark.select(this.txSelection); + }, + /** + * 특정 노드의 안으로 북마크를 수정한다. + * @param {Element} node - 특정 노드 + * @example + * processor.bookmarkInto(node); + */ + bookmarkInto: function(node, toStart) { + if(!node) { + return; + } + toStart = (toStart == _NULL)? _TRUE: toStart; + if(toStart) { + this.bookmark.saveIntoFirst(node); + } else { + this.bookmark.saveIntoLast(node); + } + }, + /** + * 특정 노드의 이전으로 북마크를 수정한다. + * @param {Element} node - 특정 노드 + * @example + * processor.bookmarkToPrevious(node); + */ + bookmarkToPrevious: function(node) { + if(!node) { + return; + } + this.bookmark.savePreviousTo(node); + }, + /** + * 특정 노드의 다음으로 북마크를 수정한다. + * @param {Element} node - 특정 노드 + * @example + * processor.bookmarkToNext(node); + */ + bookmarkToNext: function(node) { + if(!node) { + return; + } + this.bookmark.saveNextTo(node); + }, + /** + * execute하기 전 range를 북마크한다. + * @example + * processor.bookmark(); + */ + bookmarkTo: function(rng) { + rng = rng || this.txSelection.getRange(); + this.bookmark.save({ + startContainer: rng.startContainer, + startOffset: rng.startOffset, + endContainer: rng.endContainer, + endOffset: rng.endOffset + }); + }, + /** + * marker에 따라 북마크를 수정한다. + * @example + * processor.bookmarkWithMarker(marker); + */ + bookmarkWithMarker: function(marker) { + this.bookmark.saveWithMarker(marker); + }, + /** + * 저장한 range를 선택한다. + * @example + * processor.restore(); + */ + restore: function() { + this.bookmark.select(this.txSelection); + }, + /*------------ execute action ------------*/ + /** + * 인자에 따라 노드를 생성한다. + * @param {String, Object, Element} argument - 가변 arguments
          + * {String} name : 1st String은 노드명
          + * {Object} attributes : 적용할 속성들
          + * {Element, String, Number} children : 자식 노드 + * @example + * processor.create('div', { 'className': 'txc-textbox' }); + */ + create: function() { + var name = arguments[0]; + var _node = this.newNode(name); + for (var i = 1; i < arguments.length; i++) { + var arg = arguments[i]; + if (arg.nodeType) { + $tom.append(_node, arg); + } else if (typeof(arg) == 'string' || typeof(arg) == 'number') { + _node.innerHTML += arg; + } else if (typeof(arg) == 'array') { + for (var j = 0; j < arg.length; j++) { + $tom.append(_node, arg[j]); + } + } else { + $tom.applyAttributes(_node, arg); + } + } + return _node; + }, + /** + * 선택한 영역에 노드를 삽입한다. + * @param {Array,Element} nodes - 삽입하고자 하는 노드 배열 또는 노드 + * @param {Boolean} newline - 현재 영역에서 한줄을 띄운 후 삽입할지 여부 + * @param {Object} wrapStyle - wrapper 노드에 적용할 스타일,
          + * newline이 true 일 경우에만 의미를 갖는다. + * @example + * processor.pasteNode([node, node], true, { 'style': { 'textAlign': 'center' } }); + */ + pasteNode: function(nodes, newline, wrapStyle) { + if(!nodes) { + return; + } + if(!nodes.length) { + nodes = [].concat(nodes); + } + + this.txSelection.collapse(_FALSE); + if(newline) { + /* order + * (curNode) > wpNode > dvNode + */ + var _curNode, _wpNode, _dvNode; + + var _processor = this; + this.execWithMarker(function(marker) { + _dvNode = $tom.divideParagraph(marker.endMarker); + var _detected = $tom.kindOf(_dvNode, 'p,li,dd,dt,h1,h2,h3,h4,h5,h6'); + if(_detected) { + _curNode = $tom.previous(_dvNode); + _wpNode = $tom.clone(_dvNode); + } else { + _dvNode = _processor.newNode('p'); + $tom.insertAt(_dvNode, marker.endMarker); + _wpNode = _processor.newNode('p'); + } + $tom.insertAt(_wpNode, _dvNode); + nodes.each(function(node) { + $tom.append(_wpNode, node); + }); + if(wrapStyle) { + $tom.applyAttributes(_wpNode, wrapStyle); + } + // #FTDUEDTR-1442 + if (nodes.length == 1) { + var firstChildNode = nodes[0]; + var disableBlockTag = $tom.kindOf(firstChildNode, 'table,hr,blockquote,pre,h1,h2,h3,h4,h5,h6,div'); + var isParagraphTag = $tom.isTagName(_wpNode, 'p'); + if (disableBlockTag && isParagraphTag) { + $tom.unwrap(_wpNode); + } + } + }); + if(_curNode) { + if(!$tom.hasData(_curNode)) { + this.stuffNode(_curNode); + } + } + this.stuffNode(_dvNode); + this.bookmark.saveIntoFirst(_dvNode); + } else { + var self = this; + this.executeUsingCaret(function(range, savedCaret) { + var startCaret = savedCaret.getCaret(_FALSE), + endCaret = savedCaret.getCaret(_FALSE); + var targetNode = $tx.msie_nonstd ? startCaret : _NULL; + nodes.each(function(node) { + range.insertNode(node, targetNode); + }); + if (endCaret && endCaret.nextSibling) { + self.moveCaretTo(endCaret.nextSibling, 0); + } + }); + } + return nodes[0]; + }, + /** + * 선택한 영역에 HTML 컨텐츠를 삽입한다. + * @param {String} html - 삽입하고자 하는 HTML 컨텐츠 + * @param {Boolean} newline - 현재 영역에서 한줄을 띄운 후 삽입할지 여부 true/false + * @param {Object} wrapStyle - wrapper 노드에 적용할 스타일,
          + * newline이 true 일 경우에만 의미를 갖는다. + * @example + * processor.pasteNode('', true, { 'style': { 'textAlign': 'center' } }); + */ + pasteContent: function(html, newline, wrapStyle) { + var _tmpNode = this.create('div'); + _tmpNode.innerHTML = html; + var _dataNodes = $tom.children(_tmpNode); + return this.pasteNode(_dataNodes, newline, wrapStyle); + }, + /** + * 주어진 노드를 새로운 노드로 교체한다. + * @param {Element} node - 기존 노드 + * @param {String} tag - 새로운 노드 명 + * @param {Object} attributes - 새로운 노드에 적용할 속성들 + * @returns {Element} - 생성한 노드 + * @example + * processor.replace(p, 'li'); + */ + replace: function(node, tag, attributes) { + this.bookmark.saveAroundNode(node); + return $tom.replace(node, this.create(tag, attributes)); + }, + /** + * 선택한 영역안에 있는 노드 중에 패턴을 만족하는 블럭 노드들을 리턴한다. + * @param {Array} filter - 수집할 노드 패턴 조건 + * @returns {Array} - 선택한 영역안에 있는 노드 중에 패턴을 만족하는 노드들 + * @example + * processor.blocks(function() { + return '%paragraph'; + }); + */ + blocks: function(filter) { + var _nodes = []; + var _patterns = filter(); + if (this.hasControl()) { + var _control = this.getControl(); + if ($tom.kindOf(_control.parentNode, _patterns)) { + _nodes.push(_control.parentNode); + } + } else { + var _processor = this; + this.execWithMarker(function(marker) { + var _itr = _processor.getBlockRangeIterator(_patterns, marker.startMarker, marker.endMarker); + var _node; + while (_itr.hasNext()) { + _node = _itr.next(); + if ($tom.kindOf(_node, '#tx_start_marker,#tx_end_marker')) { + //ignore + } else { + _nodes.push(_node); + } + } + }); + } + return _nodes; + }, + /** + * 선택한 영역안에 있는 노드 중에 패턴을 만족하는 인라인 노드들을 리턴한다. + * @param {Array} filter - 수집할 노드 패턴 조건 + * @returns {Array} - 선택한 영역안에 있는 노드 중에 패턴을 만족하는 노드들 + * @example + * processor.inlines(function(type) { + if(type === 'control') { + return 'hr,table'; + } + return '%inline'; + }); + */ + inlines: function(filter) { + var _nodes = []; + var _patterns = filter(); + + var _processor = this; + var _createInline = function() { + return _processor.create($tom.inlineOf()); + }; + + if (this.hasControl()) { + var _control = this.getControl(); + if ($tom.kindOf(_control, _patterns)) { + _nodes.push(_control); + } else { + var _iNode = _createInline(); + $tom.insertNext(_iNode, _control); + $tom.append(_iNode, _control); + } + } else { + this.execWithMarker(function(marker) { + if (marker.checkCollapsed()) { //collapsed + var _iNode = _createInline(); + $tom.append(_iNode, _processor.newDummy()); + $tom.insertNext(_iNode, marker.startMarker); + _processor.bookmarkTo({ + startContainer: _iNode, + startOffset: 1, + endContainer: _iNode, + endOffset: 1 + }); + _nodes.push(_iNode); + } else { + var _itr = _processor.getInlineRangeIterator(_patterns, marker.startMarker, marker.endMarker); + var _node; + while (_itr.hasNext()) { + _node = _itr.next(); + if ($tom.kindOf(_node, '#tx_start_marker,#tx_end_marker')) { + //ignore + } else if ($tom.kindOf(_node, 'br')) { + //ignore + } else { + _nodes.push(_node); + } + } + } + }); + } + return _nodes; + }, + /** + * 선택한 영역안에 있는 노드 중에 패턴을 만족하는 컨트롤 노드(img,object,hr,table,button)들을 리턴한다. + * @param {Array} filter - 수집할 노드 패턴 조건 + * @returns {Array} - 선택한 영역안에 있는 노드 중에 패턴을 만족하는 노드들 + * @example + * processor.controls(function() { + return 'hr,table'; + }); + */ + controls: function(filter) { + var _nodes = []; + if (this.hasControl()) { + if ($tom.kindOf(this.getControl(), filter())) { + _nodes.push(this.getControl()); + } + } + return _nodes; + }, + /** + * 더미용 nbsp를 넣는 함수. + * webkit 용에 구현되어있습니다. + * Safari 에서 apply 시 + * 폰트에 대한 속성을 잃어버리기 때문에 필요. + */ + addDummyNbsp: function () {}, + /** + * 배열 내의 모든 노드에게 지정한 속성을 적용한다. + * @param {Array} nodes - 속성을 적용할 노드 배열 + * @param {Object} attributes - 노드에 적용할 속성들 + * @returns {Array} - 입력 노드들 + * @example + * processor.apply([p,p,p], { style: { textAlign: 'center'}}); + */ + apply: function(nodes, attributes) { + if(!nodes) { + return _NULL; + } + if(!nodes.length) { + nodes = [].concat(nodes); + } + nodes.each(function(node) { + $tom.applyAttributes(node, attributes); + }); + return nodes; + }, + /** + * 배열 내의 모든 노드를 주어진 블럭으로 감싼다. + * @param {Array} nodes - 블럭으로 감쌀 노드 배열 + * @param {String} tag - 블럭 노드 명 + * @param {Object} attributes - 블럭에 적용할 속성 + * @returns {Element} - 생성한 블럭노드 + * @example + * processor.wrap([p,p,p], 'div', { style: { backgroundColor: 'black'}}); + */ + wrap: function(nodes, tag, attributes) { + if(!nodes) { + return _NULL; + } + if(!nodes.length) { + nodes = [].concat(nodes); + } + attributes = attributes || {}; + var res = $tom.wrap(this.create(tag, attributes), nodes); + if($tx.msie && !$tom.nextContent(res)){ + var e = this.doc.createElement('p'); + e.innerHTML = $tom.EMPTY_BOGUS; + this.doc.body.appendChild(e); + } + return res; + }, + /** + * 블럭으로 감싸진 노드들을 빼내고 블럭을 삭제한다. + * @param {Element} node - 블럭 노드 + * @returns {Element} - 블럭의 첫번째 노드 또는 블럭의 다음 노드 + * @example + * processor.unwrap(node); + */ + unwrap: function(node) { + if (!node) { + return _NULL; + } + this.bookmark.saveAroundNode(node); + return $tom.unwrap(node); + }, + createGoogRange: function() { + return goog.dom.Range.createFromWindow(this.win) + }, + createGoogRangeFromNodes: function(startNode, startOffset, endNode, endOffset) { + return goog.dom.Range.createFromNodes(startNode, startOffset, endNode, endOffset); + }, + executeUsingCaret: function(handler) { + try { + var range = this.createGoogRange(); + var savedCaret = range.saveUsingCarets(); + return handler(range, savedCaret); + } finally { + if (!savedCaret.isDisposed()) { + savedCaret.restore(); + } + } + } +}; + +Trex.module("observe that @when control elements are focused at", + function(editor, toolbar, sidebar, canvas) { + if($tx.webkit || $tx.presto) { + canvas.observeJob(Trex.Ev.__CANVAS_PANEL_MOUSEDOWN, function(ev) { + var _processor = canvas.getProcessor(); + var _node = $tx.element(ev); + if ($tom.kindOf(_node, "img,hr,iframe,table")) { + var _button = $tom.find(_node, 'button'); + if(_button) { + _processor.selectControl(_button); + } else { + _processor.selectControl(_node); + } + } else if ($tom.kindOf(_node, "button")) { + _processor.selectControl(_node); + } + }); + } + } +); + +Trex.module("bind iframe activate or deactivate event", + function(editor, toolbar, sidebar, canvas) { +// if ($tx.msie_nonstd) { + canvas.observeJob(Trex.Ev.__IFRAME_LOAD_COMPLETE, function(panelDoc) { + var _processor = canvas.getProcessor(Trex.Canvas.__WYSIWYG_MODE); + + $tx.observe(panelDoc, 'beforedeactivate', function(ev) { + _processor.isRangeInsideWysiwyg = true; + _processor.lastRange = _processor.getRange(); + }); + + $tx.observe(panelDoc, 'deactivate', function (ev) { + if (_processor.hasControl()) { + return; + } + _processor.isRangeInsideWysiwyg = false; + }); + + $tx.observe(panelDoc, 'activate', function() { + _processor.isRangeInsideWysiwyg = true; + _processor.lastRange = _NULL; + }); + }); +// } + } +); diff --git a/src/main/webapp/daumeditor/js/trex/processor/processor_textarea.js b/src/main/webapp/daumeditor/js/trex/processor/processor_textarea.js new file mode 100644 index 0000000..72ca003 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/processor_textarea.js @@ -0,0 +1,61 @@ +Trex.Canvas.TextAreaProcessor = Trex.Class.create({ + $mixins: [ ], + initialize: function(textarea) { + this.el = textarea; + }, + focus: function() { + this.el.focus(); + }, + blur: function() { + _WIN.focus(); + }, + /** + * 본문의 처음으로 캐럿을 옮긴다. + * @example + * processor.focusOnTop(); + */ + focusOnTop: function() { + var textarea = this.el; + textarea.focus(); + this._selectCharacter(0, 0); + textarea.scrollTop = 0; + }, + focusOnBottom: function() { + var textarea = this.el; + textarea.focus(); + var len = textarea.value.length; + this._selectCharacter(len, len); + textarea.scrollTop = textarea.scrollHeight; + }, + savePosition: function() { + // 왜 사용되었는지 의문.. this.currentPos가 쓰이는 곳이 없음. #FTDUEDTR-1395 +// if (this.el.createTextRange) { +// this.currentPos = _DOC.selection.createRange().duplicate(); +// } + }, + controlEnter: function() { + var _processor = this; + _processor.insertTag("
          ", ""); + }, + insertTag: function(prefix, postfix) { + this.pasteContent(prefix + postfix); + return _TRUE; + }, + pasteContent: function( content/*, newLine, wrapStyle*/){ + this.el.value += content; + }, + _selectCharacter: function(startChar, endChar) { + var textarea = this.el; + if (textarea.setSelectionRange) { // standard + textarea.select(); + textarea.setSelectionRange(startChar, endChar); + + } else if (textarea.createTextRange) { // IE + var range = textarea.createTextRange(); + range.collapse(_TRUE); + range.moveStart("character", startChar); + range.moveEnd("character", endChar); + range.select(); + } + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/processor/processor_trident.js b/src/main/webapp/daumeditor/js/trex/processor/processor_trident.js new file mode 100644 index 0000000..0400716 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/processor_trident.js @@ -0,0 +1,94 @@ +Trex.I.Processor.Trident = { + /** + * Paragraph 를 채운다. + * @private + * @param {Node} node - paragraph 노드 + */ + stuffNode: function(node) { + if($tom.getLength(node) == 0) { + node.innerHTML = ' '; + } + return node; + }, + /** + * @private + * @memberOf Trex.Canvas.ProcessorP + * Trident에서 newlinepolicy가 p일 경우 Enter Key 이벤트가 발생하면 실행한다. + */ + controlEnterByParagraph: function() { + var _bNode = this.findNode('div'); + var _dvNode; + if (!_bNode) { + throw $propagate; + } + + var _pNode = this.findNode('%paragraph'); + if ($tom.kindOf(_pNode, 'p')) { + if($tom.first(_bNode, 'p') == _pNode) { + this.execWithMarker(function(marker) { + _dvNode = $tom.divideParagraph(marker.endMarker); + }); + this.stuffNode(_pNode); + this.stuffNode(_dvNode); + this.moveCaretTo(_dvNode); + } else { + throw $propagate; + } + } else if($tom.kindOf(_pNode, 'li,td,th,dd,dt')) { + throw $propagate; + } else { + _dvNode = this.newParagraph('p'); + this.execWithMarker(function(marker) { + $tom.insertNext(_dvNode, marker.endMarker); + }); + this.moveCaretTo(_dvNode); + } + } +}; + +Trex.module("delete image element @when backspace key event fires", + function(editor, toolbar, sidebar, canvas) { + if ($tx.msie_nonstd) { + canvas.observeKey({ + ctrlKey: _FALSE, + altKey: _FALSE, + shiftKey: _FALSE, + keyCode: Trex.__KEY.BACKSPACE + }, function() { + var _processor = canvas.getProcessor(); + if (_processor.hasControl() && _processor.getControl()) { + try { + var _node = _processor.getControl(); + $tom.remove(_node); + } catch (e) { } + throw $stop; + } + throw $propagate; + }); + } + } +); + + +/*-------------------------------------------------------*/ + +Object.extend(Trex.I.Processor.Trident, { + restoreRange: function() { //TODO: rename + if (!this.isRangeInsideWysiwyg && this.lastRange) { + try { + this.lastRange.select(); + } catch (e) { + var _sel = this.getSel(); + var _type = _sel.type.toLowerCase(); + if (_type === "control") { + _sel.empty(); + var _rng = _sel.createRange(); + _rng.collapse(_FALSE); + _rng.select(); + } + } finally { + this.lastRange = _NULL; + } + } + } +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/processor/processor_trident_standard.js b/src/main/webapp/daumeditor/js/trex/processor/processor_trident_standard.js new file mode 100644 index 0000000..8c091ec --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/processor_trident_standard.js @@ -0,0 +1,106 @@ +Trex.I.Processor.TridentStandard = { + /** + * Paragraph 를 채운다. + * @private + * @param {Node} node - paragraph 노드 + */ + stuffNode: function(node) { + return $tom.stuff(node, this.newNode('br')); + }, + /** + * @private + * @memberOf Trex.Canvas.ProcessorP + * Webkit에서 newlinepolicy가 p일 경우 Enter Key 이벤트가 발생하면 실행한다. + * @param {Event} ev - Enter Key 이벤트 + */ + controlEnterByParagraph: function(ev) { + throw $propagate; + }, + /** + * @private + * @memberOf Trex.Canvas.ProcessorBR + * Webkit에서 newlinepolicy가 br일 경우 Enter Key 이벤트가 발생하면 실행한다. + * @param {Event} ev - Enter Key 이벤트 + */ + controlEnterByLinebreak: function(ev) { + var _processor = this; + var _rng = this.getRange(false); + var _parent = _rng.endContainer.parentNode; + + if (_parent && (_parent.tagName == "P" || _parent.tagName == "DIV" || _parent.tagName == "BODY" || _parent.tagName == "BLOCKQUOTE")) { + + if(_parent.tagName == "BLOCKQUOTE" || $tx.hasClassName(_parent, "txc-textbox") || $tx.hasClassName(_parent, "txc-moreless")){ + $tx.stop(ev); + var _brNode = _processor.win.br(); + _rng.insertNode(_brNode); + _rng.selectNode(_brNode); + _rng.collapse(false); + _brNode = _processor.win.br(); + _rng.insertNode(_brNode); + _rng.selectNode(_brNode); + _rng.collapse(false); + + var _rng = _processor.getRange(false); + _rng.selectNodeContents(_brNode.nextSibling); + + var _sel = _processor.getSel(); + _sel.removeAllRanges(); + _sel.addRange(_rng); + _sel.collapseToStart(); + } + } + }, + /** + * 선택된 영역의 native queryCommandState 값을 얻어온다. + * @param {String} command - 커맨드 명 + * @returns {Boolean} - 해당 영역이 커맨드 상태인지 여부 + * @example + * processor.queryCommandState('bold'); + * @description + * webkit 계열의 브라우저(크롬,사파리)에서 img 에 대한 queryCommandState 가 부정확하여 수정. + */ + queryCommandState: function(command) { + var range = this.getRange(); + if (this.hasControl() && range.collapsed === _FALSE && range.endOffset - range.startOffset === 1) { + if (command === "bold" || command === "underline" || command === "italic" || command === "strikethrough") { + var elem = this.getControl(); + if (elem.tagName === "IMG" || elem.tagName === "BUTTON") { + return _FALSE; + } + } + }//<-여기까지 webkit 계열의 브라우저 queryCommandState 에러 처리. + //위 코드와 관련된 티켓: #FTDUEDTR-1107 + try { + return this.doc.queryCommandState(command); + } catch(e) { return _FALSE; } + }, + /** + * for safari bug. 빈노드에 글자크기, 글자폰트 기억 못시킴. + */ + addDummyNbsp: function (nodes) { + var _node; + if (nodes.length === 1) { + _node = nodes[0]; + if (_node.tagName.toLowerCase() === "span" + && _node.childNodes.length === 1 + && _node.firstChild.nodeType === 3 + && _node.firstChild.data === "") { + _node.firstChild.data = "\u00A0"; + } + } + } +}; + + +/*-------------------------------------------------------*/ + +Object.extend(Trex.I.Processor.TridentStandard, { + restoreRange: function() { //TODO: rename + if (!this.isRangeInsideWysiwyg && this.lastRange) { + var _sel = this.getSel(); + _sel.removeAllRanges(); + _sel.addRange(this.lastRange); + } + } +}); + diff --git a/src/main/webapp/daumeditor/js/trex/processor/processor_webkit.js b/src/main/webapp/daumeditor/js/trex/processor/processor_webkit.js new file mode 100644 index 0000000..cb16e52 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/processor_webkit.js @@ -0,0 +1,91 @@ +Trex.I.Processor.Webkit = { + /** + * Paragraph 를 채운다. + * @private + * @param {Node} node - paragraph 노드 + */ + stuffNode: function(node) { + return $tom.stuff(node, this.newNode('br')); + }, + /** + * @private + * @memberOf Trex.Canvas.ProcessorP + * Webkit에서 newlinepolicy가 p일 경우 Enter Key 이벤트가 발생하면 실행한다. + */ + controlEnterByParagraph: function() { + throw $propagate; + }, + findParagraph: function(node) { + var matched = function(node) { + return $tom.kindOf(node, "div,p,blockquote"); + }; + var mustStop = function(node) { + return $tom.kindOf(node, "body,li,%tablegroup"); + }; + return $tom.findAncestor(node, matched, mustStop); + }, + findAncestorListItem: function(node) { + var matched = function(node) { + return $tom.kindOf(node, "li"); + }; + var mustStop = function(node) { + return $tom.kindOf(node, "body,%tablegroup"); + }; + return $tom.findAncestor(node, matched, mustStop); + }, + divideListItem: function(li) { + var newLi, self = this; + self.execWithMarker(function(marker) { + newLi = $tom.divideTree(li, marker.endMarker); + }); + + if (!$tom.hasUsefulChildren(li, _TRUE)) { + li.innerHTML = ""; + } + if (!$tom.hasUsefulChildren(newLi, _TRUE)) { + newLi.innerHTML = ""; + } + self.stuffNode(li); + self.stuffNode(newLi); + self.moveCaretTo(newLi); + }, + /** + * 선택된 영역의 native queryCommandState 값을 얻어온다. + * @param {String} command - 커맨드 명 + * @returns {Boolean} - 해당 영역이 커맨드 상태인지 여부 + * @example + * processor.queryCommandState('bold'); + * @description + * webkit 계열의 브라우저(크롬,사파리)에서 img 에 대한 queryCommandState 가 부정확하여 수정. + */ + queryCommandState: function(command) { + var range = this.getRange(); + if (this.hasControl() && range.collapsed === _FALSE && range.endOffset - range.startOffset === 1) { + if (command === "bold" || command === "underline" || command === "italic" || command === "strikethrough") { + var elem = this.getControl(); + if (elem.tagName === "IMG" || elem.tagName === "BUTTON") { + return _FALSE; + } + } + }//<-여기까지 webkit 계열의 브라우저 queryCommandState 에러 처리. + //위 코드와 관련된 티켓: #FTDUEDTR-1107 + try { + return this.doc.queryCommandState(command); + } catch(e) { return _FALSE; } + }, + /** + * for safari bug. 빈노드에 글자크기, 글자폰트 기억 못시킴. + */ + addDummyNbsp: function (nodes) { + var _node; + if (nodes.length === 1) { + _node = nodes[0]; + if (_node.tagName.toLowerCase() === "span" + && _node.childNodes.length === 1 + && _node.firstChild.nodeType === 3 + && _node.firstChild.data === "") { + _node.firstChild.data = "\u00A0"; + } + } + } +}; diff --git a/src/main/webapp/daumeditor/js/trex/processor/selection.js b/src/main/webapp/daumeditor/js/trex/processor/selection.js new file mode 100644 index 0000000..caac537 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/processor/selection.js @@ -0,0 +1,672 @@ +/** + * @fileOverview + * native selection, range 객체를 wrapping 한 객체로 Processor 에서 주로 사용된다. + */ +Trex.I.Selection = {}; +Trex.I.Selection.Standard = /** @lends Trex.Canvas.Selection.prototype */{ + /** + * native selection object를 리턴한다. + * @returns {Object} - native selection object + * @example + * txSelection.getSel(); + */ + getSel: function(){ + return this.win.getSelection(); + }, + /** + * 선택된 영역의 텍스트 데이터를 리턴한다. + * @returns {String} - 선택된 영역의 텍스트 데이터 + * @example + * txSelection.getText(); + */ + getText: function() { + return this.getSel().toString(); + }, + /** + * 선택된 영역의 노드를 리턴한다. + * @returns {Element} - 선택된 영역의 노드 + * @example + * txSelection.getNode(); + */ + getNode: function() { + var _rng = this.getRange(); + if (_rng) { + var _startContainer = _rng.startContainer; + if (_startContainer.nodeType == 1) { + if ($tom.isBody(_startContainer)) { + return (_startContainer); + } else { + return (_startContainer.childNodes[_rng.startOffset]); + } + } else { + return (_startContainer.parentNode); + } + } else { + return _NULL; + } + }, + /** + * native range 를 생성한다. + * @returns {Object} - native range 객체 + * @example + * txSelection.createRange(); + */ + createRange: function() { + return this.doc.createRange(); + }, + /** + * native text range 를 생성한다. + * @returns {Object} - native text range 객체 + * @example + * txSelection.createTextRange(); + */ + createTextRange: function() { + return this.doc.createRange(); + }, + /** + * native range object를 리턴한다. + * @returns {Object} - native range 객체 + * @example + * txSelection.getRange(); + */ + getRange: function(collapse) { + var _sel = this.getSel(); + if (_sel && _sel.rangeCount > 0) { + if (collapse == _NULL) { + if (_sel.rangeCount == 1) { //단일 Range = 일반적인 경우 + return _sel.getRangeAt(0); + } else { //복수 Range -> 단일 Range로 변환 + return this.mergeRange(_sel); + } + } else { //Range를 collapse할 경우 + var _rng = _sel.getRangeAt(0); + _rng.collapse(collapse); + return _rng; + } + } else { //Range가 없을 경우 + return this.doc.createRange(); + } + }, + /** + * 선택된 영역의 collapse 여부(선택된 영역이 있는지 여부)를 리턴한다. + * @returns {Boolean} - collapse 여부 + * @example + * txSelection.isCollapsed(); + */ + isCollapsed: function() { + var _sel = this.getSel(); + return (_sel && _sel.isCollapsed); + }, + /** + * 선택된 영역을 collapse 시킨다. + * @param {Boolean} toStart - 위치, 시작 = true + * @example + * txSelection.collapse(true); + */ + collapse: function(toStart) { + var _sel = this.getSel(); + if (_sel && _sel.rangeCount > 0) { + var _rng = _sel.getRangeAt(0); + _rng.collapse(toStart); + } + }, + /** + * 선택된 영역의 컨트롤 노드(img,object,hr,table,button)를 리턴한다. + * @returns {Element} - 선택된 영역의 노드 + * @example + * txSelection.getControl(); + */ + getControl: function() { + var _sel = this.getSel(); + var _node; + if ($tx.opera) { + /* @opera IMG 선택시 isCollapsed 가 true 되는 문제가 있음. */ + _node = _sel.anchorNode.childNodes[_sel.anchorOffset]; + if (_node == _NULL) { + return _NULL; + } + if(_sel.isCollapsed && _node.tagName != "IMG") { + return _NULL; + } + } + else { + if(_sel.isCollapsed) { + return _NULL; + } + _node = _sel.anchorNode.childNodes[_sel.anchorOffset]; + } + if($tom.kindOf(_node, '%control')) { + return _node; + } else { + return _NULL; + } + }, + /** + * 선택된 영역이 컨트롤 노드인지 여부를 리턴한다. + * @returns {Boolean} - 컨트롤 노드인지 여부 + * @example + * txSelection.hasControl(); + */ + hasControl: function() { + return (this.getControl() != _NULL); + }, + /** + * 컨트롤 노드를 선택한다. + * @param {Element} node - 컨트롤 노트 + * @example + * txSelection.selectControl(node); + */ + selectControl: function(node) { + var _rng = this.createRange(); + _rng.selectNode(node); + var _sel = this.getSel(); + _sel.removeAllRanges(); + _sel.addRange(_rng); + }, + /** + * 선택된 영역이 텍스트 데이터 영역의 어떤 위치인지를 리턴한다. + * @returns {Number} - 텍스트 데이터 영역의 어떤 위치인지
          + * 빈 텍스트일 경우 : $tom.__POSITION.__EMPTY_TEXT : -2
          + * 텍스트의 처음 : $tom.__POSITION.__START_OF_TEXT : -1
          + * 텍스트의 중간 : $tom.__POSITION.__MIDDLE_OF_TEXT : 0
          + * 텍스트의 마지막 : $tom.__POSITION.__END_OF_TEXT : 1 + * @example + * txSelection.compareTextPos(); + */ + compareTextPos: function() { + var _rng = this.getRange(); + if (_rng) { + var _startContainer = _rng.startContainer; + if (_startContainer.nodeType == 3) { + if ( _startContainer.textContent.trim().length == 0 ){ + return $tom.__POSITION.__EMPTY_TEXT; + }else if(_rng.startOffset == 0 ) { + return $tom.__POSITION.__START_OF_TEXT; + } else if(_rng.startOffset == _startContainer.textContent.length) { + return $tom.__POSITION.__END_OF_TEXT; + } else { + return $tom.__POSITION.__MIDDLE_OF_TEXT; + } + } + } + return $tom.__POSITION.__END_OF_TEXT; + }, + /** + * @private + * selection에 복수의 range가 있을 경우 range를 합친디ㅏ. + * @returns {Object} - native range 객체 + * @example + * txSelection.mergeRange(sel); + */ + mergeRange: function(sel) { + try { + var _ranges = []; + for(var i=0,_length=sel.rangeCount; i<_length; i++) { + _ranges.push(sel.getRangeAt(i)); + } + sel.removeAllRanges(); + + var _startNode = _ranges[0].startContainer.childNodes[_ranges[0].startOffset]; + var _endNode = _ranges[_length - 1].endContainer.childNodes[_ranges[_length - 1].endOffset - 1]; + + var _rng = this.doc.createRange(); + try { + _rng.setStart(_startNode, 0); + } catch (e) { + _rng.collapse(_TRUE); + } + try { + _rng.setEnd(_endNode, _endNode.childNodes.length); + } catch (e) {} + + sel.addRange(_rng); + return sel.getRangeAt(0); + } catch(e) { + return sel.getRangeAt(0); + } + }, + /** + * @private + * 특정 위치로 range의 시작위치를 지정한다. + * @param {Object} rng - native range 객체 + * @param {Element} node - 특정 부모 노드 + * @param {Number} offset - 노드의 옵셋 + * @example + * txSelection.setStart(range, node, 1); + */ + setStart: function(rng, node, offset) { + try { + rng.setStart(node, offset); + } catch (e) { + rng.collapse(_TRUE); + rng.setStart(node, offset); + } + }, + /** + * @private + * 특정 위치로 range의 끝위치를 지정한다. + * @param {Object} rng - native range 객체 + * @param {Element} node - 특정 부모 노드 + * @param {Number} offset - 노드의 옵셋 + * @example + * txSelection.setEnd(range, node, 1); + */ + setEnd: function(rng, node, offset) { + try { + rng.setEnd(node, offset); + } catch (e) { + rng.collapse(_FALSE); + rng.setEnd(node, offset); + } + }, + /** + * 주어진 range를 선택한다. + * @returns {Object} - native selection 객체 + * @example + * txSelection.selectRange(range); + */ + selectRange: function(rng) { + var _sel = this.getSel(); + _sel.removeAllRanges(); + _sel.addRange(rng); + } +}; + + +Trex.I.Selection.Trident = /** @lends Trex.Canvas.Selection.prototype */{ + /** + * native selection object를 리턴한다. + * @returns {Object} - native selection object + * @example + * txSelection.getSel(); + */ + getSel: function(){ + return this.doc.selection; + }, + /** + * 선택된 영역의 텍스트 데이터를 리턴한다. + * @returns {String} - 선택된 영역의 텍스트 데이터 + * @example + * txSelection.getText(); + */ + getText: function() { + return this.getSel().createRange().text; + }, + /** + * 선택된 영역의 노드를 리턴한다. + * @returns {Element} - 선택된 영역의 노드 + * @example + * txSelection.getNode(); + */ + getNode: function() { + var _sel = this.getSel(); + var _type = _sel.type.toLowerCase(); + if (_type === "control") { + return (_sel.createRange().item(0)); + } else { + return (_sel.createRange().parentElement()); + } + }, + /** + * native range 를 생성한다. + * @returns {Object} - native range 객체 + * @example + * txSelection.createRange(); + */ + createRange: function() { + var _sel = this.getSel(); + return _sel.createRange(); + }, + /** + * native text range 를 생성한다. + * @returns {Object} - native text range 객체 + * @example + * txSelection.createTextRange(); + */ + createTextRange: function() { + return this.doc.body.createTextRange(); + }, + /** + * native range object를 리턴한다. + * @returns {Object} - native range 객체 + * @example + * txSelection.getRange(); + */ + getRange: function(collapse){ + var _sel = this.getSel(); + var _type = _sel.type.toLowerCase(); + if (_type == "none") { + return _sel.createRange() ? _sel.createRange() : function(){ + var _rng = this.doc.body.createTextRange(); + _rng.collapse(_TRUE); + _rng.select(); + return _rng; + }(); + } + if (collapse == _NULL) { + return _sel.createRange(); + } else { + if (_type === "text") { + var _rng = _sel.createRange(); + _rng.collapse(collapse); + _rng.select(); + return _sel.createRange(); + } else { + if (_type === "control") { + _sel.empty(); + } + return _sel.createRange(); + } + } + }, + /** + * 선택된 영역의 collapse 여부(선택된 영역이 있는지 여부)를 리턴한다. + * @returns {Boolean} - collapse 여부 + * @example + * txSelection.isCollapsed(); + */ + isCollapsed: function() { + var _sel = this.getSel(); + var _type = _sel.type.toLowerCase(); + if(_type === "none") { + return _TRUE; + } else if(_type === "control") { + return _TRUE; + } else if(_type === "text") { + var _rng = _sel.createRange(); + return _rng.compareEndPoints('StartToEnd', _rng) == 0; + } else { + return _TRUE; + } + }, + /** + * 선택된 영역을 collapse 시킨다. + * @param {Boolean} toStart - 위치, 시작 = true + * @example + * txSelection.collapse(true); + */ + collapse: function(toStart) { + var _sel = this.getSel(); + var _type = _sel.type.toLowerCase(); + if(_type === "text") { + var _rng = _sel.createRange(); + _rng.collapse(toStart); + _rng.select(); + return _sel.createRange(); + } else { + if(_type === "control") { + _sel.empty(); + } + return _sel.createRange(); + } + }, + /** + * 선택된 영역의 컨트롤 노드(img,object,hr,table,button)를 리턴한다. + * @returns {Element} - 선택된 영역의 노드 + * @example + * txSelection.hasControl(); + */ + getControl: function() { + var _sel = this.getSel(); + var _type = _sel.type.toLowerCase(); + if (_type === "control") { + var _node = _sel.createRange().item(0); + if($tom.kindOf(_node, '%control')) { + return _node; + } else { + return _NULL; + } + } else { + return _NULL; + } + }, + /** + * 선택된 영역이 컨트롤 노드인지 여부를 리턴한다. + * @returns {Boolean} - 컨트롤 노드인지 여부 + * @example + * txSelection.hasControl(); + */ + hasControl: function() { + var _sel = this.getSel(); + var _type = _sel.type.toLowerCase(); + if (_type === "control") { + return _TRUE; + } else { + return _FALSE; + } + }, + /** + * 컨트롤 노드를 선택한다. + * @param {Element} node - 컨트롤 노트 + * @example + * txSelection.selectControl(node); + */ + selectControl: function(node) { + var _rng = this.doc.body.createControlRange(); + _rng.add(node); + _rng.select(); + }, + /** + * 선택된 영역이 텍스트 데이터 영역의 어떤 위치인지를 리턴한다. + * @returns {Number} - 텍스트 데이터 영역의 어떤 위치인지
          + * 텍스트의 처음 : $tom.__POSITION.__START_OF_TEXT : -1
          + * 텍스트의 중간 : $tom.__POSITION.__MIDDLE_OF_TEXT : 0
          + * 텍스트의 마지막 : $tom.__POSITION.__END_OF_TEXT : 1 + * @example + * txSelection.compareTextPos(); + */ + compareTextPos: function() { + var _sel = this.getSel(); + var _type = _sel.type.toLowerCase(); + if(_type === "none") { + var _rng = _sel.createRange(); + var _rng2 = _rng.duplicate(); + _rng2.moveToElementText(_rng.parentElement()); + if ( _rng2.text.trim().replace(Trex.__WORD_JOINER_REGEXP, "").length == 0 ){ + return $tom.__POSITION.__EMPTY_TEXT; + } else if(_rng.compareEndPoints('StartToStart', _rng2) == 0) { + return $tom.__POSITION.__START_OF_TEXT; + } else if(_rng.compareEndPoints('EndToEnd', _rng2) == 0) { + return $tom.__POSITION.__END_OF_TEXT; + } else { + return $tom.__POSITION.__MIDDLE_OF_TEXT; + } + } + return $tom.__POSITION.__END_OF_TEXT; + }, + /** + * @private + * @reference http://msdn.microsoft.com/en-us/library/ms536745(VS.85).aspx + StartToEnd - Move the start of the TextRange object to the end of the specified oTextRange parameter. + StartToStart - Move the start of the TextRange object to the start of the specified oTextRange parameter. + EndToStart - Move the end of the TextRange object to the start of the specified oTextRange parameter. + EndToEnd - Move the end of the TextRange object to the end of the specified oTextRange parameter. + */ + transTextRange: function(rng, node, offset, toStart) { + var _pntRng = this.createTextRange(); + + var _pntNode = this.win.span(Trex.__WORD_JOINER); + $tom.insertAt(_pntNode, node); + _pntRng.moveToElementText(_pntNode); + $tom.remove(_pntNode); + + _pntRng.collapse(_TRUE); + _pntRng.moveStart('character', offset); + + if (toStart) { + rng.setEndPoint('StartToStart', _pntRng); + } else { + rng.setEndPoint('EndToEnd', _pntRng); + } + + return rng; + }, + /** + * @private + * 특정 위치로 range의 시작위치를 지정한다. + * @param {Object} rng - native range 객체 + * @param {Element} node - 특정 부모 노드 + * @param {Number} offset - 노드의 옵셋 + * @example + * txSelection.setStart(range, node, 1); + */ + setStart: function(rng, node, offset) { + try { + this.transTextRange(rng, node, offset, _TRUE); + } catch (e) { + console.log(e) + } + return rng; + }, + /** + * @private + * 특정 위치로 range의 끝위치를 지정한다. + * @param {Object} rng - native range 객체 + * @param {Element} node - 특정 부모 노드 + * @param {Number} offset - 노드의 옵셋 + * @example + * txSelection.setEnd(range, node, 1); + */ + setEnd: function(rng, node, offset) { + try { + this.transTextRange(rng, node, offset, _FALSE); + } catch (e) { + console.log(e) + } + return rng; + }, + /** + * 주어진 range를 선택한다. + * @returns {Object} - native selection 객체 + * @example + * txSelection.selectRange(range); + */ + selectRange: function(rng) { + rng.select(); + } +}; + +Trex.I.Selection.TridentStandard = { + /** + * 선택된 영역의 컨트롤 노드(img,object,hr,table,button)를 리턴한다. + * @returns {Element} - 선택된 영역의 노드 + * @example + * txSelection.getControl(); + */ + getControl: function() { + var _sel = this.getSel(); + if(_sel.isCollapsed) { + return null; + } + if ($tom.isElement(_sel.anchorNode)) { + var _node = _sel.anchorNode.childNodes[_sel.anchorOffset]; + if ($tom.kindOf(_node, '%control')) { + return _node; + } else { + return null; + } + } + //button + var _prevNode = $tom.previous(_sel.focusNode); + var _nextNode = $tom.next(_sel.anchorNode); + if(_prevNode == _nextNode) { + return $tom.first(_prevNode, '%control'); + } else { + return null; + } + }, + /** + * 컨트롤 노드를 선택한다. + * @param {Element} node - 컨트롤 노트 + * @example + * txSelection.selectControl(node); + */ + selectControl: function(node) { + var _rng = this.createRange(); + _rng.selectNode(node); + var _sel = this.getSel(); + _sel.removeAllRanges(); + _sel.addRange(_rng); + } +}; + + +Trex.I.Selection.Gecko = { + +}; + +Trex.I.Selection.Webkit = { + /** + * 선택된 영역의 컨트롤 노드(img,object,hr,table,button)를 리턴한다. + * @returns {Element} - 선택된 영역의 노드 + * @example + * txSelection.getControl(); + */ + getControl: function() { + var _sel = this.getSel(); + if(_sel.isCollapsed) { + return _NULL; + } + if ($tom.isElement(_sel.anchorNode)) { + var _node = _sel.anchorNode.childNodes[_sel.anchorOffset]; + if ($tom.kindOf(_node, '%control')) { + return _node; + } else { + return _NULL; + } + } + //button + var _prevNode = $tom.previous(_sel.focusNode); + var _nextNode = $tom.next(_sel.anchorNode); + if(_prevNode == _nextNode) { + return $tom.first(_prevNode, '%control'); + } else { + return _NULL; + } + }, + /** + * 컨트롤 노드를 선택한다. + * @param {Element} node - 컨트롤 노트 + * @example + * txSelection.selectControl(node); + */ + selectControl: function(node) { + var _rng = this.createRange(); + _rng.selectNode(node); + var _sel = this.getSel(); + _sel.removeAllRanges(); + _sel.addRange(_rng); + } +}; + +Trex.I.Selection.Presto = { + +}; + +/** + * native selection, range 객체를 wrapping 한 객체로
          + * browser에 따라 필요한 함수들을 mixin한다.
          + * 주로 Processor와 연관된 객체에서 호출하며,
          + * processor.getTxSel()를 통해서 txSelection를 얻어서 사용한다.
          + * native selection 과 구분짓기 위해서 txSelection로 명명한다. + * + * @class + * @param {Object} processor - Processor 객체 + */ +Trex.Canvas.Selection = Trex.Class.create(/** @lends Trex.Canvas.Selection.prototype */{ + /** @ignore */ + $mixins: [ + Trex.I.Selection.Standard, + (($tx.msie_nonstd)? Trex.I.Selection.Trident: {}), + (($tx.msie_std)? Trex.I.Selection.TridentStandard: {}), + (($tx.gecko)? Trex.I.Selection.Gecko: {}), + (($tx.webkit)? Trex.I.Selection.Webkit: {}), + (($tx.presto)? Trex.I.Selection.Presto: {}) + ], + initialize: function(processor) { + this.processor = processor; + this.win = processor.win; + this.doc = processor.doc; + } +}); + diff --git a/src/main/webapp/daumeditor/js/trex/resizer.js b/src/main/webapp/daumeditor/js/trex/resizer.js new file mode 100644 index 0000000..318f79e --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/resizer.js @@ -0,0 +1,170 @@ +Trex.module("new Trex.Resizer", + function(editor, toolbar, sidebar, canvas, config){ + var _initializedId = config.initializedId || ""; + var cfg = TrexConfig.get("resizer", config); + var _resizer = _NULL; + + editor.setMinHeight = function(h) { + return _resizer.setMinHeight(h); + }; + editor.restoreMinHeight = function() { + return _resizer.restoreMinHeight(); + }; + if (Trex.available(cfg, "resizer" + _initializedId)) { + _resizer = new Trex.Resizer(editor, cfg); + } + } +); +TrexConfig.add({ + 'resizer': { + minHeight: 200 + } +}); +Trex.Resizer = Trex.Class.create({ + $const: { + __Identity: 'resizer' + }, + $mixins: [ + Trex.I.JobObservable + ], + initialize: function(editor, config) { + var _presentHeight = 0; + if(!editor) { + return; + } + this.config = config; + + var _initializedId = editor.getInitializedId(); + var _elBar = this.elBar = $tx("tx_resizer" + _initializedId); + if(!_elBar) { + return; + } + if($tx.msie_ver == '5.5'){ + _elBar.setAttribute('align', 'center'); + } + + this.resizeHeightAtService = function( height ) { //NOTE: 에디터를 리사이즈하고 나서 실행할 서비스 콜백 + if(typeof resizeHeight == "function") { + resizeHeight( height ); + } + }; + this.resizingHeightAtService = function( height ) { //NOTE: 에디터를 리사이즈하는 중에 실행할 서비스 콜백 ex) iframe 길이 늘리기 + if(typeof resizingEditorHeight == "function") { + resizingEditorHeight( height ); + } + }; + this.minDragHeight = config.minHeight; + var _wysiwygDoc; + this.startDrag = function(ev) { + var _canvas = editor.getCanvas(); + var _panel = _canvas.getCurrentPanel(); + if(_panel == _NULL) { + return; + } + + var _position = _panel.getPosition(); + this.panelHeight = _position.height; + this.dragStartPosY = ev.clientY; + this.isDragging = _TRUE; + $tx.observe(_DOC, 'mousemove', this.documentDraggingHandler); + $tx.observe(_DOC, 'mouseup', this.stopDragHandler); + if(_panel.getName() == Trex.Canvas.__WYSIWYG_MODE) { + this.panelTop = _position.y; + _wysiwygDoc = _panel.getDocument(); + if(_wysiwygDoc == _NULL) { + return; + } + _canvas.fireJobs('canvas.height.beforechange'); + $tx.observe(_wysiwygDoc, 'mousemove', this.wysiwygDraggingHandler); + $tx.observe(_wysiwygDoc, 'mouseup', this.stopDragHandler); + } + $tx.stop(ev); + }; + + this.stopDrag = function(ev){ + var _canvas = editor.getCanvas(); + var _panel = _canvas.getCurrentPanel(); + if(_panel == _NULL) { + return; + } + this.isDragging = _FALSE; + + $tx.stopObserving(_DOC, 'mousemove', this.documentDraggingHandler); + $tx.stopObserving(_DOC, 'mouseup', this.stopDragHandler); + if(_wysiwygDoc == _NULL) { + return; + } + $tx.stopObserving(_wysiwygDoc, 'mousemove', this.wysiwygDraggingHandler); + $tx.stopObserving(_wysiwygDoc, 'mouseup', this.stopDragHandler); + _wysiwygDoc = _NULL; + + this.resizeHeightAtService(_presentHeight); + _canvas.fireJobs('canvas.height.afterchange'); + $tx.stop(ev); + }; + + this.dragingAtDocument = function(ev) { + var _canvas = editor.getCanvas(); + if (this.isDragging) { + var _panel = _canvas.getCurrentPanel(); + if(_panel == _NULL) { + return; + } + try { + var _height = Math.max((this.panelHeight + ev.clientY - this.dragStartPosY), this.minDragHeight.parsePx()).toPx(); + _panel.setPanelHeight(_height); + _presentHeight = _height; + _canvas.fireJobs('canvas.height.change', _height); + this.resizingHeightAtService(_height); + } catch(e) { + console.log(e); + } + } + $tx.stop(ev); + }; + + this.dragingAtWysiwyg = function(ev) { + var _canvas = editor.getCanvas(); + if (this.isDragging) { + var _panel = _canvas.getCurrentPanel(); + if(_panel == _NULL) { + return; + } + try { + var _scrollTop = _DOC.body.scrollTop || _DOC_EL.scrollTop || _WIN.pageYOffset; + var canvasPos = _canvas.getCanvasPos(); // canvas 위치를 조정하지 않아서 높이 잘못 계산한 부분 수정 #FTDUEDTR-1317 + var _height = Math.max((this.panelHeight + ev.clientY + canvasPos.y - this.dragStartPosY + this.panelTop - _scrollTop), this.minDragHeight.parsePx()).toPx(); + _panel.setPanelHeight(_height); + _canvas.fireJobs('canvas.height.change', _height); + } catch (e) { + console.log(e); + } + } + $tx.stop(ev); + }; + + this.startDragHandler = this.startDrag.bindAsEventListener(this); + this.stopDragHandler = this.stopDrag.bindAsEventListener(this); + this.documentDraggingHandler = this.dragingAtDocument.bindAsEventListener(this); + this.wysiwygDraggingHandler = this.dragingAtWysiwyg.bindAsEventListener(this); + this.isDragging = _FALSE; + + $tx.observe(_elBar, 'mousedown', this.startDragHandler); + + var _canvas = editor.getCanvas(); + _canvas.observeJob(Trex.Ev.__CANVAS_FULL_SCREEN_CHANGE, function() { + $tx.hide(_elBar); + }); + + _canvas.observeJob(Trex.Ev.__CANVAS_NORMAL_SCREEN_CHANGE, function() { + $tx.show(_elBar); + }); + + }, + setMinHeight: function(height) { + return this.minDragHeight = height.toPx(); + }, + restoreMinHeight: function() { + return this.minDragHeight = this.config.minHeight || 200; + } +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/saver.js b/src/main/webapp/daumeditor/js/trex/saver.js new file mode 100644 index 0000000..3b05ef3 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/saver.js @@ -0,0 +1,211 @@ +Trex.install("editor.getSaver & editor.getDataAsJSON & editor.setDataByJSON", + function(editor, toolbar, sidebar, canvas, config){ + var _saver = new Trex.Save(editor, toolbar, sidebar, canvas, config); + editor.getSaver = function() { + return _saver; + }; + + editor.getDataAsJSON = function() { + var _content = canvas.getContent(); // getContent() of current mode + var _validator = new Trex.Validator(); + if(!_validator.exists(_content)) { + return _NULL; + } + return { + 'inputmode': canvas.getCurrentPanel().getName(), + 'content': _content, + 'attachments': function() { + var _attachments = sidebar.getAttachments(); // all getAttachments() + return editor.getEntryProxy().getAttachments(_attachments, _TRUE); + }(), + 'resultBox': function() { + var _resultBox = editor.getResultBox(); + var datas = []; + _resultBox.datalist.each(function(entry){ + datas.push(entry.data); + }); + return datas; + }(), + 'formfield': editor.getForm().getFormField() + }; + }; + + editor.setDataByJSON = function(jsonData) { + if(!jsonData) { + return; + } + var _editorMode = canvas.mode; + var _inputMode = jsonData.inputmode || _editorMode; + if (_inputMode == 'original') { //save + } else if(_inputMode != _editorMode) { + canvas.fireJobs(Trex.Ev.__CANVAS_MODE_INITIALIZE, _editorMode, _inputMode); + canvas.changeMode(_inputMode); + } + + var _content = jsonData.content; + + if(jsonData.attachments) { + editor.getEntryProxy().setAttachments(jsonData.attachments, _content); + } + + if(_content) { + _content = editor.getDocParser().convertAtLoad(_content, _editorMode, _inputMode); //onlyHTML + canvas.initContent(_content); + } + + if (jsonData.resultBox) { + jsonData.resultBox.each(function(data){ + var _actor; + _actor = sidebar.searchers[data._meta.type]; + if (_actor) { + _actor.execReload(data, _content); + } + }); + } + + sidebar.syncSidebar(); //sync + + if(jsonData.formfield) { + editor.getForm().setFormField(jsonData.formfield); + } + }; + } +); + +Trex.Save = Trex.Class.create({ + editor: _NULL, + toolbar: _NULL, + sidebar: _NULL, + canvas: _NULL, + config: _NULL, + form: _NULL, + initialize: function(editor, toolbar, sidebar, canvas, config) { + this.editor = editor; + this.toolbar = toolbar; + this.sidebar = sidebar; + this.canvas = canvas; + this.config = config; + this.form = editor.getForm(); + this.docparser = editor.getDocParser(); + this.entryproxy = editor.getEntryProxy(); + }, + save: function() { + try { + if (typeof validForm == "function") { + if (!validForm(this.editor)) { + return _FALSE; + } + } + if (typeof setForm == "function") { + if (!setForm(this.editor)) { + return _FALSE; + } + } + return _TRUE; + } catch(e) { + this.editor.fireJobs(Trex.Ev.__RUNTIME_EXCEPTION, e); + return _FALSE; + } + }, + submit: function() { + if(this.save()) { + this.editor.fireJobs(Trex.Ev.__ON_SUBMIT, this.editor); + if ( this.config.save && typeof this.config.save.onSave == "function" ){ + var externalSaveHandler = this.config.save.onSave; + externalSaveHandler(); + } else { + this.form.submit(); + } + } + }, + getContent: function(outputMode) { + var _canvas = this.canvas; + + //에디터모드, 출력모드 + var _editorMode = _canvas.mode; + var _outputMode = outputMode || "original"; + + var _content = _canvas.getContent(); // getContent() of current mode + _content = this.docparser.convertAtSave(_content, _editorMode, _outputMode); + + return _content; + }, + getAttachments: function(type, all) { + all = all || _FALSE; + var _attachments = this.sidebar.getAttachments(type); // all getAttachments() + return this.entryproxy.getAttachments(_attachments, all); + }, + getEmbeddedData: function(type) { + return this.sidebar.getEmbeddedData(type); + }, + getResults: function(type) { + return this.sidebar.getResults(type); + }, + /* + data = { + content: "string", + inputmode: "string", + attachments: [{ + attacher: "string", + data: {object} + }] + } + */ + load: function(jsonData) { //NOTE: data format = JSON + jsonData = { + 'inputmode': (!jsonData.inputmode || jsonData.inputmode == 'html')? 'original': jsonData.inputmode, + 'content': function() { + var _contentObj = jsonData.content; + if (typeof _contentObj == "string") { + return jsonData.content; + } else if (_contentObj && _contentObj.nodeType && (_contentObj.nodeType == 1)) { + return jsonData.content.value; + } else { + return ''; + } + }(), + 'attachments': jsonData.attachments + }; + this.editor.fireJobs(Trex.Ev.__EDITOR_LOAD_DATA_BEGIN, jsonData); + if (!jsonData) { + throw new Error("[Exception]Trex.Save : not exist argument(data)"); + } + if (typeof loadForm == "function") { + loadForm(this.editor, jsonData); + } + + try { //#FTDUEDTR-1111 + this.setDataByJSONToEditor(jsonData); + } catch (error) { + alert(' - Error: ' + error.message + '\n소스보기 모드로 전환합니다.\n잘못된 HTML이 있는지 확인해주세요.'); + jsonData.inputmode = Trex.Canvas.__HTML_MODE; + try { + this.setDataByJSONToEditor(jsonData); + } catch(ignore) {} + } + + if (typeof postLoad == "function") { + postLoad(this.editor, jsonData); + } + this.editor.fireJobs(Trex.Ev.__EDITOR_LOAD_DATA_END); + }, + setDataByJSONToEditor: function (jsonData) { + this.editor.setDataByJSON(jsonData); + }, + makeField: function() { + var _sidebar = this.sidebar; + var _form = this.form; + + //NOTE: create field content + var _content = this.getContent(); + _form.createField(tx.textarea({ name: "tx_content", style: { display: "none" } }, _content)); + + //NOTE: create field attach + var _fields = _sidebar.getFields(); + _fields.each(function(field) { + _form.createField(tx.input({ type: "hidden", name: field.name, value: field.value })); + }); + } + +}); + diff --git a/src/main/webapp/daumeditor/js/trex/sidebar.js b/src/main/webapp/daumeditor/js/trex/sidebar.js new file mode 100644 index 0000000..3a11655 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/sidebar.js @@ -0,0 +1,310 @@ +/** + * @fileoverview + * Trex.Sidebar, Trex.EntryBox, Trex.Entry, Trex.Actor를 포함하고 있다. + */ + +/** + * 에디터와 외부 component사이의 연동을 하는 class + * + * @class + * @param {object} editor + * @param {object} config + */ +Trex.Sidebar = Trex.Class.create({ + /** @ignore */ + $const: { + __REG_ENTRY_ATTR_PAIR_Q: new RegExp("([\\w]+)=\"([^\"]+)\"", "g"), + __REG_ENTRY_ATTR_PAIR_NQ: new RegExp("([\\w]+)=([\\w]+)", "g") + }, + /** @ignore */ + $mixins: [ + Trex.I.JobObservable + ], + entryboxRegistry: _NULL, + initialize: function(editor) { + var _canvas = editor.getCanvas(); + + this.entryboxRegistry = {}; + this.getFields = function() { + var fields = []; + for(var i in this.entryboxRegistry){ + var entrybox = this.entryboxRegistry[i]; + fields = fields.concat(entrybox.getFields()); + } + return fields; + }; + + this.syncSidebar = function() { + var _content = _canvas.getContent(); + for(var i in this.entryboxRegistry){ + this.entryboxRegistry[i].syncBox(_content); + } + }; + this.emptyEntries = function() { + for(var i in this.entryboxRegistry){ + this.entryboxRegistry[i].empty(); + } + }; + + _canvas.observeJob(Trex.Ev.__CANVAS_PANEL_DELETE_SOMETHING, function() { + this.syncSidebar(); + }.bind(this)); + } +}); + + +/** + * Trex.entryBox + * @class + */ +Trex.EntryBox = Trex.Class.draft({ + /** @ignore */ + $mixins: [ + Trex.I.JobObservable + ], + autoSeq: 0, + datalist: [], + initialize: function() { + throw new Error("[Exception]Trex.EntryBox : not implements function(initialize)"); + }, + newSeq: function() { + return (++this.autoSeq); + }, + syncSeq: function(existedSeq) { + this.autoSeq = (existedSeq > this.autoSeq)? existedSeq: this.autoSeq; + return existedSeq; + }, + empty: function() { + this.fireJobs(Trex.Ev.__ENTRYBOX_ALL_ENTRY_REMOVED); + this.datalist = []; + }, + append: function(entry) { + this.datalist.push(entry); + this.fireJobs(Trex.Ev.__ENTRYBOX_ENTRY_ADDED, entry); + }, + modify: function(entry) { + this.fireJobs(Trex.Ev.__ENTRYBOX_ENTRY_MODIFIED, entry); + }, + remove: function(entry) { + entry.deletedMark = _TRUE; + this.fireJobs(Trex.Ev.__ENTRYBOX_ENTRY_REMOVED, entry); + }, + syncBox: function(content) { + this.datalist.each(function(entry) { + entry.execSync(content); + }); + }, + getFields: function() { + var _fields = []; + this.datalist.each(function(entry) { + _fields.push(entry.getField()); + }); + return _fields.findAll(function(field) { + return (field != _NULL); + }); + }, + getEntries: function(name) { + if(!name) { //all file + return this.datalist; + } + var _entries = []; + this.datalist.each( + function(entry){ + if(entry.type == name){ + _entries.push(entry); + } + } + ); + return _entries; + } +}); + +/** + * Trex.Entry + * @class + */ +Trex.Entry = Trex.Class.draft({ + /** @ignore */ + $mixins: [ + Trex.I.JobObservable + ], + existStage: _FALSE, + deletedMark: _FALSE, + initialize: function(/*actor, canvas, entryBox, config*/) { + throw new Error("[Exception]Trex.Entry : not implements function(initialize)"); + }, + setExistStage: function(existStage) { + this.existStage = existStage; + }, + execRegister: function() { + this.register(); + this.entryBox.append(this); + this.setExistStage(_TRUE); + }, + execReload: function() { + if(this.reload) { + this.reload(); + } + this.entryBox.append(this); + this.exchangeHandlerAtReload(); + }, + execRemove: function() { + this.remove(); + this.entryBox.remove(this); + }, + execReplace: function(oldReg) { + this.replace(oldReg); + this.entryBox.modify(this); + this.setExistStage(_TRUE); + }, + execAppend: function() { + this.register(); + this.setExistStage(_TRUE); + }, + execSync: function(content) { + this.setExistStage(this.checkExisted(content)); + }, + checkExisted: function(content) { + if(this.canvas.isWYSIWYG()) { + return (content.search(this.regHtml) > -1); + } else { + return (content.search(this.regText) > -1); + } + }, + getChangedContent: function(content, rex, str, param) { + var _existStage = _FALSE; + if(content.search(rex) > -1) { + _existStage = _TRUE; + if (this.actor.canResized) { + content = this.getChangedContentWithAttr(content, rex, str, param); + } else { + content = content.replace(rex, str); + } + } + this.setExistStage(_existStage); + return content; + }, + getChangedContentFromHtml: function(content) { + return this.getChangedContent(content, this.regHtml, this.dispText, ["id", "class"]); + }, + getChangedContentToHtml: function(content) { + return this.getChangedContent(content, this.regText, this.dispHtml); + }, + getChangedContentAtSave: function(content) { //Only HTML + return this.getChangedContent(content, this.regHtml, this.saveHtml, ["id", "class"]); + }, + getChangedContentAtLoad: function(content) { //Only HTML + return this.getChangedContent(content, this.regLoad, this.dispHtml); + }, + getChangedContentWithAttr: function(content, reg, disp, excepts) { + excepts = excepts || []; + var _attrMap = Trex.Util.getAllAttributes(disp); + + var _getChangedTag = function(source) { + var _tag = Trex.Util.getMatchValue(/<([a-z]*)/i, disp, 1); + var _attr = ["<"+_tag.toLowerCase()]; + var _overMap = Trex.Util.getAllAttributes(source); + + for(var _name in _attrMap) { + if (["width", "height"].contains(_name)) { + if(!_overMap[_name]) { + _attr.push(_name + "=\"" + _attrMap[_name] + "\""); + } + } else { + _attr.push(_name + "=\"" + _attrMap[_name] + "\""); + } + } + + for(var _name in _overMap) { + if(!excepts.contains(_name)) { + if (["width", "height"].contains(_name)) { + _attr.push(_name + "=\"" + _overMap[_name] + "\""); + } else if(!_attrMap[_name]) { + _attr.push(_name + "=\"" + _overMap[_name] + "\""); + } + } + } + _attr.push("/>"); + return _attr.join(" "); + }; + + var _orgContent = content; + var _matchs; + reg.lastIndex = 0; + while ((_matchs = reg.exec(_orgContent)) != _NULL) { + var _textOrg = _matchs[0]; + var _dispTrans = _getChangedTag(_textOrg); + var _regOrg = _textOrg.getRegExp(); + content = content.replace(new RegExp(_regOrg, "gmi"), _dispTrans); + } + return content; + }, + getField: function() { + if(!this.field) { + return _NULL; + } + return { + name: this.field.name, + value: [this.field.value, this.existStage].join('|') + }; + }, + exchangeHandlerAtReload: function(){} +}); + +/** + * Trex.Actor + * @class + */ +Trex.Actor = Trex.Class.draft({ + /** @ignore */ + $mixins: [ + Trex.I.JobObservable + ], + isDisabled: _FALSE, + initialize: function(/*config, canvas*/) { + throw new Error("[Exception]Trex.Actor : not implements function(initialize)"); + }, + execAttach: function(data, type) { + var _entry = this.createEntry(this.getDataForEntry(data), type); + _entry.execRegister(); + this.canvas.fireJobs('canvas.' + (type || this.constructor.__Identity) + '.added', _entry); + }, + getDatalist: function(){ + return this.entryBox.getEntries(this.name); + }, + execReattach: function(data, type) { + var datalist = this.getDatalist(); + var parsedData = this.getDataForEntry(data); + if(datalist.length < 1) { + var _entry = this.createEntry(parsedData, type); + _entry.execRegister(); + } else { + var _entry = datalist[0]; + var _oldReg = { + regHtml: _entry.regHtml, + regText: _entry.regText + }; + _entry.setProperties(parsedData); + _entry.execReplace(_oldReg); + } + }, + execReload: function(data, content, type) { + var _dataForEntry = this.getDataForEntry(data, content); + if (_dataForEntry) { // FTDUEDTR-1361 + var _entry = this.createEntry(_dataForEntry, type); + _entry.execReload(); + } + }, + existEntry: function() { + var list = this.getDatalist().findAll(function(entry) { + return entry.deletedMark != _TRUE; + }); + return list.length !== 0; + }, + getFirstEntryData: function() { + var list = this.getDatalist().findAll(function(entry) { + return entry.deletedMark != _TRUE; + }); + return ((list.length == 0)? _NULL: list[0].data); + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/advanced.js b/src/main/webapp/daumeditor/js/trex/tool/advanced.js new file mode 100644 index 0000000..ef4bb40 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/advanced.js @@ -0,0 +1,83 @@ +/** + * @fileoverview + * toolbar의 접힌 부분을 열고닫는 '더보기' Icon을 위해 필요한 configuration과 Class Trex.Tool.Advanced 를 포함 + * + */ +TrexConfig.addTool( + "advanced", + { + sync: _FALSE, + status: _TRUE, + opened: _FALSE + } +); + +/** + * Trex.Tool.Advanced + * + * @class + * @extends Trex.Tool + */ +Trex.Tool.Advanced = Trex.Class.create({ + $const: { + __Identity: 'advanced' + }, + $extend: Trex.Tool, + /** + * instance가 생성될 때 실행되며 필요한 UI Component 및 Event handler를 생성한다. + * + * @memberOf Trex.Tool.Advanced.prototype + * @param {Object} config + */ + oninitialized: function(config) { + var self = this; + var _toolbar = this.toolbar; + + var _elBasic = _toolbar.el; + self.opened = _FALSE; + var _elAdvanced = $tom.collect(_elBasic.parentNode, 'div.tx-toolbar-advanced'); + if(!_elAdvanced) { + return; + } + + _toolbar.observeJob(Trex.Ev.__CMD_ADVANCED_FOLD, function() { + + $tx.hide(_elAdvanced); + $tx.removeClassName(_elBasic, 'tx-toolbar-basic-open'); + }); + + _toolbar.observeJob(Trex.Ev.__CMD_ADVANCED_SPREAD, function() { + + $tx.show(_elAdvanced); + $tx.addClassName(_elBasic, 'tx-toolbar-basic-open'); + }); + + var _toolHandler = function() { + if(self.opened) { + _toolbar.fireJobs(Trex.Ev.__CMD_ADVANCED_FOLD); + } else { + _toolbar.fireJobs(Trex.Ev.__CMD_ADVANCED_SPREAD); + } + self.opened = !self.opened; + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button(this.buttonCfg), + /* menu */ + _NULL, + /* handler */ + _toolHandler + ); + + if(config.opened == _TRUE) { + this.forceOpen(); + } + }, + forceOpen: function(){ + this.button.pushedState(); + this.toolbar.fireJobs(Trex.Ev.__CMD_ADVANCED_SPREAD); + this.opened = _TRUE; + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/aligncenter.js b/src/main/webapp/daumeditor/js/trex/tool/aligncenter.js new file mode 100644 index 0000000..b5afa60 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/aligncenter.js @@ -0,0 +1,88 @@ +(function() { + /** + * @fileoverview + * Toolbar의 AlignCenter Icon을 위해 필요한 configuration과 Class Trex.Tool.AlignCentrer를 포함 + * + */ + TrexConfig.addTool( + "aligncenter", + { + sync: _TRUE, + status: _TRUE, + hotKey: { + ctrlKey: _TRUE, // ctrl + . + keyCode: 190 + } + } + ); + + /* + * Text : align center + * Image : float none + align center + */ + var __TextAlignProperty = "center"; + var __ImageFloatProperty = 'none'; + var __ImageClearProperty = 'none'; + var paragraphProp = { + 'align': _NULL, + 'style': { + 'textAlign': __TextAlignProperty + } + }; + + Trex.Tool.AlignCenter = Trex.Class.create({ + $const: { + __Identity: 'aligncenter', + __ImageModeProps: { + 'paragraph': paragraphProp, + 'image': { + 'style': { + 'clear': __ImageClearProperty, + 'float': __ImageFloatProperty, + 'marginLeft': "", + 'marginRight': "" + } + } + }, + __TextModeProps: { + 'paragraph': paragraphProp, + 'button': { + 'style': { + 'margin': '0 auto' + } + } + } + }, + $extend: Trex.Tool, + $mixins: [Trex.I.AlignExecution], + oninitialized: function(config) { + var self = this; + self.imageAlignMode = _FALSE; + + self.weave(new Trex.Button(self.buttonCfg), _NULL, self.handler); + self.bindKeyboard(config.hotKey, self.handler.bind(self)); + self.startSyncButtonWithStyle(); + }, + handler: function() { + var self = this; + var canvas = self.canvas; + var toolbar = self.toolbar; + canvas.execute(function(processor) { + self.executeAlign(processor); + var alignMode = self.getAlignMode(processor); + if (alignMode == "image") { + toolbar.fireJobs(Trex.Ev.__CMD_ALIGN_IMG_CENTER); + } else if (alignMode == "text") { + toolbar.fireJobs(Trex.Ev.__CMD_ALIGN_CENTER); + } + }); + canvas.triggerQueryStatus(); + }, + startSyncButtonWithStyle: function() { + var self = this; + self.canvas.observeJob(Trex.Ev.__CANVAS_PANEL_QUERY_STATUS, function() { + self.syncButtonState(); + }); + } + }); +})(); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/alignfull.js b/src/main/webapp/daumeditor/js/trex/tool/alignfull.js new file mode 100644 index 0000000..3ed6bae --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/alignfull.js @@ -0,0 +1,83 @@ +(function() { + /** + * @fileoverview + * Toolbar의 AlignFull Icon을 위해 필요한 configuration과 Class Trex.Tool.AlignFull을 포함 + * + */ + TrexConfig.addTool( + "alignfull", + { + sync: _TRUE, + status: _TRUE + } + ); + + /* + * Text : align full + * Image : float right + */ + var __TextAlignProperty = "justify"; + var __ImageFloatProperty = 'right'; + var __ImageClearProperty = 'both'; + var __ImageMarginProperty = "8px"; + var __ImageNoMarginProperty = ""; + + Trex.Tool.AlignFull = Trex.Class.create({ + $const: { + __Identity: 'alignfull', + __ImageModeProps: { + 'image': { + 'style': { + 'clear': __ImageClearProperty, + 'float': __ImageFloatProperty, + 'marginLeft': __ImageMarginProperty, + 'marginRight': __ImageNoMarginProperty + } + } + }, + __TextModeProps: { + 'paragraph': { + 'align': _NULL, + 'style': { + 'textAlign': __TextAlignProperty + } + }, + 'button': { + 'style': { + 'margin': '0' + } + } + } + }, + $extend: Trex.Tool, + $mixins: [Trex.I.AlignExecution], + oninitialized: function() { + var self = this; + self.imageAlignMode = _FALSE; + + self.weave(new Trex.Button(self.buttonCfg), _NULL, self.handler); + self.startSyncButtonWithStyle(); + }, + handler: function() { + var self = this; + var canvas = self.canvas; + var toolbar = self.toolbar; + canvas.execute(function(processor) { + self.executeAlign(processor); + var alignMode = self.getAlignMode(processor); + if (alignMode == "image") { + toolbar.fireJobs(Trex.Ev.__CMD_ALIGN_IMG_FLOAT_RIGHT); + } else if (alignMode == "text") { + toolbar.fireJobs(Trex.Ev.__CMD_ALIGN_FULL); + } + }); + canvas.triggerQueryStatus(); + }, + startSyncButtonWithStyle: function() { + var self = this; + self.canvas.observeJob(Trex.Ev.__CANVAS_PANEL_QUERY_STATUS, function(){ + self.syncButtonState(); + }); + } + }); +})(); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/alignleft.js b/src/main/webapp/daumeditor/js/trex/tool/alignleft.js new file mode 100644 index 0000000..fe1940f --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/alignleft.js @@ -0,0 +1,88 @@ +(function() { + /** + * @fileoverview + * Toolbar의 AlignLeft Icon을 위해 필요한 configuration과 Class Trex.Tool.AlignLeft를 포함 + * + */ + TrexConfig.addTool( + "alignleft", + { + sync: _TRUE, + status: _TRUE, + hotKey: { // ctrl + , + ctrlKey: _TRUE, + keyCode: 188 + } + } + ); + + /* + * Text : align left + * Image : float none + align left + */ + var __TextAlignProperty = "left"; + var __ImageFloatProperty = 'none'; + var __ImageClearProperty = 'none'; + var paragraphProp = { + 'align': _NULL, + 'style': { + 'textAlign': __TextAlignProperty + } + }; + + Trex.Tool.AlignLeft = Trex.Class.create({ + $const: { + __Identity: 'alignleft', + __ImageModeProps: { + 'paragraph': paragraphProp, + 'image': { + 'style': { + 'clear': __ImageClearProperty, + 'float': __ImageFloatProperty, + 'marginLeft': "", + 'marginRight': "" + } + } + }, + __TextModeProps: { + 'paragraph': paragraphProp, + 'button': { + 'style': { + 'margin': '0' + } + } + } + }, + $extend: Trex.Tool, + $mixins: [Trex.I.AlignExecution], + oninitialized: function(config) { + var self = this; + self.imageAlignMode = _FALSE; + + self.weave(new Trex.Button(self.buttonCfg), _NULL, self.handler); + self.bindKeyboard(config.hotKey, self.handler.bind(self)); + self.startSyncButtonWithStyle(); + }, + handler: function() { + var self = this; + var canvas = self.canvas; + var toolbar = self.toolbar; + canvas.execute(function(processor) { + self.executeAlign(processor); + var alignMode = self.getAlignMode(processor); + if (alignMode == "image") { + toolbar.fireJobs(Trex.Ev.__CMD_ALIGN_IMG_LEFT); + } else if (alignMode == "text") { + toolbar.fireJobs(Trex.Ev.__CMD_ALIGN_LEFT); + } + }); + canvas.triggerQueryStatus(); + }, + startSyncButtonWithStyle: function() { + var self = this; + self.canvas.observeJob(Trex.Ev.__CANVAS_PANEL_QUERY_STATUS, function(){ + self.syncButtonState(); + }); + } + }); +})(); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/alignright.js b/src/main/webapp/daumeditor/js/trex/tool/alignright.js new file mode 100644 index 0000000..965d41d --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/alignright.js @@ -0,0 +1,88 @@ +(function() { + /** + * @fileoverview + * Toolbar의 AlignRight Icon을 위해 필요한 configuration과 Class Trex.Tool.AlignRight을/를 포함 + * + */ + TrexConfig.addTool( + "alignright", + { + sync: _TRUE, + status: _TRUE, + hotKey: { // ctrl + / + ctrlKey: _TRUE, + keyCode: 191 + } + } + ); + + /* + * Text : align right + * Image : float left + */ + var __TextAlignProperty = "right"; + var __ImageFloatProperty = 'left'; + var __ImageClearProperty = 'both'; + var __ImageMarginProperty = "8px"; + var __ImageNoMarginProperty = ""; + + Trex.Tool.AlignRight = Trex.Class.create({ + $const: { + __Identity: 'alignright', + __ImageModeProps: { + 'image': { + 'style': { + 'clear': __ImageClearProperty, + 'float': __ImageFloatProperty, + 'marginLeft': __ImageNoMarginProperty, + 'marginRight': __ImageMarginProperty + } + } + }, + __TextModeProps: { + 'paragraph': { + 'align': _NULL, + 'style': { + 'textAlign': __TextAlignProperty + } + }, + 'button': { + 'style': { + 'margin': '0 0 0 auto' + } + } + } + }, + $extend: Trex.Tool, + $mixins: [Trex.I.AlignExecution], + oninitialized: function(config) { + var self = this; + self.imageAlignMode = _FALSE; + + self.weave(new Trex.Button(self.buttonCfg), _NULL, self.handler); + self.bindKeyboard(config.hotKey, self.handler.bind(self)); + self.startSyncButtonWithStyle(); + }, + handler: function() { + var self = this; + var canvas = self.canvas; + var toolbar = self.toolbar; + canvas.execute(function(processor) { + self.executeAlign(processor); + var alignMode = self.getAlignMode(processor); + if (alignMode == "image") { + toolbar.fireJobs(Trex.Ev.__CMD_ALIGN_IMG_FLOAT_LEFT); + } else if (alignMode == "text") { + toolbar.fireJobs(Trex.Ev.__CMD_ALIGN_RIGHT); + } + }); + canvas.triggerQueryStatus(); + }, + startSyncButtonWithStyle: function() { + var self = this; + self.canvas.observeJob(Trex.Ev.__CANVAS_PANEL_QUERY_STATUS, function(){ + self.syncButtonState(); + }); + } + }); +})(); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/async/emoticon.js b/src/main/webapp/daumeditor/js/trex/tool/async/emoticon.js new file mode 100644 index 0000000..6536acf --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/async/emoticon.js @@ -0,0 +1,50 @@ +(function() { + /** + * @fileoverview + * emoticon을 입력 할 수 있는 메뉴를 포함하는 tool인 'Emoticon' Icon을 위한 source로 + * 필요한 configuration과 Class Trex.Tool.Emoticon을/를 포함 + * + */ + + var _DOC = document, + _WIN = window, + _DOC_EL = _DOC.documentElement, + _FALSE = false, + _TRUE = true, + _NULL = null, + _UNDEFINED; + + Trex.Class.overwrite(Trex.Tool.Emoticon, { + oninitialized: function(/*config*/) { + var _canvas = this.canvas; + + var _toolHandler = this.handler = function(value) { + if(!value || value.trim().length == 0) { + return; + } + _canvas.execute(function(processor) { + var _node = processor.win.img({ 'src': value, 'border': "0", 'className' : 'txc-emo' }); + processor.pasteNode(_node, _FALSE); + }); + }; + + /* button & menu weave */ + this.resetWeave(); + this.weave.bind(this)( + /* button */ + new Trex.Button(this.buttonCfg), + /* menu */ + new Trex.Menu.Matrix(this.menuCfg), + /* handler */ + _toolHandler + ); + } + + }); + + var thisToolName = 'emoticon'; + Editor.forEachEditor(function (editor) { + editor.getTool()[thisToolName].oninitialized(); + }); + Editor.editorForAsyncLoad.getTool()[thisToolName].forceActivate(); +})(); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/async/fullscreen.js b/src/main/webapp/daumeditor/js/trex/tool/async/fullscreen.js new file mode 100644 index 0000000..2586c51 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/async/fullscreen.js @@ -0,0 +1,460 @@ +/*jslint nomen:false,onevar:false*/ +/*global Trex,TrexMessage,$tx,$tom,$A,Editor*/ +/*global showAttachBox,hideAttachBox, + showFullScreen,showNormalScreen,resizeScreen*/ +(function () { + var _DOC = document, _WIN = window, _DOC_EL = _DOC.documentElement, + _FALSE = false, _TRUE = true, _NULL = null, _UNDEFINED; + + Trex.Class.overwrite(Trex.Tool.FullScreen, { + oninitialized: function () { + var _editor = this.editor, _config = this.config; + + var _wrapper = _editor.getWrapper(); + if (!_wrapper) { + return; + } + + var _fullscreen; + var _toolHandler = function () { + if (!_fullscreen) { + _fullscreen = new Trex.FullScreen(_editor, _config); + } + _fullscreen.execute(); + }; + this.executeTool = _toolHandler; + + if (_config.switched) { //기본이 전체화면 + if (!_fullscreen) { + _fullscreen = new Trex.FullScreen(_editor, _config); + } + _fullscreen.showFullScreen(); + } + + this.resetWeave(); + this.weave.bind(this)(new Trex.Button(this.buttonCfg), _NULL, _toolHandler); + + this.bindKeyboard({ // ctrl + m - 넓게쓰기 + ctrlKey: _TRUE, + keyCode: 77 + }, _toolHandler); + + _editor.observeKey({ // ctrl + m - 넓게쓰기 + ctrlKey: _TRUE, + altKey: _FALSE, + shiftKey: _FALSE, + keyCode: 77 + }, _toolHandler); + } + }); + + + TrexMessage.addMsg({ + '@fullscreen.attach.close.btn': "파일첨부박스", + '@fullscreen.noti.btn': "일반 글쓰기로", + '@fullscreen.noti.span': "넓게쓰기 버튼을 다시 누르시면 처음 글쓰기 창 크기로 돌아갑니다." + }); + + Trex.MarkupTemplate.add('fullscreen.notice', '
          @fullscreen.noti.span@fullscreen.noti.btn
          '); + Trex.MarkupTemplate.add('fullscreen.linebox', '
          ' + + '
          ' + + '
           
          ' + + '
           
          ' + + '
          ' + + '
          ' + + '
           
          ' + + '
           
          ' + + '@fullscreen.attach.close.btn' + + '
          ' + + '
          '); + Trex.FullScreen = Trex.Class.create({ + initialize: function (editor, config) { + if (!editor) { + return; + } + this.isInit = _FALSE; + this.isFullScreen = _FALSE; + + this.editor = editor; + this.rootConfig = this.editor.initialConfig; + this.wrapper = editor.getWrapper(); + + this.canvas = editor.getCanvas(); + this.toolbar = editor.getToolbar(); + this.attachBox = editor.getAttachBox(); + + this.elSavedHiddens = []; + this.minHeight = config.minHeight; + this.minWidth = config.minWidth; + + this.useAttachBox = (!!this.attachBox.elBox); + this.isAttachBoxDisplay = _FALSE; + + var self = this; + this.resizeHandler = function () { + if (self.isFullScreen) { + self.resizeContainer(); + } + }; + this.toolbar.observeJob(Trex.Ev.__CMD_ADVANCED_FOLD, this.resizeHandler); + this.toolbar.observeJob(Trex.Ev.__CMD_ADVANCED_SPREAD, this.resizeHandler); + if (typeof showAttachBox === "function") { + this.showAttachBoxAtServiceForSave = showAttachBox; //NOTE: fullscreen 모드에서는 다른 모양의 첨부박스를 사용한다. + } + if (typeof hideAttachBox === "function") { + this.hideAttachBoxAtServiceForSave = hideAttachBox; //NOTE: fullscreen 모드에서는 다른 모양의 첨부박스를 사용한다. + } + }, + execute: function () { + if (this.isFullScreen) { + this.showNormalScreen(); + } else { + this.showFullScreen(); + } + }, + onAttachClick: function () { + this.attachClickHandler(!this.isAttachBoxDisplay); + this.resizeContainer(); + }, + attachClickHandler: function (isAttachBoxDisplay) { + if (isAttachBoxDisplay) { + this.showAttachBox(); + this.attachBox.fireJobs(Trex.Ev.__ATTACHBOX_FULLSCREEN_SHOW); + } else { + this.hideAttachBox(); + this.attachBox.fireJobs(Trex.Ev.__ATTACHBOX_FULLSCREEN_HIDE); + } + }, + showNormalScreen: function () { + if (!this.isFullScreen) { + return; + } + + this._showScrollbar(); + + //Service Specific + this.showNormalScreenAtService(); + + var _wrapper = this.wrapper; + if (!_wrapper) { + return; + } + + _wrapper.style.width = ''; + $tx.removeClassName(_wrapper, 'tx-editor-fullscreen'); + + this.elSavedHiddens.each(function (el) { + el.style.visibility = 'visible'; + }); + + if (parent) { + try { + $tx.stopObserving(parent, 'resize', this.resizeHandler); + } catch (e) { + } + } else { + $tx.stopObserving(window, 'resize', this.resizeHandler); + } + + this.canvas.setCanvasSize({ + height: this.panelNormalHeight.toPx() + }); + + //첨부파일박스 + if (this.useAttachBox) { + this.attachClickHandler(this.attachBox.checkDisplay()); + } + + //NOTE: Service Specific + if (this.showAttachBoxAtServiceForSave) { + _WIN.showAttachBox = this.showAttachBoxAtServiceForSave; + } + if (this.hideAttachBoxAtServiceForSave) { + _WIN.hideAttachBox = this.hideAttachBoxAtServiceForSave; + } + + var length = this.relativeParents.length; + for (var i = 0; i < length; i += 1) { + var element = this.relativeParents.pop(); + var value = this.relativeValues.pop(); + $tx.setStyle(element, { + position: value + }); + } + + this.isFullScreen = _FALSE; + if (!$tx.msie) { + var btnElemId = "tx_fullscreen" + this.rootConfig.initializedId; + setTimeout(function () { + var _elIcon = $tom.collect($tx(btnElemId), "a"); + _elIcon.focus(); + }, 500); + } + + this.canvas.fireJobs(Trex.Ev.__CANVAS_NORMAL_SCREEN_CHANGE); + }, + showFullScreen: function () { + var self = this; + if (this.isFullScreen) { + return; + } + + if (!this.isInit) { + this.generate(); + } + + this._hideScrollbar(); + + //Service Specific + this.showFullScreenAtService(); + if (this.showAttachBoxAtServiceForSave) { + _WIN.showAttachBox = function () { + self.showAttachBox(); + self.resizeContainer(); + }; + } + if (this.hideAttachBoxAtServiceForSave) { + _WIN.hideAttachBox = function () { + self.hideAttachBox(); + self.resizeContainer(); + }; + } + + var _wrapper = this.wrapper; + + if (!_wrapper) { + return; + } + $tx.addClassName(_wrapper, 'tx-editor-fullscreen'); + + //Hide select,activeX + var _savedHiddens = []; + ["select", "embed", "object"].each(function (name) { + var _elHdns = $A(_DOC.getElementsByTagName(name)); + _elHdns.each(function (el) { + el.style.visibility = 'hidden'; + _savedHiddens.push(el); + }); + }); + this.elSavedHiddens = _savedHiddens; + + //attach file box + if (this.useAttachBox) { + this.attachClickHandler(this.attachBox.checkDisplay()); + } + + var _panel = this.canvas.getCurrentPanel(); + this.panelNormalHeight = _panel.getPosition().height; + + if (window.parent) { + $tx.observe(window.parent, 'resize', this.resizeHandler); + } else { + $tx.observe(window, 'resize', this.resizeHandler); + } + + // make trace element and move container to body's direct child + _WIN.wrapper = _wrapper; + this.relativeParents = []; + this.relativeValues = []; + var parentOfWarpper = _wrapper.offsetParent; + while (parentOfWarpper && parentOfWarpper.tagName && parentOfWarpper.tagName !== "HTML" && parentOfWarpper.tagName !== "BODY") { + var position = $tx.getStyle(parentOfWarpper, "position"); + if (position.toLowerCase() === "relative") { + this.relativeParents.push(parentOfWarpper); + this.relativeValues.push(position); + $tx.setStyle(parentOfWarpper, { + position: "static" + }); + } + parentOfWarpper = parentOfWarpper.offsetParent; + } + + this.isFullScreen = _TRUE; + this.resizeContainer(); + + this.canvas.fireJobs(Trex.Ev.__CANVAS_FULL_SCREEN_CHANGE); + }, + _hideScrollbar: function () { + if (_DOC_EL.scrollTop || _DOC_EL.scrollLeft) { + _DOC_EL.scrollTop = 0; + _DOC_EL.scrollLeft = 0; + } + if (_DOC.body.scrollTop || _DOC.body.scrollLeft) { + _DOC.body.scrollTop = 0; + _DOC.body.scrollLeft = 0; + } + _DOC_EL.style.overflow = 'hidden'; //Remove basic scrollbars + _DOC.body.style.overflow = 'hidden'; + }, + _showScrollbar: function () { + if ($tx.msie && $tx.msie_ver <= 8) { + // FTDUEDTR-1453 + setTimeout(function(){ + _DOC_EL.style.overflow = ''; + _DOC.body.style.overflow = ''; + }, 50); + } else { + _DOC_EL.style.overflow = ''; + _DOC.body.style.overflow = ''; + } + }, + generate: function () { + if (this.isInit) { + return; + } + if (!this.wrapper) { + return; + } + this.generateNoti(); + this.generateLineBox(); + this.isInit = _TRUE; + }, + generateNoti: function () { + var self = this; + var _elNoti = Trex.MarkupTemplate.get("fullscreen.notice").evaluateAsDom({}); + $tom.insertFirst(this.wrapper, _elNoti); + + var _elNotiBtn = $tom.collect(_elNoti, 'a'); + $tx.observe(_elNotiBtn, 'click', function () { + if (self.isFullScreen) { + self.showNormalScreen(); + } else { + self.showFullScreen(); + } + }); + }, + generateLineBox: function () { + if (!this.useAttachBox) { + return; + } + + var _elCanvas = this.canvas.elContainer; + + var _elLine = Trex.MarkupTemplate.get("fullscreen.linebox").evaluateAsDom({}); + $tom.insertNext(_elLine, _elCanvas); + + var _attr = { + className: "tx-fullscreen-line-box" + }; + if ($tx.msie_ver <= '5.5') { + _attr.align = "center"; + } + + var _elLineBox = $tom.collect(_elLine, 'div.tx-fullscreen-line-box'); + if ($tx.msie_ver <= '5.5') { + _elLineBox.align = "center"; + } + + var _elLineBtn = $tom.collect(_elLineBox, "a"); + this.elLineBtn = _elLineBtn; + $tx.observe(_elLineBtn, 'click', this.onAttachClick.bind(this)); + }, + getAttachBoxPosition: function () { + if (this.isAttachBoxDisplay) { + return $tom.getPosition(this.attachBox.elBox); + } else { + return { + x: 0, + y: 0, + width: 0, + height: 0 + }; + } + }, + getPostAreaBoxPosition: function () { + var elem = $tx("tx_fullscreen_post_area"); + if (elem) { + return $tx.getDimensions(elem); + } else { + return { + x: 0, + y: 0, + width: 0, + height: 0 + }; + } + }, + resizeContainer: function () { + if (!this.isFullScreen) { + return _FALSE; + } + this.resizeScreenAtService(); + + var panelHeight, panelWidth; + panelHeight = this.getPanelHeight(); + this.canvas.setCanvasSize({ + height: panelHeight.toPx() + }); + if (this.wrapper) { + panelWidth = this.getPanelWidth(); + this.wrapper.style.width = panelWidth.toPx(); + } + return _TRUE; + }, + getPanelHeight: function () { + var _panelHeight = 0; + + var _panelPosY = this.canvas.getCanvasPos().y; + var lineHeight = this.useAttachBox ? 17 : 0; + if (_DOC_EL.clientHeight > 0) { + _panelHeight = _DOC_EL.clientHeight - _panelPosY - lineHeight; + } else { + _panelHeight = _DOC_EL.offsetHeight - _panelPosY - lineHeight; + } + + var _postArea = this.getPostAreaBoxPosition(); + _panelHeight -= _postArea.height; + + var _attachBoxPosition = this.getAttachBoxPosition(); + if (_attachBoxPosition.height > 0) { + _panelHeight -= _attachBoxPosition.height + 20; //cuz margin + } + + return Math.max(_panelHeight, this.minHeight); + }, + getPanelWidth: function () { + var _panelWidth = 0; + if (_DOC_EL.clientWidth > 0) { + _panelWidth = _DOC_EL.clientWidth; + } else { + _panelWidth = _DOC_EL.offsetWidth; + } + return Math.max(_panelWidth, this.minWidth); + }, + showAttachBox: function () { + if (this.attachBox.useBox) { + $tx.addClassName(this.elLineBtn, "tx-attach-close"); + $tx.show(this.attachBox.elBox); + this.isAttachBoxDisplay = _TRUE; + } + }, + hideAttachBox: function () { + if (this.attachBox.useBox) { + $tx.removeClassName(this.elLineBtn, "tx-attach-close"); + $tx.hide(this.attachBox.elBox); + this.isAttachBoxDisplay = _FALSE; + } + }, + showFullScreenAtService: function () { + if (typeof showFullScreen === "function") { + showFullScreen(); + } + }, + showNormalScreenAtService: function () { + if (typeof showNormalScreen === "function") { + showNormalScreen(); + } + }, + resizeScreenAtService: function () { + if (typeof resizeScreen === "function") { + resizeScreen(); + } + } + }); + + var thisToolName = 'fullscreen'; + Editor.forEachEditor(function (editor) { + editor.getTool()[thisToolName].oninitialized(); + }); + Editor.editorForAsyncLoad.getTool()[thisToolName].executeTool(); +}()); diff --git a/src/main/webapp/daumeditor/js/trex/tool/async/specialchar.js b/src/main/webapp/daumeditor/js/trex/tool/async/specialchar.js new file mode 100644 index 0000000..8cd1cf8 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/async/specialchar.js @@ -0,0 +1,124 @@ +(function(){ + + /** + * @fileoverview + * Tool '특수문자' Source, + * Class Trex.Tool.SpecialChar 와 configuration을 포함 + * + */ + var _DOC = document, + _WIN = window, + _DOC_EL = _DOC.documentElement, + _FALSE = false, + _TRUE = true, + _NULL = null, + _UNDEFINED; + + TrexMessage.addMsg({ + '@specialchar.cancel.image': "#iconpath/btn_l_cancel.gif?v=2", + '@specialchar.confirm.image': "#iconpath/btn_l_confirm.gif?v=2", + '@specialchar.title': "선택한 기호" + }); + + Trex.Class.overwrite(Trex.Tool.SpecialChar, { + oninitialized: function() { + var _canvas = this.canvas; + var _toolHandler = function(value) { + if(!value){ + return; + } + _canvas.execute(function(processor) { + if ($tx.msie_docmode < 9) { + // ie에서 특수문자 입력시 savedCaret 내부가 아닌 상위 p태그의 이전으로 insert가 되는 현상이 있어서 분기. + var timekey = 'char' + (new Date()).getTime(); + processor.pasteContent('' + value + '', _FALSE); + var spanInDoc = processor.doc.getElementById(timekey); + $tom.unwrap(spanInDoc); + } else { + processor.pasteContent(value, _FALSE); + } + }); + }; + + /* button & menu weave */ + this.resetWeave(); + this.weave.bind(this)( + /* button */ + new Trex.Button(this.buttonCfg), + /* menu */ + new Trex.Menu.SpecialChar(this.menuCfg), + /* handler */ + _toolHandler + ); + } + }); + + Trex.MarkupTemplate.add( + 'menu.specialchar.input', [ + '
          ', + '
          @specialchar.title
          ', + '
          ', + '
          ', + '
          ', + '
          ' + ].join("") + ); + Trex.Menu.SpecialChar = Trex.Class.create({ + $extend: Trex.Menu.Matrix, + ongenerated: function() { + var _elMenu = this.elMenu; + + var _elInputSet = Trex.MarkupTemplate.get('menu.specialchar.input').evaluateAsDom({}); + $tom.append($tom.collect(_elMenu, 'div.tx-menu-inner'), _elInputSet); + + var _elInput = this.elInput = $tom.collect(_elInputSet, 'input'); + var _elImgs = $tom.collectAll(_elInputSet, 'img'); + + if(_elImgs.length == 2) { + $tx.observe(_elImgs[0], "click", function() { + this._command(this.elInput.value); + this.hide(); + }.bind(this)); + $tx.observe(_elImgs[1], "click", function() { + this.onCancel(); + }.bind(this)); + } + + $tx.observe( _elInput, "keydown", function(ev){ + if ( ev.keyCode == 13 ){ + $tx.stop(ev); + this._command(this.elInput.value); + this.hide(); + } + }.bind(this)); + }, + onregenerated: function() { + this.elInput.value = ""; + this.elInput.focus(); + }, + onSelect: function(ev) { + var _elInput = this.elInput; + var el = $tx.findElement(ev, 'span'); + if (el.tagName && el.tagName.toLowerCase() != 'span') { + return; + } + _elInput.value += (!el.innerText || el.innerText == " " || el.innerText.trim() == "")? "": el.innerText; + $tx.stop(ev); + + _elInput.focus(); + if ($tx.msie) { //NOTE: #FTDUEDTR-1044 + try { + var _sel = _DOC.selection.createRange(); + _sel.move("character", _elInput.value.length); + _sel.select(); + } catch (ignore) {} + } + } + }); + + var thisToolName = 'specialchar'; + Editor.forEachEditor(function (editor) { + editor.getTool()[thisToolName].oninitialized(); + }); + Editor.editorForAsyncLoad.getTool()[thisToolName].forceActivate(); +})(); diff --git a/src/main/webapp/daumeditor/js/trex/tool/backcolor.js b/src/main/webapp/daumeditor/js/trex/tool/backcolor.js new file mode 100644 index 0000000..198d6b8 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/backcolor.js @@ -0,0 +1,106 @@ +/** + * @fileoverview + * 글자 배경색을 적용 하기 위해 쓰이는, Toolbar의 글자배경색 Icon을 위해 필요한 + * configuration과 Class Trex.Tool.BackColor을/를 포함 + * + */ +TrexConfig.addTool( + "backcolor", + { + defaultcolor: "#9aa5ea", + wysiwygonly: _TRUE, + sync: _FALSE, + status: _TRUE, + useFavorite: _TRUE, + texts: { + options: [ + { color: '#ff0000', text: '#ffffff', label: '가나다' }, + { color: '#e545d0', text: '#ffffff', label: '가나다' }, + { color: '#000000', text: '#ffffff', label: '가나다' }, + { color: '#ff5e00', text: '#ffffff', label: '가나다' }, + { color: '#7c43b1', text: '#ffffff', label: '가나다' }, + { color: '#848484', text: '#ffffff', label: '가나다' }, + { color: '#ffbb00', text: '#ffffff', label: '가나다' }, + { color: '#4673ff', text: '#ffffff', label: '가나다' }, + { color: '#66e8ff', text: '#000000', label: '가나다' }, + { color: '#ffe400', text: '#ffffff', label: '가나다' }, + { color: '#1fafda', text: '#ffffff', label: '가나다' }, + { color: '#8cfccb', text: '#000000', label: '가나다' }, + { color: '#a8c40d', text: '#ffffff', label: '가나다' }, + { color: '#009999', text: '#ffffff', label: '가나다' }, + { color: '#ffffff', text: '#000000', label: '가나다' } + ] + }, + thumbs: Trex.__CONFIG_COMMON.thumbs, + needRevert: _TRUE, + needTrans: _FALSE + } +); + +Trex.Tool.BackColor = Trex.Class.create({ + $const: { + __Identity: 'backcolor' + }, + $extend: Trex.Tool, + $mixins: [Trex.I.CookieBaker, Trex.I.FontTool, Trex.I.MenuFontTool, Trex.I.WrappingSpanFontTool], + beforeOnInitialized: function(config) { + this.useFavorite = !!config.useFavorite; + if (this.useFavorite) { + this.initCookie('txBackColorFavorite'); + } + }, + createButton: function() { + var initialColor = this.readCookie() || this.getDefaultProperty(); + + var button = this.button = new Trex.Button.Splits(this.buttonCfg); + button.setValue(initialColor); + this.syncButton(initialColor); + return button; + }, + createMenu: function() { + return new Trex.Menu.ColorPallete(this.menuCfg); + }, + onAfterHandler: function(data) { + this.syncButton(data); + if (this.useFavorite) { + this.writeCookie(data); + } + }, + getDefaultProperty: function() { + return this.config.defaultcolor; + }, + syncButton: function(data) { + try { + var color = data ? data.split("|")[0] : _NULL; + if (color) { + $tx.setStyle(this.button.elButton, { + backgroundColor: color + }); + } + } catch(e){ + console.log(e); + } + }, + getRelatedCssPropertyNames: function() { + return ["color", this.getCssPropertyName()]; + }, + getCssPropertyName: function() { + return "backgroundColor"; + }, + getQueryCommandName: function() { + return ($tx.gecko || $tx.opera) ? "hilitecolor" : "backcolor"; + }, + computeNewStyle: function(data) { + if (this.shouldRevert(data) || this.includeTextColor(data)) { + var split = data ? data.split("|") : []; + return {backgroundColor: split[0], color: split[1]}; + } + return {backgroundColor: data}; + }, + shouldRevert: function(data) { + return data == _NULL; + }, + includeTextColor: function(data) { + return data && (data.indexOf("|") > -1); + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/background.js b/src/main/webapp/daumeditor/js/trex/tool/background.js new file mode 100644 index 0000000..e3769f2 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/background.js @@ -0,0 +1,144 @@ +(function() { + TrexConfig.addTool( + "background", + { + wysiwygonly: _TRUE, + sync: _FALSE, + status: _TRUE, + needRevert: true, + thumbs: Trex.__CONFIG_COMMON.thumbs + } + ); + + var articleBackgroundColor; + + Trex.Tool.Background = Trex.Class.create({ + $const: { + __Identity: 'background' + }, + $extend: Trex.Tool, + oninitialized: function() { + /* button & menu weave */ + this.weave( + new Trex.Button(this.buttonCfg), + new Trex.Menu.ColorPallete(this.menuCfg), + this.handler + ); + }, + handler: function(color) { + var self = this; + var canvas = self.canvas; + + canvas.fireJobs("canvas.apply.backgroundcolor", color); + canvas.history.saveHistory( + { + backgroundColor: articleBackgroundColor, + backgroundImage: canvas.getStyle('backgroundImage') + }, + { + backgroundColor: color, + backgroundImage: canvas.getStyle('backgroundImage') + }, + function(data){ + self._restoreColor(data); + } + ); + if (color === null) { + canvas.addStyle({ + backgroundColor: canvas.getConfig().styles ? canvas.getConfig().styles.backgroundColor || "" : "", + backgroundImage: canvas.getConfig().styles ? canvas.getConfig().styles.backgroundImage || "" : "" + }); + articleBackgroundColor = ""; + canvas.getConfig().hasUserBgcolor = _FALSE; + } else { + canvas.addStyle({ + backgroundColor: color, + backgroundImage: "" + }); + articleBackgroundColor = color; + canvas.getConfig().hasUserBgcolor = _TRUE; + } + }, + _restoreColor: function(data) { + var canvas = this.canvas; + canvas.addStyle({ backgroundColor: data.backgroundColor }); + if (data.backgroundImage) { + canvas.addStyle({ backgroundImage: data.backgroundImage }); + } + articleBackgroundColor = data.backgroundColor; + } + }); + + Trex.install('canvas.getBgColor & canvas.setBgColor & editor.getContentWithBg', + function(editor, toolbar, sidebar, canvas, config) { + articleBackgroundColor = config.canvas.styles.backgroundColor; + + // 저장, 로드할때 content 수정 + canvas.getBgColor = function() { + var color = articleBackgroundColor || canvas.getPanel("html").getStyle("backgroundColor"); + if ( color ) { + return Trex.Color.getHexColor(color); + } else { + return ""; + } + }; + + canvas.setBgColor = function(color) { + canvas.getPanel("html").addStyle({ + "backgroundColor": color || 'transparent' + }); + }; + + editor.getContentWithBg = function() { + var _selColor = canvas.getBgColor().toLowerCase(); + if(_selColor == 'transparent') { + return editor.getContent(); + } else { + return [ + '', + '', + '
          ', + editor.getContent(), + '
          ' + ].join(""); + } + }; + + var _originInitContent = canvas.initContent.bind(canvas); + canvas.initContent = function(content) { + if(content.search(/]*txc-wrapper[^>]*>/i) > -1) { + var _selColor; + content = content.replace(/]*txc-wrapper[^>]*>]*)>([\s\S]*?)<\/td><\/tr><\/table>/i, function(full, color, html){ + _selColor = color.replace(/\sbgcolor="([#\w]*)"/, "$1"); + return html; + }); + canvas.setBgColor(_selColor); + } + _originInitContent(content); + }; + + canvas.history.initHistory({ + 'backgroundColor': config.canvas.styles.backgroundColor, + 'backgroundImage': config.canvas.styles.backgroundImage || "none" + }); + + canvas.reserveJob(Trex.Ev.__IFRAME_LOAD_COMPLETE, function() { + var color = canvas.config.articleBackgroundColor; + if ( color && color != "transparent" ){ + canvas.addStyle({ + backgroundColor: color, + backgroundImage: "" + }); + } + }); + + canvas.observeJob('canvas.apply.letterpaper', function(data){ + if ( data.id ){ + canvas.getPanel("html").addStyle({ + "backgroundColor": 'transparent' + }); + } + }); + } + ); +})(); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/bold.js b/src/main/webapp/daumeditor/js/trex/tool/bold.js new file mode 100644 index 0000000..af3a5f1 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/bold.js @@ -0,0 +1,37 @@ +/** + * @fileoverview + * Toolbar의 Bold Icon을 위해 필요한 configuration과 Class Trex.Tool.Bold을/를 포함 + * + */ +TrexConfig.addTool( + "bold", + { + wysiwygonly: _TRUE, + sync: _TRUE, + status: _TRUE, + hotKey: { // ctrl + b + ctrlKey: _TRUE, + keyCode: 66 + } + } +); + +Trex.Tool.Bold = Trex.Class.create({ + $const: { + __Identity: 'bold' + }, + $extend: Trex.Tool, + $mixins: [Trex.I.FontTool, Trex.I.ButtonFontTool, Trex.I.WrappingDummyFontTool], + getRelatedCssPropertyNames: function() { + return ["font", this.getCssPropertyName()]; + }, + getCssPropertyName: function() { + return "fontWeight"; + }, + getQueryCommandName: function() { + return "bold"; + }, + isStyleApplied: function(node) { + return ["bold", "700"].contains($tx.getStyle(node, "fontWeight")); + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/buttonFontTool.js b/src/main/webapp/daumeditor/js/trex/tool/buttonFontTool.js new file mode 100644 index 0000000..79834e9 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/buttonFontTool.js @@ -0,0 +1,64 @@ +Trex.I.ButtonFontTool = Trex.Mixin.create({ + oninitialized: function(config) { + var self = this; + self.button = new Trex.Button(self.buttonCfg); + self.weave(self.button, _NULL, self.handler); + if (config.sync) { + self.startSyncButtonWithStyle(); + } + self.bindKeyboard(config.hotKey, self.handler.bind(self)); + }, + rangeExecutor: function(processor, newStyle, range) { + var el = null; + if($tx.msie && this.wrapDummy && processor.isCollapsed()){ + el = this.wrapDummy(processor, range); + processor.execCommand(this.getQueryCommandName()); + var rng = processor.createGoogRangeFromNodes(el, 1, el, 1); + rng.select(); + }else { + processor.execCommand(this.getQueryCommandName()); + } + }, + onAfterHandler: function(data) { + // TODO 현재 툴의 state만 변경하면 되는데, 불필요하게 Trex.Ev.__CANVAS_PANEL_QUERY_STATUS를 fire한다. + var canvas = this.canvas; + if (canvas.triggerQueryStatus) { + canvas.triggerQueryStatus(); + } + }, + startSyncButtonWithStyle: function() { + var self = this; + self.canvas.observeJob(Trex.Ev.__CANVAS_PANEL_QUERY_STATUS, function(goog_range) { + self.syncButton(self.queryCurrentStyle(goog_range)); + }); + }, + queryCurrentStyle: function(goog_range) { + var self = this; + var state = self.canvas.query(function(processor) { + var command = self.getQueryCommandName(); + var minGeckoVersion = 20; + var geckoQueryCommandStateNotWorkingVersion = ($tx.gecko && $tx.gecko_ver < minGeckoVersion); + if (command && !$tx.opera && !geckoQueryCommandStateNotWorkingVersion) { + // gecko? : FTDUEDTR-1181 + // opera?: ... 인 경우에 bold 상태가 false로 나온다. ...인 경우는 제대로 나옴. + return processor.queryCommandState(command); + } else { + var targetNode = self.findQueryingNode(goog_range); + return !!targetNode && self.isStyleApplied(targetNode); + } + }); + return state; + }, + + computeNewStyle: function() { + return _NULL; + }, + + cachedProperty: _FALSE, + syncButton: function(state) { + if (this.cachedProperty != state) { + this.button.setState(state); + this.cachedProperty = state; + } + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/cellslinecolor.js b/src/main/webapp/daumeditor/js/trex/tool/cellslinecolor.js new file mode 100644 index 0000000..8edf9b4 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/cellslinecolor.js @@ -0,0 +1,65 @@ +/** + * @fileoverview + * 글자색을 변경하기 위해 쓰이는 '글자색' Icon을 위해 필요한 source, + * Class Trex.Tool.Cellslinecolor 와 configuration을 포함 + * + */ +TrexConfig.addTool( + "cellslinecolor", + { + defaultcolor: "#7c84ef", + wysiwygonly: _TRUE, + sync: _FALSE, + status: _TRUE, + useFavorite: _TRUE, + thumbs: Trex.__CONFIG_COMMON.thumbs, + needRevert: _TRUE + } +); + +Trex.Tool.Cellslinecolor = Trex.Class.create({ + $const: { + __Identity: 'cellslinecolor' + }, + $extend: Trex.Tool, + oninitialized: function() { + var canvas = this.canvas; + var self = this; + + this.button = new Trex.Button(this.buttonCfg); + + var _toolHandler = function(color) { + syncButton(color); + canvas.query(function(processor){ + if (processor.table) { + processor.table.setBorderColor(color); + } + }); + }; + + var syncButton = function(color) { + if (color) { + try { + $tx.setStyle(self.button.elButton, { + 'backgroundColor': color + }); + } catch(e) { + console.log(e); + } + } + }; + syncButton(this.config.defaultcolor); + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + self.button, + /* menu */ + new Trex.Menu.ColorPallete(this.menuCfg), + /* handler */ + _toolHandler + ); + } +}); + + diff --git a/src/main/webapp/daumeditor/js/trex/tool/cellslineheight.js b/src/main/webapp/daumeditor/js/trex/tool/cellslineheight.js new file mode 100644 index 0000000..520f6b3 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/cellslineheight.js @@ -0,0 +1,75 @@ + +TrexMessage.addMsg({ + '@cellslineheight.subtitle1': '1pt', + '@cellslineheight.subtitle2': '2pt', + '@cellslineheight.subtitle3': '3pt', + '@cellslineheight.subtitle4': '4pt', + '@cellslineheight.subtitle5': '5pt' +}); + +TrexConfig.addTool( + "cellslineheight", + { + sync: _FALSE, + status: _TRUE, + options: [ + { label: TXMSG('@cellslineheight.subtitle1'), title: '1pt', data: 1, klass: 'tx-cellslineheight-1' }, + { label: TXMSG('@cellslineheight.subtitle2'), title: '2pt', data: 2, klass: 'tx-cellslineheight-2' }, + { label: TXMSG('@cellslineheight.subtitle3'), title: '3pt', data: 3, klass: 'tx-cellslineheight-3' }, + { label: TXMSG('@cellslineheight.subtitle4'), title: '4pt', data: 4, klass: 'tx-cellslineheight-4' }, + { label: TXMSG('@cellslineheight.subtitle5'), title: '5pt', data: 5, klass: 'tx-cellslineheight-5' } + ] + } +); + +Trex.Tool.Cellslineheight = Trex.Class.create({ + $const: { + __Identity: 'cellslineheight' + }, + $extend: Trex.Tool, + oninitialized: function(config) { + var self = this; + + self.createListStyleMap(config); + self.weave( + new Trex.Button.CellslineheightList(self.buttonCfg), + new Trex.Menu.Select(self.menuCfg), + self.handler + ); + + }, + createListStyleMap: function(config) { + var listStyleMap = this.listStyleMap = {}; + config.options.each(function(option) { + listStyleMap[option.data] = { + type: option.type, + klass: option.klass + }; + }); + }, + handler: function(data) { + var self = this; + if (!self.listStyleMap[data]) { + return; + } + // 실제 로직은 여기부분 입니다. + self.canvas.query(function(processor){ + if (processor.table) { + processor.table.setBorderHeight(data); + } + }); + }, + getButtonClassByValue: function(value) { + var listStyleMap = this.listStyleMap; + if(listStyleMap[value]) { + return listStyleMap[value].klass; + } else { + return listStyleMap[this.getDefaultProperty()].klass; + } + } +}); + +Trex.Button.CellslineheightList = Trex.Class.create({ + $extend: Trex.Button.Select +}); + diff --git a/src/main/webapp/daumeditor/js/trex/tool/cellslinepreview.js b/src/main/webapp/daumeditor/js/trex/tool/cellslinepreview.js new file mode 100644 index 0000000..9bed3c8 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/cellslinepreview.js @@ -0,0 +1,129 @@ + +Trex.MarkupTemplate.add( +'cellsline.preview', [ + '', + '', + '
          ', + '
          ', + '
          ' +].join('') +); + +TrexConfig.addTool( +"cellslinepreview", { + sync: _FALSE, + status: _TRUE, + options: [{ + label: Trex.MarkupTemplate.get('cellsline.preview').evaluate({ + value: '1pt solid #ccc', + width: 70, + height: 14 + }), + title: '1pt solid #ccc', + data: '#ccc 1 solid' + }, { + label: Trex.MarkupTemplate.get('cellsline.preview').evaluate({ + value: '2pt solid #c54', + width: 70, + height: 14 + }), + title: '2pt solid #c54', + data: '#c54 2 solid' + }, { + label: Trex.MarkupTemplate.get('cellsline.preview').evaluate({ + value: '2pt solid #67f', + width: 70, + height: 14 + }), + title: '2pt solid #67f', + data: '#67f 2 solid' + }, { + label: Trex.MarkupTemplate.get('cellsline.preview').evaluate({ + value: '3pt solid #000', + width: 70, + height: 14 + }), + title: '3pt solid #000', + data: '#000 3 solid' + }, { + label: Trex.MarkupTemplate.get('cellsline.preview').evaluate({ + value: '1pt dashed #d4c', + width: 70, + height: 14 + }), + title: '1pt dashed #d4c', + data: '#d4c 1 dashed' + }] +} +); + +Trex.Tool.Cellslinepreview = Trex.Class.create({ + $const: { + __Identity: 'cellslinepreview' + }, + $extend: Trex.Tool, + oninitialized: function(config) { + var self = this; + + this.data = { + color: '', + height: 0, + type: '' + }; + + this.weave( + new Trex.Button.CellslinepreviewList(this.buttonCfg), + new Trex.Menu.Select(this.menuCfg), + this.handler); + + this.toolbar.observeJob(Trex.Ev.__TOOL_CELL_LINE_CHANGE, function(data){ + self.setData(data); + self.refreshPreview(); + }); + }, + setData: function(data){ + if ("color" in data) { + this.data.color = data.color; + } + if ("height" in data) { + this.data.height = data.height; + } + if ("type" in data) { + this.data.type = data.type; + } + }, + refreshPreview: function(){ + var data; + data = this.data; + text = data.height + "pt " + data.type + " " + data.color; + this.setPreview(text); + }, + setPreview: function(value){ + this.button.elText.innerHTML = Trex.MarkupTemplate.get('cellsline.preview').evaluate({ + value: value, + width: 43, + height: 14 + }); + }, + addBorderHistory: function(data){ + this.setData(data); + this.refreshPreview(); + }, + handler: function(data, title){ + var self = this, canvas = self.canvas; + canvas.execute(function(processor) { + var datas; + if (processor.table) { + datas = data.split(" "); + processor.table.setBorderButtons(datas[0], datas[1], datas[2]); + } + }); + } +}); + +Trex.Button.CellslinepreviewList = Trex.Class.create({ + $extend: Trex.Button.Select, + setText: function(text) { + this.tool.setPreview(text); + } +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/cellslinestyle.js b/src/main/webapp/daumeditor/js/trex/tool/cellslinestyle.js new file mode 100644 index 0000000..8fa572d --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/cellslinestyle.js @@ -0,0 +1,66 @@ + +TrexMessage.addMsg({ + '@cellslinestyle.subtitle1': '테두리 없음', + '@cellslinestyle.subtitle2': '실선', + '@cellslinestyle.subtitle3': '점선', + '@cellslinestyle.subtitle4': '작은 점선' +}); + +TrexConfig.addTool( + "cellslinestyle", + { + sync: _FALSE, + status: _TRUE, + options: [ + { label: TXMSG('@cellslinestyle.subtitle1'), title: '테두리 없음', data: 'none', klass: 'tx-cellslinestyle-1' }, + { label: TXMSG('@cellslinestyle.subtitle2'), title: '실선', data: 'solid', klass: 'tx-cellslinestyle-2' }, + { label: TXMSG('@cellslinestyle.subtitle3'), title: '점선', data: 'dotted', klass: 'tx-cellslinestyle-3' }, + { label: TXMSG('@cellslinestyle.subtitle4'), title: '작은 점선', data: 'dashed', klass: 'tx-cellslinestyle-4' } + ] + } +); + +Trex.Tool.Cellslinestyle = Trex.Class.create({ + $const: { + __Identity: 'cellslinestyle' + }, + $extend: Trex.Tool, + oninitialized: function(config) { + var self = this; + self.createListStyleMap(config); + self.weave( + new Trex.Button.CellsLineStyledList(self.buttonCfg), + new Trex.Menu.Select(self.menuCfg), + self.handler + ); + + }, + createListStyleMap: function(config) { + var listStyleMap = this.listStyleMap = {}; + config.options.each(function(option) { + listStyleMap[option.data] = { + type: option.type, + klass: option.klass + }; + }); + }, + handler: function(data) { + var self = this; + if (!self.listStyleMap[data]) { + return; + } + // 실제 로직은 여기부분 입니다. + self.canvas.query(function(processor){ + if (processor.table) { + processor.table.setBorderType(data); + } + }); + }, + getDefaultProperty: function() { + return 1; + } +}); + +Trex.Button.CellsLineStyledList = Trex.Class.create({ + $extend: Trex.Button.Select +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/cellsoutline.js b/src/main/webapp/daumeditor/js/trex/tool/cellsoutline.js new file mode 100644 index 0000000..976010d --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/cellsoutline.js @@ -0,0 +1,115 @@ +/** + * @fileoverview + * '행,열 삽입' Icon Source, + * Class Trex.Tool.celloutline configuration을 포함 + * + */ + + +TrexConfig.addTool( + "cellsoutline", + { + sync: _FALSE, + status: _TRUE, + options: [ + { label: '모든 테두리', title: '모든 테두리', data: 'all', klass: 'tx-cellsoutline-1' }, + { label: '바깥 테두리', title: '바깥 테두리', data: 'out', klass: 'tx-cellsoutline-2' }, + { label: '안쪽 테두리', title: '안쪽 테두리', data: 'in', klass: 'tx-cellsoutline-3' }, + { label: '위쪽 테두리', title: '위쪽 테두리', data: 'top' , klass: 'tx-cellsoutline-4' }, + { label: '아래쪽 테두리', title: '아래쪽 테두리', data: 'bottom', klass: 'tx-cellsoutline-5' }, + { label: '왼쪽 테두리', title: '왼쪽 테두리', data: 'left' , klass: 'tx-cellsoutline-6' }, + { label: '오른쪽 테두리', title: '오른쪽 테두리', data: 'right' , klass: 'tx-cellsoutline-7' }, + { label: '테두리 없음', title: '테두리 없음', data: 'none' , klass: 'tx-cellsoutline-8' } + ] + } +); + +Trex.Tool.Cellsoutline = Trex.Class.create({ + $const: { + __Identity: 'cellsoutline' + }, + $extend: Trex.Tool, + oninitialized: function(config) { + var self = this; + + this.twinkleCount = 0; + this.twinkleTimer = _NULL; + + self.createListStyleMap(config); + self.weave( + new Trex.Button.CellsoutlineList(self.buttonCfg), + new Trex.Menu.Select(self.menuCfg), + self.handler + ); + + this.toolbar.observeJob(Trex.Ev.__TOOL_CELL_LINE_CHANGE, function(data){ + if (data.fromInit != _TRUE) { + self.twinkleButton(); + } + }); + }, + createListStyleMap: function(config) { + var listStyleMap = this.listStyleMap = {}; + config.options.each(function(option) { + listStyleMap[option.data] = { + type: option.type, + klass: option.klass + }; + }); + }, + handler: function(data) { + var self = this; + if (!self.listStyleMap[data]) { + return; + } + // 실제 로직은 여기부분 입니다. + self.canvas.query(function(processor){ + if (processor.table) { + processor.table.setBorderRange(data); + } + }); + self.canvas.execute(function(processor) { + if (processor.table) { + if (data == 'none') { + processor.table.setNoBorder(); + } else { + processor.table.applyBorder(); + } + } + }); + }, + twinkleButton: function(){ + var self; + self = this; + + if (this.twinkleTimer) { + clearInterval(this.twinkleTimer); + this.twinkleTimer = _NULL; + } + this.twinkleCount = 4; + this.twinkleTimer = setInterval(function(){ + if (0 < self.twinkleCount) { + self.twinkleCount -= 1; + if (self.button.currentState() == "hovered") { + self.button.normalState(); + } else { + self.button.hoveredState() + } + } else { + self.button.normalState(); + clearInterval(self.twinkleTimer); + self.twinkleTimer = _NULL; + } + }, 500); + } +}); + +Trex.Button.CellsoutlineList = Trex.Class.create({ + $extend: Trex.Button.Select +}); + + + + + + diff --git a/src/main/webapp/daumeditor/js/trex/tool/deletecells.js b/src/main/webapp/daumeditor/js/trex/tool/deletecells.js new file mode 100644 index 0000000..5448c71 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/deletecells.js @@ -0,0 +1,58 @@ +/** + * @fileoverview + * '행,열 삽입' Icon Source, + * Class Trex.Tool.deletecells configuration을 포함 + * + */ +TrexConfig.addTool( + "deletecells", + { + sync: _FALSE, + status: _TRUE, + options: [ + { label: '행 삭제', title: '행 삭제', data: 'deleteRow' , klass: 'tx-deletecells-1'}, + { label: '열 삭제', title: '열 삭제', data: 'deleteCol' , klass: 'tx-deletecells-2'} + ] + } +); + +Trex.Tool.deletecells = Trex.Class.create({ + $const: { + __Identity: 'deletecells' + }, + $extend: Trex.Tool, + oninitialized: function(config) { + var _canvas = this.canvas; + + var _defaultProperty = _canvas.getStyleConfig().insert; + /* + * "deleteRow", "deleteCol" + */ + var _toolHandler = function(command) { + _canvas.execute(function(processor){ + if (processor.table) { + switch(command) { + case "deleteRow": + processor.table.deleteRow(); + break; + case "deleteCol": + processor.table.deleteCol(); + break; + } + } + }); + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button.Select(TrexConfig.merge(this.buttonCfg, { + selectedValue: _defaultProperty + })), + /* menu */ + new Trex.Menu.Select(this.menuCfg), + /* handler */ + _toolHandler); + } +}); + diff --git a/src/main/webapp/daumeditor/js/trex/tool/dictionary.js b/src/main/webapp/daumeditor/js/trex/tool/dictionary.js new file mode 100644 index 0000000..9eb4206 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/dictionary.js @@ -0,0 +1,42 @@ +/** + * @fileoverview + * 영어 사전 팝업을 띄워 주는 '사전' Icon을 위해 필요한 source, configuration과 Class Trex.Tool.Dictionary을/를 포함 + * + */ +TrexConfig.addTool( + "dictionary", + { + url: 'http://engdic.daum.net/dicen/small_view_top.do', + sync: _FALSE, + status: _FALSE + } +); + +Trex.Tool.Dictionary = Trex.Class.create({ + $const: { + __Identity: 'dictionary' + }, + $extend: Trex.Tool, + oninitialized: function(config) { + var _canvas = this.canvas; + + var _toolHandler = function() { + var _word = _canvas.query(function(processor) { + return encodeURI(processor.getText()); + }); + var _popupUrl = (_word.length > 0) ? "http://engdic.daum.net/dicen/small_search.do" : config.url; + var _dicWin = _WIN.open(_popupUrl + '?q=' + _word, 'dicWin', 'width=410,height=550,scrollbars=yes'); + _dicWin.focus(); + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button(this.buttonCfg), + /* menu */ + _NULL, + /* handler */ + _toolHandler + ); + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/emoticon.js b/src/main/webapp/daumeditor/js/trex/tool/emoticon.js new file mode 100644 index 0000000..2cc2711 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/emoticon.js @@ -0,0 +1,76 @@ +(function() { + TrexMessage.addMsg({ + '@emoticon.subtitle.person': '사람', + '@emoticon.subtitle.animal': '동식물', + '@emoticon.subtitle.thing': '사물', + '@emoticon.subtitle.etc': '기타' + }); + + var createEmoticonURLs = function (category, maxNum){ + var urls = []; + for (var i = 1; i <= maxNum; i++) { + urls.push('#decopath/emoticon/' + category + '_' + addZeroPadding(i) + '.gif?v=2'); + } + return urls; + }; + + var addZeroPadding = function (number) { + return (number < 10) ? '0' + number : String(number); + }; + + TrexConfig.addTool("emoticon", + { + sync: _FALSE, + status: _TRUE, + rows: 5, + cols: 7, + matrices: [ + { + title: TXMSG("@emoticon.subtitle.person"), + klass: "tx-menu-matrix-per", + options: createEmoticonURLs("per", 29) + }, + { + title: TXMSG("@emoticon.subtitle.animal"), + klass: "tx-menu-matrix-ani", + options: createEmoticonURLs("ani", 28) + }, + { + title: TXMSG("@emoticon.subtitle.thing"), + klass: "tx-menu-matrix-things", + options: createEmoticonURLs("things", 35), + defaultshow: _TRUE + }, + { + title: TXMSG("@emoticon.subtitle.etc"), + klass: "tx-menu-matrix-etc", + options: createEmoticonURLs("etc", 29) + } + ], + asyncUrl: "trex/tool/async/emoticon.js" + }, + function(root) { + var emoticonConfig = TrexConfig.getTool("emoticon", root); + emoticonConfig.matrices.each(function (matrix) { + for (var i = 0, len = matrix.options.length; i < len; i++) { + matrix.options[i] = TrexConfig.getDecoPath(matrix.options[i]); + } + }); + } + ); + + Trex.Tool.Emoticon = Trex.Class.create({ + $const: { + __Identity: 'emoticon' + }, + $extend: Trex.AsyncTool, + oninitialized: function () { + this.weave.bind(this)( + new Trex.Button(this.buttonCfg), + _NULL, + this.onLoadModule // define in Trex.AsyncTool + ); + } + }); + +})(); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/extraButtonDropdown.js b/src/main/webapp/daumeditor/js/trex/tool/extraButtonDropdown.js new file mode 100644 index 0000000..908ff6b --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/extraButtonDropdown.js @@ -0,0 +1,29 @@ +Trex.module("add drop-down menu button if extra buttons exist.", + function (editor, toolbar, sidebar, canvas) { + canvas.observeJob(Trex.Ev.__IFRAME_LOAD_COMPLETE, function() { + var _elButtonList = $tom.collectAll(editor.getWrapper(), 'li.tx-list-extra div.tx-extra'); + if (_elButtonList.length == 0) { + return; + } + _elButtonList.each(function(elButton) { + var elMenu = $tom.next(elButton, '.tx-extra-menu'); + if (!elMenu) { + return; + } + + toolbar.makeWidget( + new Trex.Button({ + el: elButton, + sync: _FALSE, + status: _TRUE + }), + new Trex.Menu({ + el: elMenu + }), + function() { /*dummy handler*/ } + ); + }); + }); + } +); + diff --git a/src/main/webapp/daumeditor/js/trex/tool/fontTool.js b/src/main/webapp/daumeditor/js/trex/tool/fontTool.js new file mode 100644 index 0000000..367fc29 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/fontTool.js @@ -0,0 +1,184 @@ +Trex.I.FontTool = Trex.Mixin.create({ + initialize: function(editor, toolbar, config) { + this.$super.initialize(editor, toolbar, config); + }, + handler: function(data) { + this.onBeforeHandler(data); + this.doHandle(data); + this.onAfterHandler(data); + }, + onBeforeHandler: function() { + }, + doHandle: function(data) { + var self = this, + range, newStyle = self.computeNewStyle(data); + self.canvas.execute(function(processor) { + var selectedCells = (processor.table) ? processor.table.getTdArr() : []; + if (selectedCells.length > 0) { + range = goog.dom.Range.createFromNodeContents(selectedCells[0]); + processor.executeUsingCaret(function() { + self.tableCellsExecutor(processor, newStyle, selectedCells); + }); + } else { + range = processor.createGoogRange(); + if (range) { + self.rangeExecutor(processor, newStyle, range); + } + } + }); + }, + onAfterHandler: function() { + }, + tableCellsExecutor: function(processor, newStyle, cells) { + var self = this; + cells.each(function(cell) { + var range = goog.dom.Range.createFromNodeContents(cell); + range.select(); + self.rangeExecutor(processor, newStyle, range); + }); + }, + findQueryingNode: function(goog_range) { + if (goog_range) { + var textNode; + try { + textNode = this.findFirst(goog_range.__iterator__(), function(node) { + return node.nodeType == 3 && node.nodeValue.trim(); + }); + } catch (ignore4ie678) {} + if (textNode) { + return textNode.parentNode; + } else { // fallback condition + var startNode = goog_range.getStartNode(); + if (startNode && startNode.nodeType == 3) { + return startNode.parentNode; + } + return startNode; + } + } + }, + findFirst: function(iterator, condition) { + try { + return goog.iter.filter(iterator, condition).next(); + } catch(e) { + return null; + } + } +}); + +Trex.I.WrappingSpanFontTool = Trex.Mixin.create({ + wrapTextAsStyledSpan: function(processor, newStyle, range) { + var affectedNodes; + if (processor.isCollapsed()) { + var startNode = range.getStartNode(); + if (startNode.nodeType == 3) { + startNode = startNode.parentNode; + } + var targetNode = this.findOrCreateDummySpan(startNode, processor, range); + var wordJoiner = targetNode.firstChild; + processor.createGoogRangeFromNodes(wordJoiner, wordJoiner.length, wordJoiner, wordJoiner.length).select(); + affectedNodes = [ targetNode ]; + } else { + processor.executeUsingCaret(function(range, savedCaret) { + var iterator = createTextRangeIterator(savedCaret); + var textNodes = collectTextNodes(iterator); + affectedNodes = collectTextOnlySpans(textNodes); + }); + } + processor.apply(affectedNodes, { + style: newStyle + }); + + function createTextRangeIterator(savedCaret) { + var startCaret = savedCaret.getCaret(_TRUE), + endCaret = savedCaret.getCaret(_FALSE); + return new goog.dom.TextRangeIterator(startCaret, 0, endCaret, 0); + } + + // Known Issue :

           

          에 대해 p의 childNodes.length === 0 이라 적용이 안된다. + function collectTextNodes(iterator) { + var result = []; + goog.iter.forEach(iterator, function(node) { + // 잘못된 위치의 TextNode는 제외 + if (node.nodeType == 3 && !$tom.kindOf(node.parentNode, "table,thead,tbody,tr,ul,ol")) { + result.push(node); + } + }); + return result; + } + + function collectTextOnlySpans(textNodes) { + var result = []; + textNodes.each(function(node) { + var parentNode = node.parentNode; + if (parentNode.nodeName == "SPAN" && hasOnlyOneChild(parentNode)) { + result.push(parentNode); + } else { + var newSpan = processor.create("span"); + $tom.wrap(newSpan, node); + result.push(newSpan); + } + }); + return result; + } + + function hasOnlyOneChild(node) { + var childNodes = node.childNodes; + var childCount = childNodes.length; + if (childCount > 3) { // early return + return _FALSE; + } + for (var i = 0, len = childCount; i < len; i++) { + if ($tom.isGoogRangeCaret(childNodes[i])) { + childCount = childCount - 1; + } + } + return childCount == 1; + } + }, + /** + * collapsed 일 때에 style을 적용할 수 있는 span을 찾거나, 새로 span을 만든다. + */ + findOrCreateDummySpan: function(node, processor, goog_range) { + var reuseExistNode = (node.tagName == "SPAN" && node.childNodes.length == 1 && node.firstChild.nodeType == 3 && node.firstChild.nodeValue == Trex.__WORD_JOINER); + if (reuseExistNode) { + return node; + } else { + return this.createDummySpan(node, processor, goog_range); + } + }, + createDummySpan: function (parentNode, processor, goog_range) { + var newNode = null; + if (parentNode.tagName == "SPAN") { + newNode = $tom.clone(parentNode); + } else { + newNode = processor.create('span'); + } + newNode.appendChild(processor.newDummy()); + newNode = goog_range.insertNode(newNode); // NOTE: IE에서는 return된 value를 사용해야 한다. + + // insertNode로 인해 빈 TextNode가 생긴 경우, 바로 삭제해준다. + $tom.removeEmptyTextNode(newNode.previousSibling); + $tom.removeEmptyTextNode(newNode.nextSibling); + return newNode; + } +}); + +Trex.I.WrappingDummyFontTool = Trex.Mixin.create({ + wrapDummy: function(processor, range) { + var targetNode = this.createDummySpan(processor, range); + var wordJoiner = targetNode.firstChild; + $tom.unwrap(targetNode); + processor.createGoogRangeFromNodes(wordJoiner, 0, wordJoiner, wordJoiner.length).select(); + return wordJoiner; + }, + createDummySpan: function (processor, goog_range) { + var newNode = null; + newNode = processor.create('span'); + newNode.appendChild(processor.newDummy()); + newNode = goog_range.insertNode(newNode); // NOTE: IE에서는 return된 value를 사용해야 한다. + // insertNode로 인해 빈 TextNode가 생긴 경우, 바로 삭제해준다. + $tom.removeEmptyTextNode(newNode.previousSibling); + $tom.removeEmptyTextNode(newNode.nextSibling); + return newNode; + } +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/fontfamily.js b/src/main/webapp/daumeditor/js/trex/tool/fontfamily.js new file mode 100644 index 0000000..63ca912 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/fontfamily.js @@ -0,0 +1,198 @@ +/** + * @fileoverview + * 설정에서 지정된 여러 글꼴들을 선택할 수 있는 메뉴를 포함하는 tool인 '글꼴' Icon을 위한 source로, + * 필요한 configuration과 Class Trex.Tool.FontFamily을/를 포함 + * + * + */ + +TrexMessage.addMsg({ + '@fontfamily.gulim': '굴림', + '@fontfamily.batang': '바탕', + '@fontfamily.dotum': '돋움', + '@fontfamily.gungsuh': '궁서' +}); + +TrexConfig.addTool( + "fontfamily", + { + sync: _TRUE, + status: _TRUE, + useFavorite: _TRUE, + options: [ + { label: TXMSG('@fontfamily.gulim')+' (가나다라)', title: TXMSG('@fontfamily.gulim'), data: 'Gulim,굴림,AppleGothic,sans-serif', klass: 'tx-gulim' }, + { label: TXMSG('@fontfamily.batang')+' (가나다라)', title: TXMSG('@fontfamily.batang'), data: 'Batang,바탕,serif', klass: 'tx-batang' }, + { label: TXMSG('@fontfamily.dotum')+' (가나다라)', title: TXMSG('@fontfamily.dotum'), data: 'Dotum,돋움,sans-serif', klass: 'tx-dotum' }, + { label: TXMSG('@fontfamily.gungsuh')+' (가나다라)', title: TXMSG('@fontfamily.gungsuh'), data: 'Gungsuh,궁서,serif', klass: 'tx-gungseo' }, + { label: 'Arial (abcde)', title: 'Arial', data: 'Arial,sans-serif', klass: 'tx-arial' }, + { label: 'Verdana (abcde)', title: 'Verdana', data: 'Verdana,sans-serif', klass: 'tx-verdana' }, + { label: 'Courier New (abcde)', title: 'Courier New', data: 'Courier New,monspace', klass: 'tx-courier-new' } + ] + } +); +/* legacy fontfamily * +{ label: ' 굴림 (가나다라)', title: '굴림', data: 'Gulim,굴림,AppleGothic,sans-serif', klass: 'tx-gulim' }, +{ label: ' 바탕 (가나다라)', title: '바탕', data: 'Batang,바탕', klass: 'tx-batang' }, +{ label: ' 돋움 (가나다라)', title: '돋움', data: 'Dotum,돋움', klass: 'tx-dotum' }, +{ label: ' 궁서 (가나다라)', title: '궁서', data: 'Gungsuh,궁서', klass: 'tx-gungseo' }, +{ label: ' Arial (abcde)', title: 'Arial', data: 'Arial', klass: 'tx-arial' }, +{ label: ' Verdana (abcde)', title: 'Verdana', data: 'Verdana', klass: 'tx-verdana' }, +{ label: ' Arial Black (abcde)', title: 'Arial Black', data: 'Arial Black', klass: 'tx-arial-black' }, +{ label: ' Book Antiqua (abcde)', title: 'Book Antiqua', data: 'Book Antiqua', klass: 'tx-book-antiqua' }, +{ label: ' Comic Sans MS (abcde)', title: 'Comic Sans MS', data: 'Comic Sans MS', klass: 'tx-comic-sans-ms' }, +{ label: ' Courier New (abcde)', title: 'Courier New', data: 'Courier New', klass: 'tx-courier-new' }, +{ label: ' Georgia (abcde)', title: 'Georgia', data: 'Georgia', klass: 'tx-georgia' }, +{ label: ' Helvetica (abcde)', title: 'Helvetica', data: 'Helvetica', klass: 'tx-helvetica' }, +{ label: ' Impact (abcde)', title: 'Impact', data: 'Impact', klass: 'tx-impact' }, +{ label: ' Symbol (abcde)', title: 'Symbol', data: 'Symbol', klass: 'tx-symbol' }, +{ label: ' Tahoma (abcde)', title: 'Tahoma', data: 'Tahoma', klass: 'tx-tahoma' }, +{ label: ' Terminal (abcde)', title: 'Terminal', data: 'Terminal', klass: 'tx-terminal' }, +{ label: ' Times New Roman (abcde)', title: 'Times New R..', data: 'Times New Roman', klass: 'tx-times-new-roman' }, +{ label: ' Trebuchet MS (abcde)', title: 'Trebuchet MS', data: 'Trebuchet MS', klass: 'tx-trebuchet-ms' }, +{ label: ' Webdings (abcde)', title: 'Webdings', data: 'Webdings', klass: 'tx-webdings' }, +{ label: ' Wingdings (abcde)', title: 'Wingdings', data: 'Wingdings', klass: 'tx-wingdings' } + */ +Trex.Tool.FontFamily = Trex.Class.create({ + $const: { + __Identity: 'fontfamily' + }, + $extend: Trex.Tool, + $mixins: [Trex.I.CookieBaker, Trex.I.FontTool, Trex.I.MenuFontTool, Trex.I.WrappingSpanFontTool], + beforeOnInitialized: function(config) { + function findAvailableFonts(config) { + self.usedWebFonts = (($tx.msie && config.webfont && config.webfont.use) ? config.webfont.options : []); + self.usedFonts = config.options.concat(self.usedWebFonts); + } + + function setUseFavoriteFont(config) { + if (config.useFavorite && self.usedWebFonts.length > 0) { + self.useFavorite = _TRUE; + self.initCookie('txFontFamilyFavorite'); + } else { + self.useFavorite = _FALSE; + } + } + + var self = this; + self.focusLoosed = _FALSE; + + findAvailableFonts(config); + setUseFavoriteFont(config); + + self.createFontFamilyMap(self.usedFonts); + }, + createFontFamilyMap: function(usedFonts) { + var self = this, fontFamilyMap = {}; + this.fontFamilyMap = fontFamilyMap; + usedFonts.each(function (option) { + var fontNames, title, i, key; + fontNames = option.data.split(","); + title = option.title; + for (i = 0; i < fontNames.length; i += 1) { + key = self.preprocessFontFamily(fontNames[i]); + fontFamilyMap[key] = title; + } + if (!fontFamilyMap[title.toLowerCase()]) { + fontFamilyMap[title.toLowerCase()] = title; + } + }); + }, + createButton: function() { + var button = new Trex.Button.Select(this.buttonCfg); + this.button = button; + button.setValue(this.getDefaultProperty()); + button.setText(this.getTextByValue(this.getDefaultProperty())); + return button; + }, + createMenu: function() { + var self = this; + var menu = new Trex.Menu.Select(TrexConfig.merge(self.menuCfg, { + options: self.usedFonts + })); + this.menu = menu; + //overwrite generateListItem + menu.generateListItem = function (option) { + var result = [], i, item, labalBackup; + for(i = 0; i < option.length; i += 1) { + item = option[i]; + labalBackup = item.label; + item.label = item.label.replace(//, ''); + result.push(Trex.MarkupTemplate.get("menu.select.item").evaluate(item)); + item.label = labalBackup; + } + return result.join(""); + }; + if (self.usedWebFonts.length > 0) { + $tx.addClassName(menu.elMenu, "tx-fontfamily-webfont-menu"); + var elDummyForFocus = tx.input({'type': 'text', 'className': 'tx-dummyfocus'}); + $tom.append(menu.elMenu, elDummyForFocus); + $tx.observe(menu.elMenu, 'mousedown', function(ev) { + if (ev.offsetX < self.menu.elMenu.clientWidth) { //not scrollbar + return; + } + elDummyForFocus.style.top = ev.offsetY.toPx(); + if (!self.focusLoosed) { + elDummyForFocus.focus(); + elDummyForFocus.blur(); + self.menu.elMenu.focus(); + self.focusLoosed = _TRUE; + } + }); + } + return menu; + }, + menuInitHandler: function() { + var self = this; + var menu = self.menu; + self.focusLoosed = _FALSE; + if(!self.useFavorite) { + return []; + } + menu.elMenu.scrollTop = 0; + var elGroup = $tom.collect(menu.elMenu, "ul.tx-menu-favlist"); + if(elGroup) { + $tom.remove(elGroup); + } + var favorite = self.extractOptions(self.usedFonts, self.readCookie()); + elGroup = menu.generateList(favorite); + $tom.insertFirst(menu.elMenu, elGroup); + $tx.addClassName(elGroup, 'tx-menu-favlist'); + return favorite; + }, + onBeforeHandler: function(data) { + this.canvas.includeWebfontCss("font-family: " + data); + }, + onAfterHandler: function(data) { + var self = this; + if (self.useFavorite) { + self.writeCookie(self.mergeValues(self.readCookie(), data)); + } + }, + getDefaultProperty: function() { + return this.canvas.getStyleConfig().fontFamily; + }, + getRelatedCssPropertyNames: function() { + return ["font", this.getCssPropertyName()]; + }, + getCssPropertyName: function() { + return "fontFamily"; + }, + getQueryCommandName: function() { + return "fontname"; + }, + getFontTagAttribute: function() { + return "face"; + }, + preprocessFontFamily: function (name) { + //브라우저에 따라 qoute 등으로 감싸주는 경우가 있음. + //폰트 이름중에 _9 나 9 로 끝나는게 있어 문제가 있었다고 주석이 있었음. + return name.toLowerCase().replace(/'|"/g, "").replace(/_?9$/, ""); + }, + getTextByValue: function(value) { + if (value.include(",")) { + value = value.split(",")[0]; + } + value = this.preprocessFontFamily(value); + return this.fontFamilyMap[value]; + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/fontsize.js b/src/main/webapp/daumeditor/js/trex/tool/fontsize.js new file mode 100644 index 0000000..5514834 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/fontsize.js @@ -0,0 +1,107 @@ +/** + * @fileoverview + * 설정에서 지정된 여러 fontsize들을 선택할 수 있는 메뉴를 포함하는 tool인 '글자크기' Icon을 위한 source로, + * Class Trex.Tool.FontSize, configuration 을 포함 + * + * + */ +TrexConfig.addTool( + "fontsize", + { + sync: _TRUE, + status: _TRUE, + options: [ + { label: '가나다라마바사 (8pt)', title: '8pt', data: '8pt', klass: 'tx-8pt' }, + { label: '가나다라마바사 (9pt)', title: '9pt', data: '9pt', klass: 'tx-9pt' }, + { label: '가나다라마바사 (10pt)', title: '10pt', data: '10pt', klass: 'tx-10pt' }, + { label: '가나다라마바사 (11pt)', title: '11pt', data: '11pt', klass: 'tx-11pt' }, + { label: '가나다라마바사 (12pt)', title: '12pt', data: '12pt', klass: 'tx-12pt' }, + { label: '가나다라마바사 (14pt)', title: '14pt', data: '14pt', klass: 'tx-14pt' }, + { label: '가나다라마바사 (18pt)', title: '18pt', data: '18pt', klass: 'tx-18pt' }, + { label: '가나다라마 (24pt)', title: '24pt', data: '24pt', klass: 'tx-24pt' }, + { label: '가나다 (36pt)', title: '36pt', data: '36pt', klass: 'tx-36pt' } + ] + } +); + +Trex.Tool.FontSize = Trex.Class.create({ + $const: { + __Identity: 'fontsize' + }, + $extend: Trex.Tool, + $mixins: [Trex.I.FontTool, Trex.I.MenuFontTool, Trex.I.WrappingSpanFontTool], + beforeOnInitialized: function(config) { + this.createFontSizeMap(config); + }, + createButton: function() { + var defaultProperty = this.getDefaultProperty(); + var button = this.button = new Trex.Button.Select(this.buttonCfg); + button.setValue(defaultProperty); + button.setText(this.getTextByValue(defaultProperty)); + return button; + }, + createMenu: function() { + return new Trex.Menu.Select(this.menuCfg); + }, + createFontSizeMap: function(config) { + var fontSizeMap = this.fontSizeMap = {}; + config.options.each(function(option) { + fontSizeMap[option.data] = option.title; + }); + [ + //NOTE: font tag의 속성으로 글자 크기를 지정했을 경우 + { title: '8pt', data: '1' }, + { title: '10pt', data: '2' }, + { title: '12pt', data: '3' }, + { title: '14pt', data: '4' }, + { title: '18pt', data: '5' }, + { title: '24pt', data: '6' }, + { title: '36pt', data: '7' }, + { title: '7.5pt', data: '10px'}, + { title: '8pt', data: '11px' }, + { title: '9pt', data: '12px' }, + { title: '10pt', data: '13px' }, + { title: '11pt', data: '15px' }, + { title: '12pt', data: '16px' }, + { title: '14pt', data: '19px' }, + { title: '18pt', data: '24px' }, + { title: '24pt', data: '32px' }, + { title: '36pt', data: '48px' }, + { title: '8pt', data: 'x-small' }, + { title: '10pt', data: 'small' }, + { title: '12pt', data: 'medium' }, + { title: '14pt', data: 'large' }, + { title: '18pt', data: 'x-large' }, + { title: '24pt', data: 'xx-large' }, + { title: '36pt', data: '-webkit-xxx-large' } //NOTE: webkit 계열에서 사용하는 글자 크기 + ].each(function(option) { + fontSizeMap[option.data] = option.title; + }); + }, + reliableQueriedValue: function(value) { + return $tx.webkit === false; + }, + getTextByValue: function(value) { + var matchedText = this.fontSizeMap[value]; + if (!matchedText) { + var round = Math.round(parseFloat(value)).toPx(); + matchedText = this.fontSizeMap[round]; + } + return matchedText; + }, + getRelatedCssPropertyNames: function() { + return ["font", this.getCssPropertyName()]; + }, + getCssPropertyName: function() { + return "fontSize"; + }, + getQueryCommandName: function() { + return "fontsize"; + }, + getDefaultProperty: function() { + return this.canvas.getStyleConfig().fontSize; + }, + getFontTagAttribute: function() { + return "size"; + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/forecolor.js b/src/main/webapp/daumeditor/js/trex/tool/forecolor.js new file mode 100644 index 0000000..4ed2e57 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/forecolor.js @@ -0,0 +1,77 @@ +/** + * @fileoverview + * 글자색을 변경하기 위해 쓰이는 '글자색' Icon을 위해 필요한 source, + * Class Trex.Tool.ForeColor 와 configuration을 포함 + * + */ +TrexConfig.addTool( + "forecolor", + { + defaultcolor: "#7c84ef", + wysiwygonly: _TRUE, + sync: _FALSE, + status: _TRUE, + useFavorite: _TRUE, + thumbs: Trex.__CONFIG_COMMON.thumbs, + needRevert: _TRUE + } +); + +Trex.Tool.ForeColor = Trex.Class.create({ + $const: { + __Identity: 'forecolor' + }, + $extend: Trex.Tool, + $mixins: [Trex.I.CookieBaker, Trex.I.FontTool, Trex.I.MenuFontTool, Trex.I.WrappingSpanFontTool], + beforeOnInitialized: function(config) { + this.useFavorite = !!config.useFavorite; + if (this.useFavorite) { + this.initCookie('txForeColorFavorite'); + } + }, + createButton: function() { + var initialColor = this.readCookie() || this.getDefaultProperty(); + + var button = this.button = new Trex.Button.Splits(this.buttonCfg); + button.setValue(initialColor); + this.syncButton(initialColor); + return button; + }, + createMenu: function() { + return new Trex.Menu.ColorPallete(this.menuCfg); + }, + onAfterHandler: function(data) { + this.syncButton(data); + if (this.useFavorite) { + this.writeCookie(data); + } + }, + getDefaultProperty: function() { + return this.canvas.getStyleConfig().color; + }, + getRelatedCssPropertyNames: function() { + return [this.getCssPropertyName()]; + }, + getCssPropertyName: function() { + return "color"; + }, + getQueryCommandName: function() { + return "forecolor"; + }, + computeNewStyle: function(data) { + var style = {}; + style[this.getCssPropertyName()] = data || this.getDefaultProperty(); + return style; + }, + syncButton: function(color) { + try { + if (color) { + $tx.setStyle(this.button.elButton, {'backgroundColor': color}); + } + } catch(e) { + console.log(e); + } + } +}); + + diff --git a/src/main/webapp/daumeditor/js/trex/tool/fullscreen.js b/src/main/webapp/daumeditor/js/trex/tool/fullscreen.js new file mode 100644 index 0000000..f52313d --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/fullscreen.js @@ -0,0 +1,37 @@ +(function(){ + TrexConfig.addTool( + "fullscreen", { + wysiwygonly: _FALSE, + status: _FALSE, + switched: _FALSE, + minHeight: 200, + minWidth: 766, + asyncUrl: "trex/tool/async/fullscreen.js" + } + ); + + Trex.Tool.FullScreen = Trex.Class.create({ + $const: { + __Identity: 'fullscreen' + }, + $extend: Trex.AsyncTool, + oninitialized: function(config) { + this.weave.bind(this)( + new Trex.Button(this.buttonCfg), + _NULL, + this.onLoadModule // define in Trex.AsyncTool + ); + + var self = this; + // #FTDUEDTR-150 + this.bindKeyboard({ // ctrl + m - 넓게쓰기 + ctrlKey: _TRUE, + keyCode: 77 + }, function () { + if (!self.loaded) { + self.onLoadModule(); + } + }); + } + }); +})(); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/horizontalrule.js b/src/main/webapp/daumeditor/js/trex/tool/horizontalrule.js new file mode 100644 index 0000000..a3fc4c1 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/horizontalrule.js @@ -0,0 +1,101 @@ +/** + * @fileoverview + * 여러 스타일의 구분선을 삽입할 때 쓰이는 menu를 포함하는 Tool인 '구분선' Icon Source, + * Class Trex.Tool.HorizontalRule과 configuration을 포함 + * + */ +TrexConfig.addTool( + "horizontalrule", + { + wysiwygonly: _TRUE, + sync: _FALSE, + status: _TRUE, + top: _NULL, + left: _NULL, + options: [{ data: 'tx-hr-border-1', + image: '#iconpath/horizontalrule/line01.gif?v=2', + html: '
          ' + }, + { data: 'tx-hr-border-2', + image: '#iconpath/horizontalrule/line02.gif?v=2', + html: '
          ' + }, + { data: 'tx-hr-border-3', + image: '#iconpath/horizontalrule/line04.gif?v=2', + html: '
          ' + }, + { data: 'tx-hr-image-1', + image: '#iconpath/horizontalrule/line03.gif?v=2', + html: '

          ' + }, + { data: 'tx-hr-image-2', + image: '#iconpath/horizontalrule/line05.gif?v=2', + html: '

          ' + }, + { data: 'tx-hr-image-3', + image: '#iconpath/horizontalrule/line06.gif?v=2', + html: '

          ' + }, + { data: 'tx-hr-image-4', + image: '#iconpath/horizontalrule/line07.gif?v=2', + html: '

          ' + }] + }, + function(root){ + var _config = TrexConfig.getTool("horizontalrule", root); + _config.options.each(function(option) { + option.image = TrexConfig.getIconPath(option.image); + if(option.html) { + option.html = TrexConfig.getDecoPath(option.html); + } + }); + } +); + +Trex.Tool.HorizontalRule = Trex.Class.create({ + $const: { + __Identity: 'horizontalrule' + }, + $extend: Trex.Tool, + oninitialized: function(config) { + var _canvas = this.canvas; + + var map = {}; + config.options.each(function(option) { + map[option.data] = { + html: option.html + }; + }); + + var _toolHandler = function(data) { + if(!map[data]) { + return; + } + var _item = map[data]; + if (_canvas.isWYSIWYG()) { + _canvas.execute(function(processor){ + // hr 태그는 p 태그 하위에 포함 될 수 없으므로 newline으로 내용을 추가 한 뒤에 래핑된 p태그를 제거한다. + var pastedNode = processor.pasteContent(_item.html, _TRUE); + if ($tom.isTagName(pastedNode.parentNode, 'p')) { + $tom.unwrap(pastedNode.parentNode); + } + }); + } else { + _canvas.execute(function(processor) { + processor.insertTag('',_item.html); + }); + } + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button(this.buttonCfg), + /* menu */ + new Trex.Menu.List(this.menuCfg), + /* handler */ + _toolHandler + ); + } + +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/indent.js b/src/main/webapp/daumeditor/js/trex/tool/indent.js new file mode 100644 index 0000000..184026e --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/indent.js @@ -0,0 +1,114 @@ +/** + * @fileoverview + * '들여쓰기' Icon Source, + * Class Trex.Tool.Indent configuration을 포함 + * + */ +TrexConfig.addTool( + "indent", + { + sync: _FALSE, + status: _FALSE, + hotKey: { + // tab - 들여쓰기 + keyCode: 9 + } + } +); + +Trex.Tool.Indent = Trex.Class.create({ + $const: { + __Identity: 'indent' + }, + $extend: Trex.Tool, + oninitialized: function(config) { + this.weave(new Trex.Button(this.buttonCfg), _NULL, this.handler); + this.bindKeyboard(config.hotKey, this.tabKeyHandler.bind(this)); + this.createHandlers(); + }, + handler: function() { + var self = this, canvas = self.canvas; + canvas.execute(function(processor) { + self.onIndentClicked.handle(processor); + }); + }, + tabKeyHandler: function() { + var self = this; + this.canvas.execute(function(processor) { + self.onTabPressed.handle(processor); + }); + }, + createHandlers: function() { + var IndentTool = Trex.Tool.Indent; + var Judge = IndentTool.Judge; + var Operation = IndentTool.Operation; + var Handler = IndentTool.Handler; + var ChainHandler = Trex.ChainHandler; + + var onDefaultIndent = ChainHandler.connect([ + new ChainHandler(Judge.ListItem, Operation.IndentListItem), + new ChainHandler(Judge.BlockNode, Operation.IndentBlockNode) + ]); + var onCollapsedTabPressed = ChainHandler.connect([ + new ChainHandler(Judge.And(Judge.HeadOfParagraph, Judge.ListItem), Operation.IndentListItem), + new ChainHandler(Judge.ChildOfLastTableCell, Operation.GoToBelowTable), + new ChainHandler(Judge.ChildOfTableCell, Operation.GoToNextCell), + new ChainHandler(Judge.AlwaysTrue, Operation.IndentBlockNode) +// new ChainHandler(Judge.And(Judge.HeadOfParagraph, Judge.BlockNode), Operation.IndentBlockNode), +// new ChainHandler(Judge.AlwaysTrue, Operation.AddFourSpaces) + ]); + + this.onTabPressed = new Handler(onCollapsedTabPressed, onDefaultIndent, onDefaultIndent); + this.onIndentClicked = new Handler(onDefaultIndent, onDefaultIndent, onDefaultIndent); + } +}); + +Trex.Tool.Indent.Handler = Trex.Class.create({ + initialize: function (collasped, selection, tableCell) { + var IndentTool = Trex.Tool.Indent; + var RangeIndenter = IndentTool.RangeIndenter; + var TableCellIndenter = IndentTool.TableCellIndenter; + this.collapsedRange = new RangeIndenter(collasped); + this.selectedRange = new RangeIndenter(selection); + this.tableCellSelected = new TableCellIndenter(tableCell); + }, + handle: function(processor) { + var tableCells = (processor.table) ? processor.table.getTdArr() : []; + if (tableCells.length > 0) { + this.tableCellSelected.indent(processor); + } else if (processor.isCollapsed()) { + this.collapsedRange.indent(processor); + } else { + this.selectedRange.indent(processor); + } + } +}); + +Trex.ChainHandler = Trex.Class.create({ + $const: { + connect: function(handlers) { + var firstHandler = handlers[0]; + for (var i = 1; i < handlers.length; i++) { + handlers[i - 1].setNext(handlers[i]); + } + return firstHandler; + } + }, + initialize: function(judge, executor) { + this.judge = judge; + this.executor = executor; + return this; + }, + setNext: function(successor) { + this.successor = successor; + return this.successor; + }, + handle: function() { + var args = arguments; + if (this.judge.apply(this, args)) { + this.executor.apply(this, args); + } else if (this.successor) { + this.successor.handle.apply(this.successor, args); + } + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/indentHelper.js b/src/main/webapp/daumeditor/js/trex/tool/indentHelper.js new file mode 100644 index 0000000..b217797 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/indentHelper.js @@ -0,0 +1,354 @@ +(function() { + Trex.Tool.Indent.Helper = { + findBlocksToIndentFromRange: function(range, processor, savedCaret) { + var startCaret = savedCaret.getCaret(_TRUE); + var endCaret = savedCaret.getCaret(_FALSE); + if (processor.isCollapsed()) { + // getStartNode, getStartOffset 호출하지 않으면 오류가 발생한다. + range.getStartNode(); + range.getStartOffset(); + var node = this.findBlockToIndent(startCaret, processor); + var isEmptyParagraph = (node.tagName == "P" && node.firstChild == startCaret && node.lastChild == endCaret); + if (isEmptyParagraph) { + processor.stuffNode(node); + } + // TODO : block을 create한 경우만 restoreInternal을 해야한다. tab press[P로 감싸여 있지 않은 텍스트에서 tab 누르기] 테스트케이스와 관련있음 + savedCaret.restoreInternal(); + return [ node ]; + } else { + var iterator = new goog.dom.TextRangeIterator(startCaret, 0, endCaret, 0); + return this.findBlocksToIndentFromIterator(processor, iterator); + } + }, + findBlocksToIndentFromIterator: function(processor, iterator) { + var self = this; + var allNodes = self.collectAllNodes(iterator); + var leafNodes = self.selectLeafNodes(allNodes); + var validLeafNodes = self.filterUnableToIndent(leafNodes); + + var blocksToIndent = validLeafNodes.map(function(node) { + return self.findBlockToIndent(node, processor); + }); + blocksToIndent = blocksToIndent.compact().uniq(); + return blocksToIndent; + }, + collectAllNodes: function (iterator) { + var allNodes = []; + goog.iter.forEach(iterator, function(node) { + if (!allNodes.contains(node)) { + allNodes.push(node); + } + }); + return allNodes; + }, + selectLeafNodes: function (nodes) { + var leafNodes = []; + nodes.each(function(node) { + if (node.childNodes.length == 0) { + leafNodes.push(node); + } + }); + return leafNodes; + }, + filterUnableToIndent: function (nodes) { + var result = []; + nodes.each(function(node) { + // indent를 하지 못하는 TextNode를 걸러낸다. + if ($tom.kindOf(node, "ul,ol,dl")) { + $tom.removeListIfEmpty(node); + } else if ($tom.kindOf(node.parentNode, "table") && $tom.isText(node)) { + + } else if ($tom.kindOf(node.parentNode, "thead,tbody,tfooter") && !$tom.kindOf(node, "tr")) { + + } else if ($tom.kindOf(node.parentNode, "tr") && !$tom.kindOf(node, "th,td")) { + + } else if ($tom.kindOf(node.parentNode, "ul,ol,dl") && !$tom.kindOf(node, "li,dd,dt")) { + + } else { + result.push(node); + } + }); + return result; + }, + findBlockToIndent: function(node) { + var block = this.findOrCreateBlockForNode(node); + return this.findIndentableHigherBlock(block); + }, + findOrCreateBlockForNode: function(node) { + if ($tom.isText(node) || $tom.kindOf(node, "%inline,img")) { + var blockAncestor = $tom.ancestor(node, "p,li,dd,dt,h1,h2,h3,h4,h5,h6,div"); + if (blockAncestor && $tom.children(blockAncestor, "%block").length == 0) { + return blockAncestor; + } else { + blockAncestor = $tom.ancestor(node, "%paragraph,pre,noscript,form,hr,address,fieldset,blockquote"); + return $tom.wrapInlinesWithP(node, blockAncestor); + } + } else { + return node; + } + }, + findIndentableHigherBlock: function(block) { + var foundNode = _NULL; + var visitNode = block; + while (visitNode && visitNode.tagName != "BODY") { + if (!foundNode && $tom.kindOf(visitNode, "p,div,h1,h2,h3,h4,h5,h6")) { + foundNode = visitNode; + } else if ($tom.kindOf(visitNode, "li,dd,dt")) { + return visitNode; + } else if (foundNode && $tom.kindOf(visitNode, "td,th")) { + return foundNode; + } + visitNode = visitNode.parentNode; + } + return foundNode; + }, + findAncestorTableCell: function(node) { + return $tom.ancestor(node, "td,th"); + }, + findNextCell: function(node) { + var currentCell = this.findCurrentCell(node); + var nextCell = $tom.next(currentCell, "td,th"); + if (!nextCell) { + var nextRow = $tom.next($tom.parent(currentCell), "tr"); + if (nextRow) { + nextCell = $tom.first(nextRow, "td,th"); + } + } + return nextCell; + }, + findPreviousCell: function(node) { + var currentCell = this.findCurrentCell(node); + var prevCell = $tom.previous(currentCell, "td,th"); + if (!prevCell) { + var prevRow = $tom.previous($tom.parent(currentCell), "tr"); + if (prevRow) { + prevCell = $tom.last(prevRow, "td,th"); + } + } + return prevCell; + }, + findCurrentCell: function(node) { + return $tom.kindOf(node, "td,th") ? node : this.findAncestorTableCell(node); + }, + isCaretOnStartOf: function(node, range) { + var startNode = range.getStartNode(); + var startOffset = range.getStartOffset(); + while ($tom.isElement(startNode) && startNode.childNodes.length > 0) { + startNode = startNode.childNodes[startOffset]; + startOffset = 0; + } + if (!startNode) { + return _TRUE; + } + var iterator = new goog.dom.TextRangeIterator(node, 0, startNode, startOffset); + var hasContent = _FALSE; + goog.iter.forEach(iterator, function(visiting) { + if (visiting.nodeType == 3 && !$tom.kindOf(visiting.parentNode, "script,style")) { + var text = (visiting === startNode) ? visiting.nodeValue.substring(0, startOffset) : visiting.nodeValue; + text = text.replace(Trex.__WORD_JOINER_REGEXP, ""); + hasContent = $tom.removeMeaninglessSpace(text).length > 0; + } else if ($tom.isElement(visiting)) { + if ($tom.kindOf(visiting, "img,embed,iframe")) { + hasContent = _TRUE; + } + } + if (hasContent) { + throw goog.iter.StopIteration; + } + }); + return !hasContent; + } + }; + var indentHelper = Trex.Tool.Indent.Helper; + + var $caret_moved = {}; + // range 사용해서 indent할 block을 찾아서 chain handler 작업 지시한다. + Trex.Tool.Indent.RangeIndenter = Trex.Class.create({ + initialize: function(handler) { + this.handler = handler; + }, + indent: function(processor) { + var self = this; + processor.executeUsingCaret(function(range, savedCaret) { + var blockNodes = indentHelper.findBlocksToIndentFromRange(range, processor, savedCaret); + blockNodes.each(function(node) { + try { + self.handler.handle(node, processor, range); + } catch (e) { + if (e == $caret_moved) { + savedCaret.dispose(); + } else { + throw e; + } + } + }); + }); + } + }); + + Trex.Tool.Indent.TableCellIndenter = Trex.Class.create({ + initialize: function(handler) { + this.handler = handler; + }, + indent: function(processor) { + var self = this; + var tableCells = (processor.table) ? processor.table.getTdArr() : []; + tableCells.each(function(cell) { + var iterator = new goog.dom.TagIterator(cell); + var blockNodes = indentHelper.findBlocksToIndentFromIterator(processor, iterator); + blockNodes.each(function(node) { + self.handler.handle(node, processor, _NULL); + }); + }); + } + }); + + + + Trex.Tool.Indent.Judge = { + ChildOfFirstTableCell: function(node) { + var tableCell = indentHelper.findAncestorTableCell(node); + return tableCell && !indentHelper.findPreviousCell(tableCell); + }, + ChildOfLastTableCell: function(node) { + var tableCell = indentHelper.findAncestorTableCell(node); + return tableCell && !indentHelper.findNextCell(tableCell); + }, + ChildOfTableCell: function(node) { + return indentHelper.findAncestorTableCell(node); + }, + ListItem: function(node) { + return $tom.kindOf(node, "li") && $tom.kindOf(node.parentNode, "ol,ul"); + }, + OneDepthList: function(node) { + if ($tom.kindOf(node, "li")) { + // TODO: depth계산을 할 것이냐 부모/조상만 확인하여 return 할 것이냐 고민.. + var listBuilder = new Trex.Tool.StyledList.ListBuilder(); + if (listBuilder.countDepthOfList(node) == 1) { + return _TRUE; + } + } + return _FALSE; + }, + IndentedBlockNode: function(node) { + return $tom.kindOf(node, "%block") && node.style && node.style.marginLeft != ""; + }, + BlockNode: function(node) { + // TODO %block vs %paragraph + return $tom.kindOf(node, "%block"); + }, + HeadOfParagraph: function(node, processor, range) { + return indentHelper.isCaretOnStartOf(node, range); + }, + And: function(judge1, judge2){ + return function() { + return judge1.apply(this, arguments) && judge2.apply(this, arguments); + } + }, + AlwaysTrue: function() { + return _TRUE; + } + }; + + Trex.Tool.Indent.Operation = { + /* indent */ + GoToBelowTable: function(node, processor) { + var table = $tom.ancestor(node, 'table'); + processor.bookmarkToNext(table); + throw $caret_moved; + }, + GoToNextCell: function(node, processor) { + var nextCell = indentHelper.findNextCell(node); + if (nextCell) { + processor.selectFirstText(nextCell); + throw $caret_moved; + } + }, + IndentListItem: function(node) { + var groupNode = $tom.ancestor(node, 'ul,ol,dl'); + if (groupNode) { + var prevSibling = $tom.previous(node); + var nextSibling = $tom.next(node); + if ($tom.kindOf(prevSibling, "ul,ol,dl")) { + // move to previous Group + $tom.append(prevSibling, node); + } else { + var newGroupNode = $tom.clone(groupNode); + $tom.applyStyles(newGroupNode, { marginLeft: _NULL, paddingLeft: _NULL }); + $tom.wrap(newGroupNode, node); + } + // move next Siblings to same parent + if ($tom.kindOf(nextSibling, "ul,ol,dl")) { + $tom.moveChild(nextSibling, node.parentNode); + $tom.remove(nextSibling); + } + } + }, + getChildrenAsElement: function(node) { + var blocks = []; + var childNodes = node.childNodes; + for (var i = 0, len = childNodes.length; i < len; i++) { + var child = childNodes[i]; + if ($tom.isText(child)) { + var wrappedChild = $tom.wrapInlinesWithP(child, node); + blocks.push(wrappedChild); + } else if ($tom.isElement(child)) { + blocks.push(child); + } + } + return blocks; + }, + IndentBlockNode: function(node) { + $tom.applyStyles(node, {marginLeft: "+2em"}); + }, +// AddFourSpaces: function(node, processor) { +// processor.pasteContent("    ", _FALSE); +// }, + /* outdent */ + GoToAboveTable: function(node, processor) { + var table = $tom.ancestor(node, 'table'); + processor.bookmarkToPrevious(table); + throw $caret_moved; + }, + GoToPreviousCell: function(node, processor) { + var previousCell = indentHelper.findPreviousCell(node); + if (previousCell) { + processor.moveCaretTo(previousCell, _TRUE); + throw $caret_moved; + } + }, + OutdentListItem: function(node, processor) { + var list = $tom.ancestor(node, 'ul,ol,dl'); + if (!list) { + return; + } + var parentNode = list.parentNode; + if ($tom.kindOf(parentNode, "li")) { + $tom.unwrap(parentNode); + parentNode = list.parentNode; + } + var grandParentList = $tom.kindOf(parentNode, 'ul,ol,dl') ? parentNode : _NULL; + var newList; + if (grandParentList) { + newList = $tom.divideNode(list, $tom.indexOf(node)); + $tom.insertAt(node, newList); + } else { + newList = $tom.divideNode(list, $tom.indexOf(node)); + var cssText = $tom.getStyleText(node); + // list의 스타일을 p에도 적용한다. + var p = processor.newNode('p'); + $tom.setStyleText(p, cssText); + $tom.replace(node, p); + $tom.insertAt(p, newList); + } + $tom.removeListIfEmpty(list); + $tom.removeListIfEmpty(newList); + }, + OutdentBlockNode: function(node) { + $tom.applyStyles(node, {marginLeft: "-2em"}); + }, + Propagate: function() { + throw $propagate; + } + }; +})(); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/insertcells.js b/src/main/webapp/daumeditor/js/trex/tool/insertcells.js new file mode 100644 index 0000000..790f9d1 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/insertcells.js @@ -0,0 +1,72 @@ +/** + * @fileoverview + * '행,열 삽입' Icon Source, + * Class Trex.Tool.Insert configuration을 포함 + * + */ +TrexConfig.addTool( + "insertcells", + { + sync: _FALSE, + status: _TRUE, + options: [ + { label: '위로 삽입', title: '위로 삽입', data: 'addRowUpper' , klass: 'tx-insertcells-1'}, + { label: '아래 삽입', title: '아래 삽입', data: 'addRowBelow', klass: 'tx-insertcells-2' }, + { label: '왼쪽 삽입', title: '왼쪽 삽입', data: 'addColLeft' , klass: 'tx-insertcells-3'}, + { label: '오른쪽 삽입', title: '오른쪽 삽입', data: 'addColRight', klass: 'tx-insertcells-4' } + ] + } +); + +Trex.Tool.Insertcells = Trex.Class.create({ + $const: { + __Identity: 'insertcells' + }, + $extend: Trex.Tool, + oninitialized: function(config) { + var _canvas = this.canvas; + + var _defaultProperty = _canvas.getStyleConfig().insert; + var _optionz = (config.options || []); + var _map = {}; + _optionz.each(function(option) { + _map[option.data] = option.title; + }); + + /* + * "addRowUpper", "addRowBelow", "addColLeft", "addColRight" + */ + var _toolHandler = function(command) { + _canvas.execute(function(processor){ + if (processor.table) { + switch(command){ + case "addRowUpper": + processor.table.insertRowAbove(); + break; + case "addRowBelow": + processor.table.insertRowBelow(); + break; + case "addColLeft": + processor.table.insertColLeft(); + break; + case "addColRight": + processor.table.insertColRight(); + break; + } + } + }); + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button.Select(TrexConfig.merge(this.buttonCfg, { + selectedValue: _defaultProperty + })), + /* menu */ + new Trex.Menu.Select(this.menuCfg), + /* handler */ + _toolHandler); + } +}); + diff --git a/src/main/webapp/daumeditor/js/trex/tool/insertlink.js b/src/main/webapp/daumeditor/js/trex/tool/insertlink.js new file mode 100644 index 0000000..45f3fd0 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/insertlink.js @@ -0,0 +1,303 @@ +/** + * @fileoverview + * '링크삽입' Icon Source, + * Class Trex.Tool.Link과 configuration을 포함 + * + */ +TrexConfig.addTool( + "link", + { + wysiwygonly: _TRUE, + sync: _FALSE, + status: _TRUE + } +); + +TrexMessage.addMsg({ + '@insertlink.cancel.image': "#iconpath/btn_cancel.gif?v=2", + '@insertlink.confirm.image': "#iconpath/btn_confirm.gif?v=2", + '@insertlink.invalid.url': "URL을 입력해주세요.", + '@insertlink.link.alt': "[#{title}]로 이동합니다.", + '@insertlink.remove.image': "#iconpath/btn_remove.gif?v=2", + '@insertlink.title': "선택된 부분에 걸릴 URL주소를 넣어주세요.", + '@insertlink.onclick.target': "클릭 시", + '@insertlink.target.blank': "새 창", + '@insertlink.target.self': "현재창", + '@insertlink.class.name': "tx-link" +}); + +Trex.Tool.Link = Trex.Class.create({ + $const: { + __Identity: 'link' + }, + $extend: Trex.Tool, + oninitialized: function() { + var _tool = this; + var _canvas = this.canvas; + + var _toolHandler = function(data) { + if (_canvas.isWYSIWYG()) { + if (data) { + _canvas.execute(function(processor) { + var _attributes = { + 'href': data.link, + 'target': data.target ? data.target : '_blank', + 'className': data.className + }; + var _aNode, _nodes; + if(processor.findNode('a')) { + _aNode = processor.findNode('a'); + $tom.applyAttributes(_aNode, _attributes); + } else if (processor.hasControl()) { + _nodes = processor.controls(function() { + return 'img'; + }); + $tom.wrap(processor.create('a', _attributes), _nodes); + } else if(processor.isCollapsed()) { + _aNode = processor.create('a', _attributes); + var text = processor.doc.createTextNode(data.link); + _aNode.appendChild(text); + processor.pasteNode(_aNode, _FALSE); + } else { + _nodes = processor.inlines(function() { + return '%text,img,a,%inline'; + }); + _nodes.each(function(node) { + if ($tom.hasUsefulChildren(node, _TRUE)) { + if ($tom.kindOf(node, 'a')) { + $tom.applyAttributes(node, _attributes); + } else if ($tom.kindOf(node, 'img')) { + $tom.wrap(processor.create('a', _attributes), [node]); + } else { + var _styleValue = $tom.getStyleText(node); + var _oldNodes = $tom.collectAll(node, 'a'); + _oldNodes.each(function(oldNode){ + $tom.moveChildToParent(oldNode); + $tom.remove(oldNode); + }); + var _aNode = processor.create('a', _attributes); + $tom.setStyleText(_aNode, _styleValue); + $tom.replace(node, _aNode); + } + } else { + $tom.remove(node); + } + }); + } + }); + } else { + _canvas.execute(function(processor) { + var _node = processor.findNode('a'); + if (_node) { + processor.unwrap(_node); + } + }); + } + }else{ + _canvas.execute(function(processor) { + processor.insertTag('',''); + }); + } + }; + + var __DefaultValue = ""; + var _initHandler = function() { + if (_canvas.isWYSIWYG()) { + return _canvas.query(function(processor){ + var node, value, target, text; + node = processor.findNode('a'); + if (node) { + value = $tom.getAttribute(node, "href"); + if (value) { + target = $tom.getAttribute(node, "target"); + return { + exist: _TRUE, + value: value, + target: target + }; + } + } else { + text = processor.getText(); + if (/^\w+\:\/\/\S+/.test(text)) { // only for url with protocol. + return { + exist: _FALSE, + value: text + } + } + } + return { + exist: _FALSE, + value: __DefaultValue + }; + }); + }else{ + return { + exist: _FALSE, + value: __DefaultValue + }; + } + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button(this.buttonCfg), + /* menu */ + new Trex.Menu.Link(this.menuCfg), + /* handler */ + _toolHandler, + /* handler for menu initial value */ + _initHandler + ); + + var _popdownHandler = function(ev) { + _tool.button.onMouseDown(ev); + }; + this.bindKeyboard({ // ctrl + k - 링크 + ctrlKey: _TRUE, + keyCode: 75 + }, _popdownHandler); + } + +}); + +/* Trex.Menu.Link ************************************************************************************/ +Trex.MarkupTemplate.add( + 'menu.insertlink', [ + '
          ', + '
          ', + '
          ', + ' @insertlink.title', + '
          ', + '
          ', + ' ', + '
          ', + '
          ', + ' @insertlink.onclick.target', + ' @insertlink.target.blank', + ' @insertlink.target.self', + '
          ', + '
          ', + '
          ', + '
          ', + '
          ', + ' ', + ' ', + ' ', + '
          ', + '
          ', + '
          ' + ].join("") +); +Trex.Menu.Link = Trex.Class.create({ + $extend: Trex.Menu, + ongenerated: function() { + var _elMenu = this.elMenu; + Trex.MarkupTemplate.get('menu.insertlink').evaluateToDom({}, _elMenu); + + var _elTargets = $tom.collectAll(_elMenu, ".tx-rp input"); + var _newInput = this.newInput = _elTargets[0]; + $tx.observe(_newInput, "click", function(){ + _newInput.checked = "checked"; + _currInput.checked = ""; + }); + var _currInput = this.currInput = _elTargets[1]; + $tx.observe(_currInput, "click", function(){ + _currInput.checked = "checked"; + _newInput.checked = ""; + }); + + var _checkValidation = this.urlValidator; + var _elInput = this.elInput = $tom.collect(_elMenu, 'input.tx-text-input'); + $tx.observe(_elInput, "keydown", function(ev) { + if(ev.keyCode == 13) { //Enter + var _val = _checkValidation(_elInput.value); + if (!_val) { + alert( TXMSG("@insertlink.invalid.url") ); + $tx.stop(ev); + return; + } + var _target = _newInput.checked ? _newInput.value : _currInput.value; + this.onSelect(ev, { + link: _val, + target: _target, + className: TXMSG("@insertlink.class.name") + }); + $tx.stop(ev); + } + }.bindAsEventListener(this)); + + var _elImgs = $tom.collectAll(_elMenu, 'img'); + $tx.observe(_elImgs[0], "click", function(ev) { + var _val = _checkValidation(_elInput.value); + if (!_val) { + alert( TXMSG("@insertlink.invalid.url") ); + $tx.stop(ev); + return; + } + var _target = _newInput.checked ? _newInput.value : _currInput.value; + this.onSelect(ev, { + link: _val, + target: _target, + className: TXMSG("@insertlink.class.name") + }); + $tx.stop(ev); + }.bind(this)); + + $tx.observe(_elImgs[1], "click", function() { + this.onCancel(); + }.bindAsEventListener(this)); + + var _elRemoveBtn = $tx(_elImgs[2]); + $tx.observe(_elRemoveBtn, "click", function(ev) { + this.onSelect(ev, _NULL); + }.bindAsEventListener(this)); + this.toggleRemoveBtn = function(exist) { + _elRemoveBtn.style.display = ((exist)? '': 'none'); + }; + }, + onregenerated: function() { + var _elInput = this.elInput; + var _initData = this.initHandler(); + _elInput.value = _initData.value; + if(_initData.target == "_self" || _initData.target == "_top"){ + this.currInput.checked = "checked"; + this.newInput.checked = ""; + }else{ + this.newInput.checked = "checked"; + this.currInput.checked = ""; + } + + this.toggleRemoveBtn(_initData.exist); + _elInput.focus(); + + // Set focus to end of input box. ( For IE ); + if ($tx.msie_nonstd) { + setTimeout(function() { + try { + _elInput.focus(); + var _sel = _DOC.selection.createRange(); + _sel.move("character", _elInput.value.length); + _sel.select(); + } + catch (ignore) {} + }, 100); + } + }, + urlValidator: function(value) { + if (!value) { + return _FALSE; + } + value = value.trim(); + if (value.length == 0) { + return _FALSE; + } + var pattern = /^[a-z0-9+.-]+:|^\/\//i;// FTDUEDTR-1330 && MAILCS-24754 + if ( pattern.test(value) ) { + return value; + } else { + return "http://" + value; + } + } +}); + diff --git a/src/main/webapp/daumeditor/js/trex/tool/italic.js b/src/main/webapp/daumeditor/js/trex/tool/italic.js new file mode 100644 index 0000000..9e4eb81 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/italic.js @@ -0,0 +1,39 @@ +/** + * @fileoverview + * 'Italic' Icon Source, + * Class Trex.Tool.Italic과 configuration을 포함 + * + */ +TrexConfig.addTool( + "italic", + { + wysiwygonly: _TRUE, + sync: _TRUE, + status: _TRUE, + hotKey: { + // ctrl + i - 기울임 + ctrlKey: _TRUE, + keyCode: 73 + } + } +); + +Trex.Tool.Italic = Trex.Class.create({ + $const: { + __Identity: 'italic' + }, + $extend: Trex.Tool, + $mixins: [Trex.I.FontTool, Trex.I.ButtonFontTool, Trex.I.WrappingDummyFontTool], + getRelatedCssPropertyNames: function() { + return ["font", this.getCssPropertyName()]; + }, + getCssPropertyName: function() { + return "fontStyle"; + }, + getQueryCommandName: function() { + return "italic"; + }, + isStyleApplied: function(node) { + return $tx.getStyle(node, "fontStyle") == "italic"; + } +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/lineheight.js b/src/main/webapp/daumeditor/js/trex/tool/lineheight.js new file mode 100644 index 0000000..da9e2b0 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/lineheight.js @@ -0,0 +1,64 @@ +/** + * @fileoverview + * '줄간격' Icon Source, + * Class Trex.Tool.LineHeight configuration을 포함 + * + */ +TrexConfig.addTool( + "lineheight", + { + sync: _FALSE, + status: _TRUE, + options: [ + { label: '50%', title: '50%', data: '0.5' }, + { label: '80%', title: '80%', data: '0.8' }, + { label: '100%', title: '100%', data: '1.0' }, + { label: '120%', title: '120%', data: '1.2' }, + { label: '150%', title: '150%', data: '1.5' }, + { label: '180%', title: '180%', data: '1.8' }, + { label: '200%', title: '200%', data: '2.0' } + ] + } +); + +Trex.Tool.LineHeight = Trex.Class.create({ + $const: { + __Identity: 'lineheight' + }, + $extend: Trex.Tool, + oninitialized: function(config) { + var _canvas = this.canvas; + + var _defaultProperty = _canvas.getStyleConfig().lineHeight; + var _optionz = (config.options || []); + var _map = {}; + _optionz.each(function(option) { + _map[option.data] = option.title; + }); + + var _toolHandler = function(command) { + _canvas.execute(function(processor) { + var _nodes = processor.blocks(function() { + return '%paragraph'; + }); + processor.apply(_nodes, { + 'style': { + 'lineHeight': command + } + }); + }); + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button.Select(TrexConfig.merge(this.buttonCfg, { + selectedValue: _defaultProperty + })), + /* menu */ + new Trex.Menu.Select(this.menuCfg), + /* handler */ + _toolHandler); + } +}); + diff --git a/src/main/webapp/daumeditor/js/trex/tool/menuFontTool.js b/src/main/webapp/daumeditor/js/trex/tool/menuFontTool.js new file mode 100644 index 0000000..7dc601d --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/menuFontTool.js @@ -0,0 +1,93 @@ +Trex.I.MenuFontTool = Trex.Mixin.create({ + oninitialized: function(config) { + var self = this; + self.beforeOnInitialized(config); + var menuInitHandler = self.menuInitHandler && self.menuInitHandler.bind(self); + self.weave(self.createButton(), self.createMenu(), self.handler, menuInitHandler); + if (config.sync) { + self.startSyncButtonWithStyle(); + } + }, + rangeExecutor: function(processor, newStyle, range) { + this.wrapTextAsStyledSpan(processor, newStyle, range); + }, + startSyncButtonWithStyle: function() { + var self = this; + self.canvas.observeJob(Trex.Ev.__CANVAS_PANEL_QUERY_STATUS, function(goog_range) { + self.syncButton(self.queryCurrentStyle(goog_range)); + }); + }, + queryCurrentStyle: function(goog_range) { // only for fontfamily, fontsize + var self = this; + var queriedValue = self.queryCommandValue(); + + // try to get using queryCommand + if (self.reliableQueriedValue(queriedValue) && queriedValue && self.getTextByValue(queriedValue)) { + return self.getTextByValue(queriedValue); + } + + // try to get from style + var currentStyle = self.canvas.query(function(processor) { + var targetNode; + if ($tx.msie && goog_range.isCollapsed()) { // FTDUEDTR-1233 + targetNode = processor.getNode(); + } else { + targetNode = self.findQueryingNode(goog_range); + } + return self.queryElementCurrentStyle(targetNode); + }); + if (currentStyle && self.getTextByValue(currentStyle)) { + return self.getTextByValue(currentStyle); + } + + // fallback + return queriedValue || currentStyle || self.getTextByValue(self.getDefaultProperty()); + }, + queryCommandValue: function() { + var self = this; + return self.canvas.query(function(processor) { + return processor.queryCommandValue(self.getQueryCommandName()); + }); + }, + reliableQueriedValue: function(value) { + return _TRUE; + }, + queryElementCurrentStyle: function(element) { + var cssPropertyName = this.getCssPropertyName(); + + var queryingNode = element; + var MAX_VISIT_PARENT = 10; + for (var i = 0; i < MAX_VISIT_PARENT && $tom.kindOf(queryingNode, "%inline"); i++) { + var currentStyleValue = queryingNode.style[cssPropertyName]; + if (currentStyleValue) { + return currentStyleValue; + } + if ($tom.kindOf(queryingNode, 'font') && $tom.getAttribute(this.getFontTagAttribute())) { + return $tom.getAttribute(this.getFontTagAttribute()); + } + queryingNode = queryingNode.parentNode; + } + + var processor = this.canvas.getProcessor(); + if (element) { + return processor.queryStyle(element, cssPropertyName); + } else { + return _NULL; + } + }, + computeNewStyle: function(newStyle) { + var style = {}; + style[this.getCssPropertyName()] = newStyle; + return style; + }, + + cachedProperty: _FALSE, + syncButton: function(text) { + var self = this; + self.button.setText(text); + if (self.cachedProperty != text) { + self.button.setText(text); + self.cachedProperty = text; + } + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/mergecells.js b/src/main/webapp/daumeditor/js/trex/tool/mergecells.js new file mode 100644 index 0000000..df60433 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/mergecells.js @@ -0,0 +1,57 @@ +/** + * @fileoverview + * '행,열 삽입' Icon Source, + * Class Trex.Tool.Mergecells configuration을 포함 + * + */ +TrexConfig.addTool( + "mergecells", + { + sync: _FALSE, + status: _TRUE, + options: [ + { label: '병합', title: '병합', data: 'merge' , klass: 'tx-mergecells-1'}, + { label: '분할', title: '분할', data: 'cancelmerge', klass: 'tx-mergecells-2' } + ] + } + + +); + +Trex.Tool.Mergecells = Trex.Class.create({ + $const: { + __Identity: 'mergecells' + }, + $extend: Trex.Tool, + oninitialized: function() { + var _canvas = this.canvas; + var _defaultProperty = _canvas.getStyleConfig().insert; + + var _toolHandler = function(command) { + _canvas.execute(function(processor){ + if (processor.table) { + switch(command){ + case "merge": + processor.table.merge(); + break; + case "cancelmerge": + processor.table.resetMerge(); + break; + } + } + }); + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button.Select(TrexConfig.merge(this.buttonCfg, { + selectedValue: _defaultProperty + })), + /* menu */ + new Trex.Menu.Select(this.menuCfg), + /* handler */ + _toolHandler); + } +}); + diff --git a/src/main/webapp/daumeditor/js/trex/tool/ordered.js b/src/main/webapp/daumeditor/js/trex/tool/ordered.js new file mode 100644 index 0000000..67231a6 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/ordered.js @@ -0,0 +1,75 @@ +/** + * @fileoverview + * OL을 삽입하는 '번호매기기' Source, + * Class Trex.Tool.OrderedList와 configuration을 포함 + * + */ +TrexConfig.addTool( + "ordered", + { + sync: _TRUE, + status: _TRUE + } +); + +Trex.Tool.OrderedList = Trex.Class.create({ + $const: { + __Identity: 'ordered' + }, + $extend: Trex.Tool, + $mixins: [Trex.I.ListExecution], + oninitialized: function() { + var _tool = this; + var _canvas = this.canvas; + var _toolbar = this.toolbar; + + var _toolHandler = function() { + _toolbar.tools["unordered"].button.normalState(); + /*if(_toolbar.tools["ordered"].button.isPushed()){ + return _FALSE; + }*/ + + _canvas.execute(function(processor) { + var _bNode = processor.findNode('%listhead'); + if (_bNode) { + if ($tom.kindOf(_bNode, "ol")) { + _tool.executeOffList(processor); + } else { + _tool.executeToList(processor, "ol", {}); + } + } else { + _tool.executeToList(processor, "ol", {}); + } + }); + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button(this.buttonCfg), + /* menu */ + _NULL, + /* handler */ + _toolHandler + ); + + var _cachedProperty = _NULL; + _canvas.observeJob(Trex.Ev.__CANVAS_PANEL_QUERY_STATUS, function() { + var _data = _canvas.query(function(processor) { + return processor.queryCommandState('insertorderedlist'); + }); + if(_cachedProperty == _data) { + return; + } + _tool.button.setState(_data); + _cachedProperty = _data; + }); + + this.bindKeyboard({ // ctrl + o + ctrlKey: _TRUE, + altKey: _TRUE, + keyCode: 79 + }, _toolHandler); + } + +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/outdent.js b/src/main/webapp/daumeditor/js/trex/tool/outdent.js new file mode 100644 index 0000000..686c235 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/outdent.js @@ -0,0 +1,84 @@ +/** + * @fileoverview + * Tool '내어쓰기' Source, + * Class Trex.Tool.Outdent 와 configuration을 포함 + * + */ +TrexConfig.addTool( + "outdent", + { + sync: _FALSE, + status: _FALSE, + hotKey: { // shift + tab - 내어쓰기 + shiftKey: _TRUE, + keyCode: 9 + } + } +); + +Trex.Tool.Outdent = Trex.Class.create({ + $const: { + __Identity: 'outdent' + }, + $extend: Trex.Tool, + oninitialized: function(config) { + this.weave(new Trex.Button(this.buttonCfg), _NULL, this.handler); + this.createHandlers(); + if ($tx.opera == _FALSE) { + this.observeBackspace(); + } + this.bindKeyboard(config.hotKey, this.shiftTabKeyHandler.bind(this)); + }, + handler: function() { + var self = this; + this.canvas.execute(function(processor) { + self.onOutdentClicked.handle(processor); + }); + }, + shiftTabKeyHandler: function() { + var self = this; + this.canvas.execute(function(processor) { + self.onShiftTabPressed.handle(processor); + }); + }, + observeBackspace: function() { + var canvas = this.canvas; + var self = this; + canvas.observeKey({ keyCode: Trex.__KEY.BACKSPACE }, function() { + canvas.query(function(processor) { + self.onBackspace.handle(processor); + }); + }); + }, + createHandlers: function() { + var IndentTool = Trex.Tool.Indent; + var Judge = IndentTool.Judge; + var Operation = IndentTool.Operation; + var Handler = IndentTool.Handler; + var Chain = Trex.ChainHandler; + + var onDefaultOutdent = Chain.connect([ + new Chain(Judge.ListItem, Operation.OutdentListItem), + new Chain(Judge.BlockNode, Operation.OutdentBlockNode) + ]); + var propagate = Chain.connect([ + new Chain(Judge.AlwaysTrue, Operation.Propagate) + ]); + var onCollapsedShiftTabPressed = Chain.connect([ + new Chain(Judge.ListItem, Operation.OutdentListItem), + new Chain(Judge.ChildOfFirstTableCell, Operation.GoToAboveTable), + new Chain(Judge.ChildOfTableCell, Operation.GoToPreviousCell), + new Chain(Judge.BlockNode, Operation.OutdentBlockNode) + ]); + var onCollapsedBackspace = Chain.connect([ + new Chain(Judge.And(Judge.HeadOfParagraph, Judge.OneDepthList), Operation.Propagate), + new Chain(Judge.And(Judge.HeadOfParagraph, Judge.ListItem), Operation.OutdentListItem), + new Chain(Judge.And(Judge.HeadOfParagraph, Judge.IndentedBlockNode), Operation.OutdentBlockNode), + new Chain(Judge.AlwaysTrue, Operation.Propagate) + ]); + + this.onShiftTabPressed = new Handler(onCollapsedShiftTabPressed, onDefaultOutdent, onDefaultOutdent); + this.onOutdentClicked = new Handler(onDefaultOutdent, onDefaultOutdent, onDefaultOutdent); + this.onBackspace = new Handler(onCollapsedBackspace, propagate, propagate); + } +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/quote.js b/src/main/webapp/daumeditor/js/trex/tool/quote.js new file mode 100644 index 0000000..7cc0a5a --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/quote.js @@ -0,0 +1,108 @@ +/** + * @fileoverview + * Tool '인용구' Source, + * Class Trex.Tool.Quote 와 configuration을 포함 + * + */ +TrexConfig.addTool( + "quote", + { + sync: _FALSE, + status: _TRUE, + rows: 2, + cols: 3, + options: [ + { type: 'image', data: 'tx-quote1', image: '#iconpath/quote/citation01.gif?v=2' }, + { type: 'image', data: 'tx-quote2', image: '#iconpath/quote/citation02.gif?v=2' }, + { type: 'image', data: 'tx-quote3', image: '#iconpath/quote/citation03.gif?v=2' }, + { type: 'image', data: 'tx-quote4', image: '#iconpath/quote/citation04.gif?v=2' }, + { type: 'image', data: 'tx-quote5', image: '#iconpath/quote/citation05.gif?v=2' }, + { type: 'cancel', data: 'tx-quote6', image: '#iconpath/quote/citation06.gif?v=2' } + ] + }, + function(root){ + var _config = TrexConfig.getTool("quote", root); + _config.options.each(function(option) { + option.image = TrexConfig.getIconPath(option.image, 'quote'); + }); + } +); + +Trex.Tool.Quote = Trex.Class.create({ + $const: { + __Identity: 'quote' + }, + $extend: Trex.Tool, + oninitialized: function(config) { + var _tool = this; + var _canvas = this.canvas; + + var _map = {}; + config.options.each(function(option) { + _map[option.data] = { + type: option.type + }; + }); + + var _toolHandler = function(data) { + if(!_map[data]) { + return; + } + var _type = _map[data].type; + var _tag = "blockquote"; + var _attributes = { "className": data }; + + if(_canvas.isWYSIWYG()) { + _canvas.execute(function(processor) { + var _bNode = processor.findNode(_tag); + if (_bNode) { + if(_type == "cancel") { + processor.unwrap(_bNode); + } else { + processor.apply(_bNode, _attributes); + } + } else { + if(_type != "cancel") { + var _nodes = processor.blocks(function() { + return '%wrapper,%paragraph'; + }); + _nodes = _nodes.findAll(function(node) { + if($tom.kindOf(node, "%innergroup")) { + processor.wrap($tom.children(node), _tag, _attributes); + return _FALSE; + } else { + return _TRUE; + } + }); + processor.wrap(_nodes, _tag, _attributes); + } + } + }); + } else { + _canvas.execute(function(processor) { + processor.insertTag('
          ','
          '); + }); + } + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button(this.buttonCfg), + /* menu */ + new Trex.Menu.List(this.menuCfg), + /* handler */ + _toolHandler + ); + + var _popdownHandler = function(ev) { + _tool.button.onMouseDown(ev); + }; + this.bindKeyboard({ // ctrl + q + ctrlKey: _TRUE, + keyCode: 81 + }, _popdownHandler); + } + +}); + diff --git a/src/main/webapp/daumeditor/js/trex/tool/redo.js b/src/main/webapp/daumeditor/js/trex/tool/redo.js new file mode 100644 index 0000000..c1cdecf --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/redo.js @@ -0,0 +1,51 @@ +/** + * @fileoverview + * Tool 'Redo' Source, + * Class Trex.Tool.ReDo 와 configuration을 포함 + * + */ +TrexConfig.addTool( + "redo", + { + sync: _FALSE, + status: _FALSE + } +); + +Trex.Tool.ReDo = Trex.Class.create({ + $const: { + __Identity: 'redo' + }, + $extend: Trex.Tool, + oninitialized: function() { + var _canvas = this.canvas; + + var _toolHandler = function() { + _canvas.getProcessor().blur(); + _canvas.focus(); + + setTimeout( function(){ + _canvas.fireJobs('canvas.panel.redo'); + }, 0); + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button(this.buttonCfg), + /* menu */ + _NULL, + /* handler */ + _toolHandler + ); + + this.bindKeyboard({ // ctrl + y - 다시실행 + ctrlKey: _TRUE, + keyCode: 89 + }, function() { + _canvas.fireJobs('canvas.panel.redo'); + _canvas.triggerQueryStatus(); + }); + } + +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/removeformat.js b/src/main/webapp/daumeditor/js/trex/tool/removeformat.js new file mode 100644 index 0000000..f8317af --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/removeformat.js @@ -0,0 +1,53 @@ +/** + * @fileoverview + * + */ +TrexConfig.addTool( + "removeformat", + { + wysiwygonly: _TRUE, + sync: _TRUE, + status: _FALSE, + hotKey: { // ctrl + shift + x + ctrlKey: _TRUE, + shiftKey: _TRUE, + keyCode: 88 + } + } +); + +Trex.I.FontToolForRemoveformat = Trex.Mixin.create({ + oninitialized: function(config) { + this.bindKeyboard(config.hotKey, this.handler.bind(this)); + }, + computeNewStyle: function() { + return _NULL; + }, + rangeExecutor: function(processor) { + processor.execCommand(this.getQueryCommandName()); + } +}); + +Trex.Tool.Removeformat = Trex.Class.create({ + $const: { + __Identity: 'removeformat' + }, + $extend: Trex.Tool, + $mixins: [Trex.I.FontTool, Trex.I.FontToolForRemoveformat], + getQueryCommandName: function() { + return "removeformat"; + }, + isStyleApplied: function(node) { + return false; + } +}); + +Trex.module('initialize removeformat without toolbar button', function(editor, toolbar, sidebar, canvas/*, config*/) { + if (!$tx('tx_removeformat')) { + var cfg = TrexConfig.getTool('removeformat'); + var el = _DOC.createElement('div'); + el.id = 'tx_removeformat'; + _DOC.body.appendChild(el); + new Trex.Tool.Removeformat(editor, toolbar, cfg); + } +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/richtextbox.js b/src/main/webapp/daumeditor/js/trex/tool/richtextbox.js new file mode 100644 index 0000000..4f372d5 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/richtextbox.js @@ -0,0 +1,375 @@ +/** + * @fileoverview + * 직접 편집이 가능한 기능을 포함한 Tool '글상자' Source, + * Class Trex.Tool.RichTextBox 와 configuration을 포함 + * + */ +TrexConfig.addTool( + "richtextbox", + { + sync: _FALSE, + status: _TRUE, + rows: 4, + cols: 6, + borderwidth: 1, + bordercolor: '#cbcbcb', + bgcolor: '#ffffff', + padding: "10px", + styles: [ + { klass: "", image: "#iconpath/textbox/thum_line01.gif?v=2", data: "solid" }, + { klass: "", image: "#iconpath/textbox/thum_line02.gif?v=2", data: "double" }, + { klass: "", image: "#iconpath/textbox/thum_line03.gif?v=2", data: "dashed" }, + { klass: "", image: "#iconpath/textbox/thum_line04.gif?v=2", data: "none" } + ], + options: Trex.__CONFIG_COMMON.textbox.options, + thumbs: Trex.__CONFIG_COMMON.thumbs + } +); + +TrexMessage.addMsg({ + '@richtextbox.add': "더하기", + '@richtextbox.sub': "빼기", + '@richtextbox.alert': "1 이상 20 이하의 숫자만 입력 가능합니다.", + '@richtextbox.bg.color': "배경색", + '@richtextbox.border.color': "선 색", + '@richtextbox.border.style': "선 스타일", + '@richtextbox.border.width': "선 굵기" +}); + +Trex.Tool.RichTextBox = Trex.Class.create({ + $const: { + __Identity: 'richtextbox' + }, + $extend: Trex.Tool, + oninitialized: function() { + var _canvas = this.canvas; + var _toolbar = this.toolbar; + var _tool = this; + + var _toolHandler = this.handler = function() { + var _this = _tool.menu; + var _style = { + "borderStyle": _this.elPreview.style.borderStyle, + "borderWidth": _this.elPreview.style.borderWidth, + "borderColor": _this.elPreview.style.borderColor, + "backgroundColor": _this.elPreview.style.backgroundColor, + "padding": _this.padding + }; + var _tag = "div"; + var _attributes = { "className": 'txc-textbox', style: _style }; + _canvas.execute(function(processor) { + var _nodes = processor.blocks(function() { + return '%wrapper,%paragraph'; + }); + var _bNode; + _nodes = _nodes.findAll(function(node) { + if($tom.kindOf(node, "%innergroup")) { + _bNode = processor.wrap($tom.children(node), _tag, _attributes); + _toolbar.fireJobs('cmd.textbox.added', _bNode); + return _FALSE; + } else { + return _TRUE; + } + }); + _bNode = processor.wrap(_nodes, _tag, _attributes); + _toolbar.fireJobs('cmd.textbox.added', _bNode); + }); + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button(this.buttonCfg), + /* menu */ + new Trex.Menu.RichTextbox(this.menuCfg), + /* handler */ + _toolHandler + ); + } +}); +Trex.MarkupTemplate.add( + 'richtextbox.colorpallete', + ['
          ', + '
          ', + ' ', //==> _elThumb + '
          ', + ' ', + ' ', + '
          '].join("") + ); +Trex.Menu.RichTextbox = Trex.Class.create({ + $extend: Trex.Menu, + ongenerated: function(config) { + var _this = this; + var _styleHashMap = {}; + config.options.each(function(option) { + _styleHashMap[option.data] = option.style; + }); + + this.borderWidth = config.borderWidth || 1; + this.borderColor = config.borderColor || '#cbcbcb'; + this.bgColor = config.bgColor || '#ffffff'; + this.padding = config.padding; + + var _generateBorderStyle = this.generateBorderStyle.bind(this); + var _generateBorderWidth = this.generateBorderWidth.bind(this); + var _generateBorderColor = this.generateBorderColor.bind(this); + var _generateBgColor = this.generateBgColor.bind(this); + + var _elMenu = this.elMenu; + var _elHeader = $tom.collect(_elMenu, 'div.tx-menu-header'); + var _elPreviewArea = $tom.collect(_elHeader, 'div.tx-menu-preview-area'); + this.elPreview = $tom.collect(_elPreviewArea, 'div.tx-menu-preview'); + var _elSwitch = this.elSwitch = $tom.collect(_elHeader, 'div.tx-menu-switch'); + var _elSimple = $tom.collect(_elSwitch, 'div.tx-menu-simple'); + var _elAdvanced = $tom.collect(_elSwitch, 'div.tx-menu-advanced'); + var _elInner = $tom.collect(_elMenu, 'div.tx-menu-inner'); + var _elFooter = $tom.collect(_elMenu, 'div.tx-menu-footer'); + var _elConfirm = $tom.collect(_elFooter, 'img.tx-menu-confirm'); + var _elCancel = $tom.collect(_elFooter, 'img.tx-menu-cancel'); + + (function create_thumbs_for_simplemode(){ + var _el = _this.simplePalette= tx.div({ className: 'tx-menu-list'}); + _elInner.appendChild(_el); + var _rows = config.rows; + var _cols = config.cols; + _el.innerHTML = Trex.HtmlCreator.createTableMarkup(_rows, _cols, config.options); + + $tx.observe(_el, 'click', function(ev){ + var _el = $tx.element(ev); + TrexEvent.fire(_el, { + 'span': function(){ + var _class; + if(_el.firstChild && _el.firstChild.nodeType == 1 && _el.firstChild.tagName.toLowerCase() == 'img') { + _class = _el.firstChild.title; + } else { + _class = _el.innerText; + } + var _style = _styleHashMap[_class]; + applyPreviewStyle(_style); + } + }); + $tx.stop(ev); + }); + })(); + + (function createElementsInInnerContainerForAdvancedMode(){ + var _el = _this.advancedPalette = tx.div({ className: "tx-advanced-list" }); + _elInner.appendChild(_el); + _el.appendChild( + tx.dl({ + style: { + "height": "24px" + } + }, + tx.dt(TXMSG("@richtextbox.border.style")), _generateBorderStyle())); + _el.appendChild(tx.dl(tx.dt(TXMSG("@richtextbox.border.width")), _generateBorderWidth())); + _el.appendChild(tx.dl(tx.dt(TXMSG("@richtextbox.border.color")), _generateBorderColor())); + _el.appendChild(tx.dl(tx.dt(TXMSG("@richtextbox.bg.color")), _generateBgColor())); + })(); + + var copyStyles = function(){ + _this.borderWidthInput.value = parseInt(_this.elPreview.style.borderWidth); + _this.borderColorInput.style.backgroundColor = _this.elPreview.style.borderTopColor; + _this.bgColorInput.style.backgroundColor = _this.elPreview.style.backgroundColor; + }; + + var applyPreviewStyle = function (style){ + _this.elPreview.style.border = style['border']; + _this.elPreview.style.backgroundColor = style['backgroundColor'] + }; + + var selectMode = function(mode){ + if(mode =="simple"){ + $tx.addClassName(_elSimple, "tx-selected"); + $tx.show(_this.simplePalette); + $tx.removeClassName(_elAdvanced, "tx-selected"); + $tx.hide(_this.advancedPalette); + }else if(mode =="advanced"){ + $tx.removeClassName(_elSimple, "tx-selected"); + $tx.hide(_this.simplePalette); + $tx.addClassName(_elAdvanced, "tx-selected"); + $tx.show(_this.advancedPalette); + copyStyles(); + } + _this.fireJobs(Trex.Ev.__MENU_LAYER_CHANGE_SIZE, { + detail: { + menu: _this + } + }); + }; + + (function bindingEvents(){ + $tx.observe(_elSimple, 'click', selectMode.bind(_this, "simple") ); + $tx.observe(_elAdvanced, 'click', selectMode.bind(_this, "advanced") ); + $tx.observe(_elConfirm, 'click', _this.onSelect.bind(_this)); + $tx.observe(_elCancel, 'click', function(){ + _this.onCancel(); + }); + })(); + + selectMode("simple"); + applyPreviewStyle(_styleHashMap['txc-textbox13']); + }, + generateBorderStyle: function(){ + var _this = this; + var _elWrap = tx.dd({ className: 'tx-border-area' }); + $tx.observe(_elWrap, 'click', function(ev) { + var _el = $tx.element(ev); + TrexEvent.fire(_el, { + 'img': function(element){ + var _data = element.getAttribute("data"); + _this.elPreview.style.borderStyle = _data; + if(_data == 'double' && _this.borderWidthInput.value.toNumber() < 3){ + _this.elPreview.style.borderWidth = "3px"; + _this.borderWidthInput.value = "3"; + } + } + }); + $tx.stop(ev); + }); + _elWrap.innerHTML = Trex.HtmlCreator.createTableMarkup(1, 4, this.config.styles); + return _elWrap; + }, + generateBorderWidth: function() { + var _this = this; + var _elWrap = tx.dd({ className: 'tx-border-area' }); + var _elInput = this.borderWidthInput = tx.input({ type: 'text', value: this.borderWidth }); + _elWrap.appendChild(_elInput); + + var _drawDeco = function(width) { + if(width > 20 ) { + alert(TXMSG("@richtextbox.alert")); + _elInput.value = 20; + }else if(width < 1){ + alert(TXMSG("@richtextbox.alert")); + _elInput.value = 1; + }else{ + _this.elPreview.style.borderWidth = width + "px"; + _elInput.value = width; + } + }; + + $tx.observe(_elInput, 'blur', function(ev) { + _drawDeco(_elInput.value.toNumber(), ev); + }); + $tx.observe( _elInput, "keydown", function(ev){ + if( ev.keyCode == $tx.KEY_RETURN ) + $tx.stop(ev); + }); + var _elAddBtn = tx.a({ href:'javascript:;', className: 'btn_add' }, TXMSG("@richtextbox.add")); + _elWrap.appendChild(_elAddBtn); + $tx.observe(_elAddBtn, 'click', function(ev) { + _drawDeco(_elInput.value.toNumber() + 1); + $tx.stop(ev); + }); + + var _elSubBtn = tx.a({ href:'javascript:;', className: 'btn_sub' }, TXMSG("@richtextbox.sub")); + _elWrap.appendChild(_elSubBtn); + $tx.observe(_elSubBtn, 'click', function(ev) { + _drawDeco(_elInput.value.toNumber() - 1); + $tx.stop(ev); + }); + + return _elWrap; + }, + generateBorderColor: function() { + var _this = this; + var _elWrap = Trex.MarkupTemplate.get("richtextbox.colorpallete").evaluateAsDom({"color": this.borderColor, "wrapClass": "tx-color-wrap"}); + var _elPallete = $tom.collect(_elWrap, "div.tx-colorpallete"); + + var _changeBorderColor = function(color) { + _this.elPreview.style.borderColor = _elThumb.style.backgroundColor = _this.borderColor = color; + }; + + var _colorPallete = _NULL; + var _toggleColorPallete = function() { + if (_colorPallete == _NULL) { + _colorPallete = _this.createColorPallete(_elPallete, _changeBorderColor); + _colorPallete.show(); + } else { + if (!$tx.visible(_elPallete)) _colorPallete.show(); + else _colorPallete.hide(); + } + }; + + this.externalBorderColorToggler = function(){ + if ($tx.visible(_elPallete)) { + _colorPallete.hide(); + } + }; + + var _elThumb = this.borderColorInput = $tom.collect(_elWrap, ".tx-color-box a"); + $tx.observe(_elThumb, 'click', function(ev) { + _this.externalBgColorToggler(); + _toggleColorPallete(); + $tx.stop(ev); + }); + + var _elArrow = $tom.collect(_elWrap, "a.tx-color-arrow-down"); + $tx.observe(_elArrow, 'click', function(ev) { + _this.externalBgColorToggler(); + _toggleColorPallete(); + $tx.stop(ev); + }); + + return _elWrap; + }, + createColorPallete: function(element, cmd) { + var self = this; + var pallete = new Trex.Menu.ColorPallete({el: element, thumbs: this.config.thumbs}); + pallete.setCommand(cmd); + pallete.observeJob(Trex.Ev.__MENU_LAYER_SHOW, function(ev){ + self.fireJobs(Trex.Ev.__MENU_LAYER_SHOW, ev); + }); + pallete.observeJob(Trex.Ev.__MENU_LAYER_HIDE, function(ev){ + self.fireJobs(Trex.Ev.__MENU_LAYER_HIDE, ev); + }); + pallete.observeJob(Trex.Ev.__MENU_LAYER_CHANGE_SIZE, function(ev){ + self.fireJobs(Trex.Ev.__MENU_LAYER_CHANGE_SIZE, ev); + }); + return pallete; + }, + generateBgColor: function() { + var _this = this; + var _elWrap = Trex.MarkupTemplate.get("richtextbox.colorpallete").evaluateAsDom({"color":this.bgColor}); + var _elPallete = $tom.collect(_elWrap, "div.tx-colorpallete"); + + var _changeBgColor = function(color) { + _this.elPreview.style.backgroundColor = _elThumb.style.backgroundColor = _this.bgColor = color; + }; + + var _colorPallete = _NULL; + var _toggleColorPallete = function() { + if (_colorPallete == _NULL) { + _colorPallete = _this.createColorPallete(_elPallete, _changeBgColor); + _colorPallete.show(); + } else { + if (!$tx.visible(_elPallete)) _colorPallete.show(); + else _colorPallete.hide(); + } + }; + + this.externalBgColorToggler = function(){ + if ($tx.visible(_elPallete)) { + _colorPallete.hide(); + } + }; + + var _elThumb = this.bgColorInput = $tom.collect(_elWrap, ".tx-color-box a"); + $tx.observe(_elThumb, 'click', function(ev) { + _this.externalBorderColorToggler(); + _toggleColorPallete(); + $tx.stop(ev); + }); + + var _elArrow = $tom.collect(_elWrap, "a.tx-color-arrow-down"); + $tx.observe(_elArrow, 'click', function(ev) { + _this.externalBorderColorToggler(); + _toggleColorPallete(); + $tx.stop(ev); + }); + + return _elWrap; + } +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/specialchar.js b/src/main/webapp/daumeditor/js/trex/tool/specialchar.js new file mode 100644 index 0000000..bb66515 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/specialchar.js @@ -0,0 +1,67 @@ +/** + * @fileoverview + * Tool '특수문자' Source, + * Class Trex.Tool.SpecialChar 와 configuration을 포함 + * + */ +(function(){ + TrexMessage.addMsg({ + '@specialchar.subtitle1': '일반기호', + '@specialchar.subtitle2': '수학부호, 통화단위', + '@specialchar.subtitle3': '원 기호, 괄호', + '@specialchar.subtitle4': '일본어', + '@specialchar.subtitle5': '로마자, 그리스' + }); + + TrexConfig.addTool( + "specialchar", + { + sync: _FALSE, + status: _TRUE, + rows: 9, + cols: 20, + top: _NULL, + left: _NULL, + matrices: [{ + title: TXMSG('@specialchar.subtitle1'), + options: ['\uff03', '\uff06', '\uff0a', '\uff20', '\xa7', '\u203b', '\u2606', '\u2605', '\u25cb', '\u25cf', '\u25ce', '\u25c7', '\u25c6', '\u25a1', '\u25a0', '\u25b3', '\u25b2', '\u25bd', '\u25bc', '\u2192', '\u2190', '\u2191', '\u2193', '\u2194', '\u3013', '\u25c1', '\u25c0', '\u25b7', '\u25b6', '\u2664', '\u2660', '\u2661', '\u2665', '\u2667', '\u2663', '\u2299', '\u25c8', '\u25a3', '\u25d0', '\u25d1', '\u2592', '\u25a4', '\u25a5', '\u25a8', '\u25a7', '\u25a6', '\u25a9', '\u2668', '\u260f', '\u260e', '\u261c', '\u261e', '\xb6', '\u2020', '\u2021', '\u2195', '\u2197', '\u2199', '\u2196', '\u2198', '\u266d', '\u2669', '\u266a', '\u266c', '\u327f', '\u321c', '\u2116', '\u33c7', '\u2122', '\u33c2', '\u33d8', '\u2121', '\xae', '\xaa', '\xba', '\uff02', '\uff08', '\uff09', '\uff3b', '\uff3d', '\uff5b', '\uff5d', '\u2018', '\u2019', '\u201c', '\u201d', '\u3014', '\u3015', '\u3008', '\u3009', '\u300a', '\u300b', '\u300c', '\u300d', '\u300e', '\u300f', '\u3010', '\u3011', '\uff01', '\uff07', '\uff0c', '\uff0e', '\uff0f', '\uff1a', '\uff1b', '\uff1f', '\uff3e', '\uff3f', '\uff40', '\uff5c', '\uffe3', '\u3001', '\u3002', '\xb7', '\u2025', '\u2026', '\xa8', '\u3003', '\u2015', '\u2225', '\uff3c', '\u223c', '\xb4', '\uff5e', '\u02c7', '\u02d8', '\u02dd', '\u02da', '\u02d9', '\xb8', '\u02db', '\xa1', '\xbf', '\u02d0'] + },{ + title: TXMSG('@specialchar.subtitle2'), + options: ['\uff0b', '\uff0d', '\uff1c', '\uff1d', '\uff1e', '\xb1', '\xd7', '\xf7', '\u2260', '\u2264', '\u2265', '\u221e', '\u2234', '\u2642', '\u2640', '\u2220', '\u22a5', '\u2312', '\u2202', '\u2207', '\u2261', '\u2252', '\u226a', '\u226b', '\u221a', '\u223d', '\u221d', '\u2235', '\u222b', '\u222c', '\u2208', '\u220b', '\u2286', '\u2287', '\u2282', '\u2283', '\u222a', '\u2229', '\u2227', '\u2228', '\uffe2', '\u21d2', '\u21d4', '\u2200', '\u2203', '\u222e', '\u2211', '\u220f','\uff04', '\uff05', '\uffe6', '\uff26', '\u2032', '\u2033', '\u2103', '\u212b', '\uffe0', '\uffe1', '\uffe5', '\xa4', '\u2109', '\u2030', '?', '\u3395', '\u3396', '\u3397', '\u2113', '\u3398', '\u33c4', '\u33a3', '\u33a4', '\u33a5', '\u33a5', '\u33a6', '\u3399', '\u339a', '\u339b', '\u339c', '\u339d', '\u339e', '\u339f', '\u33a0', '\u33a1', '\u33a2', '\u33ca', '\u338d', '\u338e', '\u338f', '\u33cf', '\u3388', '\u3389', '\u33c8', '\u33a7', '\u33a8', '\u33b0', '\u33b1', '\u33b2', '\u33b3', '\u33b4', '\u33b5', '\u33b6', '\u33b7', '\u33b8', '\u33b9', '\u3380', '\u3381', '\u3382', '\u3383', '\u3384', '\u33ba', '\u33bb', '\u33bc', '\u33bd', '\u33be', '\u33bf', '\u3390', '\u3391', '\u3392', '\u3393', '\u3394', '\u2126', '\u33c0', '\u33c1', '\u338a', '\u338b', '\u338c', '\u33d6', '\u33c5', '\u33ad', '\u33ae', '\u33af', '\u33db', '\u33a9', '\u33aa', '\u33ab', '\u33ac', '\u33dd', '\u33d0', '\u33d3', '\u33c3', '\u33c9', '\u33dc', '\u33c6'] + },{ + title: TXMSG('@specialchar.subtitle3'), + options: [ + '\u3260', '\u3261', '\u3262', '\u3263', '\u3264', '\u3265', '\u3266', '\u3267', '\u3268', '\u3269', + '\u326a', '\u326b', '\u326c', '\u326d', '\u326e', '\u326f', '\u3270', '\u3271', '\u3272', '\u3273', + '\u3274', '\u3275', '\u3276', '\u3277', '\u3278', '\u3279', '\u327a', '\u327b', '\u3200', '\u3201', + '\u3202', '\u3203', '\u3204', '\u3205', '\u3206', '\u3207', '\u3208', '\u3209', '\u320a', '\u320b', + '\u320c', '\u320d', '\u320e', '\u320f', '\u3210', '\u3211', '\u3212', '\u3213', '\u3214', '\u3215', + '\u3216', '\u3217', '\u3218', '\u3219', '\u321a', '\u321b', '\u24d0', '\u24d1', '\u24d2', '\u24d3', + '\u24d4', '\u24d5', '\u24d6', '\u24d7', '\u24d8', '\u24d9', '\u24da', '\u24db', '\u24dc', '\u24dd', + '\u24de', '\u24df', '\u24e0', '\u24e1', '\u24e2', '\u24e3', '\u24e4', '\u24e5', '\u24e6', '\u24e7', '\u24e8', '\u24e9', '\u2460', '\u2461', '\u2462', '\u2463', '\u2464', '\u2465', '\u2466', '\u2467', '\u2468', '\u2469', '\u246a', '\u246b', '\u246c', '\u246d', '\u246e', '\u249c', '\u249d', '\u249e', '\u249f', '\u24a0', '\u24a1', '\u24a2', '\u24a3', '\u24a4', '\u24a5', '\u24a6', '\u24a7', '\u24a8', '\u24a9', '\u24aa', '\u24ab', '\u24ac', '\u24ad', '\u24ae', '\u24af', '\u24b0', '\u24b1', '\u24b2', '\u24b3', '\u24b4', '\u24b5', '\u2474', '\u2475', '\u2476', '\u2477', '\u2478', '\u2479', '\u247a', '\u247b', '\u247c', '\u247d', '\u247e', '\u247f', '\u2480', '\u2481', '\u2482'] + },{ + title: TXMSG('@specialchar.subtitle4'), + options: ['\u3041', '\u3042', '\u3043', '\u3044', '\u3045', '\u3046', '\u3047', '\u3048', '\u3049', '\u304a', '\u304b', '\u304c', '\u304d', '\u304e', '\u304f', '\u3050', '\u3051', '\u3049', '\u3053', '\u3054', '\u3055', '\u3056', '\u3057', '\u3058', '\u3059', '\u305a', '\u305b', '\u305c', '\u305d', '\u305e', '\u305f', '\u3060', '\u3061', '\u3062', '\u3063', '\u3064', '\u3065', '\u3066', '\u3067', '\u3068', '\u3069', '\u306a', '\u306b', '\u306c', '\u306d', '\u306e', '\u306f', '\u3070', '\u3071', '\u3072', '\u3073', '\u3074', '\u3075', '\u3076', '\u3077', '\u3078', '\u3079', '\u307a', '\u307b', '\u307c', '\u307d', '\u307e', '\u307f', '\u3080', '\u3081', '\u3082', '\u3083', '\u3084', '\u3085', '\u3086', '\u3087', '\u3088', '\u3089', '\u308a', '\u308b', '\u308c', '\u308d', '\u308e', '\u308f', '\u3090', '\u3091', '\u3092', '\u3093', '\u30a1', '\u30a2', '\u30a3', '\u30a4', '\u30a5', '\u30a6', '\u30a7', '\u30a8', '\u30a9', '\u30aa', '\u30ab', '\u30ac', '\u30ad', '\u30ae', '\u30af', '\u30b0', '\u30b1', '\u30b2', '\u30b3', '\u30b4', '\u30b5', '\u30b6', '\u30b7', '\u30b8', '\u30b9', '\u30ba', '\u30bb', '\u30bc', '\u30bd', '\u30be', '\u30bf', '\u30c0', '\u30c1', '\u30c2', '\u30c3', '\u30c4', '\u30c5', '\u30c6', '\u30c7', '\u30c8', '\u30c9', '\u30ca', '\u30cb', '\u30cc', '\u30cd', '\u30ce', '\u30cf', '\u30d0', '\u30d1', '\u30d2', '\u30d3', '\u30d4', '\u30d5', '\u30d6', '\u30d7', '\u30d8', '\u30d9', '\u30da', '\u30db', '\u30dc', '\u30dd', '\u30de', '\u30df', '\u30e0', '\u30e1', '\u30e2', '\u30e3', '\u30e4', '\u30e5', '\u30e6', '\u30e7', '\u30e8', '\u30e9', '\u30ea', '\u30eb', '\u30ec', '\u30ed', '\u30ee', '\u30ef', '\u30f0', '\u30f1', '\u30f2', '\u30f3', '\u30f4', '\u30f5', '\u30f6'] + },{ + title: TXMSG('@specialchar.subtitle5'), + options: ['\uff10', '\uff11', '\uff12', '\uff13', '\uff14', '\uff15', '\uff16', '\uff17', '\uff18', '\uff19', '\u2170', '\u2171', '\u2172', '\u2173', '\u2174', '\u2175', '\u2176', '\u2177', '\u2178', '\u2179', '\u2160', '\u2161', '\u2162', '\u2163', '\u2164', '\u2165', '\u2166', '\u2167', '\u2168', '\u2169', '\u0391', '\u0392', '\u0393', '\u0394', '\u0395', '\u0396', '\u0397', '\u0398', '\u0399', '\u039a', '\u039b', '\u039c', '\u039d', '\u039e', '\u039f', '\u03a0', '\u03a1', '\u03a3', '\u03a4', '\u03a5', '\u03a6', '\u03a7', '\u03a8', '\u03a9', '\u03b1', '\u03b2', '\u03b3', '\u03b4', '\u03b5', '\u03b6', '\u03b7', '\u03b8', '\u03b9\u03ba', '\u03bb', '\u03bc', '\u03bd', '\u03be', '\u03bf', '\u03c0', '\u03c1', '\u03c3', '\u03c4', '\u03c5', '\u03c6', '\u03c7', '\u03c8', '\u03c9'] + }], + asyncUrl: "trex/tool/async/specialchar.js" + } + ); + + Trex.Tool.SpecialChar = Trex.Class.create({ + $const: { + __Identity: 'specialchar' + }, + $extend: Trex.AsyncTool, + oninitialized: function(config) { + this.config = config; + this.weave.bind(this)( + new Trex.Button(this.buttonCfg), + _NULL, + this.onLoadModule // define in Trex.AsyncTool + ); + } + }); +})(); diff --git a/src/main/webapp/daumeditor/js/trex/tool/strike.js b/src/main/webapp/daumeditor/js/trex/tool/strike.js new file mode 100644 index 0000000..75778f4 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/strike.js @@ -0,0 +1,45 @@ +/** + * @fileoverview + * Tool '취소선' Source, + * Class Trex.Tool.Strike 와 configuration을 포함 + * + */ +TrexConfig.addTool( + "strike", + { + wysiwygonly: _TRUE, + sync: _TRUE, + status: _TRUE, + hotKey: { + // ctrl + d + ctrlKey: _TRUE, + keyCode: 68 + } + } +); + +Trex.Tool.Strike = Trex.Class.create({ + $const: { + __Identity: 'strike' + }, + $extend: Trex.Tool, + $mixins: [ + Trex.I.FontTool, + Trex.I.ButtonFontTool, + Trex.I.WrappingDummyFontTool, + ($tx.gecko ? Trex.I.Tool.QueryStyle.Gecko : Trex.I.Tool.QueryStyle.Standard) + ], + getRelatedCssPropertyNames: function() { + return [this.getCssPropertyName()]; + }, + getCssPropertyName: function() { + return "textDecoration"; + }, + getQueryCommandName: function() { + return "strikethrough"; + }, + isStyleApplied: function(node) { + var matchTagName = 'strike'; + return this.queryNodeStyle(node, this.getCssPropertyName(), this.getQueryCommandName(), matchTagName); + } +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/styledlist.js b/src/main/webapp/daumeditor/js/trex/tool/styledlist.js new file mode 100644 index 0000000..fad080e --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/styledlist.js @@ -0,0 +1,330 @@ +/** + * @fileoverview + * 여러 Style의 리스트를 삽입 할 수 있는 Tool 'styledlist' Source, + * Class Trex.Tool.StyledList 와 configuration을 포함 + * + */ + +TrexMessage.addMsg({ + '@styledlist.subtitle1': '취소', + '@styledlist.subtitle2': '동그라미', + '@styledlist.subtitle3': '네모', + '@styledlist.subtitle4': '숫자', + '@styledlist.subtitle5': '로마숫자', + '@styledlist.subtitle6': '알파벳' +}); + +TrexConfig.addTool( + "styledlist", + { + status: _TRUE, + options: [ + { label: TXMSG('@styledlist.subtitle1'), title: 'cancel', type: 'cancel', data: 'cancel', klass: 'tx-styledlist-0' }, + { label: TXMSG('@styledlist.subtitle2'), title: 'disc', type: 'ul', data: 'disc', klass: 'tx-styledlist-1' }, + { label: TXMSG('@styledlist.subtitle3'), title: 'square', type: 'ul', data: 'square', klass: 'tx-styledlist-2' }, + { label: TXMSG('@styledlist.subtitle4'), title: 'decimal', type: 'ol', data: 'decimal', klass: 'tx-styledlist-3' }, + { label: TXMSG('@styledlist.subtitle5'), title: 'upper-roman', type: 'ol', data: 'upper-roman', klass: 'tx-styledlist-4' }, + { label: TXMSG('@styledlist.subtitle6'), title: 'upper-alpha', type: 'ol', data: 'upper-alpha', klass: 'tx-styledlist-5' } + ], + hotKey: { + ul: { // ctrl + alt + u + ctrlKey: _TRUE, + altKey: _TRUE, + keyCode: 85 + }, + ol: { // ctrl + alt + o + ctrlKey: _TRUE, + altKey: _TRUE, + keyCode: 79 + } + } + } +); + +Trex.Tool.StyledList = Trex.Class.create({ + $const: { + __Identity: 'styledlist' + }, + $extend: Trex.Tool, + oninitialized: function(config) { + var self = this; + self.createListStyleMap(config); + self.weave( + new Trex.Button.StyledList(self.buttonCfg), + new Trex.Menu.Select(self.menuCfg), + self.handler, + self.menuInitHandler.bind(self) + ); + self.indentHelper = Trex.Tool.Indent.Helper; + self.bindKeyboard(config.hotKey.ul, self.handler.bind(self, "disc")); + self.bindKeyboard(config.hotKey.ol, self.handler.bind(self, "decimal")); + self.startSyncButtonWithStyle(); + }, + createListStyleMap: function(config) { + var listStyleMap = this.listStyleMap = {}; + config.options.each(function(option) { + listStyleMap[option.data] = { + type: option.type, + klass: option.klass + }; + }); + }, + handler: function(data) { + var self = this; + if (!self.listStyleMap[data]) { + return; + } + var listTag = self.listStyleMap[data].type; + var listHeadStyle = {listStyleType: data}; + + self.canvas.execute(function(processor) { + if (listTag == 'cancel') { + self.outdentListItem(processor); + } else { + self.createListFromSelection(processor, listTag, listHeadStyle); + } + }); + }, + outdentListItem: function(processor) { + processor.executeUsingCaret(function(range, savedCaret) { + var blockNodes = Trex.Tool.Indent.Helper.findBlocksToIndentFromRange(range, processor, savedCaret); + blockNodes.each(function(node) { + Trex.Tool.Indent.Operation.OutdentListItem(node, processor); + + }); + }); + }, + createListFromSelection: function(processor, listTag, listHeadStyle) { + var self = this; + processor.executeUsingCaret(function(range, savedCaret) { + var blockNodes = self.indentHelper.findBlocksToIndentFromRange(range, processor, savedCaret); + var listGroups = self.groupEachList(blockNodes); + listGroups.each(function(nodes) { + var builder = new Trex.Tool.StyledList.ListBuilder(processor, listTag, listHeadStyle); + builder.createListForNodes(nodes); + }); + }); + this._removeBrInListItemForIE(processor); + }, + _removeBrInListItemForIE: function(processor) { + // FTDUEDTR-1391 + if ($tx.msie_docmode >= 11) { + var range = processor.createGoogRange(); + var startNode = range.getStartNode(); + if (range.isCollapsed() + && $tom.isElement(startNode) + && $tom.isElement(startNode.firstChild) + && $tom.isTagName(startNode.firstChild, 'br')) { + $tom.remove(startNode.firstChild); + startNode.appendChild(processor.newText('')); + } + } + }, + groupEachList: function(blockNodes) { + var indentHelper = this.indentHelper; + var groupsForList = []; + var currentGroup = []; + var previousCell = _NULL; + blockNodes.each(function(node) { + var currentCell = indentHelper.findCurrentCell(node); + // new list group detected + if (currentCell != previousCell) { + if (currentGroup.length > 0) { + groupsForList.push(currentGroup); + currentGroup = []; + } + previousCell = currentCell; + } + + currentGroup.push(node); + }); + // remained group + if (currentGroup.length > 0) { + groupsForList.push(currentGroup); + } + return groupsForList; + }, + menuInitHandler: function() { + var insideList = this.canvas.query(function(processor) { + return !! processor.findNode('%listhead'); + }); + var elCancel = $tom.collect(this.menu.elMenu, 'li'); + if (insideList) { + $tx.show(elCancel); + } else { + $tx.hide(elCancel); + } + }, + startSyncButtonWithStyle: function() { + var self = this; + var canvas = self.canvas; + var cachedProperty = self.getDefaultProperty(); + + canvas.observeJob(Trex.Ev.__CANVAS_PANEL_QUERY_STATUS, function() { + var listHeadStyle = canvas.query(function(processor) { + var node = processor.findNode('%listhead'); + return processor.queryStyle(node, 'listStyleType'); + }); + listHeadStyle = listHeadStyle || self.getDefaultProperty(); + if(cachedProperty == listHeadStyle) { + return; + } + + var text = self.getButtonClassByValue(listHeadStyle); + self.button.setText(text); + cachedProperty = listHeadStyle; + }); + }, + getDefaultProperty: function() { + return "decimal"; + }, + getButtonClassByValue: function(value) { + var listStyleMap = this.listStyleMap; + if(listStyleMap[value]) { + return listStyleMap[value].klass; + } else { + return listStyleMap[this.getDefaultProperty()].klass; + } + } +}); + +Trex.Button.StyledList = Trex.Class.create({ + $extend: Trex.Button.Select, + setText: function(text) { + this.elIcon.className = "tx-icon " + text; + } +}); + +Trex.Tool.StyledList.ListBuilder = Trex.Class.create({ + currentDepth: _NULL, + prepared: _FALSE, + listElement: _NULL, + uselessListCandidate: [], + processor: _NULL, + initialize: function(processor, listTag, listHeadStyle) { + this.processor = processor; + this.listTag = listTag; + this.listStyle = listHeadStyle; + }, + createListForNodes: function(nodes) { + var self = this; + var depthList = self.getNodeDepthList(nodes); + depthList.each(function(object) { + var node = object.node; + var depth = object.depth; + if (!self.prepared) { + self.prepareRootList(node, depth); + } + self.adjustDepth(node, depth); + self.appendAsListItem(node); + }); + self.cleanupEmptyList(); + }, + getNodeDepthList: function(list) { + var self = this; + return list.map(function(node) { + return {node: node, depth: self.countDepthOfList(node)}; + }); + }, + countDepthOfList: function (node) { + var count = 0; + var parent = $tom.parent(node); + while (parent && !$tom.isBody(parent)) { + if ($tom.kindOf(parent, "ol,ul")) { + count++; + } else if ($tom.kindOf(parent, "th,td")) { + break; + } + parent = $tom.parent(parent); + } + return (count || 1); + }, + prepareRootList: function(node, depth) { + var self = this; + self.listElement = self.createNewList(); + var insertionPoint; + if (node.tagName == "LI") { + self.uselessListCandidate.push(node.parentNode); + insertionPoint = $tom.divideNode(node.parentNode, $tom.indexOf(node)); + } else { + insertionPoint = node; + } + $tom.insertAt(self.listElement, insertionPoint); + self.currentDepth = depth; + self.listDepth = depth; + self.prepared = _TRUE; + }, + adjustDepth: function(node, depth) { + var self = this; + while (depth != self.currentDepth) { + if (depth > self.currentDepth) { + self.increaseDepth(); + } else { + self.decreaseDepth(); + } + } + }, + increaseDepth: function() { + var self = this; + var listElement = self.listElement; + + self.currentDepth++; + var subList = self.createNewList(); + listElement.appendChild(subList); + self.listElement = subList; + }, + decreaseDepth: function() { + var self = this; + var listElement = self.listElement; + + self.currentDepth--; + if (self.listDepth > self.currentDepth) { // 새로 만든 listgroup의 depth가 부족하기 때문에 최상위에 listgroup을 추가해서 트리를 키운다. + self.uselessListCandidate.push(listElement.parentNode); + var insertPosition = $tom.divideNode(listElement.parentNode, $tom.indexOf(listElement)); + var newList = self.createNewList(); + $tom.insertAt(newList, insertPosition); + newList.appendChild(listElement); + } + self.listElement = listElement.parentNode; + }, + createNewList: function() { + var self = this; + var newList = self.processor.newNode(self.listTag); + $tx.setStyle(newList, self.listStyle); + return newList; + }, + cleanupEmptyList: function() { + this.uselessListCandidate.each(function(node) { + $tom.removeListIfEmpty(node); + }); + }, + wrapWithListItem: function(node) { + if (node.tagName == "LI") { + return node; + } else if (node.tagName == "P" || ($tx.webkit && node.tagName == "DIV")) { + // p에 스타일이 있으면 marginLeft는 지우고 li로 감싸기 + var newListItem = this.createListItem(); + $tom.applyStyles(node, {marginLeft: _NULL}); + if ($tom.getStyleText(node)) { + $tom.wrap(newListItem, node); + return newListItem; + } else { + return $tom.replace(node, newListItem); + } + } else { + var li = this.createListItem(); + li.appendChild(node); + return li; + } + }, + createListItem: function() { + return this.processor.newNode("li"); + }, + appendAsListItem: function(node) { + var listItem = this.wrapWithListItem(node); + if ($tom.kindOf(node.parentNode, "%listhead")) { + this.uselessListCandidate.push(node.parentNode); + } + this.listElement.appendChild(listItem); + } +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/switcher.js b/src/main/webapp/daumeditor/js/trex/tool/switcher.js new file mode 100644 index 0000000..fe80dea --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/switcher.js @@ -0,0 +1,106 @@ +/** + * @fileoverview + * wysiwyg, source, text 세모드로의 변경을 가능하게하는 dropdown 형식의 tool 'Switcher' Source, + * Class Trex.Tool.Switcher 와 configuration을 포함 + * + */ + +TrexMessage.addMsg({ + '@switcher.wysiwyg': '에디터', + '@switcher.source': 'HTML', + '@switcher.text': '텍스트' +}); + +TrexConfig.addTool( + "switcher", + { + wysiwygonly: _FALSE, + status: _TRUE, + options: [ + { label: TXMSG('@switcher.wysiwyg'), title: TXMSG('@switcher.wysiwyg'), data: 'html' }, + { label: TXMSG('@switcher.source'), title: TXMSG('@switcher.source'), data: 'source' }, + { label: TXMSG('@switcher.text'), title: TXMSG('@switcher.text'), data: 'text' } + ] + } +); + +Trex.Tool.Switcher = Trex.Class.create({ + $const: { + __Identity: 'switcher' + }, + $extend: Trex.Tool, + oninitialized: function(config) { + var _canvas = this.canvas; + + var _map = {}; + config.options.each(function(option) { + _map[option.data] = { + title: option.title + }; + }); + + var _cachedProperty = ""; + var _defaultProperty = config.options[0]; + + var _isChangeToTextMode = function (mode) { + if (mode === "text") { + if (_canvas.mode !== "text") { + return _TRUE; + } + } + return _FALSE; + }; + var _hasContent = function () { + var content, curText, baseText; + content = _canvas.getContent(); + curText = content.toLowerCase().trim(); + baseText = $tom.EMPTY_PARAGRAPH_HTML.toLowerCase().trim(); + if (curText && curText !== baseText && curText !== " ") { + return _TRUE; + } + return _FALSE; + }; + var _toolHandler = function (data) { + if (config.changeModeConfirmMsg) { + if (_isChangeToTextMode(data)) { + if (_hasContent()) { + if (_FALSE === confirm(config.changeModeConfirmMsg)) { + return $stop; + } + } + } + } + _canvas.changeMode(data); + }; + + var _changeMode = function(from, to) { + if(from == to) return; + if(_cachedProperty == to) { + return; + } + if(!_map[to]) { + return; + } + this.button.setValue(to); + this.button.setText(_map[to].title); + _cachedProperty = to; //NOTE: Editor.modify()를 통한 로딩일 경우 switcher 동기화를 위해. + }.bind(this); + + _canvas.observeJob(Trex.Ev.__CANVAS_MODE_CHANGE, _changeMode); + _canvas.observeJob(Trex.Ev.__CANVAS_MODE_INITIALIZE, _changeMode); + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button.Select(TrexConfig.merge(this.buttonCfg, { + selectedValue: _defaultProperty.data, + selectedText: _defaultProperty.label + })), + /* menu */ + new Trex.Menu.Select(this.menuCfg), + /* handler */ + _toolHandler + ); + } + +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/switchertoggle.js b/src/main/webapp/daumeditor/js/trex/tool/switchertoggle.js new file mode 100644 index 0000000..6065dbe --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/switchertoggle.js @@ -0,0 +1,61 @@ +/** + * @fileoverview + * wysiwyg, source 두 모드의 변경을 가능하게하는 checkbox형식의 tool 'SwitcherToggle' Source, + * Class Trex.Tool.SwitcherToggle 와 configuration을 포함 + * + */ + +TrexConfig.addTool( + "switchertoggle", + { + wysiwygonly: _FALSE, + sync: _TRUE, + status: _TRUE, + options: [ + { label: '에디터', title: "에디터", data: 'html' }, + { label: 'HTML', title: "HTML", data: 'source' } + ] + } +); + +Trex.Tool.SwitcherToggle = Trex.Class.create({ + $const: { + __Identity: 'switchertoggle' + }, + $extend: Trex.Tool, + oninitialized: function() { + var _canvas = this.canvas; + + var _toolHandler = function() { + switch(_canvas.mode){ + case 'html': + _canvas.changeMode('source'); + break; + case 'source': + _canvas.changeMode('html'); + break; + } + return _FALSE; + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button.Toggle(TrexConfig.merge(this.buttonCfg, { + borderClass: 'tx-switchtoggle' + })), + /* menu */ + _NULL, + /* handler */ + _toolHandler + ); + + var _toggleCheckbox = function(from, to) { + this.button.setValue(to == 'source'); + }.bind(this); + _canvas.observeJob(Trex.Ev.__CANVAS_MODE_CHANGE, _toggleCheckbox); + _canvas.observeJob(Trex.Ev.__CANVAS_MODE_INITIALIZE, _toggleCheckbox); + } + +}); + diff --git a/src/main/webapp/daumeditor/js/trex/tool/table.js b/src/main/webapp/daumeditor/js/trex/tool/table.js new file mode 100644 index 0000000..eafb9d7 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/table.js @@ -0,0 +1,454 @@ +/** + * @fileoverview + * Table을 삽입하는 기능을 가진 Tool 'table' Source, + * Class Trex.Tool.Table,Trex.Menu.Table,Trex.Menu.Table.TableEdit와 configuration 을 포함 하고있다. + */ + +TrexConfig.addTool( + "table", + { + borderStyle: "1px solid #ccc", + sync: _FALSE, + status: _TRUE + }, + function(root){ + var bgc = TrexConfig.get("canvas",root).styles.backgroundColor; + if (bgc != "transparent") { + TrexConfig.getTool("table",root).bgcolor = bgc; + } + } +); + +TrexMessage.addMsg({ + '@table.alert': "1 이상 99 이하의 숫자만 입력 가능합니다." +}); + +Trex.Tool.Table = Trex.Class.create({ + $const: { + __Identity: 'table', + __DEFAULT_TABLE_PROPERTY:{ + "cellSpacing": 0, + "cellPadding": 1, + "border": 0, + "style": { + border: "none", + borderCollapse:"collapse" + } + }, + __DEFAULT_TABLE_PROPERTY_STR: "cellspacing=\"0\" cellpadding=\"0\" border=\"0\"", + __DEFAULT_TABLE_STYLE: "border:none;border-collapse:collapse;", + __DEFAULT_TABLE_CLASS: "txc-table", + __DEFAULT_TABLE_CELL_HEIGHT: 24 + }, + $extend: Trex.Tool, + oninitialized: function(config) { + var _self = this; + this.tableSize = { row: 0, col:0 }; + + var _canvas = this.canvas; + + var _toolHandler = this.handler = function(data) { + _canvas.execute(function(processor) { + // get table width + var tableWidth = '100%'; + processor.executeUsingCaret(function(range, savedCaret){ + var endCaret = savedCaret.getCaret(_FALSE); + if (!$tom.ancestor(endCaret, 'table')) { + tableWidth = _self.getDefaultTableWidth(); + } + }); + + // insert empty table + var table = _self.makeEmptyTable(data.row, data.col, tableWidth); + var _tNode = processor.pasteContent(table, _TRUE); + processor.bookmarkInto(_tNode); + + // open advanced toolbar + if (_self.toolbar.tools.advanced) { + _self.toolbar.tools.advanced.forceOpen(); + } + }); + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button(this.buttonCfg), + /* menu */ + new Trex.Menu.Table(this.menuCfg), + /* handler */ + _toolHandler + ); + }, + makeEmptyTable: function(row, col, tableWidth){ + var tableStringArr = []; + + tableStringArr.push(""); + + var borderStyleText = this.config.borderStyle; + var tdWidth = this.getDefaultCellWidth(col, tableWidth), + tdHeight = this.getDefaultCellHeight(row); + var basicBorder = ["border-bottom:",borderStyleText,";border-right:",borderStyleText,";"].join(""); + + for( var i = 0; i < row; i++ ){ + tableStringArr.push(""); + for( var j = 0; j < col; j++ ){ + var border = [basicBorder]; + tableStringArr.push(""); + } + tableStringArr.push("") + } + tableStringArr.push("

          " + $tom.EMPTY_BOGUS + "

          "); + return tableStringArr.join(""); + }, + getDefaultCellWidth: function(columnCount, tableWidth) { + var width; + tableWidth = tableWidth || '100%'; + if (tableWidth.toString().indexOf('%') !== -1) { + width = (100 / columnCount) + '%'; + } else { + width = parseInt(parseInt(tableWidth,10)/columnCount, 10); + if (isNaN(width)) { + width = 0; + } + width = width.toPx(); + } + return width; + }, + getDefaultCellHeight: function(rowCount) { + return Trex.Tool.Table.__DEFAULT_TABLE_CELL_HEIGHT.toPx(); + }, + getDefaultTableWidth: function(){ //NOTE: #FTDUEDTR-905 + var tableWidth = this.config.tableWidth; + if (!tableWidth) { + tableWidth = this.getCanvasInnerWidth(); + } + return tableWidth; + }, + getCanvasInnerWidth: function() { + var padding = this.canvas.getSizeConfig().contentPadding || 8; + return (this.canvas.getSizeConfig().contentWidth || 600) - padding * 2 - 20; + } +}); + + +Trex.Tool.Table.TemplateWizard = Trex.Class.create({ + initialize: function(){ + this.templateList = (typeof getTableTemplateList == "function")? getTableTemplateList() : [{ + klass: "ex1", + common: { + backgroundColor:"transparent", + borderTop:"none", + borderLeft:"none", + borderRight: "1px solid #d9d9d9", + borderBottom: "1px solid #d9d9d9" + }, + firstRow: { + borderTop: "1px solid #000" + }, + firstCol: { + borderLeft: "1px solid #000" + }, + lastCol: { + borderRight: "1px solid #000" + }, + lastRow: { + borderBottom: "1px solid #000" + }, + evenRow: {}, + oddRow: {} + }]; + this.currentTemplate = _NULL; + }, + applyStyle: function(table, templateIndex){ + if ( isNaN( templateIndex ) ){ + return ; + } + + var tableMatrixer = new Trex.Tool.Table.TableCellMatrixer(table); + var tdMatrix = tableMatrixer.getTdMatrix(); + + this.currentTemplate = this.templateList[templateIndex]; + for( var i = 0; i < tdMatrix.length; i++){ + for( var j = 0; j < tdMatrix[i].length; j++){ + this.setCellStyle(tdMatrix[i][j], { + isEvenRow: (i % 2) == 1, + isFirstRow: i == 0, + isLastRow: i == tdMatrix.length - 1, + isFirstCol: j == 0, + isLastCol: (j == tdMatrix[i].length - 1) + }); + } + } + }, + setCellStyle: function(elTd, truthMap){ + var t = this.currentTemplate; + var style = Object.extend({}, t['common']); + Object.extend(style, (truthMap.isEvenRow)?t['evenRow'] : t['oddRow']); + Object.extend(style, (truthMap.isFirstRow)?t['firstRow'] : (truthMap.isLastRow)?t['lastRow'] : {}); + Object.extend(style, (truthMap.isLastCol)?t['lastCol'] : {}); + Object.extend(style, (truthMap.isFirstCol)?t['firstCol'] : {}); + txlib.setStyle(elTd, style); + }, + getTemplateList: function(){ + return this.templateList; + } +}); +Trex.Tool.Table.TableCellMatrixer = Trex.Class.create({ + initialize: function(table){ + this.rowSize = this.initRowSize(table); + this.colSize = this.initColSize(table); + var context = $tom.first(table,"tbody") || table; + this.tdMatrix = this.createTdMatrix(context); + //this.table = table; + + for (var i = 0; i < this.tdMatrix.length; i++) { + for (var j = 0; j < this.tdMatrix[i].length; j++) { + var td = this.tdMatrix[i][j]; + if (td.cols > 1) { + td.cols--; + this.tdMatrix[i].splice(j+1, 0, td); + } + } + } + for( var i = 0; i< this.tdMatrix.length; i++ ){ + for( var j = 0; j < this.tdMatrix[i].length; j++ ){ + var td = this.tdMatrix[i][j]; + if ( td.rows > 1 ){ + td.rows--; + this.tdMatrix[i + 1].splice(j, 0, td); + } + } + } + }, + + createTdMatrix: function(tbody){ + var tdMatrix = []; + + var trArr = $tom.children(tbody, "tr"); + for( var i = 0, len = trArr.length; i < len; i++ ){ + tdMatrix.push(this.createTdArray(trArr[i])); + } + + return tdMatrix; + }, + createTdArray: function(tr){ + var tdArr = []; + + var tds = $tom.children(tr, "td"); + for( var i = 0, len = tds.length; i < len; i++ ){ + tdArr.push( this.decorateSingleTd( tds[i] ) ); + } + return tdArr; + }, + decorateSingleTd: function(td){ + var cols = parseInt( td.getAttribute("colSpan") || 1); + var rows = parseInt( td.getAttribute("rowSpan") || 1); + td.cols = cols; + td.rows = (rows-1) * cols + 1; + + return td; + }, + initRowSize: function(table){ + return table.rows.length; + }, + initColSize: function(table){ + var colSize = 0; + var tdArr = $tom.children( $tom.collect(table, "tr"), "td"); + tdArr.each(function(td){ + colSize += parseInt(td.getAttribute("colSpan") || 1); + }); + + return colSize; + }, + getRowSize: function(){ + return this.rowSize; + }, + getColSize: function(){ + return this.colSize; + }, + getTdMatrix: function(){ + return this.tdMatrix; + } +}); + +TrexMessage.addMsg({ + '@table.title.insert': '표삽입  ', + '@table.title.setDirectly': '표 직접설정', + '@table.title.row': '열 개수', + '@table.title.col': '행 개수' +}); +Trex.MarkupTemplate.add( + 'menu.table.direct', [ + '
          @table.title.setDirectly
          ', + '
          ', + '', + '', + '
          ' + ].join("") +); +/* Trex.Menu.Table ************************************************************************************/ +Trex.Menu.Table = Trex.Class.create({ + $const:{ + MAX_ROW:99, + MAX_COL:99 + }, + $extend: Trex.Menu, + ongenerated: function() { + this.rowSize = 1; + this.colSize = 1; + + this.elInnerPreview = $tom.collect(this.elMenu, 'div.tx-menu-inner .tx-menu-preview'); + this.dynamicSizer = this.generateDynamicSizer(this.elInnerPreview); + + this.elInnerRowCol = $tom.collect(this.elMenu, 'div.tx-menu-inner .tx-menu-rowcol'); + this.generateTextSizer(this.elInnerRowCol); + + this.elButtonArea = $tom.collect(this.elMenu, 'div.tx-menu-inner .tx-menu-enter'); + this.generateButtonArea(this.elButtonArea); + }, + onregenerated: function() { + this.showDynamicSizer(); + }, + showDynamicSizer: function(){ + this.dynamicSizer.clear(); + $tx.show( this.elInnerPreview ); + $tx.hide( this.elInnerRowCol ); + $tx.hide( this.elButtonArea ); + }, + showTextSizer: function(){ + $tx.hide(this.elInnerPreview); + $tx.show(this.elInnerRowCol); + $tx.show(this.elButtonArea); + }, + generateDynamicSizer: function(elPreivewContext){ + var _self = this; + var elRowCol= tx.span(); + var elDisplay = tx.div({className:"tx-dynamic-sizer-display"}, TXMSG('@table.title.insert'), elRowCol); + elPreivewContext.appendChild( elDisplay ); + + var dynamicSizer = new Trex.DynamicSizer({ + el: elPreivewContext, + clickHandler: this.onSelect.bind(this), + moveHandler: function(row, col){ + elRowCol.innerHTML = row + 'x' +col; + } + }); + + var _elA = tx.a({href:"javascript:;"}, TXMSG('@table.title.setDirectly')); + $tx.observe( _elA, "click", function(ev){ + _self.showTextSizer(); + $tx.stop(ev); + _self.fireJobs(Trex.Ev.__MENU_LAYER_CHANGE_SIZE, { + detail: { + menu: _self + } + }); + }); + + var _elButton = tx.div({className:"tx-more-button"}); + _elButton.appendChild(_elA); + elPreivewContext.appendChild( _elButton ); + + return dynamicSizer; + }, + generateTextSizer: function(elContext) { + var _self = this; + + Trex.MarkupTemplate.get('menu.table.direct').evaluateToDom({}, elContext); + + var calculator = { + calculate: function(value, max, operand){ + value = parseInt(value); + if ( value + operand > max || value + operand< 1){ + alert( TXMSG("@table.alert") ); + return value; + }else{ + return value + operand; + } + }, + getValidValue:function(value, previousValue, max){ + if ( value <= 0 || value > max ){ + alert( TXMSG("@table.alert") ); + return previousValue; + }else{ + return value; + } + + } + }; + + var colInput = $tom.collect(elContext, "div.tx-col-field input"); + $tx.observe(colInput, "blur", function(){ + colInput.value = _self.colSize = calculator.getValidValue(colInput.value, _self.colSize, Trex.Menu.Table.MAX_COL); + }); + $tx.observe( $tom.collect(elContext, "div.tx-col-field a.tx-btn-add"), "click", function(e){ + colInput.value = _self.colSize = calculator.calculate(_self.colSize, Trex.Menu.Table.MAX_COL, 1); + $tx.stop(e); + return _FALSE; + }); + $tx.observe($tom.collect(elContext, "div.tx-col-field a.tx-btn-sub"), "click", function(e){ + colInput.value = _self.colSize = calculator.calculate(_self.colSize, Trex.Menu.Table.MAX_COL, -1); + $tx.stop(e); + return _FALSE; + }); + + var rowInput = $tom.collect(elContext, "div.tx-row-field input"); + $tx.observe(rowInput, "blur", function(){ + rowInput.value = _self.rowSize = calculator.getValidValue(rowInput.value, _self.rowSize, Trex.Menu.Table.MAX_ROW); + }); + $tx.observe($tom.collect(elContext, "div.tx-row-field a.tx-btn-add"), "click", function(e){ + rowInput.value = _self.rowSize = calculator.calculate(_self.rowSize, Trex.Menu.Table.MAX_ROW, 1); + $tx.stop(e); + return _FALSE; + }); + $tx.observe($tom.collect(elContext, "div.tx-row-field a.tx-btn-sub"), "click", function(e){ + rowInput.value = _self.rowSize = calculator.calculate(_self.rowSize, Trex.Menu.Table.MAX_ROW, -1); + $tx.stop(e); + return _FALSE; + }); + }, + generateButtonArea: function(elContext){ + var _self = this; + var elDiv = tx.div(); + var elAConfirm = tx.a({href:"javascript:;", className:"tx-btn-confirm"}, "확인"); + var elACancel = tx.a({href:"javascript:;", className:"tx-btn-cancel"}, "취소"); + + $tx.observe( elAConfirm, "click", function(ev){ + _self.onSelect(ev, { + row: _self.rowSize, + col: _self.colSize + }); + }); + + $tx.observe(elACancel, "click", function(e) { + $tx.stop(e); + this.onCancel(); + return _FALSE; + }.bindAsEventListener(this)); + + elDiv.appendChild(elAConfirm); + elDiv.appendChild(elACancel); + elContext.appendChild(elDiv); + } +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/tablebackcolor.js b/src/main/webapp/daumeditor/js/trex/tool/tablebackcolor.js new file mode 100644 index 0000000..60ac755 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/tablebackcolor.js @@ -0,0 +1,62 @@ +/** + * @fileoverview + * 테이블 셀의 색을 변경하기 위해 쓰임 + * + */ +TrexConfig.addTool( + "tablebackcolor", + { + defaultcolor: "#9aa5ea", + wysiwygonly: _TRUE, + sync: _FALSE, + status: _TRUE, + useFavorite: _TRUE, + thumbs: Trex.__CONFIG_COMMON.thumbs, + needRevert: _TRUE + } +); + +Trex.Tool.Tablebackcolor = Trex.Class.create({ + $const: { + __Identity: 'tablebackcolor' + }, + $extend: Trex.Tool, + + oninitialized: function() { + var _canvas = this.canvas; + var self = this; + + self.button = new Trex.Button(this.buttonCfg); + + var _toolHandler = function(color) { + _canvas.query(function(processor){ + if (processor.table) { + processor.table.tableBackground(color); + } + }); + syncButton(color); + }; + + var syncButton = function(color) { + try { + if (color) { + $tx.setStyle(self.button.elButton, {'backgroundColor': color}); + } + } catch(e) { + console.log(e); + } + } + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + self.button, + /* menu */ + new Trex.Menu.ColorPallete(this.menuCfg), + /* handler */ + _toolHandler + ); + } +}); + + diff --git a/src/main/webapp/daumeditor/js/trex/tool/tableedittool.js b/src/main/webapp/daumeditor/js/trex/tool/tableedittool.js new file mode 100644 index 0000000..64bd6b0 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/tableedittool.js @@ -0,0 +1,79 @@ +/** + * @fileoverview + * toolbar의 접힌 부분을 열고닫는 '더보기' Icon을 위해 필요한 configuration과 Class Trex.Tool.Advanced 를 포함 + * + */ +TrexConfig.addTool( + "tableedittool", + { + sync: _FALSE, + status: _TRUE, + opened: _FALSE + } +); + +/** + * Trex.Tool.Advanced + * + * @class + * @extends Trex.Tool + */ +Trex.Tool.TableEditTool = Trex.Class.create({ + $const: { + __Identity: 'tableedittool' + }, + $extend: Trex.Tool, + /** + * instance가 생성될 때 실행되며 필요한 UI Component 및 Event handler를 생성한다. + * + * @memberOf Trex.Tool.Advanced.prototype + * @param {Object} config + */ + oninitialized: function(config) { + var _toolbar = this.toolbar; + + var _elBasic = _toolbar.el; + var _elAdvanced = $tom.collect(_elBasic.parentNode, 'div.tx-toolbar-advanced'); + if(!_elAdvanced) { + return; + } + + _toolbar.observeJob("toolbar.advanced.fold", function() { + + $tx.hide(_elAdvanced); + $tx.removeClassName(_elBasic, 'tx-toolbar-basic-open'); + }); + + _toolbar.observeJob("toolbar.advanced.spread", function() { + + $tx.show(_elAdvanced); + $tx.addClassName(_elBasic, 'tx-toolbar-basic-open'); + }); + + var _isOpened = _FALSE; + var _toolHandler = function() { + if(_isOpened) { + _toolbar.fireJobs("toolbar.advanced.fold"); + } else { + _toolbar.fireJobs("toolbar.advanced.spread"); + } + _isOpened = !_isOpened; + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button(this.buttonCfg), + /* menu */ + _NULL, + /* handler */ + _toolHandler + ); + + if(config.opened == _TRUE) { + _elAdvanced.show(); + $tx.addClassName(_elBasic, 'tx-toolbar-basic-open'); + _isOpened = _TRUE; + } + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/tabletemplate.js b/src/main/webapp/daumeditor/js/trex/tool/tabletemplate.js new file mode 100644 index 0000000..b4bc1a6 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/tabletemplate.js @@ -0,0 +1,113 @@ +/** + * @fileoverview + * Tool '서식' Source, + * + */ +TrexConfig.addTool( + "tabletemplate", + { + sync: _FALSE, + status: _TRUE, + rows: 5, + cols: 9, + options: [ + { label: 'image', data: 1 , klass: 'tx-tabletemplate-1' }, + { label: 'image', data: 2 , klass: 'tx-tabletemplate-2' }, + { label: 'image', data: 3 , klass: 'tx-tabletemplate-3' }, + { label: 'image', data: 4 , klass: 'tx-tabletemplate-4' }, + { label: 'image', data: 5 , klass: 'tx-tabletemplate-5' }, + { label: 'image', data: 6 , klass: 'tx-tabletemplate-6' }, + { label: 'image', data: 7 , klass: 'tx-tabletemplate-7' }, + { label: 'image', data: 8 , klass: 'tx-tabletemplate-8' }, + { label: 'image', data: 9 , klass: 'tx-tabletemplate-9' }, + + { label: 'image', data: 10 , klass: 'tx-tabletemplate-10' }, + { label: 'image', data: 11 , klass: 'tx-tabletemplate-11' }, + { label: 'image', data: 12 , klass: 'tx-tabletemplate-12' }, + { label: 'image', data: 13 , klass: 'tx-tabletemplate-13' }, + { label: 'image', data: 14 , klass: 'tx-tabletemplate-14' }, + { label: 'image', data: 15 , klass: 'tx-tabletemplate-15' }, + { label: 'image', data: 16 , klass: 'tx-tabletemplate-16' }, + { label: 'image', data: 17 , klass: 'tx-tabletemplate-17' }, + { label: 'image', data: 18 , klass: 'tx-tabletemplate-18' }, + + { label: 'image', data: 19 , klass: 'tx-tabletemplate-19' }, + { label: 'image', data: 20 , klass: 'tx-tabletemplate-20' }, + { label: 'image', data: 21 , klass: 'tx-tabletemplate-21' }, + { label: 'image', data: 22 , klass: 'tx-tabletemplate-22' }, + { label: 'image', data: 23 , klass: 'tx-tabletemplate-23' }, + { label: 'image', data: 24 , klass: 'tx-tabletemplate-24' }, + { label: 'image', data: 25 , klass: 'tx-tabletemplate-25' }, + { label: 'image', data: 26 , klass: 'tx-tabletemplate-26' }, + { label: 'image', data: 27 , klass: 'tx-tabletemplate-27' }, + + { label: 'image', data: 28 , klass: 'tx-tabletemplate-28' }, + { label: 'image', data: 29 , klass: 'tx-tabletemplate-29' }, + { label: 'image', data: 30 , klass: 'tx-tabletemplate-30' }, + { label: 'image', data: 31 , klass: 'tx-tabletemplate-31' }, + { label: 'image', data: 32 , klass: 'tx-tabletemplate-32' }, + { label: 'image', data: 33 , klass: 'tx-tabletemplate-33' }, + { label: 'image', data: 34 , klass: 'tx-tabletemplate-34' }, + { label: 'image', data: 35 , klass: 'tx-tabletemplate-35' }, + { label: 'image', data: 36 , klass: 'tx-tabletemplate-36' }, + + { label: 'image', data: 37 , klass: 'tx-tabletemplate-37' }, + { label: 'image', data: 38 , klass: 'tx-tabletemplate-38' }, + { label: 'image', data: 39 , klass: 'tx-tabletemplate-39' }, + { label: 'image', data: 40 , klass: 'tx-tabletemplate-40' }, + { label: 'image', data: 41 , klass: 'tx-tabletemplate-41' }, + { label: 'image', data: 42 , klass: 'tx-tabletemplate-42' }, + { label: 'image', data: 43 , klass: 'tx-tabletemplate-43' }, + { label: 'image', data: 44 , klass: 'tx-tabletemplate-44' }, + { label: 'image', data: 45 , klass: 'tx-tabletemplate-45' } + + ] + } + +); + +Trex.Tool.Tabletemplate = Trex.Class.create({ + $const: { + __Identity: 'tabletemplate' + }, + $extend: Trex.Tool, + oninitialized: function(config) { + var _tool = this; + var _canvas = this.canvas; + var _map = {}; + config.options.each(function(option) { + _map[option.data] = { + type: option.type + }; + }); + + var _toolHandler = function(data) { + if(!_map[data]) { + return; + } + + var _table = _NULL; + _canvas.execute(function(processor) { + if (processor.table) { + _table = processor.findNode('table'); + processor.table.setTemplateStyle(_table, data); + } + }); + + + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button(this.buttonCfg), + /* menu */ + new Trex.Menu.List(this.menuCfg), + /* handler */ + _toolHandler + ); + + } + +}); + diff --git a/src/main/webapp/daumeditor/js/trex/tool/underline.js b/src/main/webapp/daumeditor/js/trex/tool/underline.js new file mode 100644 index 0000000..337f931 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/underline.js @@ -0,0 +1,45 @@ +/** + * @fileoverview + * Tool 'Underline' Source, + * Class Trex.Tool.Underline configuration 을 포함 하고있다. + * + */ +TrexConfig.addTool( + "underline", + { + wysiwygonly: _TRUE, + sync: _TRUE, + status: _TRUE, + hotKey: { + // ctrl + u + ctrlKey: _TRUE, + keyCode: 85 + } + } +); + +Trex.Tool.Underline = Trex.Class.create({ + $const: { + __Identity: 'underline' + }, + $extend: Trex.Tool, + $mixins: [ + Trex.I.FontTool, + Trex.I.ButtonFontTool, + Trex.I.WrappingDummyFontTool, + ($tx.gecko ? Trex.I.Tool.QueryStyle.Gecko : Trex.I.Tool.QueryStyle.Standard) + ], + getRelatedCssPropertyNames: function() { + return [this.getCssPropertyName()]; + }, + getCssPropertyName: function() { + return "textDecoration"; + }, + getQueryCommandName: function() { + return "underline"; + }, + isStyleApplied: function(node) { + var matchTagName = 'u'; + return this.queryNodeStyle(node, this.getCssPropertyName(), this.getQueryCommandName(), matchTagName); + } +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/tool/undo.js b/src/main/webapp/daumeditor/js/trex/tool/undo.js new file mode 100644 index 0000000..8299feb --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/undo.js @@ -0,0 +1,51 @@ +/** + * @fileoverview + * Tool 'UnDo' Source, + * Class Trex.Tool.UnDo 와 configuration 을 포함 하고있다. + * + */ +TrexConfig.addTool( + "undo", + { + sync: _FALSE, + status: _FALSE + } +); + +Trex.Tool.UnDo = Trex.Class.create({ + $const: { + __Identity: 'undo' + }, + $extend: Trex.Tool, + oninitialized: function() { + var _canvas = this.canvas; + + var _toolHandler = function() { + _canvas.getProcessor().blur(); + _canvas.focus(); + + setTimeout( function(){ + _canvas.fireJobs('canvas.panel.undo'); + }, 20); + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button(this.buttonCfg), + /* menu */ + _NULL, + /* handler */ + _toolHandler + ); + + this.bindKeyboard({ // ctrl + z - 실행취소 + ctrlKey: _TRUE, + keyCode: 90 + }, function() { + _canvas.fireJobs('canvas.panel.undo'); + _canvas.triggerQueryStatus(); + }); + } + +}); diff --git a/src/main/webapp/daumeditor/js/trex/tool/unordered.js b/src/main/webapp/daumeditor/js/trex/tool/unordered.js new file mode 100644 index 0000000..563fc18 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/tool/unordered.js @@ -0,0 +1,74 @@ +/** + * @fileoverview + * UL을 삽입하는 '글머리 기호' Source, + * Class Trex.Tool.UnorderedList 와 configuration을 포함 + * + */ +TrexConfig.addTool( + "unordered", + { + sync: _TRUE, + status: _TRUE + } +); + +Trex.Tool.UnorderedList = Trex.Class.create({ + $const: { + __Identity: 'unordered' + }, + $extend: Trex.Tool, + $mixins: [Trex.I.ListExecution], + oninitialized: function() { + var _tool = this; + var _canvas = this.canvas; + var _toolbar = this.toolbar; + + var _toolHandler = function() { + _toolbar.tools["ordered"].button.normalState(); + /*if(_toolbar.tools["unordered"].button.isPushed()){ + return _FALSE; + }*/ + + _canvas.execute(function(processor) { + var _bNode = processor.findNode('%listhead'); + if (_bNode) { + if ($tom.kindOf(_bNode, "ul")) { + _tool.executeOffList(processor); + } else { + _tool.executeToList(processor, "ul", {}); + } + } else { + _tool.executeToList(processor, "ul", {}); + } + }); + }; + + /* button & menu weave */ + this.weave.bind(this)( + /* button */ + new Trex.Button(this.buttonCfg), + /* menu */ + _NULL, + /* handler */ + _toolHandler + ); + + var _cachedProperty = _NULL; + _canvas.observeJob(Trex.Ev.__CANVAS_PANEL_QUERY_STATUS, function() { + var _data = _canvas.query(function(processor) { + return processor.queryCommandState('insertunorderedlist'); + }); + if(_cachedProperty == _data) { + return; + } + _tool.button.setState(_data); + _cachedProperty = _data; + }); + + this.bindKeyboard({ // ctrl + u + ctrlKey: _TRUE, + altKey: _TRUE, + keyCode: 85 + }, _toolHandler); + } +}); \ No newline at end of file diff --git a/src/main/webapp/daumeditor/js/trex/toolbar.js b/src/main/webapp/daumeditor/js/trex/toolbar.js new file mode 100644 index 0000000..939dd70 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/toolbar.js @@ -0,0 +1,514 @@ +/** + * @fileoverview + * - Trex.Toolbar + */ + +/** + * Trex.Toolbar Class + * @class + * @param {Object} editor + * @param {Object} config + */ +Trex.Toolbar = Trex.Class.create(/** @lends Trex.Toolbar.prototype */{ + /** @ignore */ + $mixins: [ + Trex.I.JobObservable + ], + /** + * Toolbar Dom Element + */ + el: _NULL, + /** + * Tools List + */ + tools: _NULL, + initialize: function(editor, rootConfig) { + this.canvas = editor.getCanvas(); + + var _initializedId = rootConfig.initializedId || ""; + this.el = $must("tx_toolbar_basic" + _initializedId, "Trex.Toolbar"); + }, + /** + * Toolbar의 tool을 비활성화 시킨다. + * @function + * @example + * Editor.getToolbar().disableToolbar(); + */ + disableToolbar: function(){ + var _tools = this.tools; + for (var _name in _tools) { + if (_tools[_name].button) { + _tools[_name].button.disable(); + } + } + }, + /** + * 현재 toolbar의 상태를 serializing한다. + * @function + * @returns {object} + */ + serializeToolValues : function(){ + var _tools = this.tools; + var result = {}; + for(var name in _tools){ + var _tool = _tools[name]; + result[name] = _tool.button.lastValue; + } + return result; + }, + widgetSeq:0, + makeWidget: function(button, menu, handler) { + var _toolbar = this; + var _canvas = this.canvas; + var _dummyToolClass = new (function() { + this.identity = 'widget' + (++_toolbar.widgetSeq); + this.wysiwygonly = _TRUE; + this.menuFoldAuto = _TRUE; + this.canvas = _canvas; + this.toolbar = _toolbar; + })(); + + Trex.Tool.prototype.weave.bind(_dummyToolClass)( + button, + menu, + handler + ); + + this.tools[_dummyToolClass.identity] = _dummyToolClass; + return _dummyToolClass; + } +}); + +Trex.install("editor.getTool", + function(editor, toolbar) { + var _tools = toolbar.tools = {}; + + /** + * memberOf Editor.prototype + * @param {Object} name + */ + editor.getTool = function(name) { + if(_tools[name] != _NULL) { + return _tools[name]; + } else if(arguments.length == 0){ + return _tools; + }else{ + return _NULL; + } + }; + } +); + +Trex.register("new tools", + function(editor, toolbar, sidebar, canvas, config) { + var _tools = toolbar.tools; + + var _initializedId = config.initializedId || ""; + for(var item in Trex.Tool) { + var _name = Trex.Tool[item]['__Identity']; + if(_name){ + var cfg = TrexConfig.getTool(_name, config); + cfg.initializedId = _initializedId; + if (Trex.available(cfg, _name + _initializedId)) { + _tools[_name] = new Trex.Tool[item](editor, toolbar, cfg); + } + } + } + if(!!canvas.config.readonly) { + toolbar.disableToolbar(); + } + } +); + +Trex.module("bind events with tools", + function(editor, toolbar, sidebar, canvas) { + var _tools = toolbar.tools; + + var disableToolOnMobile = function () { + var isMobile, name, tool, btn; + isMobile = $tx.ios || $tx.android; + if (!isMobile) { + return; + } + for (name in _tools) { + tool = _tools[name]; + if (tool.disabledonmobile) { + btn = tool.button; + btn.disable(); + } + } + }; + disableToolOnMobile(); + + var _changeMode = function(from, to){ + if (from == to) { + return; + } + for (var _name in _tools) { + var _tool = _tools[_name]; + var _btn = _tool.button; + if (Trex.Canvas.__WYSIWYG_MODE == to) { + _btn.enable(); + } else if (Trex.Canvas.__WYSIWYG_MODE == from) { + if (_tool.wysiwygonly) { + _btn.disable(); + } else { + _btn.enable(); + } + } + } + disableToolOnMobile(); + }; + canvas.observeJob(Trex.Ev.__CANVAS_MODE_CHANGE, _changeMode); + canvas.observeJob(Trex.Ev.__CANVAS_MODE_INITIALIZE, _changeMode); + + var _releaseTools = function(identity) { + for(var _name in _tools) { + var _tool = _tools[_name]; + if(identity != _tool.identity) { + if (_tool.button) { + _tool.button.release(); + _tool.button.decreaseZindex(); + } + if(_tool.menu && _tool.menuFoldAuto) { + _tool.menu.release(); + } + } + } + }; + canvas.observeJob(Trex.Ev.__CANVAS_PANEL_CLICK, _releaseTools); + canvas.observeJob(Trex.Ev.__CANVAS_SOURCE_PANEL_CLICK, _releaseTools); + canvas.observeJob(Trex.Ev.__CANVAS_TEXT_PANEL_CLICK, _releaseTools); + + toolbar.observeJob(Trex.Ev.__TOOL_CLICK, _releaseTools); + + canvas.observeKey({ // Esc + ctrlKey: _FALSE, + altKey: _FALSE, + shiftKey: _FALSE, + keyCode: 27 + }, _releaseTools); + + editor.observeKey({ // Esc + ctrlKey: _FALSE, + altKey: _FALSE, + shiftKey: _FALSE, + keyCode: 27 + }, _releaseTools); + + $tx.observe(_DOC, 'click', + function(e){ + var _el = $tx.element(e); + var _class = [ 'tx-sidebar', 'tx-toolbar-basic' ,'tx-toolbar-advanced', + 'tx-sidebar-boundary', 'tx-toolbar-boundary', 'tx-toolbar-boundary']; + if (Trex.Util.getMatchedClassName(_el, _class)) { + _releaseTools("-"); + } + } + , _FALSE); + + var _shouldCloseMenus = function () { + editor.fireJobs(Trex.Ev.__SHOULD_CLOSE_MENUS); + }; + toolbar.observeJob(Trex.Ev.__TOOL_CLICK, _shouldCloseMenus); + } +); + +/** + * Tool 클래스의 추상 부모클래스로 각각의 tool들은 이 클래스를 상속받아야 하고, + * 'oninitialized' 함수를 구현해야한다. + * + * @abstract + * @class + * @param {Object} editor + * @param {Object} toolbar + * @param {Object} config + * + * @example + * Trex.Tool.Example = Trex.Class.create({ + * $const: { + * __Identity: 'example' + * }, + * $extend: Trex.Tool, + * oninitialized: function(config) { + * var _tool = this; + * + * this.weave.bind(this)( + * new Trex.Button(this.buttonCfg), + * new Trex.Menu(this.menuCfg), + * function(data) { + * //TODO + * } + * ); + * } + * }); + */ +Trex.Tool = Trex.Class.draft(/** @lends Trex.Tool.prototype */{ + /** + * tool identifier. 유일해야한다. + * @private + */ + identity: _NULL, + /** + * button 객체 + */ + button: _NULL, + /** + * menu 객체 + */ + menu: _NULL, + initialize: function(editor, toolbar, config) { + if(!this.constructor.__Identity) { + throw new Error("[Exception]Trex.Tool : not implement const(__Identity)"); + } + this.identity = this.constructor.__Identity; + + if(!editor) { + throw new Error("[Exception]Trex.Tool : not exist argument(editor)"); + } + /** + * editor 객체 + * @private + */ + this.editor = editor; + /** + * toolbar 객체 + * @private + */ + this.toolbar = toolbar; + /** + * canvas 객체 + * @private + */ + this.canvas = editor.getCanvas(); + /** + * 해당 tool 설정값 + * @private + */ + this.config = config; + this.wysiwygonly = ((config.wysiwygonly != _NULL)? config.wysiwygonly: _TRUE); + this.menuFoldAuto = ((config.menuFoldAuto != _NULL)? config.menuFoldAuto: _TRUE); + if (config.disabledonmobile != _NULL) { + this.disabledonmobile = config.disabledonmobile; + } + + /** + * 버튼을 생성할 때 필요한 설정값 + * @private + */ + this.buttonCfg = TrexConfig.merge({ + id: "tx_" + this.identity + }, config); + + /** + * 메뉴를 생성할 때 필요한 설정값 + * @private + */ + this.menuCfg = TrexConfig.merge({ + id: "tx_" + this.identity + "_menu" + }, config); + + this.oninitialized.bind(this)(config); + }, + /** + * tool 객체를 초기화하는 마지막 단계에서 호출되는 함수로, + * tool 클래스를 상속받는 tool에서 반드시 구현해야 한다. + * + * @abstract + * @private + * @function + */ + oninitialized: function() { + throw new Error("[Exception]Trex.Tool : not implements function(oninitialized)"); + }, + /** + * 보통 tool은 버튼과 메뉴로 구성되는데, 이 함수에서 그 둘 사이의 연결을 해준다.
          + * menu가 없으면 버튼을 클릭할 때 execHandler가 실행되고, + * menu가 있으면 버튼을 클릭할 때 menu가 보이며, + * menu에서 특정 값을 선택하면 그 값을 가지고 execHandler가 실행된다. + * + * @function + * @private + * @param {Object} button - 버튼 객체 + * @param {Object} menu - 메뉴 객체 optional + * @param {Function} execHandler + * @param {Function} initHandler - optional + * + * @example + * this.weave.bind(this)( + * new Trex.Button(this.buttonCfg), + * new Trex.Menu(this.menuCfg), + * function(data) { + * //TODO + * }); + * } + */ + weave: function(button, menu, execHandler, initHandler) { + var _tool = this; + var _identity = this.identity; + var _toolbar = this.toolbar; + var _canvas = this.canvas; + + this.button = button; + button.tool = this; + var cmd = _NULL; + if(!menu){ + button.setCommand( + cmd = function(){ + _toolbar.fireJobs(Trex.Ev.__TOOL_CLICK, _identity); + return execHandler.apply(_tool, arguments); + } + ); + }else{ + this.menu = menu; + menu.tool = this; + + menu.initHandler = initHandler || function(){}; + menu.cancelHandler = function(){ button.setState(_FALSE); }; + + menu.setCommand( + cmd = function() { + var args = arguments; + var success = execHandler.apply(_tool, args); + //handler에서 $stop 을 반환하면 버튼 값을 메뉴에서 선택한 값으로 안바꿈.. + if (success === $stop) { + button.normalState.apply(button, args); + } else { + button.updateAfterCommand.apply(button, args); + } + return success; + } + ); + button.setCommand( + function(ev) { + _toolbar.fireJobs(Trex.Ev.__TOOL_CLICK, _identity, ev); + if(!button.isPushed()) { + var _lastvalue = button.getValue(); + button.increaseZindex(); + menu.show(_lastvalue); + } else { + menu.hide(); + if ($tx.msie) { + var _processor = _canvas.getProcessor(); + if (_processor.restoreRange) { + setTimeout(function () { + _processor.restoreRange(); + }, 0); + } + } + } + return _TRUE; + } + ); + + menu.observeJob(Trex.Ev.__MENU_LAYER_SHOW, function(ev){ + _toolbar.fireJobs(Trex.Ev.__MENU_LAYER_SHOW, ev); + }); + menu.observeJob(Trex.Ev.__MENU_LAYER_HIDE, function(ev){ + _toolbar.fireJobs(Trex.Ev.__MENU_LAYER_HIDE, ev); + }); + menu.observeJob(Trex.Ev.__MENU_LAYER_CHANGE_SIZE, function(ev){ + _toolbar.fireJobs(Trex.Ev.__MENU_LAYER_CHANGE_SIZE, ev); + }); + } + this.execute = cmd; + }, + /** + * 연결된 버튼과 메뉴 레이어와의 관계를 모두 해제한다. + * 일반적은 경우에는 필요하지 않고 async를 위한 tool에만 weave 구문 상위에 추가한다. + * @function + */ + resetWeave: function(){ + this.button.removeHandler(); + this.button.normalState(); + this.button = _NULL; + this.menu = _NULL; + this.execute = _NULL; + }, + /** + * 활성화 상태를 강제한다. + * async tool 에서 클릭후 자동 활성화를 위함. + * @function + */ + forceActivate: function(){ + if( this.button && this.menu ){ + this.button.pushedState(); + this.button.increaseZindex(); + this.menu.show(); + } + }, + bindKeyboard: function(keys, execHandler) { + var toolbar = this.toolbar; + var identity = this.identity; + this.canvas.observeKey(keys, function(ev) { + execHandler(ev); + toolbar.fireJobs(Trex.Ev.__TOOL_SHORTCUT_KEY, identity); + }); + } +}); + +Trex.AsyncTool = Trex.Class.draft(/** @lends Trex.Tool.prototype */{ + $extend: Trex.Tool, + oninitialized: function() { + this.loaded = false; + throw new Error("[Exception]Trex.AsyncTool : not implements function(oninitialized)"); + }, + onLoadModule: function() { + var self = this; + var url = this.config.asyncUrl; + if (/^(?:\/\/)|(?:\w+:\/\/)/.test(url) === false) { + url = this.getJSBasePath() + url; + } + if (EditorJSLoader.getOption('environment') == 'development') { + var d = (new Date()).getTime(); + if (url.indexOf('?') === -1) { + url += '?dummy=' + d; + } else { + url += '&dummy=' + d; + } + } + Editor.editorForAsyncLoad = this.editor; + EditorJSLoader.asyncLoadModule({ + url: TrexConfig.getUrl(url), + callback: function(){ + self.loaded = true; + } + }); + }, + getJSBasePath: function() { + var basePath; + try { + basePath = EditorJSLoader.getJSBasePath("editor.js"); + } catch (e) { + basePath = EditorJSLoader.getJSBasePath(); + } + return basePath; + } +}); + + +Trex.I.Tool = {}; +Trex.I.Tool.QueryStyle = {}; +Trex.I.Tool.QueryStyle.Standard = Trex.Mixin.create({ + queryNodeStyle: function(currentNode, cssPropertyName, queryCommandName, matchTagName) { + return $tx.getStyle(currentNode, cssPropertyName).include(queryCommandName); + } +}); + +Trex.I.Tool.QueryStyle.Gecko = Trex.Mixin.create({ + queryNodeStyle: function(currentNode, cssPropertyName, queryCommandName, matchTagName) { + var tempNode = currentNode; + var isInclude = _FALSE; + while(tempNode && !$tom.isBody(tempNode) && !isInclude) { + if ($tom.isTagName(tempNode, matchTagName)) { + isInclude = _TRUE; + } else { + isInclude = $tx.getStyle(currentNode, cssPropertyName).include(queryCommandName); + } + + // move to parent + tempNode = tempNode.parentNode; + } + return isInclude; + } +}); diff --git a/src/main/webapp/daumeditor/js/trex/trex.js b/src/main/webapp/daumeditor/js/trex/trex.js new file mode 100644 index 0000000..37ab730 --- /dev/null +++ b/src/main/webapp/daumeditor/js/trex/trex.js @@ -0,0 +1,234 @@ +/** + * @fileoverview + * Trex 정의 + */ + +/** @namespace */ +var Trex = { + __WORD_JOINER: "\ufeff", + __WORD_JOINER_REGEXP: /\ufeff/g, + __KEY: { + ENTER: '13', + DELETE: '46', + SPACE: '32', + BACKSPACE: '8', + TAB: '9', + PASTE: '86', //+ ctrl + CUT: '88' //+ ctrl + }, + I: {}, + X: {}, + define: function(destination, properties) { + return Object.extend(destination, properties); + }, + available: function(config, name) { + if(!$tx("tx_" + name)){ + //console.log("Warning: JsObject is existed but element 'tx_" + name + "' is not found."); + return _FALSE; + } + if(!config){ + //console.log("Warning: no config for" + name); + return _FALSE; + } + if(config.use == _FALSE) { + //console.log("Warning: config.use == _FALSE"); + return _FALSE; + } + return _TRUE; + } +}; + +//oop +(function(Trex){ + + function $$reference($instance) { + var _$ref = $instance; + while(_$ref.$reference) { + _$ref = _$ref.$reference; + } + return _$ref; + } + + function $$super($instance) { + var _$superclass = $instance.constructor.superclass; + if(_$superclass) { + var _$initbak = _$superclass.prototype.initialize; + _$superclass.prototype.initialize = function() { + this.$reference = $instance; + }; //fake initialize + var _$superobj = new _$superclass(); + _$superclass.prototype.initialize = _$initbak; + + var _wrapFunc = function(name) { + if(!_$superobj[name]) return _NULL; + return function() { + var _arguments = arguments; + var _$reference = $$reference($instance); + var _$superbak = _$reference.$super; + _$reference.$super = _$superobj.$super; + var _returns = _$superobj[name].apply(_$reference, _arguments); + _$reference.$super = _$superbak; + return _returns; + }; + }; + + var _$wrapobj = {}; + for(var _name in _$superobj) { + if(_name.charAt(0) != '$') { + if (typeof(_$superobj[_name]) == 'function') { + _$wrapobj[_name] = _wrapFunc(_name); + } + } + } + $instance.$super = _$wrapobj; + } + } + + /** + * @namespace + * @name Trex.Class + */ + Trex.Class = /** @lends Trex.Class */ { + /** + * creates class + * @param {Object} properties + */ + create: function(properties) { + var _class = function() { + var _proto = this.constructor.prototype; //NOTE: Cuz properties must not share + for(var _name in _proto) { + if(_proto[_name] && typeof(_proto[_name]) === 'object') { + if(_proto[_name].constructor == Array) { //Array + this[_name] = [].concat(_proto[_name]); + } else { + this[_name] = Object.extend({}, _proto[_name]); + } + } + } + $$super(this); + var _arguments = arguments; + this.initialize.apply(this, _arguments); + }; + return Trex.Class.draft(properties, _class); + }, + draft: function(properties, aClass) { + var _class = aClass ? + aClass : + function() { + $$super(this); + }; + + if(properties.$const) { + Object.extend(_class, properties.$const); + } + + if(properties.$extend) { + Object.extend(_class.prototype, properties.$extend.prototype); + _class.superclass = properties.$extend; + } + + if(properties.$mixins) { + var sources = $A(properties.$mixins); + sources.each(function(source) { + Object.extend(_class.prototype, source); + }); + } + for(var _name in properties) { + if(_name.charAt(0) != '$') { + _class.prototype[_name] = properties[_name]; + } + } + return _class; + }, + overwrite: function(source, properties) { + if(source.prototype) { + Object.extend(source.prototype, properties); + } + return source; + } + }; + + /** + * @namespace + * @name Trex.Faculty, Trex.Mixin + */ + Trex.Mixin = Trex.Faculty = /** @lends Trex.Mixin */ { + /** + * Creates + * @param {Object} properties + */ + create: function(properties) { + var _class = {}; + for(var _name in properties) { + if(properties[_name] && typeof(properties[_name]) === 'object') { + if(properties[_name].constructor == Array) { //Array + _class[_name] = [].concat(properties[_name]); + } else { + _class[_name] = Object.extend({}, properties[_name]); + } + } else { + _class[_name] = properties[_name]; + } + } + return _class; + }, + toClass: function(properties, initializeFunc) { + return Trex.Class.create( + Object.extend({ + initialize: initializeFunc? initializeFunc: function() {} + }, properties) + ); + } + }; +})(Trex); + +//module +(function(Trex){ + Object.extend(Trex, /** @lends Trex */ { + installs: [], + registers: [], + modules: [], + modulesX: [], + /** + * Installs component + * @param {Object} description + * @param {Object} fn + */ + install: function(description, fn){ + fn.desc = '[install] ' + description; + Trex.installs.push(fn); + }, + register: function(description, fn){ + fn.desc = '[register] ' + description; + Trex.registers.push(fn); + }, + module: function(description, fn){ + //console.log(' >>> ' + description); + fn.desc = '[module] ' + description; + Trex.modules.push(fn); + }, + moduleX: function(description, fn){ + fn.desc = '[moduleX] ' + description; + Trex.modulesX.push(fn); + }, + invoke: function(fns, editor, toolbar, sidebar, canvas, config){ + for(var i=0,len=fns.length; i +
          +
          + + + +
          +
          + +
          +
          + +
            +
          • +
            + 9pt +
            +
            +
          • +
          + + + + + + + + +
          +
          +
          +
          +
            +
          • +
            +
          • +
          + + + + + + + +
          +
          +
          +
          +
          +
          +
          + +
          +
          +
          + +
          +
          +
          + +
          +
          +
          +
          + +
          +
          +
          + +
          +
          +
          +
          파일 첨부
          +
          +
          +
          +

          + +
          +
          +
          +
          0%
          +

          파일을 업로드하는 중입니다.

          +
          + +
            +
            +
            +
            +
            + \ No newline at end of file diff --git a/src/main/webapp/daumeditor/pages/trex/file.html b/src/main/webapp/daumeditor/pages/trex/file.html new file mode 100644 index 0000000..f5c4029 --- /dev/null +++ b/src/main/webapp/daumeditor/pages/trex/file.html @@ -0,0 +1,63 @@ + + + + +Daum에디터 - 파일 첨부 + + + + + +
            +
            +

            파일 첨부

            +
            +
            +
            +
            파일 첨부 확인
            +
            + 확인을 누르시면 임시 데이터가 파일첨부 됩니다.
            + 인터페이스는 소스를 확인해주세요. +
            +
            +
            + +
            + + diff --git a/src/main/webapp/daumeditor/pages/trex/iframe_loader_catalyst.html b/src/main/webapp/daumeditor/pages/trex/iframe_loader_catalyst.html new file mode 100644 index 0000000..58e9889 --- /dev/null +++ b/src/main/webapp/daumeditor/pages/trex/iframe_loader_catalyst.html @@ -0,0 +1,25 @@ + \ No newline at end of file diff --git a/src/main/webapp/daumeditor/pages/trex/iframe_loader_catalyst_edge.html b/src/main/webapp/daumeditor/pages/trex/iframe_loader_catalyst_edge.html new file mode 100644 index 0000000..75041a3 --- /dev/null +++ b/src/main/webapp/daumeditor/pages/trex/iframe_loader_catalyst_edge.html @@ -0,0 +1,26 @@ + + \ No newline at end of file diff --git a/src/main/webapp/daumeditor/pages/trex/iframe_loader_catalyst_loose.html b/src/main/webapp/daumeditor/pages/trex/iframe_loader_catalyst_loose.html new file mode 100644 index 0000000..d406534 --- /dev/null +++ b/src/main/webapp/daumeditor/pages/trex/iframe_loader_catalyst_loose.html @@ -0,0 +1,26 @@ + + \ No newline at end of file diff --git a/src/main/webapp/daumeditor/pages/trex/iframe_loader_catalyst_strict.html b/src/main/webapp/daumeditor/pages/trex/iframe_loader_catalyst_strict.html new file mode 100644 index 0000000..2f2f1c9 --- /dev/null +++ b/src/main/webapp/daumeditor/pages/trex/iframe_loader_catalyst_strict.html @@ -0,0 +1,26 @@ + + \ No newline at end of file diff --git a/src/main/webapp/daumeditor/pages/trex/image.html b/src/main/webapp/daumeditor/pages/trex/image.html new file mode 100644 index 0000000..d17b68a --- /dev/null +++ b/src/main/webapp/daumeditor/pages/trex/image.html @@ -0,0 +1,64 @@ + + + + +Daum에디터 - 이미지 첨부 + + + + + +
            +
            +

            사진 첨부

            +
            +
            +
            +
            사진 첨부 확인
            +
            + 확인을 누르시면 임시 데이터가 사진첨부 됩니다.
            + 인터페이스는 소스를 확인해주세요. +
            +
            +
            + +
            + + \ No newline at end of file diff --git a/src/main/webapp/daumeditor/pages/trex/multimedia.html b/src/main/webapp/daumeditor/pages/trex/multimedia.html new file mode 100644 index 0000000..07a0956 --- /dev/null +++ b/src/main/webapp/daumeditor/pages/trex/multimedia.html @@ -0,0 +1,135 @@ + + + + +Daum 에디터 - 멀티미디어 첨부 + + + + + + +
            +
            +

            외부컨텐츠 삽입

            +
            +
            +
            +

            아래 멀티미디어 등의 삽입 방식을 선택한 후, 주소를 입력하세요.

            +
              +
            • +
                +
              1. +
              2. +
              +
            • +
            • +
                +
              1. +
              2. +
              +
            • +
            +
            +
            + +
            + + \ No newline at end of file diff --git a/src/main/webapp/debug/debug.jsp b/src/main/webapp/debug/debug.jsp new file mode 100644 index 0000000..b3ca027 --- /dev/null +++ b/src/main/webapp/debug/debug.jsp @@ -0,0 +1,40 @@ +<%-- <%@ page language="java" contentType="text/html; charset=EUC-KR" + pageEncoding="EUC-KR"%> --%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +

            /debug/debug.jsp

            +Context :<%=request.getContextPath()%>
            +URL :<%=request.getRequestURL()%>
            +URI :<%=request.getRequestURI()%>
            + +Path :<%=request.getServletPath()%>
            +getQueryString :<%=request.getQueryString()%>
            +getParameterMap :<%=request.getParameterMap()%>
            +javax.servlet.include.request_uri :<%=request.getAttribute("javax.servlet.include.request_uri")%>
            + +

            param

            + +

            + + = + +

            +
            + +

            sessionScope

            + +

            + + = + +

            +
            + +

            requestScope

            + +

            + + = + +

            +
            \ No newline at end of file diff --git a/src/main/webapp/include/ink_head.jsp b/src/main/webapp/include/ink_head.jsp new file mode 100644 index 0000000..47f59cb --- /dev/null +++ b/src/main/webapp/include/ink_head.jsp @@ -0,0 +1,15 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/changelog.txt b/src/main/webapp/jquery-easyui-1.4.4/changelog.txt new file mode 100644 index 0000000..98ea597 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/changelog.txt @@ -0,0 +1,491 @@ +Version 1.4.4 +------------- +* Bug + * filebox: The 'clear' and 'reset' methods do not work properly in IE9. fixed. + * messager: After calling $.messager.progress() with no arguments, the $.messager.progress('close') does not work properly. fixed. + * timespinner: The value does not display properly in IE8 while clicking the spin buttons. fixed. + * window: The window does not display when calling 'options' method in 'onMove' event. fixed. + * treegrid: The 'getLevel' method does not accept the parameter value of 0. fixed. +* Improvement + * layout: The 'collapsedContent','expandMode' and 'hideExpandTool' properties are supported in region panel. + * layout: The 'hideCollapsedContent' property can be set to display the vertical title bar on collapsed panel. + * layout: Add 'onCollapse','onExpand','onAdd','onRemove' events. + * datagrid: Display the 'up-down' icon on the sortable columns. + * datagrid: Add 'gotoPage' method. + * propertygrid: Add 'groups' method that allows to get all the data groups. + * messager: Auto scroll feature is supported when displaying long messages. + * tabs: The 'disabled' property is supported when defining a disabled tab panel. + * tabs: The percentange size is supported now. + +Version 1.4.3 +------------- +* Bug + * textbox: The 'setText' method does not accept value 0. fixed. + * timespinner: When running in IE11, the error occurs when clicking on the empty textbox. fixed. + * tabs: The 'update' method can not update only the panel body. fixed. +* Improvement + * combobox: Improve the performance of displaying the drop-down panel. + * combogrid: Remember the displaying text when the drop-down datagrid go to other pages. + * combogrid: The 'setValue' and 'setValues' methods accept a key-value object. + * window: The inline window's mask can auto-stretch its size to fill parent container. + * tabs: The 'showTool' and 'hideTool' methods are available for users to show or hide the tools. + * layout: Allow the user to override the 'cls','headerCls' and 'bodyCls' property values. +* New Plugins + * switchbutton: The switch button with two states:'on' and 'off'. + +Version 1.4.2 +------------- +* Bug + * treegrid: The column will restore its size to original size after recreating the treegrid. fixed. +* Improvement + * draggable: Add 'delay' property that allows the user to delay the drag operation. + * tree: Add 'filter' property and 'doFilter' method. + * tabs: The 'add' method allows the user to insert a tab panel at a specified index. + * tabs: The user can determine what tab panel can be selected. + * tabs: Add 'justified' and 'narrow' properties. + * layout: Add 'unsplit' and 'split' methods. + * messager: Keyboard navigation features are supported now. + * form: Add 'onChange' event. + * combobox: Add 'queryParams' property. + * slider: Add 'range' property. + * menu: Add 'itemHeight','inline','noline' properties. + * panel: The 'header' property allows the user to customize the panel header. + * menubutton: Add 'hasDownArrow' property. +* New Plugins + * datalist: The plugin to render items in a list. + * navpanel: The root component for the mobile page. + * mobile: The plugin to provide the mobile page stack management and navigation. + +Version 1.4.1 +------------- +* Bug + * combogrid: The combogrid has different height than other combo components. fixed. + * datagrid: The row element loses some class style value after calling 'updateRow' method. fixed. + * menubutton: Calling 'enable' method on a disabled button can not work well. fixed. + * form: The filebox components in the form do not work correctly after calling 'clear' method. fixed. +* Improvement + * tabs: The 'update' method accepts 'type' option that allows the user to update the header,body,or both. + * panel: Add 'openAnimation','openDuration','closeAnimation' and 'closeDuration' properties to set the animation for opening or closing a panel. + * panel: Add 'footer' property that allows the user to add a footer bar to the bottom of panel. + * datagrid: Calling 'endEdit' method will accept the editing value correctly. + * datagrid: Add 'onBeforeSelect','onBeforeCheck','onBeforeUnselect','onBeforeUncheck' events. + * propertygrid: The user can edit a row by calling 'beginEdit' method. + * datebox: Add 'cloneFrom' method to create the datebox component quickly. + * datetimebox: Add 'cloneFrom' method to create the datetimebox component quickly. + +Version 1.4 +------------- +* Bug + * menu: The menu should not has a correct height when removed a menu item. fixed. + * datagrid: The 'fitColumns' method does not work normally when the datarid width is too small. fixed. +* Improvement + * The fluid/percentange size is supported now for all easyui components. + * menu: Add 'showItem', 'hideItem' and 'resize' methods. + * menu: Auto resize the height upon the window size. + * menu: Add 'duration' property that allows the user to define duration time in milliseconds to hide menu. + * validatebox: Add 'onBeforeValidate' and 'onValidate' events. + * combo: Extended from textbox now. + * combo: Add 'panelMinWidth','panelMaxWidth','panelMinHeight' and 'panelMaxHeight' properties. + * searchbox: Extended from textbox now. + * tree: The 'getRoot' method will return the top parent node of a specified node if pass a 'nodeEl' parameter. + * tree: Add 'queryParams' property. + * datetimebox: Add 'spinnerWidth' property. + * panel: Add 'doLayout' method to cause the panel to lay out its components. + * panel: Add 'clear' method to clear the panel's content. + * datagrid: The user is allowed to assign percent width to columns. + * form: Add 'ajax','novalidate' and 'queryParams' properties. + * linkbutton: Add 'resize' method. +* New Plugins + * textbox: A enhanced input field that allows users build their form easily. + * datetimespinner: A date and time spinner that allows to pick a specific day. + * filebox: The filebox component represents a file field of the forms. + +Version 1.3.6 +------------- +* Bug + * treegrid: The 'getChecked' method can not return correct checked rows. fixed. + * tree: The checkbox does not display properly on async tree when 'onlyLeafCheck' property is true. fixed. +* Improvement + * treegrid: All the selecting and checking methods are extended from datagrid component. + * linkbutton: The icon alignment is fully supported, possible values are: 'top','bottom','left','right'. + * linkbutton: Add 'size' property, possible values are: 'small','large'. + * linkbutton: Add 'onClick' event. + * menubutton: Add 'menuAlign' property that allows the user set top level menu alignment. + * combo: Add 'panelAlign' property, possible values are: 'left','right'. + * calendar: The 'formatter','styler' and 'validator' options are available to custom the calendar dates. + * calendar: Add 'onChange' event. + * panel: Add 'method','queryParams' and 'loader' options. + * panel: Add 'onLoadError' event. + * datagrid: Add 'onBeginEdit' event that fires when a row goes into edit mode. + * datagrid: Add 'onEndEdit' event that fires when finishing editing but before destroying editors. + * datagrid: Add 'sort' method and 'onBeforeSortColumn' event. + * datagrid: The 'combogrid' editor has been integrated into datagrid. + * datagrid: Add 'ctrlSelect' property that only allows multi-selection when ctrl+click is used. + * slider: Add 'converter' option that allows users determine how to convert a value to the slider position or the slider position to the value. + * searchbox: Add 'disabled' property. + * searchbox: Add 'disable','enable','clear','reset' methods. + * spinner: Add 'readonly' property, 'readonly' method and 'onChange' event. + +Version 1.3.5 +------------- +* Bug + * searchbox: The 'searcher' function can not offer 'name' parameter value correctly. fixed. + * combo: The 'isValid' method can not return boolean value. fixed. + * combo: Clicking combo will trigger the 'onHidePanel' event of other combo components that have hidden drop-down panels. fixed. + * combogrid: Some methods can not inherit from combo. fixed. +* Improvement + * datagrid: Improve performance on checking rows. + * menu: Allows to append a menu separator. + * menu: Add 'hideOnUnhover' property to indicate if the menu should be hidden when mouse exits it. + * slider: Add 'clear' and 'reset' methods. + * tabs: Add 'unselect' method that will trigger 'onUnselect' event. + * tabs: Add 'selected' property to specify what tab panel will be opened. + * tabs: The 'collapsible' property of tab panel is supported to determine if the tab panel can be collapsed. + * tabs: Add 'showHeader' property, 'showHeader' and 'hideHeader' methods. + * combobox: The 'disabled' property can be used to disable some items. + * tree: Improve loading performance. + * pagination: The 'layout' property can be used to customize the pagination layout. + * accordion: Add 'unselect' method that will trigger 'onUnselect' event. + * accordion: Add 'selected' and 'multiple' properties. + * accordion: Add 'getSelections' method. + * datebox: Add 'sharedCalendar' property that allows multiple datebox components share one calendar component. + +Version 1.3.4 +------------- +* Bug + * combobox: The onLoadSuccess event fires when parsing empty local data. fixed. + * form: Calling 'reset' method can not reset datebox field. fixed. +* Improvement + * mobile: The context menu and double click features are supported on mobile devices. + * combobox: The 'groupField' and 'groupFormatter' options are available to display items in groups. + * tree: When append or insert nodes, the 'data' parameter accepts one or more nodes data. + * tree: The 'getChecked' method accepts a single 'state' or an array of 'state'. + * tree: Add 'scrollTo' method. + * datagrid: The 'multiSort' property is added to support multiple column sorting. + * datagrid: The 'rowStyler' and column 'styler' can return CSS class name or inline styles. + * treegrid: Add 'load' method to load data and navigate to the first page. + * tabs: Add 'tabWidth' and 'tabHeight' properties. + * validatebox: The 'novalidate' property is available to indicate whether to perform the validation. + * validatebox: Add 'enableValidation' and 'disableValidation' methods. + * form: Add 'enableValidation' and 'disableValidation' methods. + * slider: Add 'onComplete' event. + * pagination: The 'buttons' property accepts the existing element. + +Version 1.3.3 +------------- +* Bug + * datagrid: Some style features are not supported by column styler function. fixed. + * datagrid: IE 31 stylesheet limit. fixed. + * treegrid: Some style features are not supported by column styler function. fixed. + * menu: The auto width of menu item displays incorrect in ie6. fixed. + * combo: The 'onHidePanel' event can not fire when clicked outside the combo area. fixed. +* Improvement + * datagrid: Add 'scrollTo' and 'highlightRow' methods. + * treegrid: Enable treegrid to parse data from element. + * combo: Add 'selectOnNavigation' and 'readonly' options. + * combobox: Add 'loadFilter' option to allow users to change data format before loading into combobox. + * tree: Add 'onBeforeDrop' callback event. + * validatebox: Dependent on tooltip plugin now, add 'deltaX' property. + * numberbox: The 'filter' options can be used to determine if the key pressed was accepted. + * linkbutton: The group button is available. + * layout: The 'minWidth','maxWidth','minHeight','maxHeight' and 'collapsible' properties are available for region panel. +* New Plugins + * tooltip: Display a popup message when moving mouse over an element. + +Version 1.3.2 +------------- +* Bug + * datagrid: The loading message window can not be centered when changing the width of datagrid. fixed. + * treegrid: The 'mergeCells' method can not work normally. fixed. + * propertygrid: Calling 'endEdit' method to stop editing a row will cause errors. fixed. + * tree: Can not load empty data when 'lines' property set to true. fixed. +* Improvement + * RTL feature is supported now. + * tabs: Add 'scrollBy' method to scroll the tab header by the specified amount of pixels + * tabs: Add 'toolPosition' property to set tab tools to left or right. + * tabs: Add 'tabPosition' property to define the tab position, possible values are: 'top','bottom','left','right'. + * datagrid: Add a column level property 'order' that allows users to define different default sort order per column. + * datagrid: Add a column level property 'halign' that allows users to define how to align the column header. + * datagrid: Add 'resizeHandle' property to define the resizing column position, by grabbing the left or right edge of the column. + * datagrid: Add 'freezeRow' method to freeze some rows that will always be displayed at the top when the datagrid is scrolled down. + * datagrid: Add 'clearChecked' method to clear all checked records. + * datagrid: Add 'data' property to initialize the datagrid data. + * linkbutton: Add 'iconAlgin' property to define the icon position, supported values are: 'left','right'. + * menu: Add 'minWidth' property. + * menu: The menu width can be automatically calculated. + * tree: New events are available including 'onBeforeDrag','onStartDrag','onDragEnter','onDragOver','onDragLeave',etc. + * combo: Add 'height' property to allow users to define the height of combo. + * combo: Add 'reset' method. + * numberbox: Add 'reset' method. + * spinner: Add 'reset' method. + * spinner: Add 'height' property to allow users to define the height of spinner. + * searchbox: Add 'height' property to allow users to define the height of searchbox. + * form: Add 'reset' method. + * validatebox: Add 'delay' property to delay validating from the last inputting value. + * validatebox: Add 'tipPosition' property to define the tip position, supported values are: 'left','right'. + * validatebox: Multiple validate rules on a field is supported now. + * slider: Add 'reversed' property to determine if the min value and max value will switch their positions. + * progressbar: Add 'height' property to allow users to define the height of progressbar. + +Version 1.3.1 +------------- +* Bug + * datagrid: Setting the 'pageNumber' property is not valid. fixed. + * datagrid: The id attribute of rows isn't adjusted properly while calling 'insertRow' or 'deleteRow' method. + * dialog: When load content from 'href', the script will run twice. fixed. + * propertygrid: The editors that extended from combo can not accept its changed value. fixed. +* Improvement + * droppable: Add 'disabled' property. + * droppable: Add 'options','enable' and 'disable' methods. + * tabs: The tab panel tools can be changed by calling 'update' method. + * messager: When show a message window, the user can define the window position by applying 'style' property. + * window: Prevent script on window body from running twice. + * window: Add 'hcenter','vcenter' and 'center' methods. + * tree: Add 'onBeforeCheck' callback event. + * tree: Extend the 'getChecked' method to allow users to get 'checked','unchecked' or 'indeterminate' nodes. + * treegrid: Add 'update' method to update a specified node. + * treegrid: Add 'insert' method to insert a new node. + * treegrid: Add 'pop' method to remove a node and get the removed node data. + +Version 1.3 +----------- +* Bug + * combogrid: When set to 'remote' query mode, the 'queryParams' parameters can't be sent to server. fixed. + * combotree: The tree nodes on drop-down panel can not be unchecked while calling 'clear' method. fixed. + * datetimebox: Setting 'showSeconds' property to false cannot hide seconds info. fixed. + * datagrid: Calling 'mergeCells' method can't auto resize the merged cell while header is hidden. fixed. + * dialog: Set cache to false and load data via ajax, the content cannot be refreshed. fixed. +* Improvement + * The HTML5 'data-options' attribute is available for components to declare all custom options, including properties and events. + * More detailed documentation is available. + * panel: Prevent script on panel body from running twice. + * accordion: Add 'getPanelIndex' method. + * accordion: The tools can be added on panel header. + * datetimebox: Add 'timeSeparator' option that allows users to define the time separator. + * pagination: Add 'refresh' and 'select' methods. + * datagrid: Auto resize the column width to fit the contents when the column width is not defined. + * datagrid: Double click on the right border of columns to auto resize the columns to the contents in the columns. + * datagrid: Add 'autoSizeColumn' method that allows users to adjust the column width to fit the contents. + * datagrid: Add 'getChecked' method to get all rows where the checkbox has been checked. + * datagrid: Add 'selectOnCheck' and 'checkOnSelect' properties and some checking methods to enhance the row selections. + * datagrid: Add 'pagePosition' property to allow users to display pager bar at either top,bottom or both places of the grid. + * datagrid: The buffer view and virtual scroll view are supported to display large amounts of records without pagination. + * tabs: Add 'disableTab' and 'enableTab' methods to allow users to disable or enable a tab panel. + +Version 1.2.6 +------------- +* Bug + * tabs: Call 'add' method with 'selected:false' option, the added tab panel is always selected. fixed. + * treegrid: The 'onSelect' and 'onUnselect' events can't be triggered. fixed. + * treegrid: Cannot display zero value field. fixed. +* Improvement + * propertygrid: Add 'expandGroup' and 'collapseGroup' methods. + * layout: Allow users to create collapsed layout panels by assigning 'collapsed' property to true. + * layout: Add 'add' and 'remove' methods that allow users to dynamically add or remove region panel. + * layout: Additional tool icons can be added on region panel header. + * calendar: Add 'firstDay' option that allow users to set first day of week. Sunday is 0, Monday is 1, ... + * tree: Add 'lines' option, true to display tree lines. + * tree: Add 'loadFilter' option that allow users to change data format before loading into the tree. + * tree: Add 'loader' option that allow users to define how to load data from remote server. + * treegrid: Add 'onClickCell' and 'onDblClickCell' callback function options. + * datagrid: Add 'autoRowHeight' property that allow users to determine if set the row height based on the contents of that row. + * datagrid: Improve performance to load large data set. + * datagrid: Add 'loader' option that allow users to define how to load data from remote server. + * treegrid: Add 'loader' option that allow users to define how to load data from remote server. + * combobox: Add 'onBeforeLoad' callback event function. + * combobox: Add 'loader' option that allow users to define how to load data from remote server. + * Add support for other loading mode such as dwr,xml,etc. +* New Plugins + * slider: Allows the user to choose a numeric value from a finite range. + +Version 1.2.5 +------------- +* Bug + * tabs: When add a new tab panel with href property, the content page is loaded twice. fixed. + * form: Failed to call 'load' method to load form input with complex name. fixed. + * draggable: End drag in ie9, the cursor cannot be restored. fixed. +* Improvement + * panel: The tools can be defined via html markup. + * tabs: Call 'close' method to close specified tab panel, users can pass tab title or index of tab panel. Other methods such 'select','getTab' and 'exists' are similar to 'close' method. + * tabs: Add 'getTabIndex' method. + * tabs: Users can define mini tools on tabs. + * tree: The mouse must move a specified distance to begin drag and drop operation. + * resizable: Add 'options','enable' and 'disable' methods. + * numberbox: Allow users to change number format. + * datagrid: The subgrid is supported now. + * searchbox: Add 'selectName' method to select searching type name. + +Version 1.2.4 +------------- +* Bug + * menu: The menu position is wrong when scroll bar appears. fixed. + * accordion: Cannot display the default selected panel in jQuery 1.6.2. fixed. + * tabs: Cannot display the default selected tab panel in jQuery 1.6.2. fixed. +* Improvement + * menu: Allow users to disable or enable menu item. + * combo: Add 'delay' property to set the delay time to do searching from the last key input event. + * treegrid: The 'getEditors' and 'getEditor' methods are supported now. + * treegrid: The 'loadFilter' option is supported now. + * messager: Add 'progress' method to display a message box with a progress bar. + * panel: Add 'extractor' option to allow users to extract panel content from ajax response. +* New Plugins + * searchbox: Allow users to type words into box and do searching operation. + * progressbar: To display the progress of a task. + +Version 1.2.3 +------------- +* Bug + * window: Cannot resize the window with iframe content. fixed. + * tree: The node will be removed when dragging to its child. fixed. + * combogrid: The onChange event fires multiple times. fixed. + * accordion: Cannot add batch new panels when animate property is set to true. fixed. +* Improvement + * treegrid: The footer row and row styler features are supported now. + * treegrid: Add 'getLevel','reloadFooter','getFooterRows' methods. + * treegrid: Support root nodes pagination and editable features. + * datagrid: Add 'getFooterRows','reloadFooter','insertRow' methods and improve editing performance. + * datagrid: Add 'loadFilter' option that allow users to change original source data to standard data format. + * draggable: Add 'onBeforeDrag' callback event function. + * validatebox: Add 'remote' validation type. + * combobox: Add 'method' option. +* New Plugins + * propertygrid: Allow users to edit property value in datagrid. + +Version 1.2.2 +------------- +* Bug + * datagrid: Apply fitColumns cannot work fine while set checkbox column. fixed. + * datagrid: The validateRow method cannot return boolean type value. fixed. + * numberbox: Cannot fix value in chrome when min or max property isn't defined. fixed. +* Improvement + * menu: Add some crud methods. + * combo: Add hasDownArrow property to determine whether to display the down arrow button. + * tree: Supports inline editing. + * calendar: Add some useful methods such as 'resize', 'moveTo' etc. + * timespinner: Add some useful methods. + * datebox: Refactoring based on combo and calendar plugin now. + * datagrid: Allow users to change row style in some conditions. + * datagrid: Users can use the footer row to display summary information. +* New Plugins + * datetimebox: Combines datebox with timespinner component. + +Version 1.2.1 +------------- +* Bug + * easyloader: Some dependencies cannot be loaded by their order. fixed. + * tree: The checkbox is setted incorrectly when removing a node. fixed. + * dialog: The dialog layout incorrectly when 'closed' property is setted to true. fixed. +* Improvement + * parser: Add onComplete callback function that can indicate whether the parse action is complete. + * menu: Add onClick callback function and some other methods. + * tree: Add some useful methods. + * tree: Drag and Drop feature is supported now. + * tree: Add onContextMenu callback function. + * tabs: Add onContextMenu callback function. + * tabs: Add 'tools' property that can create buttons on right bar. + * datagrid: Add onHeaderContextMenu and onRowContextMenu callback functions. + * datagrid: Custom view is supported. + * treegrid: Add onContextMenu callback function and append,remove methods. + +Version 1.2 +------------- +* Improvement + * tree: Add cascadeCheck,onlyLeafCheck properties and select event. + * combobox: Enable multiple selection. + * combotree: Enable multiple selection. + * tabs: Remember the trace of selection, when current tab panel is closed, the previous selected tab will be selected. + * datagrid: Extend from panel, so many properties defined in panel can be used for datagrid. +* New Plugins + * treegrid: Represent tabular data in hierarchical view, combines tree view and datagrid. + * combo: The basic component that allow user to extend their combo component such as combobox,combotree,etc. + * combogrid: Combines combobox with drop-down datagrid component. + * spinner: The basic plugin to create numberspinner,timespinner,etc. + * numberspinner: The numberbox that allow user to change value by clicking up and down spin buttons. + * timespinner: The time selector that allow user to quickly inc/dec a time. + +Version 1.1.2 +------------- +* Bug + * messager: When call show method in layout, the message window will be blocked. fixed. +* Improvement + * datagrid: Add validateRow method, remember the current editing row status when do editing action. + * datagrid: Add the ability to create merged cells. + * form: Add callback functions when loading data. + * panel,window,dialog: Add maximize,minimize,restore,collapse,expand methods. + * panel,tabs,accordion: The lazy loading feature is supported. + * tabs: Add getSelected,update,getTab methods. + * accordion: Add crud methods. + * linkbutton: Accept an id option to set the id attribute. + * tree: Enhance tree node operation. + +Version 1.1.1 +------------- +* Bug + * form: Cannot clear the value of combobox and combotree component. fixed. +* Improvement + * tree: Add some useful methods such as 'getRoot','getChildren','update',etc. + * datagrid: Add editable feature, improve performance while loading data. + * datebox: Add destroy method. + * combobox: Add destroy and clear method. + * combotree: Add destroy and clear method. + +Version 1.1 +------------- +* Bug + * messager: When call show method with timeout property setted, an error occurs while clicking the close button. fixed. + * combobox: The editable property of combobox plugin is invalid. fixed. + * window: The proxy box will not be removed when dragging or resizing exceed browser border in ie. fixed. +* Improvement + * menu: The menu item can use markup to display a different page. + * tree: The tree node can use markup to act as a tree menu. + * pagination: Add some event on refresh button and page list. + * datagrid: Add a 'param' parameter for reload method, with which users can pass query parameter when reload data. + * numberbox: Add required validation support, the usage is same as validatebox plugin. + * combobox: Add required validation support. + * combotree: Add required validation support. + * layout: Add some method that can get a region panel and attach event handlers. +* New Plugins + * droppable: A droppable plugin that supports drag drop operation. + * calendar: A calendar plugin that can either be embedded within a page or popup. + * datebox: Combines a textbox with a calendar that let users to select date. + * easyloader: A JavaScript loader that allows you to load plugin and their dependencies into your page. + +Version 1.0.5 +* Bug + * panel: The fit property of panel performs incorrectly. fixed. +* Improvement + * menu: Add a href attribute for menu item, with which user can display a different page in the current browser window. + * form: Add a validate method to do validation for validatebox component. + * dialog: The dialog can read collapsible,minimizable,maximizable and resizable attribute from markup. +* New Plugins + * validatebox: A validation plugin that checks to make sure the user's input value is valid. + +Version 1.0.4 +------------- +* Bug + * panel: When panel is invisible, it is abnormal when resized. fixed. + * panel: Memory leak in method 'destroy'. fixed. + * messager: Memory leak when messager box is closed. fixed. + * dialog: No onLoad event occurs when loading remote data. fixed. +* Improvement + * panel: Add method 'setTitle'. + * window: Add method 'setTitle'. + * dialog: Add method 'setTitle'. + * combotree: Add method 'getValue'. + * combobox: Add method 'getValue'. + * form: The 'load' method can load data and fill combobox and combotree field correctly. + +Version 1.0.3 +------------- +* Bug + * menu: When menu is show in a DIV container, it will be cropped. fixed. + * layout: If you collpase a region panel and then expand it immediately, the region panel will not show normally. fixed. + * accordion: If no panel selected then the first one will become selected and the first panel's body height will not set correctly. fixed. +* Improvement + * tree: Add some methods to support CRUD operation. + * datagrid: Toolbar can accept a new property named 'disabled' to disable the specified tool button. +* New Plugins + * combobox: Combines a textbox with a list of options that users are able to choose from. + * combotree: Combines combobox with drop-down tree component. + * numberbox: Make input element can only enter number char. + * dialog: rewrite the dialog plugin, dialog can contains toolbar and buttons. diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/accordion/_content.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/accordion/_content.html new file mode 100644 index 0000000..9967402 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/accordion/_content.html @@ -0,0 +1,18 @@ + + + + + AJAX Content + + +

            Here is the content loaded via AJAX.

            +
              +
            • easyui is a collection of user-interface plugin based on jQuery.
            • +
            • easyui provides essential functionality for building modern, interactive, javascript applications.
            • +
            • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
            • +
            • complete framework for HTML5 web page.
            • +
            • easyui save your time and scales while developing your products.
            • +
            • easyui is very easy but powerful.
            • +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/accordion/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/accordion/basic.html new file mode 100644 index 0000000..36eece5 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/accordion/basic.html @@ -0,0 +1 @@ + Basic Accordion - jQuery EasyUI Mobile Demo
            Basic Accordion
            • WLAN
            • Memory
            • Screen
            • More...
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/accordion/header.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/accordion/header.html new file mode 100644 index 0000000..6ea6250 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/accordion/header.html @@ -0,0 +1 @@ + Custom Accordion Header - jQuery EasyUI Mobile Demo
            Custom Accordion Header
            List 26/51
            • WLAN
            • Memory
            • Screen
            • More...
            Ajax Loading via ajax 23
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/animation/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/animation/basic.html new file mode 100644 index 0000000..995b0f9 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/animation/basic.html @@ -0,0 +1 @@ + Basic Animation - jQuery EasyUI Mobile Demo
            Panel2
            Panel3

            Panel3 Content.

            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/animation/fade.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/animation/fade.html new file mode 100644 index 0000000..b85c784 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/animation/fade.html @@ -0,0 +1 @@ + Fade Animation - jQuery EasyUI Mobile Demo
            Fade Animation
            Panel2

            Panel2 Content.

            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/animation/pop.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/animation/pop.html new file mode 100644 index 0000000..6bcebcc --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/animation/pop.html @@ -0,0 +1 @@ + Pop Animation - jQuery EasyUI Mobile Demo
            Pop Animation
            Panel2

            Panel2 Content.

            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/animation/slide.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/animation/slide.html new file mode 100644 index 0000000..4528d68 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/animation/slide.html @@ -0,0 +1 @@ + Slide Animation - jQuery EasyUI Mobile Demo
            Panel2

            Panel2 Content.

            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/badge/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/badge/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/badge/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/badge/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/badge/basic.html new file mode 100644 index 0000000..6f9cdc6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/badge/basic.html @@ -0,0 +1 @@ + Basic Badge - jQuery EasyUI Mobile Demo \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/badge/button.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/badge/button.html new file mode 100644 index 0000000..db5d531 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/badge/button.html @@ -0,0 +1 @@ + Button Badge - jQuery EasyUI Mobile Demo \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/badge/list.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/badge/list.html new file mode 100644 index 0000000..c06f18b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/badge/list.html @@ -0,0 +1 @@ + List Badge - jQuery EasyUI Mobile Demo
            List Badge
            • Large
              234
            • Spotted Adult Female
              215
            • Venomless
              12
            • Rattleless
              6
            • Green Adult
            • Tailless
            • With tail
            • Adult Female
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/badge/tabs.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/badge/tabs.html new file mode 100644 index 0000000..51cd859 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/badge/tabs.html @@ -0,0 +1 @@ + Tabs Badge - jQuery EasyUI Mobile Demo
            Tabs Badge

            Modem

            A modem (modulator-demodulator) is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information.


            Scanner

            In computing, an image scanner—often abbreviated to just scanner—is a device that optically scans images, printed text, handwriting, or an object, and converts it to a digital image.


            Pda 23

            A personal digital assistant (PDA), also known as a palmtop computer, or personal data assistant, is a mobile device that functions as a personal information manager. PDAs are largely considered obsolete with the widespread adoption of smartphones.


            Pda 13

            A tablet computer, or simply tablet, is a one-piece mobile computer. Devices typically have a touchscreen, with finger or stylus gestures replacing the conventional computer mouse.

            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/button/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/button/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/button/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/button/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/button/basic.html new file mode 100644 index 0000000..f5f5255 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/button/basic.html @@ -0,0 +1 @@ + Basic LinkButton - jQuery EasyUI Mobile Demo
            Login to System
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/button/group.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/button/group.html new file mode 100644 index 0000000..8bd165d --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/button/group.html @@ -0,0 +1 @@ + Group LinkButton - jQuery EasyUI Mobile Demo
            Button Group

            A modem (modulator-demodulator) is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information.

            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/button/style.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/button/style.html new file mode 100644 index 0000000..6662094 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/button/style.html @@ -0,0 +1 @@ + Button Style - jQuery EasyUI Mobile Demo \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/button/switch.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/button/switch.html new file mode 100644 index 0000000..f2e128e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/button/switch.html @@ -0,0 +1 @@ + Switch Button - jQuery EasyUI Mobile Demo
            Switch Button
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datagrid/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datagrid/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datagrid/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datagrid/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datagrid/basic.html new file mode 100644 index 0000000..d81c652 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datagrid/basic.html @@ -0,0 +1 @@ + Basic DataGrid - jQuery EasyUI Mobile Demo
            Item ID Product List Price Unit Cost
            Basic DataGrid
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datagrid/rowediting.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datagrid/rowediting.html new file mode 100644 index 0000000..8c425e8 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datagrid/rowediting.html @@ -0,0 +1,104 @@ + + + + + + Row Editing DataGrid - jQuery EasyUI Mobile Demo + + + + + + + + + + + + + + + + + +
            Item IDProductList PriceUnit Cost
            +
            +
            +
            Row Editing
            +
            + + + +
            +
            +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datalist/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datalist/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datalist/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datalist/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datalist/basic.html new file mode 100644 index 0000000..33f5e5b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datalist/basic.html @@ -0,0 +1 @@ + Basic DataList - jQuery EasyUI Mobile Demo
            Basic DataList
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datalist/group.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datalist/group.html new file mode 100644 index 0000000..d9e6443 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datalist/group.html @@ -0,0 +1 @@ + Group DataList - jQuery EasyUI Mobile Demo
            Group DataList
            Detail
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datalist/selection.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datalist/selection.html new file mode 100644 index 0000000..06b2623 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/datalist/selection.html @@ -0,0 +1 @@ + DataList Selection - jQuery EasyUI Mobile Demo
            DataList Selection
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/dialog/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/dialog/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/dialog/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/dialog/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/dialog/basic.html new file mode 100644 index 0000000..d02c84d --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/dialog/basic.html @@ -0,0 +1,46 @@ + + + + + + Basic Dialog - jQuery EasyUI Mobile Demo + + + + + + + + +
            +
            +
            +
            Basic Dialog
            +
            +
            + +
            + Login +
            + +
            +
            + +
            +
            + +
            +
            + Sign in +
            +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/dialog/message.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/dialog/message.html new file mode 100644 index 0000000..0254dbe --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/dialog/message.html @@ -0,0 +1,41 @@ + + + + + + Message Dialog - jQuery EasyUI Mobile Demo + + + + + + + + +
            +
            +
            +
            Message Dialog
            +
            +
            + +
            + Click me +
            + +
            +

            This is a message dialog.

            +
            + OK +
            +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/form/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/form/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/form/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/form/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/form/basic.html new file mode 100644 index 0000000..3715b27 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/form/basic.html @@ -0,0 +1,54 @@ + + + + + + Basic Form - jQuery EasyUI Mobile Demo + + + + + + + + +
            +
            +
            +
            Basic Form
            +
            + Reset +
            +
            +
            +
            +
            + + +
            +
            + + +
            +
            + + +
            +
            + + +
            +
            + + +
            +
            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/login1.jpg b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/login1.jpg new file mode 100644 index 0000000..e9faa80 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/login1.jpg differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/modem.png b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/modem.png new file mode 100644 index 0000000..be5a2eb Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/modem.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/more.png b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/more.png new file mode 100644 index 0000000..94922a2 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/more.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/pda.png b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/pda.png new file mode 100644 index 0000000..1458d9b Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/pda.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/scanner.png b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/scanner.png new file mode 100644 index 0000000..974635d Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/scanner.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/tablet.png b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/tablet.png new file mode 100644 index 0000000..fa871f5 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/images/tablet.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/input/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/input/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/input/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/input/numberspinner.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/input/numberspinner.html new file mode 100644 index 0000000..aab3f96 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/input/numberspinner.html @@ -0,0 +1 @@ + NumberSpinner - jQuery EasyUI Mobile Demo
            NumberSpinner
            • Basic Number
            • Increment Number
            • Format Number
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/input/textbox.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/input/textbox.html new file mode 100644 index 0000000..7338847 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/input/textbox.html @@ -0,0 +1 @@ + TextBox - jQuery EasyUI Mobile Demo
            TextBox
            • Standard TextBox
            • Icon
            • Button
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/layout/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/layout/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/layout/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/layout/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/layout/basic.html new file mode 100644 index 0000000..c1ecaff --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/layout/basic.html @@ -0,0 +1,32 @@ + + + + + + Basic Layout - jQuery EasyUI Mobile Demo + + + + + + + + +
            +
            +
            +
            Layout
            +
            + Back +
            +
            + Search +
            +
            +
            +
            + +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/menu/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/menu/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/menu/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/menu/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/menu/basic.html new file mode 100644 index 0000000..fb97096 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/menu/basic.html @@ -0,0 +1,39 @@ + + + + + + Basic Menu - jQuery EasyUI Mobile Demo + + + + + + + + +
            +
            +
            +
            Menu
            +
            + + +
            +
            +
            +
            +
            +
            Undo
            +
            Redo
            + +
            Cut
            +
            Copy
            +
            Paste
            + +
            Toolbar
            +
            Delete
            +
            Select All
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/menu/menubar.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/menu/menubar.html new file mode 100644 index 0000000..5ef8eef --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/menu/menubar.html @@ -0,0 +1,45 @@ + + + + + + Menubar - jQuery EasyUI Mobile Demo + + + + + + + + +
            +
            +
            +
            + Home + Edit + Help + About +
            +
            +
            +
            +
            +
            Undo
            +
            Redo
            + +
            Cut
            +
            Copy
            +
            Paste
            + +
            Toolbar
            +
            Delete
            +
            Select All
            +
            +
            +
            Help
            +
            Update
            +
            About
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/panel/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/panel/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/panel/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/panel/_content.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/panel/_content.html new file mode 100644 index 0000000..9967402 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/panel/_content.html @@ -0,0 +1,18 @@ + + + + + AJAX Content + + +

            Here is the content loaded via AJAX.

            +
              +
            • easyui is a collection of user-interface plugin based on jQuery.
            • +
            • easyui provides essential functionality for building modern, interactive, javascript applications.
            • +
            • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
            • +
            • complete framework for HTML5 web page.
            • +
            • easyui save your time and scales while developing your products.
            • +
            • easyui is very easy but powerful.
            • +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/panel/ajax.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/panel/ajax.html new file mode 100644 index 0000000..e4b4f2d --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/panel/ajax.html @@ -0,0 +1 @@ + Ajax Panel - jQuery EasyUI Mobile Demo
            Ajax Panel
            Panel Footer
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/panel/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/panel/basic.html new file mode 100644 index 0000000..407a2f3 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/panel/basic.html @@ -0,0 +1 @@ + Basic Panel - jQuery EasyUI Mobile Demo
            Panel Header
            Panel Footer
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/panel/nav.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/panel/nav.html new file mode 100644 index 0000000..0362890 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/panel/nav.html @@ -0,0 +1,39 @@ + + + + + + Navigation Panel - jQuery EasyUI Mobile Demo + + + + + + + + +
            +
            +
            +
            Navigation
            +
            +
            + +
            +
            +
            +
            +
            Panel2
            +
            + Back +
            +
            +
            +
            + Go Back +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/basic.html new file mode 100644 index 0000000..906d942 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/basic.html @@ -0,0 +1 @@ + Simple List - jQuery EasyUI Mobile Demo
            Simple List
            • Large
            • Spotted Adult Female
            • Venomless
            • Rattleless
            • Green Adult
            • Tailless
            • With tail
            • Adult Female
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/button.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/button.html new file mode 100644 index 0000000..f326ba9 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/button.html @@ -0,0 +1 @@ + Button on List - jQuery EasyUI Mobile Demo
            Button on List
            • HP Deskjet 1000 Printer
              Add
            • Epson WorkForce 845
              Add
            • Logitech Keyboard K120
              Add
            • Nikon COOLPIX L26 16.1 MP
              Add
            • SanDisk Sansa Clip Zip 4GB
              Add
            • BLUE MP3 Metal Mini Clip Player
              Add
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/group.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/group.html new file mode 100644 index 0000000..e64c2e4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/group.html @@ -0,0 +1 @@ + Group List - jQuery EasyUI Mobile Demo
            Detail
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/image.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/image.html new file mode 100644 index 0000000..ddf79e5 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/image.html @@ -0,0 +1 @@ + List with Image - jQuery EasyUI Mobile Demo
            List with Image
            • modem
              modulates an analog carrier signal to encode digital information.
            • scanner
              scans images, printed text, handwriting, or an object.
            • pda
              A personal digital assistant.
            • tablet
              one-piece mobile computer.
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/link.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/link.html new file mode 100644 index 0000000..c630576 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/simplelist/link.html @@ -0,0 +1 @@ + Link List - jQuery EasyUI Mobile Demo
            Detail
            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tabs/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tabs/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tabs/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tabs/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tabs/basic.html new file mode 100644 index 0000000..4654e12 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tabs/basic.html @@ -0,0 +1 @@ + Basic Tabs - jQuery EasyUI Mobile Demo

            Java is a general-purpose, concurrent, class-based, object-oriented computer programming language that is specifically designed to have as few implementation dependencies as possible.

            Java applications are typically compiled to bytecode (class file) that can run on any Java virtual machine (JVM) regardless of computer architecture.

            Fortran (previously FORTRAN) is a general-purpose, imperative programming language that is especially suited to numeric computation and scientific computing. Originally developed by IBM at their campus in south San Jose, California[1] in the 1950s for scientific and engineering applications.

            Perl is a family of high-level, general-purpose, interpreted, dynamic programming languages. The languages in this family include Perl 5 and Perl 6.

            Though Perl is not officially an acronym, there are various backronyms in use, such as: Practical Extraction and Reporting Language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions.

            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tabs/nav.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tabs/nav.html new file mode 100644 index 0000000..061218f --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tabs/nav.html @@ -0,0 +1 @@ + Navigation Tabs - jQuery EasyUI Mobile Demo
            Devices

            Modem

            A modem (modulator-demodulator) is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information.


            Scanner

            In computing, an image scanner—often abbreviated to just scanner—is a device that optically scans images, printed text, handwriting, or an object, and converts it to a digital image.


            Pda

            A personal digital assistant (PDA), also known as a palmtop computer, or personal data assistant, is a mobile device that functions as a personal information manager. PDAs are largely considered obsolete with the widespread adoption of smartphones.


            Pda

            A tablet computer, or simply tablet, is a one-piece mobile computer. Devices typically have a touchscreen, with finger or stylus gestures replacing the conventional computer mouse.

            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tabs/pill.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tabs/pill.html new file mode 100644 index 0000000..ead2863 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tabs/pill.html @@ -0,0 +1 @@ + Pill Tabs - jQuery EasyUI Mobile Demo

            Java is a general-purpose, concurrent, class-based, object-oriented computer programming language that is specifically designed to have as few implementation dependencies as possible.

            Java applications are typically compiled to bytecode (class file) that can run on any Java virtual machine (JVM) regardless of computer architecture.

            Fortran (previously FORTRAN) is a general-purpose, imperative programming language that is especially suited to numeric computation and scientific computing. Originally developed by IBM at their campus in south San Jose, California[1] in the 1950s for scientific and engineering applications.

            Perl is a family of high-level, general-purpose, interpreted, dynamic programming languages. The languages in this family include Perl 5 and Perl 6.

            Though Perl is not officially an acronym, there are various backronyms in use, such as: Practical Extraction and Reporting Language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions.

            \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/toolbar/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/toolbar/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/toolbar/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/toolbar/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/toolbar/basic.html new file mode 100644 index 0000000..f8fc613 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/toolbar/basic.html @@ -0,0 +1,63 @@ + + + + + + Basic Toolbar - jQuery EasyUI Mobile Demo + + + + + + + + +
            +
            +
            +
            Basic Toolbar
            +
            + Back +
            +
            + Next +
            +
            +
            +
              +
            • Large
            • +
            • Spotted Adult Female
            • +
            • Venomless
            • +
            • Rattleless
            • +
            • Green Adult
            • +
            • Tailless
            • +
            • With tail
            • +
            • Adult Female
            • +
            +
            +
            +
            +
            + Detail +
            + Back +
            +
            +
            +
            + Go Back +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/toolbar/button.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/toolbar/button.html new file mode 100644 index 0000000..3db342a --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/toolbar/button.html @@ -0,0 +1,45 @@ + + + + + + Toolbar Button - jQuery EasyUI Mobile Demo + + + + + + + + +
            +
            +
            +
            Toolbar Button
            +
            +
            + +
              +
            • Large
            • +
            • Spotted Adult Female
            • +
            • Venomless
            • +
            • Rattleless
            • +
            • Green Adult
            • +
            • Tailless
            • +
            • With tail
            • +
            • Adult Female
            • +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/toolbar/menu.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/toolbar/menu.html new file mode 100644 index 0000000..f053bcc --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/toolbar/menu.html @@ -0,0 +1,76 @@ + + + + + + Menu on Toolbar - jQuery EasyUI Mobile Demo + + + + + + + + +
            +
            +
            +
            Menu on Toolbar
            +
            + +
            +
            + + +
            +
            +
            +
            +
            Undo
            +
            Redo
            + +
            Cut
            +
            Copy
            +
            Paste
            + +
            Toolbar
            +
            Delete
            +
            Select All
            +
            +
              +
            • Large
            • +
            • Spotted Adult Female
            • +
            • Venomless
            • +
            • Rattleless
            • +
            • Green Adult
            • +
            • Tailless
            • +
            • With tail
            • +
            • Adult Female
            • +
            +
            +
            +
            +
            + Detail +
            + Back +
            +
            +
            +
            + Go Back +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tree/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tree/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tree/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tree/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tree/basic.html new file mode 100644 index 0000000..9284505 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tree/basic.html @@ -0,0 +1,56 @@ + + + + + + Basic Tree - jQuery EasyUI Mobile Demo + + + + + + + + +
            +
            +
            +
            Basic Tree
            +
            +
            +
              +
            • + My Documents +
                +
              • + Photos +
                  +
                • + Friend +
                • +
                • + Wife +
                • +
                • + Company +
                • +
                +
              • +
              • + Program Files +
                  +
                • Intel
                • +
                • Java
                • +
                • Microsoft Office
                • +
                • Games
                • +
                +
              • +
              • index.html
              • +
              • about.html
              • +
              • welcome.html
              • +
              +
            • +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tree/dnd.html b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tree/dnd.html new file mode 100644 index 0000000..ecb8e31 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo-mobile/tree/dnd.html @@ -0,0 +1,56 @@ + + + + + + Drag Drop Tree Nodes - jQuery EasyUI Mobile Demo + + + + + + + + +
            +
            +
            +
            Drag Drop Tree Nodes
            +
            +
            +
              +
            • + My Documents +
                +
              • + Photos +
                  +
                • + Friend +
                • +
                • + Wife +
                • +
                • + Company +
                • +
                +
              • +
              • + Program Files +
                  +
                • Intel
                • +
                • Java
                • +
                • Microsoft Office
                • +
                • Games
                • +
                +
              • +
              • index.html
              • +
              • about.html
              • +
              • welcome.html
              • +
              +
            • +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/_content.html b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/_content.html new file mode 100644 index 0000000..9967402 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/_content.html @@ -0,0 +1,18 @@ + + + + + AJAX Content + + +

            Here is the content loaded via AJAX.

            +
              +
            • easyui is a collection of user-interface plugin based on jQuery.
            • +
            • easyui provides essential functionality for building modern, interactive, javascript applications.
            • +
            • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
            • +
            • complete framework for HTML5 web page.
            • +
            • easyui save your time and scales while developing your products.
            • +
            • easyui is very easy but powerful.
            • +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/actions.html b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/actions.html new file mode 100644 index 0000000..f895ebb --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/actions.html @@ -0,0 +1,51 @@ + + + + + Accordion Actions - jQuery EasyUI Demo + + + + + + + +

            Accordion Actions

            +

            Click the buttons below to add or remove accordion items.

            +
            + Select + Add + Remove +
            +
            +
            +

            Accordion for jQuery

            +

            Accordion is a part of easyui framework for jQuery. It lets you define your accordion component on web page more easily.

            +
            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/ajax.html b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/ajax.html new file mode 100644 index 0000000..e5c77f3 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/ajax.html @@ -0,0 +1,28 @@ + + + + + Loading Accordion Content with AJAX - jQuery EasyUI Demo + + + + + + + +

            Loading Accordion Content with AJAX

            +

            Click AJAX panel header to load content via AJAX.

            +
            +
            +
            +

            Accordion for jQuery

            +

            Accordion is a part of easyui framework for jQuery. It lets you define your accordion component on web page more easily.

            +
            +
            +

            The accordion allows you to provide multiple panels and display one or more at a time. Each panel has built-in support for expanding and collapsing. Clicking on a panel header to expand or collapse that panel body. The panel content can be loaded via ajax by specifying a 'href' property. Users can define a panel to be selected. If it is not specified, then the first panel is taken by default.

            +
            +
            +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/basic.html new file mode 100644 index 0000000..141deac --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/basic.html @@ -0,0 +1,52 @@ + + + + + Basic Accordion - jQuery EasyUI Demo + + + + + + + +

            Basic Accordion

            +

            Click on panel header to show its content.

            +
            +
            +
            +

            Accordion for jQuery

            +

            Accordion is a part of easyui framework for jQuery. It lets you define your accordion component on web page more easily.

            +
            +
            +

            The accordion allows you to provide multiple panels and display one or more at a time. Each panel has built-in support for expanding and collapsing. Clicking on a panel header to expand or collapse that panel body. The panel content can be loaded via ajax by specifying a 'href' property. Users can define a panel to be selected. If it is not specified, then the first panel is taken by default.

            +
            +
            +
              +
            • + Foods +
                +
              • + Fruits +
                  +
                • apple
                • +
                • orange
                • +
                +
              • +
              • + Vegetables +
                  +
                • tomato
                • +
                • carrot
                • +
                • cabbage
                • +
                • potato
                • +
                • lettuce
                • +
                +
              • +
              +
            • +
            +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/datagrid_data1.json b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/datagrid_data1.json new file mode 100644 index 0000000..63d6473 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/datagrid_data1.json @@ -0,0 +1,12 @@ +{"total":28,"rows":[ + {"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"}, + {"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"}, + {"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"}, + {"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"}, + {"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"}, + {"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"}, + {"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"}, + {"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"}, + {"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"}, + {"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"} +]} diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/expandable.html b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/expandable.html new file mode 100644 index 0000000..a678953 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/expandable.html @@ -0,0 +1,33 @@ + + + + + Keep Expandable Panel in Accordion - jQuery EasyUI Demo + + + + + + + +

            Keep Expandable Panel in Accordion

            +

            Keep a expandable panel and prevent it from collapsing.

            +
            +
            +
            + +
            +
            +

            Accordion for jQuery

            +

            Accordion is a part of easyui framework for jQuery. It lets you define your accordion component on web page more easily.

            +
            +
            +

            Content1

            +
            +
            +

            Content2

            +
            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/fluid.html new file mode 100644 index 0000000..1848802 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/fluid.html @@ -0,0 +1,33 @@ + + + + + Fluid Accordion - jQuery EasyUI Demo + + + + + + + +

            Fluid Accordion

            +

            This example shows how to set the width of accordion to a percentage of its parent container.

            +
            +
            +
            +

            width: 100%

            +
            +
            +
            +
            +
            + +
            +
            +

            width: 50%

            +
            +
            +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/multiple.html b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/multiple.html new file mode 100644 index 0000000..afd1b7f --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/multiple.html @@ -0,0 +1,34 @@ + + + + + Multiple Accordion Panels - jQuery EasyUI Demo + + + + + + + +

            Multiple Accordion Panels

            +

            Enable 'multiple' mode to expand multiple panels at one time.

            +
            +
            +
            +

            A programming language is a formal language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely.

            +
            +
            +

            Java (Indonesian: Jawa) is an island of Indonesia. With a population of 135 million (excluding the 3.6 million on the island of Madura which is administered as part of the provinces of Java), Java is the world's most populous island, and one of the most densely populated places in the world.

            +
            +
            +

            C# is a multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines.

            +
            +
            +

            A dynamic, reflective, general-purpose object-oriented programming language.

            +
            +
            +

            Fortran (previously FORTRAN) is a general-purpose, imperative programming language that is especially suited to numeric computation and scientific computing.

            +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/tools.html b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/tools.html new file mode 100644 index 0000000..271694b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/accordion/tools.html @@ -0,0 +1,48 @@ + + + + + Accordion Tools - jQuery EasyUI Demo + + + + + + + +

            Accordion Tools

            +

            Click the tools on top right of panel to perform actions.

            +
            +
            +
            +

            Accordion for jQuery

            +

            Accordion is a part of easyui framework for jQuery. It lets you define your accordion component on web page more easily.

            +
            +
            +

            The accordion allows you to provide multiple panels and display one ore more at a time. Each panel has built-in support for expanding and collapsing. Clicking on a panel header to expand or collapse that panel body. The panel content can be loaded via ajax by specifying a 'href' property. Users can define a panel to be selected. If it is not specified, then the first panel is taken by default.

            +
            +
            + + + + + + + + + + + +
            Item IDProduct IDList PriceUnit CostAttributeStatus
            +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/calendar/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/calendar/basic.html new file mode 100644 index 0000000..64f37fe --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/calendar/basic.html @@ -0,0 +1,19 @@ + + + + + Basic Calendar - jQuery EasyUI Demo + + + + + + + +

            Basic Calendar

            +

            Click to select date.

            +
            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/calendar/custom.html b/src/main/webapp/jquery-easyui-1.4.4/demo/calendar/custom.html new file mode 100644 index 0000000..f3fea45 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/calendar/custom.html @@ -0,0 +1,46 @@ + + + + + Custom Calendar - jQuery EasyUI Demo + + + + + + + +

            Custom Calendar

            +

            This example shows how to custom the calendar date by using 'formatter' function.

            +
            + +
            + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/calendar/disabledate.html b/src/main/webapp/jquery-easyui-1.4.4/demo/calendar/disabledate.html new file mode 100644 index 0000000..ef2c7ea --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/calendar/disabledate.html @@ -0,0 +1,28 @@ + + + + + Disable Calendar Date - jQuery EasyUI Demo + + + + + + + +

            Disable Calendar Date

            +

            This example shows how to disable specified dates, only allows the user to select Mondays.

            +
            + +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/calendar/firstday.html b/src/main/webapp/jquery-easyui-1.4.4/demo/calendar/firstday.html new file mode 100644 index 0000000..c636a07 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/calendar/firstday.html @@ -0,0 +1,30 @@ + + + + + First Day of Week - jQuery EasyUI Demo + + + + + + + +

            First Day of Week

            +

            Choose the first day of the week.

            + +
            + +
            + +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/calendar/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/calendar/fluid.html new file mode 100644 index 0000000..e5e7070 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/calendar/fluid.html @@ -0,0 +1,23 @@ + + + + + Fluid Calendar - jQuery EasyUI Demo + + + + + + + +

            Fluid Calendar

            +

            This example shows how to set the width of calendar to a percentage of its parent container.

            +
            +
            +

            width: 50%, height: 250px

            +
            +

            width: 30%, height: 40%

            +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combo/animation.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combo/animation.html new file mode 100644 index 0000000..70f52a6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combo/animation.html @@ -0,0 +1,37 @@ + + + + + Combo Animation - jQuery EasyUI Demo + + + + + + + +

            Combo Animation

            +

            Change the animation type when open & close the drop-down panel.

            +
            + Animation Type: + +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combo/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combo/basic.html new file mode 100644 index 0000000..a0ec2c8 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combo/basic.html @@ -0,0 +1,42 @@ + + + + + Basic Combo - jQuery EasyUI Demo + + + + + + + +

            Basic Combo

            +

            Click the right arrow button to show drop down panel that can be filled with any content.

            +
            + +
            +
            Select a language
            +
            + Java
            + C#
            + Ruby
            + Basic
            + Fortran +
            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/actions.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/actions.html new file mode 100644 index 0000000..0fccf56 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/actions.html @@ -0,0 +1,86 @@ + + + + + ComboBox Actions - jQuery EasyUI Demo + + + + + + + +

            ComboBox

            +

            Click the buttons below to perform actions.

            + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/basic.html new file mode 100644 index 0000000..6a9c4fa --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/basic.html @@ -0,0 +1,71 @@ + + + + + Basic ComboBox - jQuery EasyUI Demo + + + + + + + +

            Basic ComboBox

            +

            Type in ComboBox to try auto complete.

            +
            + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/combobox_data1.json b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/combobox_data1.json new file mode 100644 index 0000000..9c8f7f5 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/combobox_data1.json @@ -0,0 +1,22 @@ +[{ + "id":1, + "text":"Java", + "desc":"Write once, run anywhere" +},{ + "id":2, + "text":"C#", + "desc":"One of the programming languages designed for the Common Language Infrastructure" +},{ + "id":3, + "text":"Ruby", + "selected":true, + "desc":"A dynamic, reflective, general-purpose object-oriented programming language" +},{ + "id":4, + "text":"Perl", + "desc":"A high-level, general-purpose, interpreted, dynamic programming language" +},{ + "id":5, + "text":"Basic", + "desc":"A family of general-purpose, high-level programming languages" +}] \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/combobox_data2.json b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/combobox_data2.json new file mode 100644 index 0000000..c3baf77 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/combobox_data2.json @@ -0,0 +1,47 @@ +[{ + "value":"f20", + "text":"Firefox 2.0 or higher", + "group":"Firefox" +},{ + "value":"f15", + "text":"Firefox 1.5.x", + "group":"Firefox" +},{ + "value":"f10", + "text":"Firefox 1.0.x", + "group":"Firefox" +},{ + "value":"ie7", + "text":"Microsoft Internet Explorer 7.0 or higher", + "group":"Microsoft Internet Explorer" +},{ + "value":"ie6", + "text":"Microsoft Internet Explorer 6.x", + "group":"Microsoft Internet Explorer" +},{ + "value":"ie5", + "text":"Microsoft Internet Explorer 5.x", + "group":"Microsoft Internet Explorer" +},{ + "value":"ie4", + "text":"Microsoft Internet Explorer 4.x", + "group":"Microsoft Internet Explorer" +},{ + "value":"op9", + "text":"Opera 9.0 or higher", + "group":"Opera" +},{ + "value":"op8", + "text":"Opera 8.x", + "group":"Opera" +},{ + "value":"op7", + "text":"Opera 7.x", + "group":"Opera" +},{ + "value":"Safari", + "text":"Safari" +},{ + "value":"Other", + "text":"Other" +}] \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/customformat.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/customformat.html new file mode 100644 index 0000000..5c58fd1 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/customformat.html @@ -0,0 +1,33 @@ + + + + + Custom Format in ComboBox - jQuery EasyUI Demo + + + + + + + +

            Custom Format in ComboBox

            +

            This sample shows how to custom the format of list item.

            +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/dynamicdata.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/dynamicdata.html new file mode 100644 index 0000000..2548599 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/dynamicdata.html @@ -0,0 +1,23 @@ + + + + + Load Dynamic ComboBox Data - jQuery EasyUI Demo + + + + + + + +

            Load Dynamic ComboBox Data

            +

            Click the button below to load data.

            + +
            + LoadData +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/fluid.html new file mode 100644 index 0000000..289fcda --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/fluid.html @@ -0,0 +1,36 @@ + + + + + Fluid ComboBox - jQuery EasyUI Demo + + + + + + + +

            Fluid ComboBox

            +

            This example shows how to set the width of combobox to a percentage of its parent container.

            +
            +

            width: 50%

            + +

            width: 30%

            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/group.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/group.html new file mode 100644 index 0000000..baa8959 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/group.html @@ -0,0 +1,26 @@ + + + + + Group ComboBox - jQuery EasyUI Demo + + + + + + + +

            Group ComboBox

            +

            This example shows how to display combobox items in groups.

            +
            + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/icons.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/icons.html new file mode 100644 index 0000000..ebd087d --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/icons.html @@ -0,0 +1,32 @@ + + + + + ComboBox with Extra Icons- jQuery EasyUI Demo + + + + + + + +

            ComboBox with Extra Icons

            +

            The user can attach extra icons to the ComboBox.

            +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/multiline.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/multiline.html new file mode 100644 index 0000000..74cbc58 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/multiline.html @@ -0,0 +1,71 @@ + + + + + Multiline ComboBox - jQuery EasyUI Demo + + + + + + + +

            Multiline ComboBox

            +

            This example shows how to create a multiline ComboBox.

            +
            + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/multiple.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/multiple.html new file mode 100644 index 0000000..79b5e69 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/multiple.html @@ -0,0 +1,29 @@ + + + + + Multiple Select - jQuery EasyUI Demo + + + + + + + +

            Load Dynamic ComboBox Data

            +

            Drop down the panel and select multiple items.

            +
            + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/navigation.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/navigation.html new file mode 100644 index 0000000..3ea5d3c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/navigation.html @@ -0,0 +1,73 @@ + + + + + Navigate ComboBox - jQuery EasyUI Demo + + + + + + + +

            Navigate ComboBox

            +

            Navigate through combobox items width keyboard to select an item.

            +
            + + SelectOnNavigation +
            + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/remotedata.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/remotedata.html new file mode 100644 index 0000000..46e75fd --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/remotedata.html @@ -0,0 +1,27 @@ + + + + + Binding to Remote Data - jQuery EasyUI Demo + + + + + + + +

            Binding to Remote Data

            +

            The ComboBox is bound to a remote data.

            +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/remotejsonp.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/remotejsonp.html new file mode 100644 index 0000000..0cbfe4e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combobox/remotejsonp.html @@ -0,0 +1,48 @@ + + + + + Remote JSONP - jQuery EasyUI Demo + + + + + + + +

            Remote JSONP

            +

            This sample shows how to use JSONP to retrieve data from a remote site.

            +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/actions.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/actions.html new file mode 100644 index 0000000..c41d0c9 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/actions.html @@ -0,0 +1,53 @@ + + + + + ComboGrid Actions - jQuery EasyUI Demo + + + + + + + +

            ComboGrid Actions

            +

            Click the buttons below to perform actions.

            + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/basic.html new file mode 100644 index 0000000..de430b6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/basic.html @@ -0,0 +1,34 @@ + + + + + Basic ComboGrid - jQuery EasyUI Demo + + + + + + + +

            Basic ComboGrid

            +

            Click the right arrow button to show the DataGrid.

            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/datagrid_data1.json b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/datagrid_data1.json new file mode 100644 index 0000000..c74fa23 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/datagrid_data1.json @@ -0,0 +1,12 @@ +{"total":28,"rows":[ + {"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"}, + {"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"}, + {"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"}, + {"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"}, + {"selected":true,"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"}, + {"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"}, + {"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"}, + {"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"}, + {"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"}, + {"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"} +]} diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/fluid.html new file mode 100644 index 0000000..0392992 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/fluid.html @@ -0,0 +1,54 @@ + + + + + Fluid ComboGrid - jQuery EasyUI Demo + + + + + + + +

            Fluid ComboGrid

            +

            This example shows how to set the width of ComboGrid to a percentage of its parent container.

            +
            +

            width: 50%

            + +

            width: 30%

            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/initvalue.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/initvalue.html new file mode 100644 index 0000000..9a55c89 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/initvalue.html @@ -0,0 +1,33 @@ + + + + + Initialize Value for ComboGrid - jQuery EasyUI Demo + + + + + + + +

            Initialize Value for ComboGrid

            +

            Initialize value when ComboGrid is created.

            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/multiple.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/multiple.html new file mode 100644 index 0000000..60700f7 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/multiple.html @@ -0,0 +1,37 @@ + + + + + Multiple ComboGrid - jQuery EasyUI Demo + + + + + + + +

            Multiple ComboGrid

            +

            Click the right arrow button to show the DataGrid and select items.

            +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/navigation.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/navigation.html new file mode 100644 index 0000000..7af03b8 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/navigation.html @@ -0,0 +1,38 @@ + + + + + Navigate ComboGrid - jQuery EasyUI Demo + + + + + + + +

            Navigate ComboGrid

            +

            Navigate through grid items with keyboard to select an item.

            +
            + + SelectOnNavigation +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/setvalue.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/setvalue.html new file mode 100644 index 0000000..4d0e0b8 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combogrid/setvalue.html @@ -0,0 +1,52 @@ + + + + + Set Value for ComboGrid - jQuery EasyUI Demo + + + + + + + +

            Set Value for ComboGrid

            +

            Click the buttons below to perform actions.

            + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/actions.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/actions.html new file mode 100644 index 0000000..c1290bb --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/actions.html @@ -0,0 +1,39 @@ + + + + + ComboTree Actions - jQuery EasyUI Demo + + + + + + + +

            ComboTree Actions

            +

            Click the buttons below to perform actions

            + + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/basic.html new file mode 100644 index 0000000..4b62c88 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/basic.html @@ -0,0 +1,19 @@ + + + + + Basic ComboTree - jQuery EasyUI Demo + + + + + + + +

            Basic ComboTree

            +

            Click the right arrow button to show the tree panel.

            +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/fluid.html new file mode 100644 index 0000000..5b78306 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/fluid.html @@ -0,0 +1,22 @@ + + + + + Fluid ComboTree - jQuery EasyUI Demo + + + + + + + +

            Fluid ComboTree

            +

            This example shows how to set the width of ComboTree to a percentage of its parent container.

            +
            +

            width: 50%

            + +

            width: 30%, height: 26px

            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/initvalue.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/initvalue.html new file mode 100644 index 0000000..801113a --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/initvalue.html @@ -0,0 +1,19 @@ + + + + + Initialize Value for ComboTree - jQuery EasyUI Demo + + + + + + + +

            Initialize Value for ComboTree

            +

            Initialize Value when ComboTree is created.

            +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/multiple.html b/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/multiple.html new file mode 100644 index 0000000..feb3bbe --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/multiple.html @@ -0,0 +1,22 @@ + + + + + Multiple ComboTree - jQuery EasyUI Demo + + + + + + + +

            Multiple ComboTree

            +

            Click the right arrow button to show the tree panel and select multiple nodes.

            +
            + Cascade Check: + +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/tree_data1.json b/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/tree_data1.json new file mode 100644 index 0000000..e0c6192 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/combotree/tree_data1.json @@ -0,0 +1,49 @@ +[{ + "id":1, + "text":"My Documents", + "children":[{ + "id":11, + "text":"Photos", + "state":"closed", + "children":[{ + "id":111, + "text":"Friend" + },{ + "id":112, + "text":"Wife" + },{ + "id":113, + "text":"Company" + }] + },{ + "id":12, + "text":"Program Files", + "children":[{ + "id":121, + "text":"Intel" + },{ + "id":122, + "text":"Java", + "attributes":{ + "p1":"Custom Attribute1", + "p2":"Custom Attribute2" + } + },{ + "id":123, + "text":"Microsoft Office" + },{ + "id":124, + "text":"Games", + "checked":true + }] + },{ + "id":13, + "text":"index.html" + },{ + "id":14, + "text":"about.html" + },{ + "id":15, + "text":"welcome.html" + }] +}] diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/aligncolumns.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/aligncolumns.html new file mode 100644 index 0000000..6021962 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/aligncolumns.html @@ -0,0 +1,32 @@ + + + + + Aligning Columns in DataGrid - jQuery EasyUI Demo + + + + + + + +

            Aligning Columns in DataGrid

            +

            Use align and halign properties to set the alignment of the columns and their header.

            +
            + + + + + + + + + + + + +
            Item IDProductList PriceUnit CostAttributeStatus
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/basic.html new file mode 100644 index 0000000..6870ac2 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/basic.html @@ -0,0 +1,32 @@ + + + + + Basic DataGrid - jQuery EasyUI Demo + + + + + + + +

            Basic DataGrid

            +

            The DataGrid is created from markup, no JavaScript code needed.

            +
            + + + + + + + + + + + + +
            Item IDProductList PriceUnit CostAttributeStatus
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/cacheeditor.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/cacheeditor.html new file mode 100644 index 0000000..df55e30 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/cacheeditor.html @@ -0,0 +1,149 @@ + + + + + Cache Editor for DataGrid - jQuery EasyUI Demo + + + + + + + +

            Cache Editor for DataGrid

            +

            This example shows how to cache the editors for datagrid to improve the editing speed.

            +
            + + + + + + + + + + + + +
            Item IDProductList PriceUnit CostAttributeStatus
            + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/cellediting.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/cellediting.html new file mode 100644 index 0000000..385b2d4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/cellediting.html @@ -0,0 +1,94 @@ + + + + + Cell Editing in DataGrid - jQuery EasyUI Demo + + + + + + + +

            Cell Editing in DataGrid

            +

            Click a cell to start editing.

            +
            + + + + + + + + + + + + +
            Item IDProductList PriceUnit CostAttributeStatus
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/cellstyle.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/cellstyle.html new file mode 100644 index 0000000..9230ac2 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/cellstyle.html @@ -0,0 +1,42 @@ + + + + + DataGrid Cell Style - jQuery EasyUI Demo + + + + + + + +

            DataGrid Cell Style

            +

            The cells which listprice value is less than 30 are highlighted.

            +
            + + + + + + + + + + + +
            Item IDProductList PriceUnit CostAttributeStatus
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/checkbox.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/checkbox.html new file mode 100644 index 0000000..ca1c81c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/checkbox.html @@ -0,0 +1,42 @@ + + + + + CheckBox Selection on DataGrid - jQuery EasyUI Demo + + + + + + + +

            CheckBox Selection on DataGrid

            +

            Click the checkbox on header to select or unselect all selections.

            +
            + + + + + + + + + + + + + +
            Item IDProductList PriceUnit CostAttributeStatus
            +
            + Selection Mode: +
            + SelectOnCheck:
            + CheckOnSelect: +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/clientpagination.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/clientpagination.html new file mode 100644 index 0000000..3bec54c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/clientpagination.html @@ -0,0 +1,160 @@ + + + + + Client Side Pagination in DataGrid - jQuery EasyUI Demo + + + + + + + +

            Client Side Pagination in DataGrid

            +

            This sample shows how to implement client side pagination in DataGrid.

            +
            + + + + + + + + + + + + + +
            Inv NoDateNameAmountPriceCostNote
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/columngroup.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/columngroup.html new file mode 100644 index 0000000..9c3340e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/columngroup.html @@ -0,0 +1,34 @@ + + + + + Column Group - jQuery EasyUI Demo + + + + + + + +

            Column Group

            +

            The header cells can be merged. Useful to group columns under a category.

            +
            + + + + + + + + + + + + + + +
            Item IDProductItem Details
            List PriceUnit CostAttributeStatus
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/complextoolbar.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/complextoolbar.html new file mode 100644 index 0000000..35c9ba1 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/complextoolbar.html @@ -0,0 +1,50 @@ + + + + + DataGrid Complex Toolbar - jQuery EasyUI Demo + + + + + + + +

            DataGrid Complex Toolbar

            +

            The DataGrid toolbar can be defined from a <div> markup, so you can define the layout of toolbar easily.

            +
            + + + + + + + + + + + +
            Item IDProductList PriceUnit CostAttributeStatus
            +
            + Date From: + To: + Language: + + Search +
            +
            + + + + + +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/contextmenu.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/contextmenu.html new file mode 100644 index 0000000..96f3c6d --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/contextmenu.html @@ -0,0 +1,81 @@ + + + + + Context Menu on DataGrid - jQuery EasyUI Demo + + + + + + + +

            Context Menu on DataGrid

            +

            Right click on the header of DataGrid to display context menu.

            +
            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/custompager.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/custompager.html new file mode 100644 index 0000000..c4c62d7 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/custompager.html @@ -0,0 +1,53 @@ + + + + + Custom DataGrid Pager - jQuery EasyUI Demo + + + + + + + +

            Custom DataGrid Pager

            +

            You can append some buttons to the standard datagrid pager bar.

            +
            + + + + + + + + + + + +
            Item IDProductList PriceUnit CostAttributeStatus
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/datagrid_data1.json b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/datagrid_data1.json new file mode 100644 index 0000000..63d6473 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/datagrid_data1.json @@ -0,0 +1,12 @@ +{"total":28,"rows":[ + {"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"}, + {"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"}, + {"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"}, + {"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"}, + {"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"}, + {"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"}, + {"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"}, + {"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"}, + {"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"}, + {"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"} +]} diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/datagrid_data2.json b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/datagrid_data2.json new file mode 100644 index 0000000..ce91bab --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/datagrid_data2.json @@ -0,0 +1,15 @@ +{"total":28,"rows":[ + {"productid":"FI-SW-01","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"}, + {"productid":"K9-DL-01","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"}, + {"productid":"RP-SN-01","unitcost":12.00,"status":"P","listprice":28.50,"attr1":"Venomless","itemid":"EST-11"}, + {"productid":"RP-SN-01","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"}, + {"productid":"RP-LI-02","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"}, + {"productid":"FL-DSH-01","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"}, + {"productid":"FL-DSH-01","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"}, + {"productid":"FL-DLH-02","unitcost":12.00,"status":"P","listprice":63.50,"attr1":"Adult Female","itemid":"EST-16"}, + {"productid":"FL-DLH-02","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"}, + {"productid":"AV-CB-01","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"} +],"footer":[ + {"unitcost":19.80,"listprice":60.40,"productid":"Average:"}, + {"unitcost":198.00,"listprice":604.00,"productid":"Total:"} +]} diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/fluid.html new file mode 100644 index 0000000..463f570 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/fluid.html @@ -0,0 +1,32 @@ + + + + + Fluid DataGrid - jQuery EasyUI Demo + + + + + + + +

            Fluid DataGrid

            +

            This example shows how to assign percentage width to a column in DataGrid.

            +
            + + + + + + + + + + + + +
            Item ID(15%)Product(15%)List Price(15%)Unit Cost(15%)Attribute(25%)Status(15%)
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/footer.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/footer.html new file mode 100644 index 0000000..ccb8885 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/footer.html @@ -0,0 +1,38 @@ + + + + + Footer Rows in DataGrid - jQuery EasyUI Demo + + + + + + + +

            Footer Rows in DataGrid

            +

            The summary informations can be displayed in footer rows.

            +
            + + + + + + + + + + + +
            Item IDProduct IDList PriceUnit CostAttributeStatus
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/formatcolumns.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/formatcolumns.html new file mode 100644 index 0000000..e5a2e02 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/formatcolumns.html @@ -0,0 +1,39 @@ + + + + + Format DataGrid Columns - jQuery EasyUI Demo + + + + + + + +

            Format DataGrid Columns

            +

            The list price value will show red color when less than 30.

            +
            + + + + + + + + + + + +
            Item IDProductList PriceUnit CostAttributeStatus
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/frozencolumns.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/frozencolumns.html new file mode 100644 index 0000000..3542017 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/frozencolumns.html @@ -0,0 +1,35 @@ + + + + + Frozen Columns in DataGrid - jQuery EasyUI Demo + + + + + + + +

            Frozen Columns in DataGrid

            +

            You can freeze some columns that can't scroll out of view.

            +
            + + + + + + + + + + + + + + + +
            Item IDProduct
            List PriceUnit CostAttributeStatus
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/frozenrows.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/frozenrows.html new file mode 100644 index 0000000..be27afd --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/frozenrows.html @@ -0,0 +1,44 @@ + + + + + Frozen Rows in DataGrid - jQuery EasyUI Demo + + + + + + + +

            Frozen Rows in DataGrid

            +

            This sample shows how to freeze some rows that will always be displayed at the top when the datagrid is scrolled down.

            +
            + + + + + + + + + + + + + + + +
            Item IDProduct
            List PriceUnit CostAttributeStatus
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/mergecells.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/mergecells.html new file mode 100644 index 0000000..3d0ff75 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/mergecells.html @@ -0,0 +1,58 @@ + + + + + Merge Cells for DataGrid - jQuery EasyUI Demo + + + + + + + +

            Merge Cells for DataGrid

            +

            Cells in DataGrid body can be merged.

            +
            + + + + + + + + + + + +
            ProductItem IDList PriceUnit CostAttributeStatus
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/multisorting.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/multisorting.html new file mode 100644 index 0000000..d7337f3 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/multisorting.html @@ -0,0 +1,37 @@ + + + + + Multiple Sorting - jQuery EasyUI Demo + + + + + + + +

            Multiple Sorting

            +

            Set 'multiSort' property to true to enable multiple column sorting.

            +
            + + + + + + + + + + + + +
            Item IDProductList PriceUnit CostAttributeStatus
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/products.json b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/products.json new file mode 100644 index 0000000..b0b6a93 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/products.json @@ -0,0 +1,9 @@ +[ +{"productid":"FI-SW-01","productname":"Koi"}, +{"productid":"K9-DL-01","productname":"Dalmation"}, +{"productid":"RP-SN-01","productname":"Rattlesnake"}, +{"productid":"RP-LI-02","productname":"Iguana"}, +{"productid":"FL-DSH-01","productname":"Manx"}, +{"productid":"FL-DLH-02","productname":"Persian"}, +{"productid":"AV-CB-01","productname":"Amazon Parrot"} +] diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/rowborder.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/rowborder.html new file mode 100644 index 0000000..21843f4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/rowborder.html @@ -0,0 +1,60 @@ + + + + + Row Border in DataGrid - jQuery EasyUI Demo + + + + + + + +

            Row Border in DataGrid

            +

            This sample shows how to change the row border style of datagrid.

            +
            + Border: + + Striped: + +
            + + + + + + + + + + + +
            Item IDProductList PriceUnit CostAttributeStatus
            + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/rowediting.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/rowediting.html new file mode 100644 index 0000000..ace9467 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/rowediting.html @@ -0,0 +1,118 @@ + + + + + Row Editing in DataGrid - jQuery EasyUI Demo + + + + + + + +

            Row Editing in DataGrid

            +

            Click the row to start editing.

            +
            + + + + + + + + + + + + +
            Item IDProductList PriceUnit CostAttributeStatus
            + + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/rowstyle.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/rowstyle.html new file mode 100644 index 0000000..d4e36a8 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/rowstyle.html @@ -0,0 +1,41 @@ + + + + + DataGrid Row Style - jQuery EasyUI Demo + + + + + + + +

            DataGrid Row Style

            +

            The rows which listprice value is less than 30 are highlighted.

            +
            + + + + + + + + + + + +
            Item IDProductList PriceUnit CostAttributeStatus
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/selection.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/selection.html new file mode 100644 index 0000000..d6b4047 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/selection.html @@ -0,0 +1,57 @@ + + + + + DataGrid Selection - jQuery EasyUI Demo + + + + + + + +

            DataGrid Selection

            +

            Choose a selection mode and select one or more rows.

            + + + + + + + + + + + + +
            Item IDProductList PriceUnit CostAttributeStatus
            +
            + Selection Mode: + +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/simpletoolbar.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/simpletoolbar.html new file mode 100644 index 0000000..4c67f56 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/simpletoolbar.html @@ -0,0 +1,45 @@ + + + + + DataGrid with Toolbar - jQuery EasyUI Demo + + + + + + + +

            DataGrid with Toolbar

            +

            Put buttons on top toolbar of DataGrid.

            +
            + + + + + + + + + + + +
            Item IDProductList PriceUnit CostAttributeStatus
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/transform.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/transform.html new file mode 100644 index 0000000..9379832 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datagrid/transform.html @@ -0,0 +1,46 @@ + + + + + Transform DataGrid from Table - jQuery EasyUI Demo + + + + + + + +

            Transform DataGrid from Table

            +

            Transform DataGrid from an existing, unformatted html table.

            +
            + Transform +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Item IDProductList PriceAttribute
            EST-1FI-SW-0136.50Large
            EST-10K9-DL-0118.50Spotted Adult Female
            EST-11RP-SN-0128.50Venomless
            EST-12RP-SN-0126.50Rattleless
            EST-13RP-LI-0235.50Green Adult
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/basic.html new file mode 100644 index 0000000..4910219 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/basic.html @@ -0,0 +1,69 @@ + + + + + Basic DataList - jQuery EasyUI Demo + + + + + + + +

            Basic DataList

            +

            The DataList can be created from the <ul> element.

            +
            +
              +
            • Alabama
            • +
            • Alaska
            • +
            • Arizona
            • +
            • Arkansas
            • +
            • California
            • +
            • Colorado
            • +
            • Connecticut
            • +
            • Delaware
            • +
            • Florida
            • +
            • Georgia
            • +
            • Hawaii
            • +
            • Idaho
            • +
            • Illinois
            • +
            • Indiana
            • +
            • Iowa
            • +
            • Kansas
            • +
            • Kentucky
            • +
            • Louisiana
            • +
            • Maine
            • +
            • Maryland
            • +
            • Massachusetts
            • +
            • Michigan
            • +
            • Minnesota
            • +
            • Mississippi
            • +
            • Missouri
            • +
            • Montana
            • +
            • Nebraska
            • +
            • Nevada
            • +
            • New Hampshire
            • +
            • New Jersey
            • +
            • New Mexico
            • +
            • New York
            • +
            • North Carolina
            • +
            • North Dakota
            • +
            • Ohio
            • +
            • Oklahoma
            • +
            • Oregon
            • +
            • Pennsylvania
            • +
            • Rhode Island
            • +
            • South Carolina
            • +
            • South Dakota
            • +
            • Tennessee
            • +
            • Texas
            • +
            • Utah
            • +
            • Vermont
            • +
            • Virginia
            • +
            • Washington
            • +
            • West Virginia
            • +
            • Wisconsin
            • +
            • Wyoming
            • +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/checkbox.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/checkbox.html new file mode 100644 index 0000000..2ade7ac --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/checkbox.html @@ -0,0 +1,28 @@ + + + + +Checkbox in DataList - jQuery EasyUI Demo + + + + + + + +

            Checkbox in DataList

            +

            Each item in the DataList has a checkbox.

            +
            +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/datalist_data1.json b/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/datalist_data1.json new file mode 100644 index 0000000..d53cf62 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/datalist_data1.json @@ -0,0 +1,18 @@ +[ +{"text":"Epson WorkForce 845","group":"Printer"}, +{"text":"Canon PIXMA MG5320","group":"Printer"}, +{"text":"HP Deskjet 1000 Printer","group":"Printer"}, +{"text":"Cisco RV110W-A-NA-K9","group":"Firewall"}, +{"text":"ZyXEL ZyWALL USG50","group":"Firewall"}, +{"text":"NETGEAR FVS318","group":"Firewall"}, +{"text":"Logitech Keyboard K120","group":"Keyboard"}, +{"text":"Microsoft Natural Ergonomic Keyboard 4000","group":"Keyboard"}, +{"text":"Logitech Wireless Touch Keyboard K400","group":"Keyboard"}, +{"text":"Logitech Gaming Keyboard G110","group":"Keyboard"}, +{"text":"Nikon COOLPIX L26 16.1 MP","group":"Camera"}, +{"text":"Canon PowerShot A1300","group":"Camera"}, +{"text":"Canon PowerShot A2300","group":"Camera"} + + + +] \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/group.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/group.html new file mode 100644 index 0000000..bf22b6f --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/group.html @@ -0,0 +1,23 @@ + + + + + Group DataList - jQuery EasyUI Demo + + + + + + + +

            Group DataList

            +

            This example shows how to display items in groups.

            +
            +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/multiselect.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/multiselect.html new file mode 100644 index 0000000..704924c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/multiselect.html @@ -0,0 +1,23 @@ + + + + + Multiple Selection DataList - jQuery EasyUI Demo + + + + + + + +

            Multiple Selection DataList

            +

            The multiple selection allows the user to select multiple items in a datalist.

            +
            +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/remotedata.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/remotedata.html new file mode 100644 index 0000000..0c71604 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datalist/remotedata.html @@ -0,0 +1,22 @@ + + + + + Binding to Remote Data - jQuery EasyUI Demo + + + + + + + +

            Binding to Remote Data

            +

            The DataList is bound to a remote data.

            +
            +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/basic.html new file mode 100644 index 0000000..2a55d8c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/basic.html @@ -0,0 +1,18 @@ + + + + + Basic DateBox - jQuery EasyUI Demo + + + + + + + +

            Basic DateBox

            +

            Click the calendar image on the right side.

            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/buttons.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/buttons.html new file mode 100644 index 0000000..357316c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/buttons.html @@ -0,0 +1,28 @@ + + + + + DateBox Buttons - jQuery EasyUI Demo + + + + + + + +

            DateBox Buttons

            +

            This example shows how to customize the datebox buttons underneath the calendar.

            +
            + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/clone.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/clone.html new file mode 100644 index 0000000..75948b0 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/clone.html @@ -0,0 +1,27 @@ + + + + + Clone DateBox - jQuery EasyUI Demo + + + + + + + +

            Clone DateBox

            +

            Click the 'Clone' button to clone datebox components from the exiting datebox.

            +
            + Clone +
            + +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/dateformat.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/dateformat.html new file mode 100644 index 0000000..5aff044 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/dateformat.html @@ -0,0 +1,39 @@ + + + + + Date Format - jQuery EasyUI Demo + + + + + + + +

            Date Format

            +

            Different date formats are applied to different DateBox components.

            +
            + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/events.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/events.html new file mode 100644 index 0000000..21d1c6e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/events.html @@ -0,0 +1,27 @@ + + + + + DateBox Events - jQuery EasyUI Demo + + + + + + + +

            DateBox Events

            +

            Click the calendar image on the right side.

            +
            + +
            + Selected Date: + +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/fluid.html new file mode 100644 index 0000000..fdf40ac --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/fluid.html @@ -0,0 +1,21 @@ + + + + + Fluid DateBox - jQuery EasyUI Demo + + + + + + + +

            Fluid DateBox

            +

            This example shows how to set the width of DateBox to a percentage of its parent container.

            +
            +

            width: 50%

            + +

            width: 30%

            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/restrict.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/restrict.html new file mode 100644 index 0000000..3a4b105 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/restrict.html @@ -0,0 +1,30 @@ + + + + + Restrict Date Range in DateBox - jQuery EasyUI Demo + + + + + + + +

            Restrict Date Range in DateBox

            +

            This example shows how to restrict the user to select only ten days from now.

            +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/sharedcalendar.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/sharedcalendar.html new file mode 100644 index 0000000..48c3c1e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/sharedcalendar.html @@ -0,0 +1,30 @@ + + + + + Shared Calendar in DateBox - jQuery EasyUI Demo + + + + + + + +

            Shared Calendar in DateBox

            +

            Multiple datebox components can share a calendar and use it to pick dates.

            +
            + + + + + + + +
            Start Date: + + End Date: + +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/validate.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/validate.html new file mode 100644 index 0000000..ae45228 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datebox/validate.html @@ -0,0 +1,30 @@ + + + + + Validate DateBox - jQuery EasyUI Demo + + + + + + + +

            Validate DateBox

            +

            When the selected date is greater than specified date. The field validator will raise an error.

            +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datetimebox/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimebox/basic.html new file mode 100644 index 0000000..fa92ff3 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimebox/basic.html @@ -0,0 +1,18 @@ + + + + + Basic DateTimeBox - jQuery EasyUI Demo + + + + + + + +

            Basic DateTimeBox

            +

            Click the calendar image on the right side.

            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datetimebox/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimebox/fluid.html new file mode 100644 index 0000000..af4f08f --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimebox/fluid.html @@ -0,0 +1,21 @@ + + + + + Fluid DateTimeBox - jQuery EasyUI Demo + + + + + + + +

            Fluid DateTimeBox

            +

            This example shows how to set the width of DateTimeBox to a percentage of its parent container.

            +
            +

            width: 50%

            + +

            width: 30%

            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datetimebox/initvalue.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimebox/initvalue.html new file mode 100644 index 0000000..26f6c61 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimebox/initvalue.html @@ -0,0 +1,19 @@ + + + + + Initialize Value for DateTime - jQuery EasyUI Demo + + + + + + + +

            Initialize Value for DateTime

            +

            The value is initialized when DateTimeBox has been created.

            +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datetimebox/showseconds.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimebox/showseconds.html new file mode 100644 index 0000000..938d9b8 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimebox/showseconds.html @@ -0,0 +1,22 @@ + + + + + Display Seconds - jQuery EasyUI Demo + + + + + + + +

            Display Seconds

            +

            The user can decide to display seconds part or not.

            +
            + Show Seconds: + +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datetimespinner/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimespinner/basic.html new file mode 100644 index 0000000..1e30a71 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimespinner/basic.html @@ -0,0 +1,18 @@ + + + + + Basic DateTimeSpinner - jQuery EasyUI Demo + + + + + + + +

            Basic DateTimeSpinner

            +

            Click spin button to adjust date and time.

            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datetimespinner/clearicon.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimespinner/clearicon.html new file mode 100644 index 0000000..135bf29 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimespinner/clearicon.html @@ -0,0 +1,28 @@ + + + + + DateTimeSpinner with Clear Icon - jQuery EasyUI Demo + + + + + + + +

            DateTimeSpinner with Clear Icon

            +

            A clear icon can be attached to the datetimespinner. Click it to clear the entered value.

            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datetimespinner/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimespinner/fluid.html new file mode 100644 index 0000000..eeca9b9 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimespinner/fluid.html @@ -0,0 +1,21 @@ + + + + + Fluid DateTimeSpinner - jQuery EasyUI Demo + + + + + + + +

            Fluid DateTimeSpinner

            +

            The width of datetimespinner is set in percentages.

            +
            +

            width: 50%

            + +

            width: 30%

            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/datetimespinner/format.html b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimespinner/format.html new file mode 100644 index 0000000..427e186 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/datetimespinner/format.html @@ -0,0 +1,50 @@ + + + + + Format DateTimeSpinner - jQuery EasyUI Demo + + + + + + + +

            Format DateTimeSpinner

            +

            The DataTimeSpinner value can be formatted by specifying the 'formatter' and 'parser' functions.

            +
            +

            mm/dd/yyyy hh:mm

            + +

            mm/dd/yyyy

            + +

            yyyy-mm

            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/demo.css b/src/main/webapp/jquery-easyui-1.4.4/demo/demo.css new file mode 100644 index 0000000..72ffb54 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/demo.css @@ -0,0 +1,21 @@ +*{ + font-size:12px; +} +body { + font-family:verdana,helvetica,arial,sans-serif; + padding:20px; + font-size:12px; + margin:0; +} +h2 { + font-size:18px; + font-weight:bold; + margin:0; + margin-bottom:15px; +} +.demo-info{ + padding:0 0 12px 0; +} +.demo-tip{ + display:none; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/dialog/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/dialog/basic.html new file mode 100644 index 0000000..37ca830 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/dialog/basic.html @@ -0,0 +1,23 @@ + + + + + Basic Dialog - jQuery EasyUI Demo + + + + + + + +

            Basic Dialog

            +

            Click below button to open or close dialog.

            +
            + Open + Close +
            +
            + The dialog content. +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/dialog/complextoolbar.html b/src/main/webapp/jquery-easyui-1.4.4/demo/dialog/complextoolbar.html new file mode 100644 index 0000000..adaa97b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/dialog/complextoolbar.html @@ -0,0 +1,46 @@ + + + + + Complex Toolbar on Dialog - jQuery EasyUI Demo + + + + + + + +

            Complex Toolbar on Dialog

            +

            This sample shows how to create complex toolbar on dialog.

            +
            + Open + Close +
            +
            + The dialog content. +
            +
            + + + + + +
            + Edit + Help + + +
            +
            +
            + Save + Close +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/dialog/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/dialog/fluid.html new file mode 100644 index 0000000..f64f72e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/dialog/fluid.html @@ -0,0 +1,24 @@ + + + + + Fluid Dialog - jQuery EasyUI Demo + + + + + + + +

            Fluid Dialog

            +

            This example shows how to set the width of Dialog to a percentage of its parent container.

            +
            +
            +

            width: 80%; height: 200px

            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/dialog/toolbarbuttons.html b/src/main/webapp/jquery-easyui-1.4.4/demo/dialog/toolbarbuttons.html new file mode 100644 index 0000000..12e2307 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/dialog/toolbarbuttons.html @@ -0,0 +1,52 @@ + + + + + Toolbar and Buttons - jQuery EasyUI Demo + + + + + + + +

            Toolbar and Buttons

            +

            The toolbar and buttons can be added to dialog.

            +
            + Open + Close +
            +
            + The dialog content. +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/draggable/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/draggable/basic.html new file mode 100644 index 0000000..3a73cf2 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/draggable/basic.html @@ -0,0 +1,21 @@ + + + + + Basic Draggable - jQuery EasyUI Demo + + + + + + + +

            Basic Draggable

            +

            Move the boxes below by clicking on it with mouse.

            +
            +
            +
            +
            Title
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/draggable/constrain.html b/src/main/webapp/jquery-easyui-1.4.4/demo/draggable/constrain.html new file mode 100644 index 0000000..b72e3ff --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/draggable/constrain.html @@ -0,0 +1,35 @@ + + + + + Constrain Draggable - jQuery EasyUI Demo + + + + + + + +

            Constrain Draggable

            +

            The draggable object can only be moved within its parent container.

            +
            +
            +
            +
            +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/draggable/snap.html b/src/main/webapp/jquery-easyui-1.4.4/demo/draggable/snap.html new file mode 100644 index 0000000..c3ddd05 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/draggable/snap.html @@ -0,0 +1,37 @@ + + + + + Snap Draggable - jQuery EasyUI Demo + + + + + + + +

            Snap Draggable

            +

            This sample shows how to snap a draggable object to a 20x20 grid.

            +
            +
            +
            +
            +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/droppable/accept.html b/src/main/webapp/jquery-easyui-1.4.4/demo/droppable/accept.html new file mode 100644 index 0000000..8da0d42 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/droppable/accept.html @@ -0,0 +1,78 @@ + + + + + Accept a Drop - jQuery EasyUI Demo + + + + + + + +

            Accept a Drop

            +

            Some draggable object can not be accepted.

            +
            +
            + drag me! +
            Drag 1
            +
            Drag 2
            +
            Drag 3
            +
            +
            + drop here! +
            +
            + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/droppable/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/droppable/basic.html new file mode 100644 index 0000000..7738c06 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/droppable/basic.html @@ -0,0 +1,77 @@ + + + + + Basic Droppable - jQuery EasyUI Demo + + + + + + + +

            Basic Droppable

            +

            Drag the boxed on left to the target area on right.

            +
            +
            +
            Source
            +
            +
            Apple
            +
            Peach
            +
            Orange
            +
            +
            +
            +
            Target
            +
            +
            +
            +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/droppable/sort.html b/src/main/webapp/jquery-easyui-1.4.4/demo/droppable/sort.html new file mode 100644 index 0000000..1d99cd8 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/droppable/sort.html @@ -0,0 +1,71 @@ + + + + + Change Items Order - jQuery EasyUI Demo + + + + + + + +

            Change Items Order

            +

            Drag the list items to change their order.

            +
            +
              +
            • Drag 1
            • +
            • Drag 2
            • +
            • Drag 3
            • +
            • Drag 4
            • +
            • Drag 5
            • +
            • Drag 6
            • +
            + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/easyloader/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/easyloader/basic.html new file mode 100644 index 0000000..0d7ba7b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/easyloader/basic.html @@ -0,0 +1,75 @@ + + + + + Basic EasyLoader - jQuery EasyUI Demo + + + + + + + +

            Basic EasyLoader

            +
            +
            +
            Click the buttons below to load components dynamically.
            +
            + +
            +
            +
            + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/filebox/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/filebox/basic.html new file mode 100644 index 0000000..25cf5f7 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/filebox/basic.html @@ -0,0 +1,34 @@ + + + + + Basic FileBox - jQuery EasyUI Demo + + + + + + + +

            Basic FileBox

            +

            The filebox component represents a file field of the forms.

            +
            +
            +
            +
            Name:
            + +
            +
            +
            File1:
            + +
            +
            +
            File2:
            + +
            +
            + Upload +
            +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/filebox/buttonalign.html b/src/main/webapp/jquery-easyui-1.4.4/demo/filebox/buttonalign.html new file mode 100644 index 0000000..f87d954 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/filebox/buttonalign.html @@ -0,0 +1,29 @@ + + + + + Button Align on FileBox - jQuery EasyUI Demo + + + + + + + +

            Button Align on FileBox

            +

            Change the button align to the left or right of filebox.

            +
            + Select Button Align: + +
            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/filebox/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/filebox/fluid.html new file mode 100644 index 0000000..ef32e48 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/filebox/fluid.html @@ -0,0 +1,21 @@ + + + + + Fluid FileBox - jQuery EasyUI Demo + + + + + + + +

            Fluid FileBox

            +

            This example shows how to set the width of FileBox to a percentage of its parent container.

            +
            +

            width: 50%

            + +

            width: 30%

            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/form/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/form/basic.html new file mode 100644 index 0000000..1aac45f --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/form/basic.html @@ -0,0 +1,59 @@ + + + + + Basic Form - jQuery EasyUI Demo + + + + + + + +

            Basic Form

            +

            Fill the form and submit it.

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + +
            Name:
            Email:
            Subject:
            Message:
            Language: + +
            +
            +
            + Submit + Clear +
            +
            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/form/form_data1.json b/src/main/webapp/jquery-easyui-1.4.4/demo/form/form_data1.json new file mode 100644 index 0000000..3a58567 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/form/form_data1.json @@ -0,0 +1,7 @@ +{ + "name":"easyui", + "email":"easyui@gmail.com", + "subject":"Subject Title", + "message":"Message Content", + "language":"de" +} \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/form/load.html b/src/main/webapp/jquery-easyui-1.4.4/demo/form/load.html new file mode 100644 index 0000000..c668970 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/form/load.html @@ -0,0 +1,68 @@ + + + + + Load Form Data - jQuery EasyUI Demo + + + + + + + +

            Load Form Data

            +

            Click the buttons below to load form data.

            + +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + +
            Name:
            Email:
            Subject:
            Message:
            Language: + +
            +
            +
            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/form/validateonsubmit.html b/src/main/webapp/jquery-easyui-1.4.4/demo/form/validateonsubmit.html new file mode 100644 index 0000000..119206c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/form/validateonsubmit.html @@ -0,0 +1,63 @@ + + + + + Validate Form on Submit - jQuery EasyUI Demo + + + + + + + +

            Validate Form on Submit

            +

            The form does not perform validation before being submitted.

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + +
            Name:
            Email:
            Subject:
            Message:
            Language: + +
            +
            +
            + Submit + Clear +
            +
            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/layout/_content.html b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/_content.html new file mode 100644 index 0000000..76f2506 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/_content.html @@ -0,0 +1,18 @@ + + + + + AJAX Content + + +

            jQuery EasyUI framework help you build your web page easily.

            +
              +
            • easyui is a collection of user-interface plugin based on jQuery.
            • +
            • easyui provides essential functionality for building modern, interactive, javascript applications.
            • +
            • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
            • +
            • complete framework for HTML5 web page.
            • +
            • easyui save your time and scales while developing your products.
            • +
            • easyui is very easy but powerful.
            • +
            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/layout/addremove.html b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/addremove.html new file mode 100644 index 0000000..ede2889 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/addremove.html @@ -0,0 +1,53 @@ + + + + + Add and Remove Layout - jQuery EasyUI Demo + + + + + + + +

            Add and Remove Layout

            +

            Click the buttons below to add or remove region panel of layout.

            +
            + Select Region Panel: + + Add + Remove +
            +
            +
            +
            +
            +
            +
            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/layout/autoheight.html b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/autoheight.html new file mode 100644 index 0000000..b9ccc7e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/autoheight.html @@ -0,0 +1,59 @@ + + + + + Auto Height for Layout - jQuery EasyUI Demo + + + + + + + +

            Auto Height for Layout

            +

            This example shows how to auto adjust layout height after dynamically adding items.

            + +
            +
            +
            +
            +
            +

            Panel Content.

            +

            Panel Content.

            +

            Panel Content.

            +

            Panel Content.

            +

            Panel Content.

            +
            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/layout/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/basic.html new file mode 100644 index 0000000..f428724 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/basic.html @@ -0,0 +1,39 @@ + + + + + Basic Layout - jQuery EasyUI Demo + + + + + + + +

            Basic Layout

            +

            The layout contains north,south,west,east and center regions.

            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + + +
            Item IDProduct IDList PriceUnit CostAttributeStatus
            +
            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/layout/collapsetitle.html b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/collapsetitle.html new file mode 100644 index 0000000..0d103e6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/collapsetitle.html @@ -0,0 +1,39 @@ + + + + + Collapse Title in Layout - jQuery EasyUI Demo + + + + + + + +

            Collapse Title in Layout

            +

            The title bar will display while collapse a region panel.

            +
            +
            +
            +
            +
            +
            +
            + + + + + + + + + + + +
            Item IDProduct IDList PriceUnit CostAttributeStatus
            +
            +
            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/layout/complex.html b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/complex.html new file mode 100644 index 0000000..9d1ab66 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/complex.html @@ -0,0 +1,57 @@ + + + + + Complex Layout - jQuery EasyUI Demo + + + + + + + +

            Complex Layout

            +

            This sample shows how to create a complex layout.

            +
            +
            +
            +
            +
            +
              +
              +
              +
              +
              + content1 +
              +
              + content2 +
              +
              + content3 +
              +
              +
              +
              +
              +
              +
              + + + + + + + + + + + +
              Item IDProduct IDList PriceUnit CostAttributeStatus
              +
              +
              +
              +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/layout/customcollapsetitle.html b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/customcollapsetitle.html new file mode 100644 index 0000000..945b6af --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/customcollapsetitle.html @@ -0,0 +1,51 @@ + + + + + Custom Collapse Title in Layout - jQuery EasyUI Demo + + + + + + + +

              Custom Collapse Title in Layout

              +

              Any components can display on the title bar of a collapsed panel.

              +
              +
              +
              +
              +
              + + + + + + + + + + + +
              Item IDProduct IDList PriceUnit CostAttributeStatus
              +
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/layout/datagrid_data1.json b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/datagrid_data1.json new file mode 100644 index 0000000..63d6473 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/datagrid_data1.json @@ -0,0 +1,12 @@ +{"total":28,"rows":[ + {"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"}, + {"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"}, + {"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"}, + {"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"}, + {"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"}, + {"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"}, + {"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"}, + {"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"}, + {"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"}, + {"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"} +]} diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/layout/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/fluid.html new file mode 100644 index 0000000..8ddd50f --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/fluid.html @@ -0,0 +1,24 @@ + + + + + Fluid Layout - jQuery EasyUI Demo + + + + + + + +

              Fluid Layout

              +

              Percentage width of region panel in a layout.

              +
              +
              +
              +

              width: 30%

              +
              +
              +
              +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/layout/full.html b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/full.html new file mode 100644 index 0000000..13eb94a --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/full.html @@ -0,0 +1,19 @@ + + + + + Full Layout - jQuery EasyUI Demo + + + + + + + +
              north region
              +
              west content
              +
              east region
              +
              south region
              +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/layout/nestedlayout.html b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/nestedlayout.html new file mode 100644 index 0000000..b0e1b2c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/nestedlayout.html @@ -0,0 +1,31 @@ + + + + + Nested Layout - jQuery EasyUI Demo + + + + + + + +

              Nested Layout

              +

              The layout region panel contains another layout or other components.

              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/layout/nocollapsible.html b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/nocollapsible.html new file mode 100644 index 0000000..5854b2d --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/nocollapsible.html @@ -0,0 +1,34 @@ + + + + + No collapsible button in Layout - jQuery EasyUI Demo + + + + + + + +

              No collapsible button in Layout

              +

              The layout region panel has no collapsible button.

              +
              +
              +
              +
              +
              + +
              +
              +
              +
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/layout/propertygrid_data1.json b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/propertygrid_data1.json new file mode 100644 index 0000000..a458d83 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/propertygrid_data1.json @@ -0,0 +1,20 @@ +{"total":7,"rows":[ + {"name":"Name","value":"Bill Smith","group":"ID Settings","editor":"text"}, + {"name":"Address","value":"","group":"ID Settings","editor":"text"}, + {"name":"Age","value":"40","group":"ID Settings","editor":"numberbox"}, + {"name":"Birthday","value":"01/02/2012","group":"ID Settings","editor":"datebox"}, + {"name":"SSN","value":"123-456-7890","group":"ID Settings","editor":"text"}, + {"name":"Email","value":"bill@gmail.com","group":"Marketing Settings","editor":{ + "type":"validatebox", + "options":{ + "validType":"email" + } + }}, + {"name":"FrequentBuyer","value":"false","group":"Marketing Settings","editor":{ + "type":"checkbox", + "options":{ + "on":true, + "off":false + } + }} +]} \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/layout/tree_data1.json b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/tree_data1.json new file mode 100644 index 0000000..e0c6192 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/layout/tree_data1.json @@ -0,0 +1,49 @@ +[{ + "id":1, + "text":"My Documents", + "children":[{ + "id":11, + "text":"Photos", + "state":"closed", + "children":[{ + "id":111, + "text":"Friend" + },{ + "id":112, + "text":"Wife" + },{ + "id":113, + "text":"Company" + }] + },{ + "id":12, + "text":"Program Files", + "children":[{ + "id":121, + "text":"Intel" + },{ + "id":122, + "text":"Java", + "attributes":{ + "p1":"Custom Attribute1", + "p2":"Custom Attribute2" + } + },{ + "id":123, + "text":"Microsoft Office" + },{ + "id":124, + "text":"Games", + "checked":true + }] + },{ + "id":13, + "text":"index.html" + },{ + "id":14, + "text":"about.html" + },{ + "id":15, + "text":"welcome.html" + }] +}] diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/basic.html new file mode 100644 index 0000000..d46c47f --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/basic.html @@ -0,0 +1,33 @@ + + + + + Basic LinkButton - jQuery EasyUI Demo + + + + + + + +

              Basic LinkButton

              +

              Buttons can be created from <a> or <button> elements.

              +
              +

              Basic Buttons

              +
              + Add + Remove + Save + Cut + Text Button +
              +

              Fixed Width Buttons

              +
              + Search + Print + Reload + Help +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/fluid.html new file mode 100644 index 0000000..cb033e7 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/fluid.html @@ -0,0 +1,33 @@ + + + + + Fluid LinkButton - jQuery EasyUI Demo + + + + + + + +

              Fluid LinkButton

              +

              This example shows how to set the width of LinkButton to a percentage of its parent container.

              +
              +

              width: 15%

              +
              + Add + Remove + Save + Cut + Text Button +
              +

              width: 20%

              +
              + Search + Print + Reload + Help +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/group.html b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/group.html new file mode 100644 index 0000000..4c1293d --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/group.html @@ -0,0 +1,33 @@ + + + + + Button Group - jQuery EasyUI Demo + + + + + + + +

              Button Group

              +

              In a button group only one button can be selected.

              +
              + +
              + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/iconalign.html b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/iconalign.html new file mode 100644 index 0000000..21835f0 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/iconalign.html @@ -0,0 +1,32 @@ + + + + + Icon Align on LinkButton - jQuery EasyUI Demo + + + + + + + +

              Icon Align on LinkButton

              +

              Change the icon align to place icon on left, right, top or bottom of button.

              +
              +
              + Select Icon Align: + +
              +
              + Add + Remove + Save + Cut +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/plain.html b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/plain.html new file mode 100644 index 0000000..71c89cd --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/plain.html @@ -0,0 +1,28 @@ + + + + + Plain LinkButton - jQuery EasyUI Demo + + + + + + + +

              Plain LinkButton

              +

              The buttons with plain style have transparent background.

              +
              + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/size.html b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/size.html new file mode 100644 index 0000000..3e121bb --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/size.html @@ -0,0 +1,34 @@ + + + + + LinkButton Size - jQuery EasyUI Demo + + + + + + + +

              LinkButton Size

              +

              This sample shows how to display small buttons and large buttons.

              +
              +

              Small Buttons

              +
              + Add + Remove + Save + Cut + Text Button +
              +

              Large Buttons

              + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/style.html b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/style.html new file mode 100644 index 0000000..fe61dd9 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/style.html @@ -0,0 +1,31 @@ + + + + + Style LinkButton - jQuery EasyUI Demo + + + + + + + +

              Style LinkButton

              +

              This example shows how to style a linkbutton.

              +
              + + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/toggle.html b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/toggle.html new file mode 100644 index 0000000..352001a --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/linkbutton/toggle.html @@ -0,0 +1,25 @@ + + + + + Toggle Button - jQuery EasyUI Demo + + + + + + + +

              Toggle Button

              +

              Click the button below to switch its selected state.

              +
              +
              + Add + Remove + Save + Cut + Text Button +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/menu/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/menu/basic.html new file mode 100644 index 0000000..c1bf0d3 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/menu/basic.html @@ -0,0 +1,68 @@ + + + + + Basic Menu - jQuery EasyUI Demo + + + + + + + +

              Basic Menu

              +

              Right click on page to display menu.

              +
              + +
              +
              New
              +
              + Open +
              +
              Word
              +
              Excel
              +
              PowerPoint
              +
              + M1 +
              +
              sub1
              +
              sub2
              +
              + Sub +
              +
              sub21
              +
              sub22
              +
              sub23
              +
              +
              +
              sub3
              +
              +
              +
              + Window Demos +
              +
              Window
              +
              Dialog
              + +
              +
              +
              +
              +
              Save
              +
              Print
              + +
              Exit
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/menu/customitem.html b/src/main/webapp/jquery-easyui-1.4.4/demo/menu/customitem.html new file mode 100644 index 0000000..e420131 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/menu/customitem.html @@ -0,0 +1,55 @@ + + + + + Custom Menu Item - jQuery EasyUI Demo + + + + + + + +

              Custom Menu Item

              +

              Right click on page to display menu, move to the 'Open' item to display its custom sub content.

              +
              +
              +
              New
              +
              + Open + +
              +
              Save
              +
              Print
              + +
              Exit
              +
              + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/menu/events.html b/src/main/webapp/jquery-easyui-1.4.4/demo/menu/events.html new file mode 100644 index 0000000..c26b060 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/menu/events.html @@ -0,0 +1,40 @@ + + + + + Menu Events - jQuery EasyUI Demo + + + + + + + +

              Menu Events

              +

              Right click on page to display menu and click an item.

              +
              +
              +
              New
              +
              Save
              +
              Print
              + +
              Exit
              +
              +
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/menu/inline.html b/src/main/webapp/jquery-easyui-1.4.4/demo/menu/inline.html new file mode 100644 index 0000000..e23e3ae --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/menu/inline.html @@ -0,0 +1,59 @@ + + + + + Inline Menu - jQuery EasyUI Demo + + + + + + + +

              Inline Menu

              +

              The inline menu stays inside its parent container.

              +
              + +
              +
              +
              New
              +
              + Open +
              +
              Word
              +
              Excel
              +
              PowerPoint
              +
              + M1 +
              +
              sub1
              +
              sub2
              +
              + Sub +
              +
              sub21
              +
              sub22
              +
              sub23
              +
              +
              +
              sub3
              +
              +
              +
              + Window Demos +
              +
              Window
              +
              Dialog
              + +
              +
              +
              +
              +
              Save
              +
              Print
              + +
              Exit
              +
              +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/menu/nav.html b/src/main/webapp/jquery-easyui-1.4.4/demo/menu/nav.html new file mode 100644 index 0000000..1985af0 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/menu/nav.html @@ -0,0 +1,132 @@ + + + + + Keyboard Navigation in Menu - jQuery EasyUI Demo + + + + + + + +

              Keyboard Navigation in Menu

              +

              Press Alt+W to focus the menu. Once the menu get focus, you will be able to navigate menu using keyboard keys.

              +
              + +
              +
              +
              New
              +
              + Open +
              +
              Word
              +
              Excel
              +
              PowerPoint
              +
              + M1 +
              +
              sub1
              +
              sub2
              +
              + Sub +
              +
              sub21
              +
              sub22
              +
              sub23
              +
              +
              +
              sub3
              +
              +
              +
              + Window Demos +
              +
              Window
              +
              Dialog
              +
              EasyUI
              +
              +
              +
              +
              +
              Save
              +
              Print
              + +
              Exit
              +
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/menubutton/actions.html b/src/main/webapp/jquery-easyui-1.4.4/demo/menubutton/actions.html new file mode 100644 index 0000000..5d447fe --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/menubutton/actions.html @@ -0,0 +1,58 @@ + + + + + MenuButton Actions - jQuery EasyUI Demo + + + + + + + +

              MenuButton Actions

              +

              Click the buttons below to perform actions.

              + +
              + Home + Edit + Help + About +
              +
              +
              Undo
              +
              Redo
              + +
              Cut
              +
              Copy
              +
              Paste
              + +
              + Toolbar +
              +
              Address
              +
              Link
              +
              Navigation Toolbar
              +
              Bookmark Toolbar
              + +
              New Toolbar...
              +
              +
              +
              Delete
              +
              Select All
              +
              +
              +
              Help
              +
              Update
              +
              About
              +
              + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/menubutton/alignment.html b/src/main/webapp/jquery-easyui-1.4.4/demo/menubutton/alignment.html new file mode 100644 index 0000000..f34f89a --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/menubutton/alignment.html @@ -0,0 +1,69 @@ + + + + + Menu Alignment on MenuButton - jQuery EasyUI Demo + + + + + + + +

              Menu Alignment on MenuButton

              +

              This example shows how to change the alignment of the top level menu.

              +
              + Change Alignment: + +
              +
              + Home + Edit + Help + About + +
              +
              +
              Undo
              +
              Redo
              + +
              Cut
              +
              Copy
              +
              Paste
              + +
              + Toolbar +
              +
              Address
              +
              Link
              +
              Navigation Toolbar
              +
              Bookmark Toolbar
              + +
              New Toolbar...
              +
              +
              +
              Delete
              +
              Select All
              +
              +
              +
              Help
              +
              Update
              +
              About
              +
              +
              +
              History
              +
              Faq
              +
              Our Team
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/menubutton/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/menubutton/basic.html new file mode 100644 index 0000000..932309b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/menubutton/basic.html @@ -0,0 +1,54 @@ + + + + + Basic MenuButton - jQuery EasyUI Demo + + + + + + + +

              Basic MenuButton

              +

              Move mouse over the button to drop down menu.

              +
              +
              + Home + Edit + Help + About +
              +
              +
              Undo
              +
              Redo
              + +
              Cut
              +
              Copy
              +
              Paste
              + +
              + Toolbar +
              +
              Address
              +
              Link
              +
              Navigation Toolbar
              +
              Bookmark Toolbar
              + +
              New Toolbar...
              +
              +
              +
              Delete
              +
              Select All
              +
              +
              +
              Help
              +
              Update
              +
              About
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/menubutton/nav.html b/src/main/webapp/jquery-easyui-1.4.4/demo/menubutton/nav.html new file mode 100644 index 0000000..a2c7001 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/menubutton/nav.html @@ -0,0 +1,152 @@ + + + + + Keyboard Navigation in MenuButton - jQuery EasyUI Demo + + + + + + + +

              Keyboard Navigation in MenuButton

              +

              Press Alt+W to focus the menubutton. Once the menubutton get focus, you will be able to navigate menubutton using keyboard keys.

              +
              +
              + Home + Edit + Help + About +
              +
              +
              Undo
              +
              Redo
              + +
              Cut
              +
              Copy
              +
              Paste
              + +
              + Toolbar +
              +
              Address
              +
              Link
              +
              Navigation Toolbar
              +
              Bookmark Toolbar
              + +
              New Toolbar...
              +
              +
              +
              Delete
              +
              Select All
              +
              +
              +
              Help
              +
              Update
              +
              About
              +
              + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/messager/alert.html b/src/main/webapp/jquery-easyui-1.4.4/demo/messager/alert.html new file mode 100644 index 0000000..a69c166 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/messager/alert.html @@ -0,0 +1,40 @@ + + + + + Alert Messager - jQuery EasyUI Demo + + + + + + + +

              Alert Messager

              +

              Click on each button to display different alert message box.

              + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/messager/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/messager/basic.html new file mode 100644 index 0000000..65026ef --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/messager/basic.html @@ -0,0 +1,56 @@ + + + + + Basic Messager - jQuery EasyUI Demo + + + + + + + +

              Basic Messager

              +

              Click on each button to see a distinct message box.

              +
              + Show + Slide + Fade + Progress +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/messager/interactive.html b/src/main/webapp/jquery-easyui-1.4.4/demo/messager/interactive.html new file mode 100644 index 0000000..e712243 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/messager/interactive.html @@ -0,0 +1,36 @@ + + + + + Interactive Messager - jQuery EasyUI Demo + + + + + + + +

              Interactive Messager

              +

              Click on each button to display interactive message box.

              +
              + Confirm + Prompt +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/messager/position.html b/src/main/webapp/jquery-easyui-1.4.4/demo/messager/position.html new file mode 100644 index 0000000..6a6273e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/messager/position.html @@ -0,0 +1,140 @@ + + + + + Message Box Position - jQuery EasyUI Demo + + + + + + + +

              Message Box Position

              +

              Click the buttons below to display message box on different position.

              + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/numberbox/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/numberbox/basic.html new file mode 100644 index 0000000..57ec060 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/numberbox/basic.html @@ -0,0 +1,28 @@ + + + + + Basic NumberBox - jQuery EasyUI Demo + + + + + + + +

              Basic NumberBox

              +

              The NumberBox can only accept inputing numbers.

              +
              +
              +
              +
              List Price:
              + +
              +
              +
              Amount:
              + +
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/numberbox/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/numberbox/fluid.html new file mode 100644 index 0000000..da84534 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/numberbox/fluid.html @@ -0,0 +1,28 @@ + + + + + Fluid NumberBox - jQuery EasyUI Demo + + + + + + + +

              Fluid NumberBox

              +

              This example shows how to set the width of NumberBox to a percentage of its parent container.

              +
              +
              +
              +
              width: 100%
              + +
              +
              +
              width: 50%
              + +
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/numberbox/format.html b/src/main/webapp/jquery-easyui-1.4.4/demo/numberbox/format.html new file mode 100644 index 0000000..6dfe901 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/numberbox/format.html @@ -0,0 +1,40 @@ + + + + + Format NumberBox - jQuery EasyUI Demo + + + + + + + +

              Format NumberBox

              +

              Number formatting is the ability to control how a number is displayed.

              +
              + + + + + + + + + + + + + + + + + + + + + +
              Number in the United States
              Number in France
              Currency:USD
              Currency:EUR
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/numberbox/range.html b/src/main/webapp/jquery-easyui-1.4.4/demo/numberbox/range.html new file mode 100644 index 0000000..9dcd6d7 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/numberbox/range.html @@ -0,0 +1,31 @@ + + + + + Number Range - jQuery EasyUI Demo + + + + + + + +

              Number Range

              +

              The value is constrained to a specified range.

              +
              +
              +
              +
              Amount:
              + +
              +
              +
              Weight:
              + +
              +
              +
              Age:
              + +
              +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/numberspinner/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/numberspinner/basic.html new file mode 100644 index 0000000..38fc05b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/numberspinner/basic.html @@ -0,0 +1,25 @@ + + + + + Basic NumberSpinner - jQuery EasyUI Demo + + + + + + + +

              Basic NumberSpinner

              +

              Click spinner button to change value.

              +
              + +
              + Value: +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/numberspinner/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/numberspinner/fluid.html new file mode 100644 index 0000000..668822d --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/numberspinner/fluid.html @@ -0,0 +1,21 @@ + + + + + Fluid NumberSpinner - jQuery EasyUI Demo + + + + + + + +

              Fluid NumberSpinner

              +

              This example shows how to set the width of NumberSpinner to a percentage of its parent container.

              +
              +

              width: 50%

              + +

              width: 30%

              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/numberspinner/increment.html b/src/main/webapp/jquery-easyui-1.4.4/demo/numberspinner/increment.html new file mode 100644 index 0000000..7562573 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/numberspinner/increment.html @@ -0,0 +1,18 @@ + + + + + Increment Number - jQuery EasyUI Demo + + + + + + + +

              Increment Number

              +

              The sample shows how to set the increment step.

              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/numberspinner/range.html b/src/main/webapp/jquery-easyui-1.4.4/demo/numberspinner/range.html new file mode 100644 index 0000000..f31d81c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/numberspinner/range.html @@ -0,0 +1,18 @@ + + + + + Number Range - jQuery EasyUI Demo + + + + + + + +

              Number Range

              +

              The value is constrained to a range between 10 and 100.

              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/attaching.html b/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/attaching.html new file mode 100644 index 0000000..0e56bb3 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/attaching.html @@ -0,0 +1,32 @@ + + + + + Attaching Other Components - jQuery EasyUI Demo + + + + + + + +

              Attaching Other Components

              +

              Any other components can be attached to page bar.

              +
              +
              +
              +
              +
              + + + + + +
              + + + +
              +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/basic.html new file mode 100644 index 0000000..bcdba63 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/basic.html @@ -0,0 +1,20 @@ + + + + + Basic Pagination - jQuery EasyUI Demo + + + + + + + +

              Basic Pagination

              +

              The user can change page number and page size on page bar.

              +
              +
              +
              +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/custombuttons.html b/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/custombuttons.html new file mode 100644 index 0000000..113e921 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/custombuttons.html @@ -0,0 +1,38 @@ + + + + + Custom Pagination Buttons - jQuery EasyUI Demo + + + + + + + +

              Custom Pagination Buttons

              +

              The customized buttons can be appended to page bar.

              +
              +
              +
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/layout.html b/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/layout.html new file mode 100644 index 0000000..1288397 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/layout.html @@ -0,0 +1,62 @@ + + + + + Pagination Layout - jQuery EasyUI Demo + + + + + + + +

              Pagination Layout

              +

              The pagination layout supports various types of pages which you can choose.

              +
              +
              +
              +
              +
              + +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/links.html b/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/links.html new file mode 100644 index 0000000..3b7ee25 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/links.html @@ -0,0 +1,23 @@ + + + + + Pagination Links - jQuery EasyUI Demo + + + + + + + +

              Pagination Links

              +

              The example shows how to customize numbered pagination links.

              +
              +
              +
              +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/simple.html b/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/simple.html new file mode 100644 index 0000000..521f75f --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/pagination/simple.html @@ -0,0 +1,25 @@ + + + + + Simplify Pagination - jQuery EasyUI Demo + + + + + + + +

              Simplify Pagination

              +

              The sample shows how to simplify pagination.

              +
              +
              +
              +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/panel/_content.html b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/_content.html new file mode 100644 index 0000000..9967402 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/_content.html @@ -0,0 +1,18 @@ + + + + + AJAX Content + + +

              Here is the content loaded via AJAX.

              +
                +
              • easyui is a collection of user-interface plugin based on jQuery.
              • +
              • easyui provides essential functionality for building modern, interactive, javascript applications.
              • +
              • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
              • +
              • complete framework for HTML5 web page.
              • +
              • easyui save your time and scales while developing your products.
              • +
              • easyui is very easy but powerful.
              • +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/panel/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/basic.html new file mode 100644 index 0000000..ec0e535 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/basic.html @@ -0,0 +1,31 @@ + + + + + Basic Panel - jQuery EasyUI Demo + + + + + + + +

              Basic Panel

              +

              The panel is a container for other components or elements.

              +
              + Open + Close +
              +
              +

              jQuery EasyUI framework helps you build your web pages easily.

              +
                +
              • easyui is a collection of user-interface plugin based on jQuery.
              • +
              • easyui provides essential functionality for building modem, interactive, javascript applications.
              • +
              • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
              • +
              • complete framework for HTML5 web page.
              • +
              • easyui save your time and scales while developing your products.
              • +
              • easyui is very easy but powerful.
              • +
              +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/panel/customtools.html b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/customtools.html new file mode 100644 index 0000000..670001e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/customtools.html @@ -0,0 +1,35 @@ + + + + + Custom Panel Tools - jQuery EasyUI Demo + + + + + + + +

              Custom Panel Tools

              +

              Click the right top buttons to perform actions with panel.

              +
              +
              +

              jQuery EasyUI framework helps you build your web pages easily.

              +
                +
              • easyui is a collection of user-interface plugin based on jQuery.
              • +
              • easyui provides essential functionality for building modem, interactive, javascript applications.
              • +
              • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
              • +
              • complete framework for HTML5 web page.
              • +
              • easyui save your time and scales while developing your products.
              • +
              • easyui is very easy but powerful.
              • +
              +
              +
              + + + + +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/panel/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/fluid.html new file mode 100644 index 0000000..72510f2 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/fluid.html @@ -0,0 +1,21 @@ + + + + + Fluid Panel - jQuery EasyUI Demo + + + + + + + +

              Fluid Panel

              +

              This example shows how to set the width of Panel to a percentage of its parent container.

              +
              +
              +
              +

              The panel has a width of 100%.

              +

              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/panel/footer.html b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/footer.html new file mode 100644 index 0000000..31e6385 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/footer.html @@ -0,0 +1,22 @@ + + + + + Panel Footer - jQuery EasyUI Demo + + + + + + + +

              Panel Footer

              +

              The panel footer is displayed at the bottom of the panel and can consist of any other components.

              +
              +
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/panel/loadcontent.html b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/loadcontent.html new file mode 100644 index 0000000..6db638d --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/loadcontent.html @@ -0,0 +1,27 @@ + + + + + Load Panel Content - jQuery EasyUI Demo + + + + + + + +

              Load Panel Content

              +

              Click the refresh button on top right of panel to load content.

              +
              +
              +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/panel/nestedpanel.html b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/nestedpanel.html new file mode 100644 index 0000000..28f5170 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/nestedpanel.html @@ -0,0 +1,30 @@ + + + + + Nested Panel - jQuery EasyUI Demo + + + + + + + +

              Nested Panel

              +

              The panel can be placed inside containers and can contain other components.

              +
              +
              +
              +
              + Left Content +
              +
              + Right Content +
              +
              + Center Content +
              +
              +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/panel/paneltools.html b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/paneltools.html new file mode 100644 index 0000000..47efc11 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/panel/paneltools.html @@ -0,0 +1,37 @@ + + + + + Panel Tools - jQuery EasyUI Demo + + + + + + + +

              Panel Tools

              +

              Click the right top buttons to perform actions with panel.

              + +
              +
              +

              jQuery EasyUI framework helps you build your web pages easily.

              +
                +
              • easyui is a collection of user-interface plugin based on jQuery.
              • +
              • easyui provides essential functionality for building modem, interactive, javascript applications.
              • +
              • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
              • +
              • complete framework for HTML5 web page.
              • +
              • easyui save your time and scales while developing your products.
              • +
              • easyui is very easy but powerful.
              • +
              +
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/progressbar/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/progressbar/basic.html new file mode 100644 index 0000000..966d556 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/progressbar/basic.html @@ -0,0 +1,30 @@ + + + + + Basic ProgressBar - jQuery EasyUI Demo + + + + + + + +

              Basic ProgressBar

              +

              Click the button below to show progress information.

              +
              + Start +
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/progressbar/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/progressbar/fluid.html new file mode 100644 index 0000000..613e180 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/progressbar/fluid.html @@ -0,0 +1,21 @@ + + + + + Fluid ProgressBar - jQuery EasyUI Demo + + + + + + + +

              Fluid ProgressBar

              +

              This example shows how to set the width of ProgressBar to a percentage of its parent container.

              +
              +

              width: 50%

              +
              +

              width: 30%

              +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/propertygrid/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/propertygrid/basic.html new file mode 100644 index 0000000..8f7743c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/propertygrid/basic.html @@ -0,0 +1,61 @@ + + + + + Basic PropertyGrid - jQuery EasyUI Demo + + + + + + + +

              Basic PropertyGrid

              +

              Click on row to change each property value.

              + + +
              + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/propertygrid/customcolumns.html b/src/main/webapp/jquery-easyui-1.4.4/demo/propertygrid/customcolumns.html new file mode 100644 index 0000000..0a683ef --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/propertygrid/customcolumns.html @@ -0,0 +1,31 @@ + + + + + Customize Columns of PropertyGrid - jQuery EasyUI Demo + + + + + + + +

              Customize Columns of PropertyGrid

              +

              The columns of PropertyGrid can be changed.

              +
              + +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/propertygrid/groupformat.html b/src/main/webapp/jquery-easyui-1.4.4/demo/propertygrid/groupformat.html new file mode 100644 index 0000000..d4eb883 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/propertygrid/groupformat.html @@ -0,0 +1,30 @@ + + + + + Group Format - jQuery EasyUI Demo + + + + + + + +

              Group Format

              +

              The user can change the group information.

              +
              + +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/propertygrid/propertygrid_data1.json b/src/main/webapp/jquery-easyui-1.4.4/demo/propertygrid/propertygrid_data1.json new file mode 100644 index 0000000..a458d83 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/propertygrid/propertygrid_data1.json @@ -0,0 +1,20 @@ +{"total":7,"rows":[ + {"name":"Name","value":"Bill Smith","group":"ID Settings","editor":"text"}, + {"name":"Address","value":"","group":"ID Settings","editor":"text"}, + {"name":"Age","value":"40","group":"ID Settings","editor":"numberbox"}, + {"name":"Birthday","value":"01/02/2012","group":"ID Settings","editor":"datebox"}, + {"name":"SSN","value":"123-456-7890","group":"ID Settings","editor":"text"}, + {"name":"Email","value":"bill@gmail.com","group":"Marketing Settings","editor":{ + "type":"validatebox", + "options":{ + "validType":"email" + } + }}, + {"name":"FrequentBuyer","value":"false","group":"Marketing Settings","editor":{ + "type":"checkbox", + "options":{ + "on":true, + "off":false + } + }} +]} \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/resizable/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/resizable/basic.html new file mode 100644 index 0000000..7b9e747 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/resizable/basic.html @@ -0,0 +1,24 @@ + + + + + Basic Resizable - jQuery EasyUI Demo + + + + + + + +

              Basic Resizable

              +

              Click on the edge of box and move the edge to resize the box.

              +
              +
              +
              Resize Me
              +
              +
              +
              Title
              +
              Drag and Resize Me
              +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/searchbox/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/searchbox/basic.html new file mode 100644 index 0000000..a4f0151 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/searchbox/basic.html @@ -0,0 +1,23 @@ + + + + + Basic SearchBox - jQuery EasyUI Demo + + + + + + + +

              Basic SearchBox

              +

              Click search button or press enter key in input box to do searching.

              +
              + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/searchbox/category.html b/src/main/webapp/jquery-easyui-1.4.4/demo/searchbox/category.html new file mode 100644 index 0000000..dad4476 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/searchbox/category.html @@ -0,0 +1,28 @@ + + + + + Search Category - jQuery EasyUI Demo + + + + + + + +

              Search Category

              +

              Select a category and click search button or press enter key in input box to do searching.

              +
              + +
              +
              All News
              +
              Sports News
              +
              + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/searchbox/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/searchbox/fluid.html new file mode 100644 index 0000000..8539c5b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/searchbox/fluid.html @@ -0,0 +1,25 @@ + + + + + Fluid SearchBox - jQuery EasyUI Demo + + + + + + + +

              Fluid SearchBox

              +

              This example shows how to set the width of SearchBox to a percentage of its parent container.

              +
              +

              width: 50%

              + +

              width: 30%

              + +
              +
              All News
              +
              Sports News
              +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/slider/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/slider/basic.html new file mode 100644 index 0000000..a71f0e4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/slider/basic.html @@ -0,0 +1,18 @@ + + + + + Basic Slider - jQuery EasyUI Demo + + + + + + + +

              Basic Slider

              +

              Drag the slider to change value.

              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/slider/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/slider/fluid.html new file mode 100644 index 0000000..7459276 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/slider/fluid.html @@ -0,0 +1,21 @@ + + + + + Fluid Slider - jQuery EasyUI Demo + + + + + + + +

              Fluid Slider

              +

              This example shows how to set the width of Slider to a percentage of its parent container.

              +
              +

              width: 50%

              + +

              width: 30%

              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/slider/formattip.html b/src/main/webapp/jquery-easyui-1.4.4/demo/slider/formattip.html new file mode 100644 index 0000000..6b5c398 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/slider/formattip.html @@ -0,0 +1,28 @@ + + + + + Format Tip Information - jQuery EasyUI Demo + + + + + + + +

              Format Tip Information

              +

              This sample shows how to format tip information.

              +
              + +
              jQuery EasyUI
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/slider/nonlinear.html b/src/main/webapp/jquery-easyui-1.4.4/demo/slider/nonlinear.html new file mode 100644 index 0000000..b07c61b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/slider/nonlinear.html @@ -0,0 +1,58 @@ + + + + + Non Linear Slider - jQuery EasyUI Demo + + + + + + + +

              Non Linear Slider

              +

              This example shows how to create a slider with a non-linear scale.

              +
              +
              + +
              +
              +
              +
              + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/slider/range.html b/src/main/webapp/jquery-easyui-1.4.4/demo/slider/range.html new file mode 100644 index 0000000..c7e6cf5 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/slider/range.html @@ -0,0 +1,23 @@ + + + + + Range Slider - jQuery EasyUI Demo + + + + + + + +

              Range Slider

              +

              This sample shows how to define a range slider.

              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/slider/rule.html b/src/main/webapp/jquery-easyui-1.4.4/demo/slider/rule.html new file mode 100644 index 0000000..652b4e5 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/slider/rule.html @@ -0,0 +1,21 @@ + + + + + Slider Rule - jQuery EasyUI Demo + + + + + + + +

              Slider Rule

              +

              This sample shows how to define slider rule.

              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/slider/vertical.html b/src/main/webapp/jquery-easyui-1.4.4/demo/slider/vertical.html new file mode 100644 index 0000000..59d3b49 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/slider/vertical.html @@ -0,0 +1,25 @@ + + + + + Vertical Slider - jQuery EasyUI Demo + + + + + + + +

              Vertical Slider

              +

              This sample shows how to create a vertical slider.

              +
              +
              + +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/splitbutton/actions.html b/src/main/webapp/jquery-easyui-1.4.4/demo/splitbutton/actions.html new file mode 100644 index 0000000..3110484 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/splitbutton/actions.html @@ -0,0 +1,64 @@ + + + + + SplitButton Actions - jQuery EasyUI Demo + + + + + + + +

              SplitButton Actions

              +

              Click the buttons below to perform actions.

              + +
              + Home + Edit + Ok + Help +
              +
              +
              Undo
              +
              Redo
              + +
              Cut
              +
              Copy
              +
              Paste
              + +
              + Toolbar +
              +
              Address
              +
              Link
              +
              Navigation Toolbar
              +
              Bookmark Toolbar
              + +
              New Toolbar...
              +
              +
              +
              Delete
              +
              Select All
              +
              +
              +
              Ok
              +
              Cancel
              +
              +
              +
              Help
              +
              Update
              +
              + About + +
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/splitbutton/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/splitbutton/basic.html new file mode 100644 index 0000000..795d526 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/splitbutton/basic.html @@ -0,0 +1,61 @@ + + + + + Basic SplitButton - jQuery EasyUI Demo + + + + + + + +

              Basic SplitButton

              +

              Move mouse over the arrow area of button to drop down menu.

              +
              +
              + Home + Edit + Ok + Help +
              +
              +
              Undo
              +
              Redo
              + +
              Cut
              +
              Copy
              +
              Paste
              + +
              + Toolbar +
              +
              Address
              +
              Link
              +
              Navigation Toolbar
              +
              Bookmark Toolbar
              + +
              New Toolbar...
              +
              +
              +
              Delete
              +
              Select All
              +
              +
              +
              Ok
              +
              Cancel
              +
              +
              +
              Help
              +
              Update
              +
              + About + +
              +
              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/switchbutton/action.html b/src/main/webapp/jquery-easyui-1.4.4/demo/switchbutton/action.html new file mode 100644 index 0000000..0a6e197 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/switchbutton/action.html @@ -0,0 +1,24 @@ + + + + + SwitchButton Actions - jQuery EasyUI Demo + + + + + + + +

              SwitchButton Actions

              +

              Click the buttons below to perform actions.

              +
              + +
              + Disable + Enable +
              + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/switchbutton/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/switchbutton/basic.html new file mode 100644 index 0000000..56a09b5 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/switchbutton/basic.html @@ -0,0 +1,32 @@ + + + + + Basic SwitchButton - jQuery EasyUI Demo + + + + + + + +

              Basic SwitchButton

              +

              Click the switchbutton to change its state.

              +
              + + + + + + + + + + + + + + +
              Receive mail:
              Shared network:
              Subscribed:
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/_content.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/_content.html new file mode 100644 index 0000000..9967402 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/_content.html @@ -0,0 +1,18 @@ + + + + + AJAX Content + + +

              Here is the content loaded via AJAX.

              +
                +
              • easyui is a collection of user-interface plugin based on jQuery.
              • +
              • easyui provides essential functionality for building modern, interactive, javascript applications.
              • +
              • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
              • +
              • complete framework for HTML5 web page.
              • +
              • easyui save your time and scales while developing your products.
              • +
              • easyui is very easy but powerful.
              • +
              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/autoheight.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/autoheight.html new file mode 100644 index 0000000..8fd287a --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/autoheight.html @@ -0,0 +1,36 @@ + + + + + Auto Height for Tabs - jQuery EasyUI Demo + + + + + + + +

              Auto Height for Tabs

              +

              The tabs height is auto adjusted according to tab panel content.

              +
              +
              +
              +

              jQuery EasyUI framework helps you build your web pages easily.

              +
                +
              • easyui is a collection of user-interface plugin based on jQuery.
              • +
              • easyui provides essential functionality for building modem, interactive, javascript applications.
              • +
              • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
              • +
              • complete framework for HTML5 web page.
              • +
              • easyui save your time and scales while developing your products.
              • +
              • easyui is very easy but powerful.
              • +
              +
              +
              +
                +
                +
                + This is the help content. +
                +
                + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/basic.html new file mode 100644 index 0000000..c5a7ce6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/basic.html @@ -0,0 +1,36 @@ + + + + + Basic Tabs - jQuery EasyUI Demo + + + + + + + +

                Basic Tabs

                +

                Click tab strip to swap tab panel content.

                +
                +
                +
                +

                jQuery EasyUI framework helps you build your web pages easily.

                +
                  +
                • easyui is a collection of user-interface plugin based on jQuery.
                • +
                • easyui provides essential functionality for building modem, interactive, javascript applications.
                • +
                • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
                • +
                • complete framework for HTML5 web page.
                • +
                • easyui save your time and scales while developing your products.
                • +
                • easyui is very easy but powerful.
                • +
                +
                +
                +
                  +
                  +
                  + This is the help content. +
                  +
                  + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/dropdown.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/dropdown.html new file mode 100644 index 0000000..e13426c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/dropdown.html @@ -0,0 +1,55 @@ + + + + + Tabs with DropDown - jQuery EasyUI Demo + + + + + + + +

                  Tabs with DropDown

                  +

                  This sample shows how to add a dropdown menu over a tab strip.

                  +
                  +
                  +
                  +

                  jQuery EasyUI framework helps you build your web pages easily.

                  +
                    +
                  • easyui is a collection of user-interface plugin based on jQuery.
                  • +
                  • easyui provides essential functionality for building modem, interactive, javascript applications.
                  • +
                  • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
                  • +
                  • complete framework for HTML5 web page.
                  • +
                  • easyui save your time and scales while developing your products.
                  • +
                  • easyui is very easy but powerful.
                  • +
                  +
                  +
                  +
                    +
                    +
                    + This is the help content. +
                    +
                    +
                    +
                    Welcome
                    +
                    Help Contents
                    +
                    Search
                    +
                    Dynamic Help
                    +
                    + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/fixedwidth.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/fixedwidth.html new file mode 100644 index 0000000..1803066 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/fixedwidth.html @@ -0,0 +1,37 @@ + + + + + Fixed Tab Width - jQuery EasyUI Demo + + + + + + + +

                    Fixed Tab Width

                    +

                    The tab strips have fixed width and height.

                    +
                    +
                    +
                    +

                    Home Content.

                    +
                    +
                    +

                    Maps Content.

                    +
                    +
                    +

                    Journal Content.

                    +
                    +
                    +

                    History Content.

                    +
                    +
                    +

                    References Content.

                    +
                    +
                    +

                    Contact Content.

                    +
                    +
                    + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/fluid.html new file mode 100644 index 0000000..42cf7fc --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/fluid.html @@ -0,0 +1,24 @@ + + + + + Fluid Tabs - jQuery EasyUI Demo + + + + + + + +

                    Fluid Tabs

                    +

                    This example shows how to set the width of Tabs to a percentage of its parent container.

                    +
                    +
                    +
                    +

                    The tabs has a width of 100%.

                    +
                    +
                    +
                    +
                    + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/hover.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/hover.html new file mode 100644 index 0000000..04419c8 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/hover.html @@ -0,0 +1,46 @@ + + + + + Hover Tabs - jQuery EasyUI Demo + + + + + + + +

                    Hover Tabs

                    +

                    Move mouse over the tab strip to open the tab panel.

                    +
                    +
                    +
                    +

                    jQuery EasyUI framework helps you build your web pages easily.

                    +
                      +
                    • easyui is a collection of user-interface plugin based on jQuery.
                    • +
                    • easyui provides essential functionality for building modem, interactive, javascript applications.
                    • +
                    • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
                    • +
                    • complete framework for HTML5 web page.
                    • +
                    • easyui save your time and scales while developing your products.
                    • +
                    • easyui is very easy but powerful.
                    • +
                    +
                    +
                    +
                      +
                      +
                      + This is the help content. +
                      +
                      + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/images/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/images/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/images/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/images/modem.png b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/images/modem.png new file mode 100644 index 0000000..be5a2eb Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/images/modem.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/images/pda.png b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/images/pda.png new file mode 100644 index 0000000..1458d9b Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/images/pda.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/images/scanner.png b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/images/scanner.png new file mode 100644 index 0000000..974635d Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/images/scanner.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/images/tablet.png b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/images/tablet.png new file mode 100644 index 0000000..fa871f5 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/images/tablet.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/nestedtabs.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/nestedtabs.html new file mode 100644 index 0000000..6f78600 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/nestedtabs.html @@ -0,0 +1,54 @@ + + + + + Nested Tabs - jQuery EasyUI Demo + + + + + + + +

                      Nested Tabs

                      +

                      The tab panel can contain sub tabs or other components.

                      +
                      +
                      +
                      +
                      +
                      Content 1
                      +
                      Content 2
                      +
                      Content 3
                      +
                      +
                      +
                      +
                      + +
                      +
                      + + + + + + + + + + + + + + + + + + + + +
                      Title1Title2Title3
                      d11d12d13
                      d21d22d23
                      +
                      +
                      + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/striptools.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/striptools.html new file mode 100644 index 0000000..13ca5b4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/striptools.html @@ -0,0 +1,39 @@ + + + + + Tabs Strip Tools - jQuery EasyUI Demo + + + + + + + +

                      Tabs Strip Tools

                      +

                      Click the mini-buttons on the tab strip to perform actions.

                      +
                      +
                      +
                      +

                      jQuery EasyUI framework helps you build your web pages easily.

                      +
                        +
                      • easyui is a collection of user-interface plugin based on jQuery.
                      • +
                      • easyui provides essential functionality for building modem, interactive, javascript applications.
                      • +
                      • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
                      • +
                      • complete framework for HTML5 web page.
                      • +
                      • easyui save your time and scales while developing your products.
                      • +
                      • easyui is very easy but powerful.
                      • +
                      +
                      +
                      + This is the help content. +
                      +
                      +
                      + + + +
                      + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/style.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/style.html new file mode 100644 index 0000000..adcb507 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/style.html @@ -0,0 +1,51 @@ + + + + + Tabs Style - jQuery EasyUI Demo + + + + + + + +

                      Tabs Style

                      +

                      Click the options below to change the tabs style.

                      +
                      + plain
                      + narrow
                      + pill
                      + justified +
                      +
                      +
                      +

                      jQuery EasyUI framework helps you build your web pages easily.

                      +
                        +
                      • easyui is a collection of user-interface plugin based on jQuery.
                      • +
                      • easyui provides essential functionality for building modem, interactive, javascript applications.
                      • +
                      • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
                      • +
                      • complete framework for HTML5 web page.
                      • +
                      • easyui save your time and scales while developing your products.
                      • +
                      • easyui is very easy but powerful.
                      • +
                      +
                      +
                      +
                        +
                        +
                        + This is the help content. +
                        +
                        + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/tabimage.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/tabimage.html new file mode 100644 index 0000000..415cbef --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/tabimage.html @@ -0,0 +1,41 @@ + + + + + Tabs with Images - jQuery EasyUI Demo + + + + + + + +

                        Tabs with Images

                        +

                        The tab strip can display big images.

                        +
                        +
                        +
                        +

                        A modem (modulator-demodulator) is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information.

                        +
                        +
                        +

                        In computing, an image scanner—often abbreviated to just scanner—is a device that optically scans images, printed text, handwriting, or an object, and converts it to a digital image.

                        +
                        +
                        +

                        A personal digital assistant (PDA), also known as a palmtop computer, or personal data assistant, is a mobile device that functions as a personal information manager. PDAs are largely considered obsolete with the widespread adoption of smartphones.

                        +
                        +
                        +

                        A tablet computer, or simply tablet, is a one-piece mobile computer. Devices typically have a touchscreen, with finger or stylus gestures replacing the conventional computer mouse.

                        +
                        +
                        + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/tabposition.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/tabposition.html new file mode 100644 index 0000000..4354736 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/tabposition.html @@ -0,0 +1,45 @@ + + + + + Tab Position - jQuery EasyUI Demo + + + + + + + +

                        Tab Position

                        +

                        Click the 'position' drop-down list and select an item to change the tab position.

                        +
                        + Position: + +
                        +
                        +
                        +

                        jQuery EasyUI framework helps you build your web pages easily.

                        +
                          +
                        • easyui is a collection of user-interface plugin based on jQuery.
                        • +
                        • easyui provides essential functionality for building modem, interactive, javascript applications.
                        • +
                        • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
                        • +
                        • complete framework for HTML5 web page.
                        • +
                        • easyui save your time and scales while developing your products.
                        • +
                        • easyui is very easy but powerful.
                        • +
                        +
                        +
                        +
                          +
                          +
                          + This is the help content. +
                          +
                          + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/tabstools.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/tabstools.html new file mode 100644 index 0000000..9c8fa10 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/tabstools.html @@ -0,0 +1,41 @@ + + + + + Tabs Tools - jQuery EasyUI Demo + + + + + + + +

                          Tabs Tools

                          +

                          Click the buttons on the top right of tabs header to add or remove tab panel.

                          +
                          +
                          +
                          +
                          + + +
                          + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/tree_data1.json b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/tree_data1.json new file mode 100644 index 0000000..e0c6192 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tabs/tree_data1.json @@ -0,0 +1,49 @@ +[{ + "id":1, + "text":"My Documents", + "children":[{ + "id":11, + "text":"Photos", + "state":"closed", + "children":[{ + "id":111, + "text":"Friend" + },{ + "id":112, + "text":"Wife" + },{ + "id":113, + "text":"Company" + }] + },{ + "id":12, + "text":"Program Files", + "children":[{ + "id":121, + "text":"Intel" + },{ + "id":122, + "text":"Java", + "attributes":{ + "p1":"Custom Attribute1", + "p2":"Custom Attribute2" + } + },{ + "id":123, + "text":"Microsoft Office" + },{ + "id":124, + "text":"Games", + "checked":true + }] + },{ + "id":13, + "text":"index.html" + },{ + "id":14, + "text":"about.html" + },{ + "id":15, + "text":"welcome.html" + }] +}] diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/basic.html new file mode 100644 index 0000000..dc631be --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/basic.html @@ -0,0 +1,39 @@ + + + + + Basic TextBox - jQuery EasyUI Demo + + + + + + + +

                          Basic TextBox

                          +

                          The textbox allows a user to enter information.

                          +
                          +
                          +
                          +
                          Email:
                          + +
                          +
                          +
                          First Name:
                          + +
                          +
                          +
                          Last Name:
                          + +
                          +
                          +
                          Company:
                          + +
                          + +
                          + Register +
                          +
                          + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/button.html b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/button.html new file mode 100644 index 0000000..cd22425 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/button.html @@ -0,0 +1,23 @@ + + + + + TextBox with Button - jQuery EasyUI Demo + + + + + + + +

                          TextBox with Button

                          +

                          The button can be attached to a textbox.

                          +
                          +
                          + +
                          +
                          + +
                          + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/clearicon.html b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/clearicon.html new file mode 100644 index 0000000..10d6794 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/clearicon.html @@ -0,0 +1,61 @@ + + + + + TextBox with Clear Icon - jQuery EasyUI Demo + + + + + + + +

                          TextBox with Clear Icon

                          +

                          This example shows how to create an textbox with an icon to clear the input element itself.

                          +
                          + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/custom.html b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/custom.html new file mode 100644 index 0000000..5b15fd7 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/custom.html @@ -0,0 +1,34 @@ + + + + + Custom TextBox - jQuery EasyUI Demo + + + + + + + +

                          Custom TextBox

                          +

                          This example shows how to custom a login form.

                          +
                          +
                          +
                          + +
                          +
                          + +
                          +
                          + + Remember me +
                          + +
                          + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/fluid.html new file mode 100644 index 0000000..69d3aee --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/fluid.html @@ -0,0 +1,21 @@ + + + + + Fluid TextBox - jQuery EasyUI Demo + + + + + + + +

                          Fluid TextBox

                          +

                          This example shows how to set the width of TextBox to a percentage of its parent container.

                          +
                          +

                          width: 50%

                          + +

                          width: 30%

                          + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/icons.html b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/icons.html new file mode 100644 index 0000000..a594410 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/icons.html @@ -0,0 +1,45 @@ + + + + + TextBox with Icons - jQuery EasyUI Demo + + + + + + + +

                          TextBox with Icons

                          +

                          Click the icons on textbox to perform actions.

                          +
                          +
                          + Select Icon Align: + +
                          + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/multiline.html b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/multiline.html new file mode 100644 index 0000000..064ffd7 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/multiline.html @@ -0,0 +1,18 @@ + + + + + Multiline TextBox - jQuery EasyUI Demo + + + + + + + +

                          Multiline TextBox

                          +

                          This example shows how to define a textbox for the user to enter multi-line text input.

                          +
                          + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/size.html b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/size.html new file mode 100644 index 0000000..57c9a09 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/textbox/size.html @@ -0,0 +1,29 @@ + + + + + TextBox Size - jQuery EasyUI Demo + + + + + + + +

                          TextBox Size

                          +

                          The textbox can vary in size.

                          +
                          +
                          + +
                          +
                          + +
                          +
                          + +
                          +
                          + +
                          + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/timespinner/actions.html b/src/main/webapp/jquery-easyui-1.4.4/demo/timespinner/actions.html new file mode 100644 index 0000000..b03229f --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/timespinner/actions.html @@ -0,0 +1,38 @@ + + + + + TimeSpinner Actions - jQuery EasyUI Demo + + + + + + + +

                          TimeSpinner Actions

                          +

                          Click the buttons below to perform actions.

                          + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/timespinner/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/timespinner/basic.html new file mode 100644 index 0000000..55c88b9 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/timespinner/basic.html @@ -0,0 +1,18 @@ + + + + + Basic TimeSpinner - jQuery EasyUI Demo + + + + + + + +

                          Basic TimeSpinner

                          +

                          Click spin button to adjust time.

                          +
                          + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/timespinner/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/timespinner/fluid.html new file mode 100644 index 0000000..1b3ce46 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/timespinner/fluid.html @@ -0,0 +1,21 @@ + + + + + Fluid TimeSpinner - jQuery EasyUI Demo + + + + + + + +

                          Fluid TimeSpinner

                          +

                          This example shows how to set the width of TimeSpinner to a percentage of its parent container.

                          +
                          +

                          width: 50%

                          + +

                          width: 30%

                          + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/timespinner/range.html b/src/main/webapp/jquery-easyui-1.4.4/demo/timespinner/range.html new file mode 100644 index 0000000..24ece66 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/timespinner/range.html @@ -0,0 +1,20 @@ + + + + + Time Range - jQuery EasyUI Demo + + + + + + + +

                          Time Range

                          +

                          The time value is constrained in specified range.

                          +
                          + From 08:30 to 18:00 +
                          + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/_content.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/_content.html new file mode 100644 index 0000000..9967402 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/_content.html @@ -0,0 +1,18 @@ + + + + + AJAX Content + + +

                          Here is the content loaded via AJAX.

                          +
                            +
                          • easyui is a collection of user-interface plugin based on jQuery.
                          • +
                          • easyui provides essential functionality for building modern, interactive, javascript applications.
                          • +
                          • using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.
                          • +
                          • complete framework for HTML5 web page.
                          • +
                          • easyui save your time and scales while developing your products.
                          • +
                          • easyui is very easy but powerful.
                          • +
                          + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/_dialog.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/_dialog.html new file mode 100644 index 0000000..ddcdc07 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/_dialog.html @@ -0,0 +1,23 @@ + + + + + Dialog Content + + +
                          +
                          +
                          User Name:
                          + +
                          +
                          +
                          Password:
                          + +
                          +
                          + Login + Cancel +
                          +
                          + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/ajax.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/ajax.html new file mode 100644 index 0000000..c0095fa --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/ajax.html @@ -0,0 +1,32 @@ + + + + + Ajax Tooltip - jQuery EasyUI Demo + + + + + + + +

                          Ajax Tooltip

                          +

                          The tooltip content can be loaded via AJAX.

                          +
                          + Hove me to display tooltip content via AJAX. + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/basic.html new file mode 100644 index 0000000..3fb1362 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/basic.html @@ -0,0 +1,20 @@ + + + + + Basic Tooltip - jQuery EasyUI Demo + + + + + + + +

                          Basic Tooltip

                          +

                          Hover the links to display tooltip message.

                          +
                          +

                          The tooltip can use each elements title attribute. + Hover me to display tooltip. +

                          + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/customcontent.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/customcontent.html new file mode 100644 index 0000000..68ce13c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/customcontent.html @@ -0,0 +1,32 @@ + + + + + Custom Tooltip Content - jQuery EasyUI Demo + + + + + + + +

                          Custom Tooltip Content

                          +

                          Access to each elements attribute to get the tooltip content.

                          +
                          +
                          +
                          +
                          + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/customstyle.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/customstyle.html new file mode 100644 index 0000000..13f10ac --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/customstyle.html @@ -0,0 +1,52 @@ + + + + + Custom Tooltip Style - jQuery EasyUI Demo + + + + + + + +

                          Custom Tooltip Style

                          +

                          This sample shows how to change the tooltip style.

                          +
                          +
                          +
                          Hover Me
                          +
                          +
                          +
                          Hover Me
                          +
                          + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/position.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/position.html new file mode 100644 index 0000000..8707b25 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/position.html @@ -0,0 +1,34 @@ + + + + + Tooltip Position - jQuery EasyUI Demo + + + + + + + +

                          Tooltip Position

                          +

                          Click the drop-down list below to change where the tooltip appears.

                          +
                          + Select position: + +
                          +
                          Hover Me
                          +
                          + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/toolbar.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/toolbar.html new file mode 100644 index 0000000..c376ea2 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/toolbar.html @@ -0,0 +1,40 @@ + + + + + Tooltip as Toolbar - jQuery EasyUI Demo + + + + + + + +

                          Tooltip as Toolbar

                          +

                          This sample shows how to create a tooltip style toolbar.

                          +
                          +
                          +

                          Hover me to display toolbar.

                          +
                          +
                          +
                          + + + + + +
                          +
                          + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/tooltipdialog.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/tooltipdialog.html new file mode 100644 index 0000000..a22bcac --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tooltip/tooltipdialog.html @@ -0,0 +1,44 @@ + + + + + Tooltip Dialog - jQuery EasyUI Demo + + + + + + + +

                          Tooltip Dialog

                          +

                          This sample shows how to create a tooltip dialog.

                          +
                          +
                          +

                          Click here to see the tooltip dialog. +

                          + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tree/actions.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/actions.html new file mode 100644 index 0000000..4b194e7 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/actions.html @@ -0,0 +1,47 @@ + + + + + Tree Actions - jQuery EasyUI Demo + + + + + + + +

                          Tree Actions

                          +

                          Click the buttons below to perform actions.

                          + +
                          +
                            +
                            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tree/animation.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/animation.html new file mode 100644 index 0000000..83fb263 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/animation.html @@ -0,0 +1,20 @@ + + + + + Animation Tree - jQuery EasyUI Demo + + + + + + + +

                            Animation Tree

                            +

                            Apply 'animate' property to true to enable animation effect.

                            +
                            +
                            +
                              +
                              + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tree/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/basic.html new file mode 100644 index 0000000..96f4396 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/basic.html @@ -0,0 +1,53 @@ + + + + + Basic Tree - jQuery EasyUI Demo + + + + + + + +

                              Basic Tree

                              +

                              Click the arrow on the left to expand or collapse nodes.

                              +
                              +
                              +
                                +
                              • + My Documents +
                                  +
                                • + Photos +
                                    +
                                  • + Friend +
                                  • +
                                  • + Wife +
                                  • +
                                  • + Company +
                                  • +
                                  +
                                • +
                                • + Program Files +
                                    +
                                  • Intel
                                  • +
                                  • Java
                                  • +
                                  • Microsoft Office
                                  • +
                                  • Games
                                  • +
                                  +
                                • +
                                • index.html
                                • +
                                • about.html
                                • +
                                • welcome.html
                                • +
                                +
                              • +
                              +
                              + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tree/checkbox.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/checkbox.html new file mode 100644 index 0000000..2d1f8d5 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/checkbox.html @@ -0,0 +1,37 @@ + + + + + CheckBox Tree - jQuery EasyUI Demo + + + + + + + +

                              CheckBox Tree

                              +

                              Tree nodes with check boxes.

                              + +
                              + CascadeCheck + OnlyLeafCheck +
                              +
                              +
                                +
                                + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tree/contextmenu.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/contextmenu.html new file mode 100644 index 0000000..342fcf3 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/contextmenu.html @@ -0,0 +1,65 @@ + + + + + Tree Context Menu - jQuery EasyUI Demo + + + + + + + +

                                Tree Context Menu

                                +

                                Right click on a node to display context menu.

                                +
                                +
                                +
                                  +
                                  +
                                  +
                                  Append
                                  +
                                  Remove
                                  + +
                                  Expand
                                  +
                                  Collapse
                                  +
                                  + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tree/dnd.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/dnd.html new file mode 100644 index 0000000..4be5bbd --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/dnd.html @@ -0,0 +1,20 @@ + + + + + Drag Drop Tree Nodes - jQuery EasyUI Demo + + + + + + + +

                                  Drag Drop Tree Nodes

                                  +

                                  Press mouse down and drag a node to another position.

                                  +
                                  +
                                  +
                                    +
                                    + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tree/editable.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/editable.html new file mode 100644 index 0000000..9d3b62c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/editable.html @@ -0,0 +1,27 @@ + + + + + Editable Tree - jQuery EasyUI Demo + + + + + + + +

                                    Editable Tree

                                    +

                                    Click the node to begin edit, press enter key to stop edit or esc key to cancel edit.

                                    +
                                    +
                                    +
                                      +
                                      + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tree/formatting.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/formatting.html new file mode 100644 index 0000000..187f588 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/formatting.html @@ -0,0 +1,32 @@ + + + + + Formatting Tree Nodes - jQuery EasyUI Demo + + + + + + + +

                                      Formatting Tree Nodes

                                      +

                                      This example shows how to display extra information on nodes.

                                      +
                                      +
                                      +
                                        +
                                      +
                                      + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tree/icons.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/icons.html new file mode 100644 index 0000000..c4cecb8 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/icons.html @@ -0,0 +1,20 @@ + + + + + Tree Node Icons - jQuery EasyUI Demo + + + + + + + +

                                      Tree Node Icons

                                      +

                                      This sample illustrates how to add icons to tree node.

                                      +
                                      +
                                      +
                                        +
                                        + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tree/lazyload.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/lazyload.html new file mode 100644 index 0000000..865cee6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/lazyload.html @@ -0,0 +1,82 @@ + + + + + Lazy Load Tree Nodes - jQuery EasyUI Demo + + + + + + + +

                                        Lazy Load Tree Nodes

                                        +

                                        Get full hierarchical tree data but lazy load nodes level by level.

                                        +
                                        +
                                        +
                                          +
                                          + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tree/lines.html b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/lines.html new file mode 100644 index 0000000..681a16b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/lines.html @@ -0,0 +1,20 @@ + + + + + Tree Lines - jQuery EasyUI Demo + + + + + + + +

                                          Tree Lines

                                          +

                                          This sample shows how to show tree lines.

                                          +
                                          +
                                          +
                                            +
                                            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tree/tree_data1.json b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/tree_data1.json new file mode 100644 index 0000000..e0c6192 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/tree_data1.json @@ -0,0 +1,49 @@ +[{ + "id":1, + "text":"My Documents", + "children":[{ + "id":11, + "text":"Photos", + "state":"closed", + "children":[{ + "id":111, + "text":"Friend" + },{ + "id":112, + "text":"Wife" + },{ + "id":113, + "text":"Company" + }] + },{ + "id":12, + "text":"Program Files", + "children":[{ + "id":121, + "text":"Intel" + },{ + "id":122, + "text":"Java", + "attributes":{ + "p1":"Custom Attribute1", + "p2":"Custom Attribute2" + } + },{ + "id":123, + "text":"Microsoft Office" + },{ + "id":124, + "text":"Games", + "checked":true + }] + },{ + "id":13, + "text":"index.html" + },{ + "id":14, + "text":"about.html" + },{ + "id":15, + "text":"welcome.html" + }] +}] diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/tree/tree_data2.json b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/tree_data2.json new file mode 100644 index 0000000..a6e2251 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/tree/tree_data2.json @@ -0,0 +1,61 @@ +[{ + "id":1, + "text":"My Documents", + "children":[{ + "id":11, + "text":"Photos", + "state":"closed", + "children":[{ + "id":111, + "text":"Friend" + },{ + "id":112, + "text":"Wife" + },{ + "id":113, + "text":"Company" + }] + },{ + "id":12, + "text":"Program Files", + "state":"closed", + "children":[{ + "id":121, + "text":"Intel" + },{ + "id":122, + "text":"Java" + },{ + "id":123, + "text":"Microsoft Office" + },{ + "id":124, + "text":"Games" + }] + },{ + "id":16, + "text":"Actions", + "children":[{ + "text":"Add", + "iconCls":"icon-add" + },{ + "text":"Remove", + "iconCls":"icon-remove" + },{ + "text":"Save", + "iconCls":"icon-save" + },{ + "text":"Search", + "iconCls":"icon-search" + }] + },{ + "id":13, + "text":"index.html" + },{ + "id":14, + "text":"about.html" + },{ + "id":15, + "text":"welcome.html" + }] +}] diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/actions.html b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/actions.html new file mode 100644 index 0000000..6249a9e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/actions.html @@ -0,0 +1,64 @@ + + + + + TreeGrid Actions - jQuery EasyUI Demo + + + + + + + +

                                            TreeGrid Actions

                                            +

                                            Click the buttons below to perform actions.

                                            + + + + + + + + + + + +
                                            Task NamePersonsBegin DateEnd DateProgress
                                            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/basic.html new file mode 100644 index 0000000..3b5076b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/basic.html @@ -0,0 +1,34 @@ + + + + + Basic TreeGrid - jQuery EasyUI Demo + + + + + + + +

                                            Basic TreeGrid

                                            +

                                            TreeGrid allows you to expand or collapse group rows.

                                            +
                                            + + + + + + + + +
                                            NameSizeModified Date
                                            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/clientpagination.html b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/clientpagination.html new file mode 100644 index 0000000..03f8bf3 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/clientpagination.html @@ -0,0 +1,189 @@ + + + + + Client Side Pagination in TreeGrid - jQuery EasyUI Demo + + + + + + + +

                                            Client Side Pagination in TreeGrid

                                            +

                                            This sample shows how to implement client side pagination in TreeGrid.

                                            +
                                            + + + + + + + + + + +
                                            Task NamePersonsBegin DateEnd DateProgress
                                            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/contextmenu.html b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/contextmenu.html new file mode 100644 index 0000000..3394ea1 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/contextmenu.html @@ -0,0 +1,106 @@ + + + + + TreeGrid ContextMenu - jQuery EasyUI Demo + + + + + + + +

                                            TreeGrid ContextMenu

                                            +

                                            Right click to display the context menu.

                                            +
                                            + + + + + + + + + + +
                                            Task NamePersonsBegin DateEnd DateProgress
                                            +
                                            +
                                            Append
                                            +
                                            Remove
                                            + +
                                            Collapse
                                            +
                                            Expand
                                            +
                                            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/editable.html b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/editable.html new file mode 100644 index 0000000..0b79d39 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/editable.html @@ -0,0 +1,93 @@ + + + + + Editable TreeGrid - jQuery EasyUI Demo + + + + + + + +

                                            Editable TreeGrid

                                            +

                                            Select one node and click edit button to perform editing.

                                            +
                                            + Edit + Save + Cancel +
                                            + + + + + + + + + + +
                                            Task NamePersonsBegin DateEnd DateProgress
                                            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/fluid.html new file mode 100644 index 0000000..1fd82f6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/fluid.html @@ -0,0 +1,33 @@ + + + + + Fluid TreeGrid - jQuery EasyUI Demo + + + + + + + +

                                            Fluid TreeGrid

                                            +

                                            This example shows how to assign percentage width to a column in TreeGrid.

                                            +
                                            + + + + + + + + +
                                            Name(50%)Size(20%)Modified Date(30%)
                                            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/footer.html b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/footer.html new file mode 100644 index 0000000..d03e756 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/footer.html @@ -0,0 +1,55 @@ + + + + + TreeGrid with Footer - jQuery EasyUI Demo + + + + + + + +

                                            TreeGrid with Footer

                                            +

                                            Show summary information on TreeGrid footer.

                                            +
                                            +
                                            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/lines.html b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/lines.html new file mode 100644 index 0000000..935f862 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/lines.html @@ -0,0 +1,35 @@ + + + + + TreeGrid Lines - jQuery EasyUI Demo + + + + + + + +

                                            TreeGrid Lines

                                            +

                                            This example shows how to show treegrid lines.

                                            +
                                            + + + + + + + + +
                                            NameSizeModified Date
                                            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/reports.html b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/reports.html new file mode 100644 index 0000000..062e6c8 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/reports.html @@ -0,0 +1,49 @@ + + + + + Reports using TreeGrid - jQuery EasyUI Demo + + + + + + + +

                                            Reports using TreeGrid

                                            +

                                            Using TreeGrid to show complex reports.

                                            +
                                            + + + + + + + + + + + + + + + + + + + + + + +
                                            Region
                                            20092010
                                            1st qrt.2st qrt.3st qrt.4st qrt.1st qrt.2st qrt.3st qrt.4st qrt.
                                            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/treegrid_data1.json b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/treegrid_data1.json new file mode 100644 index 0000000..6cc1097 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/treegrid_data1.json @@ -0,0 +1,73 @@ +[{ + "id":1, + "name":"C", + "size":"", + "date":"02/19/2010", + "children":[{ + "id":2, + "name":"Program Files", + "size":"120 MB", + "date":"03/20/2010", + "children":[{ + "id":21, + "name":"Java", + "size":"", + "date":"01/13/2010", + "state":"closed", + "children":[{ + "id":211, + "name":"java.exe", + "size":"142 KB", + "date":"01/13/2010" + },{ + "id":212, + "name":"jawt.dll", + "size":"5 KB", + "date":"01/13/2010" + }] + },{ + "id":22, + "name":"MySQL", + "size":"", + "date":"01/13/2010", + "state":"closed", + "children":[{ + "id":221, + "name":"my.ini", + "size":"10 KB", + "date":"02/26/2009" + },{ + "id":222, + "name":"my-huge.ini", + "size":"5 KB", + "date":"02/26/2009" + },{ + "id":223, + "name":"my-large.ini", + "size":"5 KB", + "date":"02/26/2009" + }] + }] + },{ + "id":3, + "name":"eclipse", + "size":"", + "date":"01/20/2010", + "children":[{ + "id":31, + "name":"eclipse.exe", + "size":"56 KB", + "date":"05/19/2009" + },{ + "id":32, + "name":"eclipse.ini", + "size":"1 KB", + "date":"04/20/2010" + },{ + "id":33, + "name":"notice.html", + "size":"7 KB", + "date":"03/17/2005" + }] + }] +}] \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/treegrid_data2.json b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/treegrid_data2.json new file mode 100644 index 0000000..52c2c05 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/treegrid_data2.json @@ -0,0 +1,11 @@ +{"total":7,"rows":[ + {"id":1,"name":"All Tasks","begin":"3/4/2010","end":"3/20/2010","progress":60,"iconCls":"icon-ok"}, + {"id":2,"name":"Designing","begin":"3/4/2010","end":"3/10/2010","progress":100,"_parentId":1,"state":"closed"}, + {"id":21,"name":"Database","persons":2,"begin":"3/4/2010","end":"3/6/2010","progress":100,"_parentId":2}, + {"id":22,"name":"UML","persons":1,"begin":"3/7/2010","end":"3/8/2010","progress":100,"_parentId":2}, + {"id":23,"name":"Export Document","persons":1,"begin":"3/9/2010","end":"3/10/2010","progress":100,"_parentId":2}, + {"id":3,"name":"Coding","persons":2,"begin":"3/11/2010","end":"3/18/2010","progress":80}, + {"id":4,"name":"Testing","persons":1,"begin":"3/19/2010","end":"3/20/2010","progress":20} +],"footer":[ + {"name":"Total Persons:","persons":7,"iconCls":"icon-sum"} +]} diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/treegrid_data3.json b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/treegrid_data3.json new file mode 100644 index 0000000..7015d31 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/treegrid/treegrid_data3.json @@ -0,0 +1,13 @@ +{"total":9,"rows":[ + {"id":1,"region":"Wyoming"}, + {"id":11,"region":"Albin","f1":2000,"f2":1800,"f3":1903,"f4":2183,"f5":2133,"f6":1923,"f7":2018,"f8":1838,"_parentId":1}, + {"id":12,"region":"Canon","f1":2000,"f2":1800,"f3":1903,"f4":2183,"f5":2133,"f6":1923,"f7":2018,"f8":1838,"_parentId":1}, + {"id":13,"region":"Egbert","f1":2000,"f2":1800,"f3":1903,"f4":2183,"f5":2133,"f6":1923,"f7":2018,"f8":1838,"_parentId":1}, + {"id":2,"region":"Washington"}, + {"id":21,"region":"Bellingham","f1":2000,"f2":1800,"f3":1903,"f4":2183,"f5":2133,"f6":1923,"f7":2018,"f8":1838,"_parentId":2}, + {"id":22,"region":"Chehalis","f1":2000,"f2":1800,"f3":1903,"f4":2183,"f5":2133,"f6":1923,"f7":2018,"f8":1838,"_parentId":2}, + {"id":23,"region":"Ellensburg","f1":2000,"f2":1800,"f3":1903,"f4":2183,"f5":2133,"f6":1923,"f7":2018,"f8":1838,"_parentId":2}, + {"id":24,"region":"Monroe","f1":2000,"f2":1800,"f3":1903,"f4":2183,"f5":2133,"f6":1923,"f7":2018,"f8":1838,"_parentId":2} +],"footer":[ + {"region":"Total","f1":14000,"f2":12600,"f3":13321,"f4":15281,"f5":14931,"f6":13461,"f7":14126,"f8":12866} +]} \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/validatebox/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/validatebox/basic.html new file mode 100644 index 0000000..5df5f5e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/validatebox/basic.html @@ -0,0 +1,50 @@ + + + + + Basic ValidateBox - jQuery EasyUI Demo + + + + + + + +

                                            Basic ValidateBox

                                            +

                                            It's easy to add validate logic to a input box.

                                            +
                                            +
                                            + + + + + + + + + + + + + + + + + + + + + +
                                            User Name:
                                            Email:
                                            Birthday:
                                            URL:
                                            Phone:
                                            +
                                            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/validatebox/customtooltip.html b/src/main/webapp/jquery-easyui-1.4.4/demo/validatebox/customtooltip.html new file mode 100644 index 0000000..e997f13 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/validatebox/customtooltip.html @@ -0,0 +1,95 @@ + + + + + Custom ValidateBox Tooltip - jQuery EasyUI Demo + + + + + + + +

                                            Custom ValidateBox Tooltip

                                            +

                                            This sample shows how to display another tooltip message on a valid textbox.

                                            +
                                            +
                                            + + + + + + + + + + + + + + + + + + + + + +
                                            User Name:
                                            Email:
                                            Birthday:
                                            URL:
                                            Phone:
                                            +
                                            + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/validatebox/validateonblur.html b/src/main/webapp/jquery-easyui-1.4.4/demo/validatebox/validateonblur.html new file mode 100644 index 0000000..dc02112 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/validatebox/validateonblur.html @@ -0,0 +1,57 @@ + + + + + Validate On Blur - jQuery EasyUI Demo + + + + + + + +

                                            Validate On Blur

                                            +

                                            Active validation on first blur event.

                                            +
                                            +
                                            + + + + + + + + + + + + + + + + + + + + + +
                                            User Name:
                                            Email:
                                            Birthday:
                                            URL:
                                            Phone:
                                            +
                                            + + + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/window/basic.html b/src/main/webapp/jquery-easyui-1.4.4/demo/window/basic.html new file mode 100644 index 0000000..fb40246 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/window/basic.html @@ -0,0 +1,23 @@ + + + + + Basic Window - jQuery EasyUI Demo + + + + + + + +

                                            Basic Window

                                            +

                                            Window can be dragged freely on screen.

                                            +
                                            + Open + Close +
                                            +
                                            + The window content. +
                                            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/window/customtools.html b/src/main/webapp/jquery-easyui-1.4.4/demo/window/customtools.html new file mode 100644 index 0000000..4a0e2c4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/window/customtools.html @@ -0,0 +1,30 @@ + + + + + Custom Window Tools - jQuery EasyUI Demo + + + + + + + +

                                            Custom Window Tools

                                            +

                                            Click the right top buttons to perform actions.

                                            +
                                            + Open + Close +
                                            +
                                            + The window content. +
                                            +
                                            + + + + +
                                            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/window/fluid.html b/src/main/webapp/jquery-easyui-1.4.4/demo/window/fluid.html new file mode 100644 index 0000000..13406fa --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/window/fluid.html @@ -0,0 +1,24 @@ + + + + + Fluid Window - jQuery EasyUI Demo + + + + + + + +

                                            Fluid Window

                                            +

                                            This example shows how to set the width of Window to a percentage of its parent container.

                                            +
                                            +
                                            +

                                            The window has a width of 80%.

                                            +
                                            + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/window/footer.html b/src/main/webapp/jquery-easyui-1.4.4/demo/window/footer.html new file mode 100644 index 0000000..60e8b9a --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/window/footer.html @@ -0,0 +1,24 @@ + + + + + Window with a Footer - jQuery EasyUI Demo + + + + + + + +

                                            Window with a Footer

                                            +

                                            This example shows how to attach a footer bar to the window.

                                            +
                                            + Open + Close +
                                            +
                                            + The window content. +
                                            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/window/inlinewindow.html b/src/main/webapp/jquery-easyui-1.4.4/demo/window/inlinewindow.html new file mode 100644 index 0000000..f272bb1 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/window/inlinewindow.html @@ -0,0 +1,26 @@ + + + + + Inline Window - jQuery EasyUI Demo + + + + + + + +

                                            Inline Window

                                            +

                                            The inline window stay inside its parent.

                                            +
                                            + Open + Close +
                                            +
                                            +
                                            + This window stay inside its parent +
                                            +
                                            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/window/modalwindow.html b/src/main/webapp/jquery-easyui-1.4.4/demo/window/modalwindow.html new file mode 100644 index 0000000..ee273ec --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/window/modalwindow.html @@ -0,0 +1,24 @@ + + + + + Modal Window - jQuery EasyUI Demo + + + + + + + +

                                            Modal Window

                                            +

                                            Click the open button below to open the modal window.

                                            +
                                            + Open + Close +
                                            +
                                            + The window content. +
                                            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/demo/window/windowlayout.html b/src/main/webapp/jquery-easyui-1.4.4/demo/window/windowlayout.html new file mode 100644 index 0000000..d799272 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/demo/window/windowlayout.html @@ -0,0 +1,33 @@ + + + + + Window Layout - jQuery EasyUI Demo + + + + + + + +

                                            Window Layout

                                            +

                                            Using layout on window.

                                            +
                                            + Open + Close +
                                            +
                                            +
                                            +
                                            +
                                            + jQuery EasyUI framework help you build your web page easily. +
                                            +
                                            + Ok + Cancel +
                                            +
                                            +
                                            + + + \ No newline at end of file diff --git a/src/main/webapp/jquery-easyui-1.4.4/easyloader.js b/src/main/webapp/jquery-easyui-1.4.4/easyloader.js new file mode 100644 index 0000000..9a61a5a --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/easyloader.js @@ -0,0 +1,190 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function(){ +var _1={draggable:{js:"jquery.draggable.js"},droppable:{js:"jquery.droppable.js"},resizable:{js:"jquery.resizable.js"},linkbutton:{js:"jquery.linkbutton.js",css:"linkbutton.css"},progressbar:{js:"jquery.progressbar.js",css:"progressbar.css"},tooltip:{js:"jquery.tooltip.js",css:"tooltip.css"},pagination:{js:"jquery.pagination.js",css:"pagination.css",dependencies:["linkbutton"]},datagrid:{js:"jquery.datagrid.js",css:"datagrid.css",dependencies:["panel","resizable","linkbutton","pagination"]},treegrid:{js:"jquery.treegrid.js",css:"tree.css",dependencies:["datagrid"]},propertygrid:{js:"jquery.propertygrid.js",css:"propertygrid.css",dependencies:["datagrid"]},datalist:{js:"jquery.datalist.js",css:"datalist.css",dependencies:["datagrid"]},panel:{js:"jquery.panel.js",css:"panel.css"},window:{js:"jquery.window.js",css:"window.css",dependencies:["resizable","draggable","panel"]},dialog:{js:"jquery.dialog.js",css:"dialog.css",dependencies:["linkbutton","window"]},messager:{js:"jquery.messager.js",css:"messager.css",dependencies:["linkbutton","dialog","progressbar"]},layout:{js:"jquery.layout.js",css:"layout.css",dependencies:["resizable","panel"]},form:{js:"jquery.form.js"},menu:{js:"jquery.menu.js",css:"menu.css"},tabs:{js:"jquery.tabs.js",css:"tabs.css",dependencies:["panel","linkbutton"]},menubutton:{js:"jquery.menubutton.js",css:"menubutton.css",dependencies:["linkbutton","menu"]},splitbutton:{js:"jquery.splitbutton.js",css:"splitbutton.css",dependencies:["menubutton"]},switchbutton:{js:"jquery.switchbutton.js",css:"switchbutton.css"},accordion:{js:"jquery.accordion.js",css:"accordion.css",dependencies:["panel"]},calendar:{js:"jquery.calendar.js",css:"calendar.css"},textbox:{js:"jquery.textbox.js",css:"textbox.css",dependencies:["validatebox","linkbutton"]},filebox:{js:"jquery.filebox.js",css:"filebox.css",dependencies:["textbox"]},combo:{js:"jquery.combo.js",css:"combo.css",dependencies:["panel","textbox"]},combobox:{js:"jquery.combobox.js",css:"combobox.css",dependencies:["combo"]},combotree:{js:"jquery.combotree.js",dependencies:["combo","tree"]},combogrid:{js:"jquery.combogrid.js",dependencies:["combo","datagrid"]},validatebox:{js:"jquery.validatebox.js",css:"validatebox.css",dependencies:["tooltip"]},numberbox:{js:"jquery.numberbox.js",dependencies:["textbox"]},searchbox:{js:"jquery.searchbox.js",css:"searchbox.css",dependencies:["menubutton","textbox"]},spinner:{js:"jquery.spinner.js",css:"spinner.css",dependencies:["textbox"]},numberspinner:{js:"jquery.numberspinner.js",dependencies:["spinner","numberbox"]},timespinner:{js:"jquery.timespinner.js",dependencies:["spinner"]},tree:{js:"jquery.tree.js",css:"tree.css",dependencies:["draggable","droppable"]},datebox:{js:"jquery.datebox.js",css:"datebox.css",dependencies:["calendar","combo"]},datetimebox:{js:"jquery.datetimebox.js",dependencies:["datebox","timespinner"]},slider:{js:"jquery.slider.js",dependencies:["draggable"]},parser:{js:"jquery.parser.js"},mobile:{js:"jquery.mobile.js"}}; +var _2={"af":"easyui-lang-af.js","ar":"easyui-lang-ar.js","bg":"easyui-lang-bg.js","ca":"easyui-lang-ca.js","cs":"easyui-lang-cs.js","cz":"easyui-lang-cz.js","da":"easyui-lang-da.js","de":"easyui-lang-de.js","el":"easyui-lang-el.js","en":"easyui-lang-en.js","es":"easyui-lang-es.js","fr":"easyui-lang-fr.js","it":"easyui-lang-it.js","jp":"easyui-lang-jp.js","nl":"easyui-lang-nl.js","pl":"easyui-lang-pl.js","pt_BR":"easyui-lang-pt_BR.js","ru":"easyui-lang-ru.js","sv_SE":"easyui-lang-sv_SE.js","tr":"easyui-lang-tr.js","zh_CN":"easyui-lang-zh_CN.js","zh_TW":"easyui-lang-zh_TW.js"}; +var _3={}; +function _4(_5,_6){ +var _7=false; +var _8=document.createElement("script"); +_8.type="text/javascript"; +_8.language="javascript"; +_8.src=_5; +_8.onload=_8.onreadystatechange=function(){ +if(!_7&&(!_8.readyState||_8.readyState=="loaded"||_8.readyState=="complete")){ +_7=true; +_8.onload=_8.onreadystatechange=null; +if(_6){ +_6.call(_8); +} +} +}; +document.getElementsByTagName("head")[0].appendChild(_8); +}; +function _9(_a,_b){ +_4(_a,function(){ +document.getElementsByTagName("head")[0].removeChild(this); +if(_b){ +_b(); +} +}); +}; +function _c(_d,_e){ +var _f=document.createElement("link"); +_f.rel="stylesheet"; +_f.type="text/css"; +_f.media="screen"; +_f.href=_d; +document.getElementsByTagName("head")[0].appendChild(_f); +if(_e){ +_e.call(_f); +} +}; +function _10(_11,_12){ +_3[_11]="loading"; +var _13=_1[_11]; +var _14="loading"; +var _15=(easyloader.css&&_13["css"])?"loading":"loaded"; +if(easyloader.css&&_13["css"]){ +if(/^http/i.test(_13["css"])){ +var url=_13["css"]; +}else{ +var url=easyloader.base+"themes/"+easyloader.theme+"/"+_13["css"]; +} +_c(url,function(){ +_15="loaded"; +if(_14=="loaded"&&_15=="loaded"){ +_16(); +} +}); +} +if(/^http/i.test(_13["js"])){ +var url=_13["js"]; +}else{ +var url=easyloader.base+"plugins/"+_13["js"]; +} +_4(url,function(){ +_14="loaded"; +if(_14=="loaded"&&_15=="loaded"){ +_16(); +} +}); +function _16(){ +_3[_11]="loaded"; +easyloader.onProgress(_11); +if(_12){ +_12(); +} +}; +}; +function _17(_18,_19){ +var mm=[]; +var _1a=false; +if(typeof _18=="string"){ +add(_18); +}else{ +for(var i=0;i<_18.length;i++){ +add(_18[i]); +} +} +function add(_1b){ +if(!_1[_1b]){ +return; +} +var d=_1[_1b]["dependencies"]; +if(d){ +for(var i=0;i=0){ +v=Math.floor((_8.width()-_9)*v/100); +}else{ +v=Math.floor((_8.height()-_9)*v/100); +} +}else{ +v=parseInt(v)||undefined; +} +return v; +},parseOptions:function(_b,_c){ +var t=$(_b); +var _d={}; +var s=$.trim(t.attr("data-options")); +if(s){ +if(s.substring(0,1)!="{"){ +s="{"+s+"}"; +} +_d=(new Function("return "+s))(); +} +$.map(["width","height","left","top","minWidth","maxWidth","minHeight","maxHeight"],function(p){ +var pv=$.trim(_b.style[p]||""); +if(pv){ +if(pv.indexOf("%")==-1){ +pv=parseInt(pv)||undefined; +} +_d[p]=pv; +} +}); +if(_c){ +var _e={}; +for(var i=0;i<_c.length;i++){ +var pp=_c[i]; +if(typeof pp=="string"){ +_e[pp]=t.attr(pp); +}else{ +for(var _f in pp){ +var _10=pp[_f]; +if(_10=="boolean"){ +_e[_f]=t.attr(_f)?(t.attr(_f)=="true"):undefined; +}else{ +if(_10=="number"){ +_e[_f]=t.attr(_f)=="0"?0:parseFloat(t.attr(_f))||undefined; +} +} +} +} +} +$.extend(_d,_e); +} +return _d; +}}; +$(function(){ +var d=$("
                                            ").appendTo("body"); +$._boxModel=d.outerWidth()!=100; +d.remove(); +d=$("
                                            ").appendTo("body"); +$._positionFixed=(d.css("position")=="fixed"); +d.remove(); +if(!window.easyloader&&$.parser.auto){ +$.parser.parse(); +} +}); +$.fn._outerWidth=function(_11){ +if(_11==undefined){ +if(this[0]==window){ +return this.width()||document.body.clientWidth; +} +return this.outerWidth()||0; +} +return this._size("width",_11); +}; +$.fn._outerHeight=function(_12){ +if(_12==undefined){ +if(this[0]==window){ +return this.height()||document.body.clientHeight; +} +return this.outerHeight()||0; +} +return this._size("height",_12); +}; +$.fn._scrollLeft=function(_13){ +if(_13==undefined){ +return this.scrollLeft(); +}else{ +return this.each(function(){ +$(this).scrollLeft(_13); +}); +} +}; +$.fn._propAttr=$.fn.prop||$.fn.attr; +$.fn._size=function(_14,_15){ +if(typeof _14=="string"){ +if(_14=="clear"){ +return this.each(function(){ +$(this).css({width:"",minWidth:"",maxWidth:"",height:"",minHeight:"",maxHeight:""}); +}); +}else{ +if(_14=="fit"){ +return this.each(function(){ +_16(this,this.tagName=="BODY"?$("body"):$(this).parent(),true); +}); +}else{ +if(_14=="unfit"){ +return this.each(function(){ +_16(this,$(this).parent(),false); +}); +}else{ +if(_15==undefined){ +return _17(this[0],_14); +}else{ +return this.each(function(){ +_17(this,_14,_15); +}); +} +} +} +} +}else{ +return this.each(function(){ +_15=_15||$(this).parent(); +$.extend(_14,_16(this,_15,_14.fit)||{}); +var r1=_18(this,"width",_15,_14); +var r2=_18(this,"height",_15,_14); +if(r1||r2){ +$(this).addClass("easyui-fluid"); +}else{ +$(this).removeClass("easyui-fluid"); +} +}); +} +function _16(_19,_1a,fit){ +if(!_1a.length){ +return false; +} +var t=$(_19)[0]; +var p=_1a[0]; +var _1b=p.fcount||0; +if(fit){ +if(!t.fitted){ +t.fitted=true; +p.fcount=_1b+1; +$(p).addClass("panel-noscroll"); +if(p.tagName=="BODY"){ +$("html").addClass("panel-fit"); +} +} +return {width:($(p).width()||1),height:($(p).height()||1)}; +}else{ +if(t.fitted){ +t.fitted=false; +p.fcount=_1b-1; +if(p.fcount==0){ +$(p).removeClass("panel-noscroll"); +if(p.tagName=="BODY"){ +$("html").removeClass("panel-fit"); +} +} +} +return false; +} +}; +function _18(_1c,_1d,_1e,_1f){ +var t=$(_1c); +var p=_1d; +var p1=p.substr(0,1).toUpperCase()+p.substr(1); +var min=$.parser.parseValue("min"+p1,_1f["min"+p1],_1e); +var max=$.parser.parseValue("max"+p1,_1f["max"+p1],_1e); +var val=$.parser.parseValue(p,_1f[p],_1e); +var _20=(String(_1f[p]||"").indexOf("%")>=0?true:false); +if(!isNaN(val)){ +var v=Math.min(Math.max(val,min||0),max||99999); +if(!_20){ +_1f[p]=v; +} +t._size("min"+p1,""); +t._size("max"+p1,""); +t._size(p,v); +}else{ +t._size(p,""); +t._size("min"+p1,min); +t._size("max"+p1,max); +} +return _20||_1f.fit; +}; +function _17(_21,_22,_23){ +var t=$(_21); +if(_23==undefined){ +_23=parseInt(_21.style[_22]); +if(isNaN(_23)){ +return undefined; +} +if($._boxModel){ +_23+=_24(); +} +return _23; +}else{ +if(_23===""){ +t.css(_22,""); +}else{ +if($._boxModel){ +_23-=_24(); +if(_23<0){ +_23=0; +} +} +t.css(_22,_23+"px"); +} +} +function _24(){ +if(_22.toLowerCase().indexOf("width")>=0){ +return t.outerWidth()-t.width(); +}else{ +return t.outerHeight()-t.height(); +} +}; +}; +}; +})(jQuery); +(function($){ +var _25=null; +var _26=null; +var _27=false; +function _28(e){ +if(e.touches.length!=1){ +return; +} +if(!_27){ +_27=true; +dblClickTimer=setTimeout(function(){ +_27=false; +},500); +}else{ +clearTimeout(dblClickTimer); +_27=false; +_29(e,"dblclick"); +} +_25=setTimeout(function(){ +_29(e,"contextmenu",3); +},1000); +_29(e,"mousedown"); +if($.fn.draggable.isDragging||$.fn.resizable.isResizing){ +e.preventDefault(); +} +}; +function _2a(e){ +if(e.touches.length!=1){ +return; +} +if(_25){ +clearTimeout(_25); +} +_29(e,"mousemove"); +if($.fn.draggable.isDragging||$.fn.resizable.isResizing){ +e.preventDefault(); +} +}; +function _2b(e){ +if(_25){ +clearTimeout(_25); +} +_29(e,"mouseup"); +if($.fn.draggable.isDragging||$.fn.resizable.isResizing){ +e.preventDefault(); +} +}; +function _29(e,_2c,_2d){ +var _2e=new $.Event(_2c); +_2e.pageX=e.changedTouches[0].pageX; +_2e.pageY=e.changedTouches[0].pageY; +_2e.which=_2d||1; +$(e.target).trigger(_2e); +}; +if(document.addEventListener){ +document.addEventListener("touchstart",_28,true); +document.addEventListener("touchmove",_2a,true); +document.addEventListener("touchend",_2b,true); +} +})(jQuery); +(function($){ +function _2f(e){ +var _30=$.data(e.data.target,"draggable"); +var _31=_30.options; +var _32=_30.proxy; +var _33=e.data; +var _34=_33.startLeft+e.pageX-_33.startX; +var top=_33.startTop+e.pageY-_33.startY; +if(_32){ +if(_32.parent()[0]==document.body){ +if(_31.deltaX!=null&&_31.deltaX!=undefined){ +_34=e.pageX+_31.deltaX; +}else{ +_34=e.pageX-e.data.offsetWidth; +} +if(_31.deltaY!=null&&_31.deltaY!=undefined){ +top=e.pageY+_31.deltaY; +}else{ +top=e.pageY-e.data.offsetHeight; +} +}else{ +if(_31.deltaX!=null&&_31.deltaX!=undefined){ +_34+=e.data.offsetWidth+_31.deltaX; +} +if(_31.deltaY!=null&&_31.deltaY!=undefined){ +top+=e.data.offsetHeight+_31.deltaY; +} +} +} +if(e.data.parent!=document.body){ +_34+=$(e.data.parent).scrollLeft(); +top+=$(e.data.parent).scrollTop(); +} +if(_31.axis=="h"){ +_33.left=_34; +}else{ +if(_31.axis=="v"){ +_33.top=top; +}else{ +_33.left=_34; +_33.top=top; +} +} +}; +function _35(e){ +var _36=$.data(e.data.target,"draggable"); +var _37=_36.options; +var _38=_36.proxy; +if(!_38){ +_38=$(e.data.target); +} +_38.css({left:e.data.left,top:e.data.top}); +$("body").css("cursor",_37.cursor); +}; +function _39(e){ +if(!$.fn.draggable.isDragging){ +return false; +} +var _3a=$.data(e.data.target,"draggable"); +var _3b=_3a.options; +var _3c=$(".droppable").filter(function(){ +return e.data.target!=this; +}).filter(function(){ +var _3d=$.data(this,"droppable").options.accept; +if(_3d){ +return $(_3d).filter(function(){ +return this==e.data.target; +}).length>0; +}else{ +return true; +} +}); +_3a.droppables=_3c; +var _3e=_3a.proxy; +if(!_3e){ +if(_3b.proxy){ +if(_3b.proxy=="clone"){ +_3e=$(e.data.target).clone().insertAfter(e.data.target); +}else{ +_3e=_3b.proxy.call(e.data.target,e.data.target); +} +_3a.proxy=_3e; +}else{ +_3e=$(e.data.target); +} +} +_3e.css("position","absolute"); +_2f(e); +_35(e); +_3b.onStartDrag.call(e.data.target,e); +return false; +}; +function _3f(e){ +if(!$.fn.draggable.isDragging){ +return false; +} +var _40=$.data(e.data.target,"draggable"); +_2f(e); +if(_40.options.onDrag.call(e.data.target,e)!=false){ +_35(e); +} +var _41=e.data.target; +_40.droppables.each(function(){ +var _42=$(this); +if(_42.droppable("options").disabled){ +return; +} +var p2=_42.offset(); +if(e.pageX>p2.left&&e.pageXp2.top&&e.pageYp2.left&&e.pageXp2.top&&e.pageY_58.options.edge; +}; +}); +}; +$.fn.draggable.methods={options:function(jq){ +return $.data(jq[0],"draggable").options; +},proxy:function(jq){ +return $.data(jq[0],"draggable").proxy; +},enable:function(jq){ +return jq.each(function(){ +$(this).draggable({disabled:false}); +}); +},disable:function(jq){ +return jq.each(function(){ +$(this).draggable({disabled:true}); +}); +}}; +$.fn.draggable.parseOptions=function(_5d){ +var t=$(_5d); +return $.extend({},$.parser.parseOptions(_5d,["cursor","handle","axis",{"revert":"boolean","deltaX":"number","deltaY":"number","edge":"number","delay":"number"}]),{disabled:(t.attr("disabled")?true:undefined)}); +}; +$.fn.draggable.defaults={proxy:null,revert:false,cursor:"move",deltaX:null,deltaY:null,handle:null,disabled:false,edge:0,axis:null,delay:100,onBeforeDrag:function(e){ +},onStartDrag:function(e){ +},onDrag:function(e){ +},onStopDrag:function(e){ +}}; +$.fn.draggable.isDragging=false; +})(jQuery); +(function($){ +function _5e(_5f){ +$(_5f).addClass("droppable"); +$(_5f).bind("_dragenter",function(e,_60){ +$.data(_5f,"droppable").options.onDragEnter.apply(_5f,[e,_60]); +}); +$(_5f).bind("_dragleave",function(e,_61){ +$.data(_5f,"droppable").options.onDragLeave.apply(_5f,[e,_61]); +}); +$(_5f).bind("_dragover",function(e,_62){ +$.data(_5f,"droppable").options.onDragOver.apply(_5f,[e,_62]); +}); +$(_5f).bind("_drop",function(e,_63){ +$.data(_5f,"droppable").options.onDrop.apply(_5f,[e,_63]); +}); +}; +$.fn.droppable=function(_64,_65){ +if(typeof _64=="string"){ +return $.fn.droppable.methods[_64](this,_65); +} +_64=_64||{}; +return this.each(function(){ +var _66=$.data(this,"droppable"); +if(_66){ +$.extend(_66.options,_64); +}else{ +_5e(this); +$.data(this,"droppable",{options:$.extend({},$.fn.droppable.defaults,$.fn.droppable.parseOptions(this),_64)}); +} +}); +}; +$.fn.droppable.methods={options:function(jq){ +return $.data(jq[0],"droppable").options; +},enable:function(jq){ +return jq.each(function(){ +$(this).droppable({disabled:false}); +}); +},disable:function(jq){ +return jq.each(function(){ +$(this).droppable({disabled:true}); +}); +}}; +$.fn.droppable.parseOptions=function(_67){ +var t=$(_67); +return $.extend({},$.parser.parseOptions(_67,["accept"]),{disabled:(t.attr("disabled")?true:undefined)}); +}; +$.fn.droppable.defaults={accept:null,disabled:false,onDragEnter:function(e,_68){ +},onDragOver:function(e,_69){ +},onDragLeave:function(e,_6a){ +},onDrop:function(e,_6b){ +}}; +})(jQuery); +(function($){ +$.fn.resizable=function(_6c,_6d){ +if(typeof _6c=="string"){ +return $.fn.resizable.methods[_6c](this,_6d); +} +function _6e(e){ +var _6f=e.data; +var _70=$.data(_6f.target,"resizable").options; +if(_6f.dir.indexOf("e")!=-1){ +var _71=_6f.startWidth+e.pageX-_6f.startX; +_71=Math.min(Math.max(_71,_70.minWidth),_70.maxWidth); +_6f.width=_71; +} +if(_6f.dir.indexOf("s")!=-1){ +var _72=_6f.startHeight+e.pageY-_6f.startY; +_72=Math.min(Math.max(_72,_70.minHeight),_70.maxHeight); +_6f.height=_72; +} +if(_6f.dir.indexOf("w")!=-1){ +var _71=_6f.startWidth-e.pageX+_6f.startX; +_71=Math.min(Math.max(_71,_70.minWidth),_70.maxWidth); +_6f.width=_71; +_6f.left=_6f.startLeft+_6f.startWidth-_6f.width; +} +if(_6f.dir.indexOf("n")!=-1){ +var _72=_6f.startHeight-e.pageY+_6f.startY; +_72=Math.min(Math.max(_72,_70.minHeight),_70.maxHeight); +_6f.height=_72; +_6f.top=_6f.startTop+_6f.startHeight-_6f.height; +} +}; +function _73(e){ +var _74=e.data; +var t=$(_74.target); +t.css({left:_74.left,top:_74.top}); +if(t.outerWidth()!=_74.width){ +t._outerWidth(_74.width); +} +if(t.outerHeight()!=_74.height){ +t._outerHeight(_74.height); +} +}; +function _75(e){ +$.fn.resizable.isResizing=true; +$.data(e.data.target,"resizable").options.onStartResize.call(e.data.target,e); +return false; +}; +function _76(e){ +_6e(e); +if($.data(e.data.target,"resizable").options.onResize.call(e.data.target,e)!=false){ +_73(e); +} +return false; +}; +function _77(e){ +$.fn.resizable.isResizing=false; +_6e(e,true); +_73(e); +$.data(e.data.target,"resizable").options.onStopResize.call(e.data.target,e); +$(document).unbind(".resizable"); +$("body").css("cursor",""); +return false; +}; +return this.each(function(){ +var _78=null; +var _79=$.data(this,"resizable"); +if(_79){ +$(this).unbind(".resizable"); +_78=$.extend(_79.options,_6c||{}); +}else{ +_78=$.extend({},$.fn.resizable.defaults,$.fn.resizable.parseOptions(this),_6c||{}); +$.data(this,"resizable",{options:_78}); +} +if(_78.disabled==true){ +return; +} +$(this).bind("mousemove.resizable",{target:this},function(e){ +if($.fn.resizable.isResizing){ +return; +} +var dir=_7a(e); +if(dir==""){ +$(e.data.target).css("cursor",""); +}else{ +$(e.data.target).css("cursor",dir+"-resize"); +} +}).bind("mouseleave.resizable",{target:this},function(e){ +$(e.data.target).css("cursor",""); +}).bind("mousedown.resizable",{target:this},function(e){ +var dir=_7a(e); +if(dir==""){ +return; +} +function _7b(css){ +var val=parseInt($(e.data.target).css(css)); +if(isNaN(val)){ +return 0; +}else{ +return val; +} +}; +var _7c={target:e.data.target,dir:dir,startLeft:_7b("left"),startTop:_7b("top"),left:_7b("left"),top:_7b("top"),startX:e.pageX,startY:e.pageY,startWidth:$(e.data.target).outerWidth(),startHeight:$(e.data.target).outerHeight(),width:$(e.data.target).outerWidth(),height:$(e.data.target).outerHeight(),deltaWidth:$(e.data.target).outerWidth()-$(e.data.target).width(),deltaHeight:$(e.data.target).outerHeight()-$(e.data.target).height()}; +$(document).bind("mousedown.resizable",_7c,_75); +$(document).bind("mousemove.resizable",_7c,_76); +$(document).bind("mouseup.resizable",_7c,_77); +$("body").css("cursor",dir+"-resize"); +}); +function _7a(e){ +var tt=$(e.data.target); +var dir=""; +var _7d=tt.offset(); +var _7e=tt.outerWidth(); +var _7f=tt.outerHeight(); +var _80=_78.edge; +if(e.pageY>_7d.top&&e.pageY<_7d.top+_80){ +dir+="n"; +}else{ +if(e.pageY<_7d.top+_7f&&e.pageY>_7d.top+_7f-_80){ +dir+="s"; +} +} +if(e.pageX>_7d.left&&e.pageX<_7d.left+_80){ +dir+="w"; +}else{ +if(e.pageX<_7d.left+_7e&&e.pageX>_7d.left+_7e-_80){ +dir+="e"; +} +} +var _81=_78.handles.split(","); +for(var i=0;i<_81.length;i++){ +var _82=_81[i].replace(/(^\s*)|(\s*$)/g,""); +if(_82=="all"||_82==dir){ +return dir; +} +} +return ""; +}; +}); +}; +$.fn.resizable.methods={options:function(jq){ +return $.data(jq[0],"resizable").options; +},enable:function(jq){ +return jq.each(function(){ +$(this).resizable({disabled:false}); +}); +},disable:function(jq){ +return jq.each(function(){ +$(this).resizable({disabled:true}); +}); +}}; +$.fn.resizable.parseOptions=function(_83){ +var t=$(_83); +return $.extend({},$.parser.parseOptions(_83,["handles",{minWidth:"number",minHeight:"number",maxWidth:"number",maxHeight:"number",edge:"number"}]),{disabled:(t.attr("disabled")?true:undefined)}); +}; +$.fn.resizable.defaults={disabled:false,handles:"n, e, s, w, ne, se, sw, nw, all",minWidth:10,minHeight:10,maxWidth:10000,maxHeight:10000,edge:5,onStartResize:function(e){ +},onResize:function(e){ +},onStopResize:function(e){ +}}; +$.fn.resizable.isResizing=false; +})(jQuery); +(function($){ +function _84(_85,_86){ +var _87=$.data(_85,"linkbutton").options; +if(_86){ +$.extend(_87,_86); +} +if(_87.width||_87.height||_87.fit){ +var btn=$(_85); +var _88=btn.parent(); +var _89=btn.is(":visible"); +if(!_89){ +var _8a=$("
                                            ").insertBefore(_85); +var _8b={position:btn.css("position"),display:btn.css("display"),left:btn.css("left")}; +btn.appendTo("body"); +btn.css({position:"absolute",display:"inline-block",left:-20000}); +} +btn._size(_87,_88); +var _8c=btn.find(".l-btn-left"); +_8c.css("margin-top",0); +_8c.css("margin-top",parseInt((btn.height()-_8c.height())/2)+"px"); +if(!_89){ +btn.insertAfter(_8a); +btn.css(_8b); +_8a.remove(); +} +} +}; +function _8d(_8e){ +var _8f=$.data(_8e,"linkbutton").options; +var t=$(_8e).empty(); +t.addClass("l-btn").removeClass("l-btn-plain l-btn-selected l-btn-plain-selected l-btn-outline"); +t.removeClass("l-btn-small l-btn-medium l-btn-large").addClass("l-btn-"+_8f.size); +if(_8f.plain){ +t.addClass("l-btn-plain"); +} +if(_8f.outline){ +t.addClass("l-btn-outline"); +} +if(_8f.selected){ +t.addClass(_8f.plain?"l-btn-selected l-btn-plain-selected":"l-btn-selected"); +} +t.attr("group",_8f.group||""); +t.attr("id",_8f.id||""); +var _90=$("").appendTo(t); +if(_8f.text){ +$("").html(_8f.text).appendTo(_90); +}else{ +$(" ").appendTo(_90); +} +if(_8f.iconCls){ +$(" ").addClass(_8f.iconCls).appendTo(_90); +_90.addClass("l-btn-icon-"+_8f.iconAlign); +} +t.unbind(".linkbutton").bind("focus.linkbutton",function(){ +if(!_8f.disabled){ +$(this).addClass("l-btn-focus"); +} +}).bind("blur.linkbutton",function(){ +$(this).removeClass("l-btn-focus"); +}).bind("click.linkbutton",function(){ +if(!_8f.disabled){ +if(_8f.toggle){ +if(_8f.selected){ +$(this).linkbutton("unselect"); +}else{ +$(this).linkbutton("select"); +} +} +_8f.onClick.call(this); +} +}); +_91(_8e,_8f.selected); +_92(_8e,_8f.disabled); +}; +function _91(_93,_94){ +var _95=$.data(_93,"linkbutton").options; +if(_94){ +if(_95.group){ +$("a.l-btn[group=\""+_95.group+"\"]").each(function(){ +var o=$(this).linkbutton("options"); +if(o.toggle){ +$(this).removeClass("l-btn-selected l-btn-plain-selected"); +o.selected=false; +} +}); +} +$(_93).addClass(_95.plain?"l-btn-selected l-btn-plain-selected":"l-btn-selected"); +_95.selected=true; +}else{ +if(!_95.group){ +$(_93).removeClass("l-btn-selected l-btn-plain-selected"); +_95.selected=false; +} +} +}; +function _92(_96,_97){ +var _98=$.data(_96,"linkbutton"); +var _99=_98.options; +$(_96).removeClass("l-btn-disabled l-btn-plain-disabled"); +if(_97){ +_99.disabled=true; +var _9a=$(_96).attr("href"); +if(_9a){ +_98.href=_9a; +$(_96).attr("href","javascript:void(0)"); +} +if(_96.onclick){ +_98.onclick=_96.onclick; +_96.onclick=null; +} +_99.plain?$(_96).addClass("l-btn-disabled l-btn-plain-disabled"):$(_96).addClass("l-btn-disabled"); +}else{ +_99.disabled=false; +if(_98.href){ +$(_96).attr("href",_98.href); +} +if(_98.onclick){ +_96.onclick=_98.onclick; +} +} +}; +$.fn.linkbutton=function(_9b,_9c){ +if(typeof _9b=="string"){ +return $.fn.linkbutton.methods[_9b](this,_9c); +} +_9b=_9b||{}; +return this.each(function(){ +var _9d=$.data(this,"linkbutton"); +if(_9d){ +$.extend(_9d.options,_9b); +}else{ +$.data(this,"linkbutton",{options:$.extend({},$.fn.linkbutton.defaults,$.fn.linkbutton.parseOptions(this),_9b)}); +$(this).removeAttr("disabled"); +$(this).bind("_resize",function(e,_9e){ +if($(this).hasClass("easyui-fluid")||_9e){ +_84(this); +} +return false; +}); +} +_8d(this); +_84(this); +}); +}; +$.fn.linkbutton.methods={options:function(jq){ +return $.data(jq[0],"linkbutton").options; +},resize:function(jq,_9f){ +return jq.each(function(){ +_84(this,_9f); +}); +},enable:function(jq){ +return jq.each(function(){ +_92(this,false); +}); +},disable:function(jq){ +return jq.each(function(){ +_92(this,true); +}); +},select:function(jq){ +return jq.each(function(){ +_91(this,true); +}); +},unselect:function(jq){ +return jq.each(function(){ +_91(this,false); +}); +}}; +$.fn.linkbutton.parseOptions=function(_a0){ +var t=$(_a0); +return $.extend({},$.parser.parseOptions(_a0,["id","iconCls","iconAlign","group","size","text",{plain:"boolean",toggle:"boolean",selected:"boolean",outline:"boolean"}]),{disabled:(t.attr("disabled")?true:undefined),text:($.trim(t.html())||undefined),iconCls:(t.attr("icon")||t.attr("iconCls"))}); +}; +$.fn.linkbutton.defaults={id:null,disabled:false,toggle:false,selected:false,outline:false,group:null,plain:false,text:"",iconCls:null,iconAlign:"left",size:"small",onClick:function(){ +}}; +})(jQuery); +(function($){ +function _a1(_a2){ +var _a3=$.data(_a2,"pagination"); +var _a4=_a3.options; +var bb=_a3.bb={}; +var _a5=$(_a2).addClass("pagination").html("
                                            "); +var tr=_a5.find("tr"); +var aa=$.extend([],_a4.layout); +if(!_a4.showPageList){ +_a6(aa,"list"); +} +if(!_a4.showRefresh){ +_a6(aa,"refresh"); +} +if(aa[0]=="sep"){ +aa.shift(); +} +if(aa[aa.length-1]=="sep"){ +aa.pop(); +} +for(var _a7=0;_a7"); +ps.bind("change",function(){ +_a4.pageSize=parseInt($(this).val()); +_a4.onChangePageSize.call(_a2,_a4.pageSize); +_ae(_a2,_a4.pageNumber); +}); +for(var i=0;i<_a4.pageList.length;i++){ +$("").text(_a4.pageList[i]).appendTo(ps); +} +$("").append(ps).appendTo(tr); +}else{ +if(_a8=="sep"){ +$("
                                            ").appendTo(tr); +}else{ +if(_a8=="first"){ +bb.first=_a9("first"); +}else{ +if(_a8=="prev"){ +bb.prev=_a9("prev"); +}else{ +if(_a8=="next"){ +bb.next=_a9("next"); +}else{ +if(_a8=="last"){ +bb.last=_a9("last"); +}else{ +if(_a8=="manual"){ +$("").html(_a4.beforePageText).appendTo(tr).wrap(""); +bb.num=$("").appendTo(tr).wrap(""); +bb.num.unbind(".pagination").bind("keydown.pagination",function(e){ +if(e.keyCode==13){ +var _aa=parseInt($(this).val())||1; +_ae(_a2,_aa); +return false; +} +}); +bb.after=$("").appendTo(tr).wrap(""); +}else{ +if(_a8=="refresh"){ +bb.refresh=_a9("refresh"); +}else{ +if(_a8=="links"){ +$("").appendTo(tr); +} +} +} +} +} +} +} +} +} +} +if(_a4.buttons){ +$("
                                            ").appendTo(tr); +if($.isArray(_a4.buttons)){ +for(var i=0;i<_a4.buttons.length;i++){ +var btn=_a4.buttons[i]; +if(btn=="-"){ +$("
                                            ").appendTo(tr); +}else{ +var td=$("").appendTo(tr); +var a=$("").appendTo(td); +a[0].onclick=eval(btn.handler||function(){ +}); +a.linkbutton($.extend({},btn,{plain:true})); +} +} +}else{ +var td=$("").appendTo(tr); +$(_a4.buttons).appendTo(td).show(); +} +} +$("
                                            ").appendTo(_a5); +$("
                                            ").appendTo(_a5); +function _a9(_ab){ +var btn=_a4.nav[_ab]; +var a=$("").appendTo(tr); +a.wrap(""); +a.linkbutton({iconCls:btn.iconCls,plain:true}).unbind(".pagination").bind("click.pagination",function(){ +btn.handler.call(_a2); +}); +return a; +}; +function _a6(aa,_ac){ +var _ad=$.inArray(_ac,aa); +if(_ad>=0){ +aa.splice(_ad,1); +} +return aa; +}; +}; +function _ae(_af,_b0){ +var _b1=$.data(_af,"pagination").options; +_b2(_af,{pageNumber:_b0}); +_b1.onSelectPage.call(_af,_b1.pageNumber,_b1.pageSize); +}; +function _b2(_b3,_b4){ +var _b5=$.data(_b3,"pagination"); +var _b6=_b5.options; +var bb=_b5.bb; +$.extend(_b6,_b4||{}); +var ps=$(_b3).find("select.pagination-page-list"); +if(ps.length){ +ps.val(_b6.pageSize+""); +_b6.pageSize=parseInt(ps.val()); +} +var _b7=Math.ceil(_b6.total/_b6.pageSize)||1; +if(_b6.pageNumber<1){ +_b6.pageNumber=1; +} +if(_b6.pageNumber>_b7){ +_b6.pageNumber=_b7; +} +if(_b6.total==0){ +_b6.pageNumber=0; +_b7=0; +} +if(bb.num){ +bb.num.val(_b6.pageNumber); +} +if(bb.after){ +bb.after.html(_b6.afterPageText.replace(/{pages}/,_b7)); +} +var td=$(_b3).find("td.pagination-links"); +if(td.length){ +td.empty(); +var _b8=_b6.pageNumber-Math.floor(_b6.links/2); +if(_b8<1){ +_b8=1; +} +var _b9=_b8+_b6.links-1; +if(_b9>_b7){ +_b9=_b7; +} +_b8=_b9-_b6.links+1; +if(_b8<1){ +_b8=1; +} +for(var i=_b8;i<=_b9;i++){ +var a=$("").appendTo(td); +a.linkbutton({plain:true,text:i}); +if(i==_b6.pageNumber){ +a.linkbutton("select"); +}else{ +a.unbind(".pagination").bind("click.pagination",{pageNumber:i},function(e){ +_ae(_b3,e.data.pageNumber); +}); +} +} +} +var _ba=_b6.displayMsg; +_ba=_ba.replace(/{from}/,_b6.total==0?0:_b6.pageSize*(_b6.pageNumber-1)+1); +_ba=_ba.replace(/{to}/,Math.min(_b6.pageSize*(_b6.pageNumber),_b6.total)); +_ba=_ba.replace(/{total}/,_b6.total); +$(_b3).find("div.pagination-info").html(_ba); +if(bb.first){ +bb.first.linkbutton({disabled:((!_b6.total)||_b6.pageNumber==1)}); +} +if(bb.prev){ +bb.prev.linkbutton({disabled:((!_b6.total)||_b6.pageNumber==1)}); +} +if(bb.next){ +bb.next.linkbutton({disabled:(_b6.pageNumber==_b7)}); +} +if(bb.last){ +bb.last.linkbutton({disabled:(_b6.pageNumber==_b7)}); +} +_bb(_b3,_b6.loading); +}; +function _bb(_bc,_bd){ +var _be=$.data(_bc,"pagination"); +var _bf=_be.options; +_bf.loading=_bd; +if(_bf.showRefresh&&_be.bb.refresh){ +_be.bb.refresh.linkbutton({iconCls:(_bf.loading?"pagination-loading":"pagination-load")}); +} +}; +$.fn.pagination=function(_c0,_c1){ +if(typeof _c0=="string"){ +return $.fn.pagination.methods[_c0](this,_c1); +} +_c0=_c0||{}; +return this.each(function(){ +var _c2; +var _c3=$.data(this,"pagination"); +if(_c3){ +_c2=$.extend(_c3.options,_c0); +}else{ +_c2=$.extend({},$.fn.pagination.defaults,$.fn.pagination.parseOptions(this),_c0); +$.data(this,"pagination",{options:_c2}); +} +_a1(this); +_b2(this); +}); +}; +$.fn.pagination.methods={options:function(jq){ +return $.data(jq[0],"pagination").options; +},loading:function(jq){ +return jq.each(function(){ +_bb(this,true); +}); +},loaded:function(jq){ +return jq.each(function(){ +_bb(this,false); +}); +},refresh:function(jq,_c4){ +return jq.each(function(){ +_b2(this,_c4); +}); +},select:function(jq,_c5){ +return jq.each(function(){ +_ae(this,_c5); +}); +}}; +$.fn.pagination.parseOptions=function(_c6){ +var t=$(_c6); +return $.extend({},$.parser.parseOptions(_c6,[{total:"number",pageSize:"number",pageNumber:"number",links:"number"},{loading:"boolean",showPageList:"boolean",showRefresh:"boolean"}]),{pageList:(t.attr("pageList")?eval(t.attr("pageList")):undefined)}); +}; +$.fn.pagination.defaults={total:1,pageSize:10,pageNumber:1,pageList:[10,20,30,50],loading:false,buttons:null,showPageList:true,showRefresh:true,links:10,layout:["list","sep","first","prev","sep","manual","sep","next","last","sep","refresh"],onSelectPage:function(_c7,_c8){ +},onBeforeRefresh:function(_c9,_ca){ +},onRefresh:function(_cb,_cc){ +},onChangePageSize:function(_cd){ +},beforePageText:"Page",afterPageText:"of {pages}",displayMsg:"Displaying {from} to {to} of {total} items",nav:{first:{iconCls:"pagination-first",handler:function(){ +var _ce=$(this).pagination("options"); +if(_ce.pageNumber>1){ +$(this).pagination("select",1); +} +}},prev:{iconCls:"pagination-prev",handler:function(){ +var _cf=$(this).pagination("options"); +if(_cf.pageNumber>1){ +$(this).pagination("select",_cf.pageNumber-1); +} +}},next:{iconCls:"pagination-next",handler:function(){ +var _d0=$(this).pagination("options"); +var _d1=Math.ceil(_d0.total/_d0.pageSize); +if(_d0.pageNumber<_d1){ +$(this).pagination("select",_d0.pageNumber+1); +} +}},last:{iconCls:"pagination-last",handler:function(){ +var _d2=$(this).pagination("options"); +var _d3=Math.ceil(_d2.total/_d2.pageSize); +if(_d2.pageNumber<_d3){ +$(this).pagination("select",_d3); +} +}},refresh:{iconCls:"pagination-refresh",handler:function(){ +var _d4=$(this).pagination("options"); +if(_d4.onBeforeRefresh.call(this,_d4.pageNumber,_d4.pageSize)!=false){ +$(this).pagination("select",_d4.pageNumber); +_d4.onRefresh.call(this,_d4.pageNumber,_d4.pageSize); +} +}}}}; +})(jQuery); +(function($){ +function _d5(_d6){ +var _d7=$(_d6); +_d7.addClass("tree"); +return _d7; +}; +function _d8(_d9){ +var _da=$.data(_d9,"tree").options; +$(_d9).unbind().bind("mouseover",function(e){ +var tt=$(e.target); +var _db=tt.closest("div.tree-node"); +if(!_db.length){ +return; +} +_db.addClass("tree-node-hover"); +if(tt.hasClass("tree-hit")){ +if(tt.hasClass("tree-expanded")){ +tt.addClass("tree-expanded-hover"); +}else{ +tt.addClass("tree-collapsed-hover"); +} +} +e.stopPropagation(); +}).bind("mouseout",function(e){ +var tt=$(e.target); +var _dc=tt.closest("div.tree-node"); +if(!_dc.length){ +return; +} +_dc.removeClass("tree-node-hover"); +if(tt.hasClass("tree-hit")){ +if(tt.hasClass("tree-expanded")){ +tt.removeClass("tree-expanded-hover"); +}else{ +tt.removeClass("tree-collapsed-hover"); +} +} +e.stopPropagation(); +}).bind("click",function(e){ +var tt=$(e.target); +var _dd=tt.closest("div.tree-node"); +if(!_dd.length){ +return; +} +if(tt.hasClass("tree-hit")){ +_144(_d9,_dd[0]); +return false; +}else{ +if(tt.hasClass("tree-checkbox")){ +_104(_d9,_dd[0]); +return false; +}else{ +_18a(_d9,_dd[0]); +_da.onClick.call(_d9,_e0(_d9,_dd[0])); +} +} +e.stopPropagation(); +}).bind("dblclick",function(e){ +var _de=$(e.target).closest("div.tree-node"); +if(!_de.length){ +return; +} +_18a(_d9,_de[0]); +_da.onDblClick.call(_d9,_e0(_d9,_de[0])); +e.stopPropagation(); +}).bind("contextmenu",function(e){ +var _df=$(e.target).closest("div.tree-node"); +if(!_df.length){ +return; +} +_da.onContextMenu.call(_d9,e,_e0(_d9,_df[0])); +e.stopPropagation(); +}); +}; +function _e1(_e2){ +var _e3=$.data(_e2,"tree").options; +_e3.dnd=false; +var _e4=$(_e2).find("div.tree-node"); +_e4.draggable("disable"); +_e4.css("cursor","pointer"); +}; +function _e5(_e6){ +var _e7=$.data(_e6,"tree"); +var _e8=_e7.options; +var _e9=_e7.tree; +_e7.disabledNodes=[]; +_e8.dnd=true; +_e9.find("div.tree-node").draggable({disabled:false,revert:true,cursor:"pointer",proxy:function(_ea){ +var p=$("
                                            ").appendTo("body"); +p.html(" "+$(_ea).find(".tree-title").html()); +p.hide(); +return p; +},deltaX:15,deltaY:15,onBeforeDrag:function(e){ +if(_e8.onBeforeDrag.call(_e6,_e0(_e6,this))==false){ +return false; +} +if($(e.target).hasClass("tree-hit")||$(e.target).hasClass("tree-checkbox")){ +return false; +} +if(e.which!=1){ +return false; +} +var _eb=$(this).find("span.tree-indent"); +if(_eb.length){ +e.data.offsetWidth-=_eb.length*_eb.width(); +} +},onStartDrag:function(e){ +$(this).next("ul").find("div.tree-node").each(function(){ +$(this).droppable("disable"); +_e7.disabledNodes.push(this); +}); +$(this).draggable("proxy").css({left:-10000,top:-10000}); +_e8.onStartDrag.call(_e6,_e0(_e6,this)); +var _ec=_e0(_e6,this); +if(_ec.id==undefined){ +_ec.id="easyui_tree_node_id_temp"; +_127(_e6,_ec); +} +_e7.draggingNodeId=_ec.id; +},onDrag:function(e){ +var x1=e.pageX,y1=e.pageY,x2=e.data.startX,y2=e.data.startY; +var d=Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)); +if(d>3){ +$(this).draggable("proxy").show(); +} +this.pageY=e.pageY; +},onStopDrag:function(){ +for(var i=0;i<_e7.disabledNodes.length;i++){ +$(_e7.disabledNodes[i]).droppable("enable"); +} +_e7.disabledNodes=[]; +var _ed=_182(_e6,_e7.draggingNodeId); +if(_ed&&_ed.id=="easyui_tree_node_id_temp"){ +_ed.id=""; +_127(_e6,_ed); +} +_e8.onStopDrag.call(_e6,_ed); +}}).droppable({accept:"div.tree-node",onDragEnter:function(e,_ee){ +if(_e8.onDragEnter.call(_e6,this,_ef(_ee))==false){ +_f0(_ee,false); +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +$(this).droppable("disable"); +_e7.disabledNodes.push(this); +} +},onDragOver:function(e,_f1){ +if($(this).droppable("options").disabled){ +return; +} +var _f2=_f1.pageY; +var top=$(this).offset().top; +var _f3=top+$(this).outerHeight(); +_f0(_f1,true); +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +if(_f2>top+(_f3-top)/2){ +if(_f3-_f2<5){ +$(this).addClass("tree-node-bottom"); +}else{ +$(this).addClass("tree-node-append"); +} +}else{ +if(_f2-top<5){ +$(this).addClass("tree-node-top"); +}else{ +$(this).addClass("tree-node-append"); +} +} +if(_e8.onDragOver.call(_e6,this,_ef(_f1))==false){ +_f0(_f1,false); +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +$(this).droppable("disable"); +_e7.disabledNodes.push(this); +} +},onDragLeave:function(e,_f4){ +_f0(_f4,false); +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +_e8.onDragLeave.call(_e6,this,_ef(_f4)); +},onDrop:function(e,_f5){ +var _f6=this; +var _f7,_f8; +if($(this).hasClass("tree-node-append")){ +_f7=_f9; +_f8="append"; +}else{ +_f7=_fa; +_f8=$(this).hasClass("tree-node-top")?"top":"bottom"; +} +if(_e8.onBeforeDrop.call(_e6,_f6,_ef(_f5),_f8)==false){ +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +return; +} +_f7(_f5,_f6,_f8); +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +}}); +function _ef(_fb,pop){ +return $(_fb).closest("ul.tree").tree(pop?"pop":"getData",_fb); +}; +function _f0(_fc,_fd){ +var _fe=$(_fc).draggable("proxy").find("span.tree-dnd-icon"); +_fe.removeClass("tree-dnd-yes tree-dnd-no").addClass(_fd?"tree-dnd-yes":"tree-dnd-no"); +}; +function _f9(_ff,dest){ +if(_e0(_e6,dest).state=="closed"){ +_13c(_e6,dest,function(){ +_100(); +}); +}else{ +_100(); +} +function _100(){ +var node=_ef(_ff,true); +$(_e6).tree("append",{parent:dest,data:[node]}); +_e8.onDrop.call(_e6,dest,node,"append"); +}; +}; +function _fa(_101,dest,_102){ +var _103={}; +if(_102=="top"){ +_103.before=dest; +}else{ +_103.after=dest; +} +var node=_ef(_101,true); +_103.data=node; +$(_e6).tree("insert",_103); +_e8.onDrop.call(_e6,dest,node,_102); +}; +}; +function _104(_105,_106,_107){ +var _108=$.data(_105,"tree"); +var opts=_108.options; +if(!opts.checkbox){ +return; +} +var _109=_e0(_105,_106); +if(_107==undefined){ +var ck=$(_106).find(".tree-checkbox"); +if(ck.hasClass("tree-checkbox1")){ +_107=false; +}else{ +if(ck.hasClass("tree-checkbox0")){ +_107=true; +}else{ +if(_109._checked==undefined){ +_109._checked=$(_106).find(".tree-checkbox").hasClass("tree-checkbox1"); +} +_107=!_109._checked; +} +} +} +_109._checked=_107; +if(opts.onBeforeCheck.call(_105,_109,_107)==false){ +return; +} +if(opts.cascadeCheck){ +_10a(_109,_107); +_10b(_109,_107); +}else{ +_10c($(_109.target),_107?"1":"0"); +} +opts.onCheck.call(_105,_109,_107); +function _10c(node,flag){ +var ck=node.find(".tree-checkbox"); +ck.removeClass("tree-checkbox0 tree-checkbox1 tree-checkbox2"); +ck.addClass("tree-checkbox"+flag); +}; +function _10a(_10d,_10e){ +if(opts.deepCheck){ +var node=$("#"+_10d.domId); +var flag=_10e?"1":"0"; +_10c(node,flag); +_10c(node.next(),flag); +}else{ +_10f(_10d,_10e); +_12a(_10d.children||[],function(n){ +_10f(n,_10e); +}); +} +}; +function _10f(_110,_111){ +if(_110.hidden){ +return; +} +var cls="tree-checkbox"+(_111?"1":"0"); +var node=$("#"+_110.domId); +_10c(node,_111?"1":"0"); +if(_110.children){ +for(var i=0;i<_110.children.length;i++){ +if(_110.children[i].hidden){ +if(!$("#"+_110.children[i].domId).find("."+cls).length){ +_10c(node,"2"); +var _112=_14f(_105,node[0]); +while(_112){ +_10c($(_112.target),"2"); +_112=_14f(_105,_112[0]); +} +return; +} +} +} +} +}; +function _10b(_113,_114){ +var node=$("#"+_113.domId); +var _115=_14f(_105,node[0]); +if(_115){ +var flag=""; +if(_116(node,true)){ +flag="1"; +}else{ +if(_116(node,false)){ +flag="0"; +}else{ +flag="2"; +} +} +_10c($(_115.target),flag); +_10b(_115,_114); +} +}; +function _116(node,_117){ +var cls="tree-checkbox"+(_117?"1":"0"); +var ck=node.find(".tree-checkbox"); +if(!ck.hasClass(cls)){ +return false; +} +var b=true; +node.parent().siblings().each(function(){ +var ck=$(this).children("div.tree-node").children(".tree-checkbox"); +if(ck.length&&!ck.hasClass(cls)){ +b=false; +return false; +} +}); +return b; +}; +}; +function _118(_119,_11a){ +var opts=$.data(_119,"tree").options; +if(!opts.checkbox){ +return; +} +var node=$(_11a); +if(_11b(_119,_11a)){ +var ck=node.find(".tree-checkbox"); +if(ck.length){ +if(ck.hasClass("tree-checkbox1")){ +_104(_119,_11a,true); +}else{ +_104(_119,_11a,false); +} +}else{ +if(opts.onlyLeafCheck){ +$("").insertBefore(node.find(".tree-title")); +} +} +}else{ +var ck=node.find(".tree-checkbox"); +if(opts.onlyLeafCheck){ +ck.remove(); +}else{ +if(ck.hasClass("tree-checkbox1")){ +_104(_119,_11a,true); +}else{ +if(ck.hasClass("tree-checkbox2")){ +var _11c=true; +var _11d=true; +var _11e=_11f(_119,_11a); +for(var i=0;i<_11e.length;i++){ +if(_11e[i].checked){ +_11d=false; +}else{ +_11c=false; +} +} +if(_11c){ +_104(_119,_11a,true); +} +if(_11d){ +_104(_119,_11a,false); +} +} +} +} +} +}; +function _120(_121,ul,data,_122){ +var _123=$.data(_121,"tree"); +var opts=_123.options; +var _124=$(ul).prevAll("div.tree-node:first"); +data=opts.loadFilter.call(_121,data,_124[0]); +var _125=_126(_121,"domId",_124.attr("id")); +if(!_122){ +_125?_125.children=data:_123.data=data; +$(ul).empty(); +}else{ +if(_125){ +_125.children?_125.children=_125.children.concat(data):_125.children=data; +}else{ +_123.data=_123.data.concat(data); +} +} +opts.view.render.call(opts.view,_121,ul,data); +if(opts.dnd){ +_e5(_121); +} +if(_125){ +_127(_121,_125); +} +var _128=[]; +var _129=[]; +for(var i=0;i1){ +$(_12f[0].target).addClass("tree-root-first"); +}else{ +if(_12f.length==1){ +$(_12f[0].target).addClass("tree-root-one"); +} +} +} +$(ul).children("li").each(function(){ +var node=$(this).children("div.tree-node"); +var ul=node.next("ul"); +if(ul.length){ +if($(this).next().length){ +_130(node); +} +_12c(_12d,ul,_12e); +}else{ +_131(node); +} +}); +var _132=$(ul).children("li:last").children("div.tree-node").addClass("tree-node-last"); +_132.children("span.tree-join").removeClass("tree-join").addClass("tree-joinbottom"); +function _131(node,_133){ +var icon=node.find("span.tree-icon"); +icon.prev("span.tree-indent").addClass("tree-join"); +}; +function _130(node){ +var _134=node.find("span.tree-indent, span.tree-hit").length; +node.next().find("div.tree-node").each(function(){ +$(this).children("span:eq("+(_134-1)+")").addClass("tree-line"); +}); +}; +}; +function _135(_136,ul,_137,_138){ +var opts=$.data(_136,"tree").options; +_137=$.extend({},opts.queryParams,_137||{}); +var _139=null; +if(_136!=ul){ +var node=$(ul).prev(); +_139=_e0(_136,node[0]); +} +if(opts.onBeforeLoad.call(_136,_139,_137)==false){ +return; +} +var _13a=$(ul).prev().children("span.tree-folder"); +_13a.addClass("tree-loading"); +var _13b=opts.loader.call(_136,_137,function(data){ +_13a.removeClass("tree-loading"); +_120(_136,ul,data); +if(_138){ +_138(); +} +},function(){ +_13a.removeClass("tree-loading"); +opts.onLoadError.apply(_136,arguments); +if(_138){ +_138(); +} +}); +if(_13b==false){ +_13a.removeClass("tree-loading"); +} +}; +function _13c(_13d,_13e,_13f){ +var opts=$.data(_13d,"tree").options; +var hit=$(_13e).children("span.tree-hit"); +if(hit.length==0){ +return; +} +if(hit.hasClass("tree-expanded")){ +return; +} +var node=_e0(_13d,_13e); +if(opts.onBeforeExpand.call(_13d,node)==false){ +return; +} +hit.removeClass("tree-collapsed tree-collapsed-hover").addClass("tree-expanded"); +hit.next().addClass("tree-folder-open"); +var ul=$(_13e).next(); +if(ul.length){ +if(opts.animate){ +ul.slideDown("normal",function(){ +node.state="open"; +opts.onExpand.call(_13d,node); +if(_13f){ +_13f(); +} +}); +}else{ +ul.css("display","block"); +node.state="open"; +opts.onExpand.call(_13d,node); +if(_13f){ +_13f(); +} +} +}else{ +var _140=$("
                                              ").insertAfter(_13e); +_135(_13d,_140[0],{id:node.id},function(){ +if(_140.is(":empty")){ +_140.remove(); +} +if(opts.animate){ +_140.slideDown("normal",function(){ +node.state="open"; +opts.onExpand.call(_13d,node); +if(_13f){ +_13f(); +} +}); +}else{ +_140.css("display","block"); +node.state="open"; +opts.onExpand.call(_13d,node); +if(_13f){ +_13f(); +} +} +}); +} +}; +function _141(_142,_143){ +var opts=$.data(_142,"tree").options; +var hit=$(_143).children("span.tree-hit"); +if(hit.length==0){ +return; +} +if(hit.hasClass("tree-collapsed")){ +return; +} +var node=_e0(_142,_143); +if(opts.onBeforeCollapse.call(_142,node)==false){ +return; +} +hit.removeClass("tree-expanded tree-expanded-hover").addClass("tree-collapsed"); +hit.next().removeClass("tree-folder-open"); +var ul=$(_143).next(); +if(opts.animate){ +ul.slideUp("normal",function(){ +node.state="closed"; +opts.onCollapse.call(_142,node); +}); +}else{ +ul.css("display","none"); +node.state="closed"; +opts.onCollapse.call(_142,node); +} +}; +function _144(_145,_146){ +var hit=$(_146).children("span.tree-hit"); +if(hit.length==0){ +return; +} +if(hit.hasClass("tree-expanded")){ +_141(_145,_146); +}else{ +_13c(_145,_146); +} +}; +function _147(_148,_149){ +var _14a=_11f(_148,_149); +if(_149){ +_14a.unshift(_e0(_148,_149)); +} +for(var i=0;i<_14a.length;i++){ +_13c(_148,_14a[i].target); +} +}; +function _14b(_14c,_14d){ +var _14e=[]; +var p=_14f(_14c,_14d); +while(p){ +_14e.unshift(p); +p=_14f(_14c,p.target); +} +for(var i=0;i<_14e.length;i++){ +_13c(_14c,_14e[i].target); +} +}; +function _150(_151,_152){ +var c=$(_151).parent(); +while(c[0].tagName!="BODY"&&c.css("overflow-y")!="auto"){ +c=c.parent(); +} +var n=$(_152); +var ntop=n.offset().top; +if(c[0].tagName!="BODY"){ +var ctop=c.offset().top; +if(ntopctop+c.outerHeight()-18){ +c.scrollTop(c.scrollTop()+ntop+n.outerHeight()-ctop-c.outerHeight()+18); +} +} +}else{ +c.scrollTop(ntop); +} +}; +function _153(_154,_155){ +var _156=_11f(_154,_155); +if(_155){ +_156.unshift(_e0(_154,_155)); +} +for(var i=0;i<_156.length;i++){ +_141(_154,_156[i].target); +} +}; +function _157(_158,_159){ +var node=$(_159.parent); +var data=_159.data; +if(!data){ +return; +} +data=$.isArray(data)?data:[data]; +if(!data.length){ +return; +} +var ul; +if(node.length==0){ +ul=$(_158); +}else{ +if(_11b(_158,node[0])){ +var _15a=node.find("span.tree-icon"); +_15a.removeClass("tree-file").addClass("tree-folder tree-folder-open"); +var hit=$("").insertBefore(_15a); +if(hit.prev().length){ +hit.prev().remove(); +} +} +ul=node.next(); +if(!ul.length){ +ul=$("
                                                ").insertAfter(node); +} +} +_120(_158,ul[0],data,true); +_118(_158,ul.prev()); +}; +function _15b(_15c,_15d){ +var ref=_15d.before||_15d.after; +var _15e=_14f(_15c,ref); +var data=_15d.data; +if(!data){ +return; +} +data=$.isArray(data)?data:[data]; +if(!data.length){ +return; +} +_157(_15c,{parent:(_15e?_15e.target:null),data:data}); +var _15f=_15e?_15e.children:$(_15c).tree("getRoots"); +for(var i=0;i<_15f.length;i++){ +if(_15f[i].domId==$(ref).attr("id")){ +for(var j=data.length-1;j>=0;j--){ +_15f.splice((_15d.before?i:(i+1)),0,data[j]); +} +_15f.splice(_15f.length-data.length,data.length); +break; +} +} +var li=$(); +for(var i=0;i
                                                ").prependTo(node); +node.next().remove(); +} +_127(_161,_163); +_118(_161,_163.target); +} +_12c(_161,_161); +function del(_164){ +var id=$(_164).attr("id"); +var _165=_14f(_161,_164); +var cc=_165?_165.children:$.data(_161,"tree").data; +for(var i=0;i=0;i--){ +_189.unshift(node.children[i]); +} +} +} +}; +function _18a(_18b,_18c){ +var opts=$.data(_18b,"tree").options; +var node=_e0(_18b,_18c); +if(opts.onBeforeSelect.call(_18b,node)==false){ +return; +} +$(_18b).find("div.tree-node-selected").removeClass("tree-node-selected"); +$(_18c).addClass("tree-node-selected"); +opts.onSelect.call(_18b,node); +}; +function _11b(_18d,_18e){ +return $(_18e).children("span.tree-hit").length==0; +}; +function _18f(_190,_191){ +var opts=$.data(_190,"tree").options; +var node=_e0(_190,_191); +if(opts.onBeforeEdit.call(_190,node)==false){ +return; +} +$(_191).css("position","relative"); +var nt=$(_191).find(".tree-title"); +var _192=nt.outerWidth(); +nt.empty(); +var _193=$("").appendTo(nt); +_193.val(node.text).focus(); +_193.width(_192+20); +_193.height(document.compatMode=="CSS1Compat"?(18-(_193.outerHeight()-_193.height())):18); +_193.bind("click",function(e){ +return false; +}).bind("mousedown",function(e){ +e.stopPropagation(); +}).bind("mousemove",function(e){ +e.stopPropagation(); +}).bind("keydown",function(e){ +if(e.keyCode==13){ +_194(_190,_191); +return false; +}else{ +if(e.keyCode==27){ +_198(_190,_191); +return false; +} +} +}).bind("blur",function(e){ +e.stopPropagation(); +_194(_190,_191); +}); +}; +function _194(_195,_196){ +var opts=$.data(_195,"tree").options; +$(_196).css("position",""); +var _197=$(_196).find("input.tree-editor"); +var val=_197.val(); +_197.remove(); +var node=_e0(_195,_196); +node.text=val; +_127(_195,node); +opts.onAfterEdit.call(_195,node); +}; +function _198(_199,_19a){ +var opts=$.data(_199,"tree").options; +$(_19a).css("position",""); +$(_19a).find("input.tree-editor").remove(); +var node=_e0(_199,_19a); +_127(_199,node); +opts.onCancelEdit.call(_199,node); +}; +function _19b(_19c,q){ +var _19d=$.data(_19c,"tree"); +var opts=_19d.options; +var ids={}; +_12a(_19d.data,function(node){ +if(opts.filter.call(_19c,q,node)){ +$("#"+node.domId).removeClass("tree-node-hidden"); +ids[node.domId]=1; +node.hidden=false; +}else{ +$("#"+node.domId).addClass("tree-node-hidden"); +node.hidden=true; +} +}); +for(var id in ids){ +_19e(id); +} +function _19e(_19f){ +var p=$(_19c).tree("getParent",$("#"+_19f)[0]); +while(p){ +$(p.target).removeClass("tree-node-hidden"); +p.hidden=false; +p=$(_19c).tree("getParent",p.target); +} +}; +}; +$.fn.tree=function(_1a0,_1a1){ +if(typeof _1a0=="string"){ +return $.fn.tree.methods[_1a0](this,_1a1); +} +var _1a0=_1a0||{}; +return this.each(function(){ +var _1a2=$.data(this,"tree"); +var opts; +if(_1a2){ +opts=$.extend(_1a2.options,_1a0); +_1a2.options=opts; +}else{ +opts=$.extend({},$.fn.tree.defaults,$.fn.tree.parseOptions(this),_1a0); +$.data(this,"tree",{options:opts,tree:_d5(this),data:[]}); +var data=$.fn.tree.parseData(this); +if(data.length){ +_120(this,this,data); +} +} +_d8(this); +if(opts.data){ +_120(this,this,$.extend(true,[],opts.data)); +} +_135(this,this); +}); +}; +$.fn.tree.methods={options:function(jq){ +return $.data(jq[0],"tree").options; +},loadData:function(jq,data){ +return jq.each(function(){ +_120(this,this,data); +}); +},getNode:function(jq,_1a3){ +return _e0(jq[0],_1a3); +},getData:function(jq,_1a4){ +return _17d(jq[0],_1a4); +},reload:function(jq,_1a5){ +return jq.each(function(){ +if(_1a5){ +var node=$(_1a5); +var hit=node.children("span.tree-hit"); +hit.removeClass("tree-expanded tree-expanded-hover").addClass("tree-collapsed"); +node.next().remove(); +_13c(this,_1a5); +}else{ +$(this).empty(); +_135(this,this); +} +}); +},getRoot:function(jq,_1a6){ +return _169(jq[0],_1a6); +},getRoots:function(jq){ +return _16d(jq[0]); +},getParent:function(jq,_1a7){ +return _14f(jq[0],_1a7); +},getChildren:function(jq,_1a8){ +return _11f(jq[0],_1a8); +},getChecked:function(jq,_1a9){ +return _176(jq[0],_1a9); +},getSelected:function(jq){ +return _17b(jq[0]); +},isLeaf:function(jq,_1aa){ +return _11b(jq[0],_1aa); +},find:function(jq,id){ +return _182(jq[0],id); +},select:function(jq,_1ab){ +return jq.each(function(){ +_18a(this,_1ab); +}); +},check:function(jq,_1ac){ +return jq.each(function(){ +_104(this,_1ac,true); +}); +},uncheck:function(jq,_1ad){ +return jq.each(function(){ +_104(this,_1ad,false); +}); +},collapse:function(jq,_1ae){ +return jq.each(function(){ +_141(this,_1ae); +}); +},expand:function(jq,_1af){ +return jq.each(function(){ +_13c(this,_1af); +}); +},collapseAll:function(jq,_1b0){ +return jq.each(function(){ +_153(this,_1b0); +}); +},expandAll:function(jq,_1b1){ +return jq.each(function(){ +_147(this,_1b1); +}); +},expandTo:function(jq,_1b2){ +return jq.each(function(){ +_14b(this,_1b2); +}); +},scrollTo:function(jq,_1b3){ +return jq.each(function(){ +_150(this,_1b3); +}); +},toggle:function(jq,_1b4){ +return jq.each(function(){ +_144(this,_1b4); +}); +},append:function(jq,_1b5){ +return jq.each(function(){ +_157(this,_1b5); +}); +},insert:function(jq,_1b6){ +return jq.each(function(){ +_15b(this,_1b6); +}); +},remove:function(jq,_1b7){ +return jq.each(function(){ +_160(this,_1b7); +}); +},pop:function(jq,_1b8){ +var node=jq.tree("getData",_1b8); +jq.tree("remove",_1b8); +return node; +},update:function(jq,_1b9){ +return jq.each(function(){ +_127(this,_1b9); +}); +},enableDnd:function(jq){ +return jq.each(function(){ +_e5(this); +}); +},disableDnd:function(jq){ +return jq.each(function(){ +_e1(this); +}); +},beginEdit:function(jq,_1ba){ +return jq.each(function(){ +_18f(this,_1ba); +}); +},endEdit:function(jq,_1bb){ +return jq.each(function(){ +_194(this,_1bb); +}); +},cancelEdit:function(jq,_1bc){ +return jq.each(function(){ +_198(this,_1bc); +}); +},doFilter:function(jq,q){ +return jq.each(function(){ +_19b(this,q); +}); +}}; +$.fn.tree.parseOptions=function(_1bd){ +var t=$(_1bd); +return $.extend({},$.parser.parseOptions(_1bd,["url","method",{checkbox:"boolean",cascadeCheck:"boolean",onlyLeafCheck:"boolean"},{animate:"boolean",lines:"boolean",dnd:"boolean"}])); +}; +$.fn.tree.parseData=function(_1be){ +var data=[]; +_1bf(data,$(_1be)); +return data; +function _1bf(aa,tree){ +tree.children("li").each(function(){ +var node=$(this); +var item=$.extend({},$.parser.parseOptions(this,["id","iconCls","state"]),{checked:(node.attr("checked")?true:undefined)}); +item.text=node.children("span").html(); +if(!item.text){ +item.text=node.html(); +} +var _1c0=node.children("ul"); +if(_1c0.length){ +item.children=[]; +_1bf(item.children,_1c0); +} +aa.push(item); +}); +}; +}; +var _1c1=1; +var _1c2={render:function(_1c3,ul,data){ +var opts=$.data(_1c3,"tree").options; +var _1c4=$(ul).prev("div.tree-node").find("span.tree-indent, span.tree-hit").length; +var cc=_1c5(_1c4,data); +$(ul).append(cc.join("")); +function _1c5(_1c6,_1c7){ +var cc=[]; +for(var i=0;i<_1c7.length;i++){ +var item=_1c7[i]; +if(item.state!="open"&&item.state!="closed"){ +item.state="open"; +} +item.domId="_easyui_tree_"+_1c1++; +cc.push("
                                              • "); +cc.push("
                                                "); +for(var j=0;j<_1c6;j++){ +cc.push(""); +} +var _1c8=false; +if(item.state=="closed"){ +cc.push(""); +cc.push(""); +}else{ +if(item.children&&item.children.length){ +cc.push(""); +cc.push(""); +}else{ +cc.push(""); +cc.push(""); +_1c8=true; +} +} +if(opts.checkbox){ +if((!opts.onlyLeafCheck)||_1c8){ +cc.push(""); +} +} +cc.push(""+opts.formatter.call(_1c3,item)+""); +cc.push("
                                                "); +if(item.children&&item.children.length){ +var tmp=_1c5(_1c6+1,item.children); +cc.push("
                                                  "); +cc=cc.concat(tmp); +cc.push("
                                                "); +} +cc.push("
                                              • "); +} +return cc; +}; +}}; +$.fn.tree.defaults={url:null,method:"post",animate:false,checkbox:false,cascadeCheck:true,onlyLeafCheck:false,lines:false,dnd:false,data:null,queryParams:{},formatter:function(node){ +return node.text; +},filter:function(q,node){ +return node.text.toLowerCase().indexOf(q.toLowerCase())>=0; +},loader:function(_1c9,_1ca,_1cb){ +var opts=$(this).tree("options"); +if(!opts.url){ +return false; +} +$.ajax({type:opts.method,url:opts.url,data:_1c9,dataType:"json",success:function(data){ +_1ca(data); +},error:function(){ +_1cb.apply(this,arguments); +}}); +},loadFilter:function(data,_1cc){ +return data; +},view:_1c2,onBeforeLoad:function(node,_1cd){ +},onLoadSuccess:function(node,data){ +},onLoadError:function(){ +},onClick:function(node){ +},onDblClick:function(node){ +},onBeforeExpand:function(node){ +},onExpand:function(node){ +},onBeforeCollapse:function(node){ +},onCollapse:function(node){ +},onBeforeCheck:function(node,_1ce){ +},onCheck:function(node,_1cf){ +},onBeforeSelect:function(node){ +},onSelect:function(node){ +},onContextMenu:function(e,node){ +},onBeforeDrag:function(node){ +},onStartDrag:function(node){ +},onStopDrag:function(node){ +},onDragEnter:function(_1d0,_1d1){ +},onDragOver:function(_1d2,_1d3){ +},onDragLeave:function(_1d4,_1d5){ +},onBeforeDrop:function(_1d6,_1d7,_1d8){ +},onDrop:function(_1d9,_1da,_1db){ +},onBeforeEdit:function(node){ +},onAfterEdit:function(node){ +},onCancelEdit:function(node){ +}}; +})(jQuery); +(function($){ +function init(_1dc){ +$(_1dc).addClass("progressbar"); +$(_1dc).html("
                                                "); +$(_1dc).bind("_resize",function(e,_1dd){ +if($(this).hasClass("easyui-fluid")||_1dd){ +_1de(_1dc); +} +return false; +}); +return $(_1dc); +}; +function _1de(_1df,_1e0){ +var opts=$.data(_1df,"progressbar").options; +var bar=$.data(_1df,"progressbar").bar; +if(_1e0){ +opts.width=_1e0; +} +bar._size(opts); +bar.find("div.progressbar-text").css("width",bar.width()); +bar.find("div.progressbar-text,div.progressbar-value").css({height:bar.height()+"px",lineHeight:bar.height()+"px"}); +}; +$.fn.progressbar=function(_1e1,_1e2){ +if(typeof _1e1=="string"){ +var _1e3=$.fn.progressbar.methods[_1e1]; +if(_1e3){ +return _1e3(this,_1e2); +} +} +_1e1=_1e1||{}; +return this.each(function(){ +var _1e4=$.data(this,"progressbar"); +if(_1e4){ +$.extend(_1e4.options,_1e1); +}else{ +_1e4=$.data(this,"progressbar",{options:$.extend({},$.fn.progressbar.defaults,$.fn.progressbar.parseOptions(this),_1e1),bar:init(this)}); +} +$(this).progressbar("setValue",_1e4.options.value); +_1de(this); +}); +}; +$.fn.progressbar.methods={options:function(jq){ +return $.data(jq[0],"progressbar").options; +},resize:function(jq,_1e5){ +return jq.each(function(){ +_1de(this,_1e5); +}); +},getValue:function(jq){ +return $.data(jq[0],"progressbar").options.value; +},setValue:function(jq,_1e6){ +if(_1e6<0){ +_1e6=0; +} +if(_1e6>100){ +_1e6=100; +} +return jq.each(function(){ +var opts=$.data(this,"progressbar").options; +var text=opts.text.replace(/{value}/,_1e6); +var _1e7=opts.value; +opts.value=_1e6; +$(this).find("div.progressbar-value").width(_1e6+"%"); +$(this).find("div.progressbar-text").html(text); +if(_1e7!=_1e6){ +opts.onChange.call(this,_1e6,_1e7); +} +}); +}}; +$.fn.progressbar.parseOptions=function(_1e8){ +return $.extend({},$.parser.parseOptions(_1e8,["width","height","text",{value:"number"}])); +}; +$.fn.progressbar.defaults={width:"auto",height:22,value:0,text:"{value}%",onChange:function(_1e9,_1ea){ +}}; +})(jQuery); +(function($){ +function init(_1eb){ +$(_1eb).addClass("tooltip-f"); +}; +function _1ec(_1ed){ +var opts=$.data(_1ed,"tooltip").options; +$(_1ed).unbind(".tooltip").bind(opts.showEvent+".tooltip",function(e){ +$(_1ed).tooltip("show",e); +}).bind(opts.hideEvent+".tooltip",function(e){ +$(_1ed).tooltip("hide",e); +}).bind("mousemove.tooltip",function(e){ +if(opts.trackMouse){ +opts.trackMouseX=e.pageX; +opts.trackMouseY=e.pageY; +$(_1ed).tooltip("reposition"); +} +}); +}; +function _1ee(_1ef){ +var _1f0=$.data(_1ef,"tooltip"); +if(_1f0.showTimer){ +clearTimeout(_1f0.showTimer); +_1f0.showTimer=null; +} +if(_1f0.hideTimer){ +clearTimeout(_1f0.hideTimer); +_1f0.hideTimer=null; +} +}; +function _1f1(_1f2){ +var _1f3=$.data(_1f2,"tooltip"); +if(!_1f3||!_1f3.tip){ +return; +} +var opts=_1f3.options; +var tip=_1f3.tip; +var pos={left:-100000,top:-100000}; +if($(_1f2).is(":visible")){ +pos=_1f4(opts.position); +if(opts.position=="top"&&pos.top<0){ +pos=_1f4("bottom"); +}else{ +if((opts.position=="bottom")&&(pos.top+tip._outerHeight()>$(window)._outerHeight()+$(document).scrollTop())){ +pos=_1f4("top"); +} +} +if(pos.left<0){ +if(opts.position=="left"){ +pos=_1f4("right"); +}else{ +$(_1f2).tooltip("arrow").css("left",tip._outerWidth()/2+pos.left); +pos.left=0; +} +}else{ +if(pos.left+tip._outerWidth()>$(window)._outerWidth()+$(document)._scrollLeft()){ +if(opts.position=="right"){ +pos=_1f4("left"); +}else{ +var left=pos.left; +pos.left=$(window)._outerWidth()+$(document)._scrollLeft()-tip._outerWidth(); +$(_1f2).tooltip("arrow").css("left",tip._outerWidth()/2-(pos.left-left)); +} +} +} +} +tip.css({left:pos.left,top:pos.top,zIndex:(opts.zIndex!=undefined?opts.zIndex:($.fn.window?$.fn.window.defaults.zIndex++:""))}); +opts.onPosition.call(_1f2,pos.left,pos.top); +function _1f4(_1f5){ +opts.position=_1f5||"bottom"; +tip.removeClass("tooltip-top tooltip-bottom tooltip-left tooltip-right").addClass("tooltip-"+opts.position); +var left,top; +if(opts.trackMouse){ +t=$(); +left=opts.trackMouseX+opts.deltaX; +top=opts.trackMouseY+opts.deltaY; +}else{ +var t=$(_1f2); +left=t.offset().left+opts.deltaX; +top=t.offset().top+opts.deltaY; +} +switch(opts.position){ +case "right": +left+=t._outerWidth()+12+(opts.trackMouse?12:0); +top-=(tip._outerHeight()-t._outerHeight())/2; +break; +case "left": +left-=tip._outerWidth()+12+(opts.trackMouse?12:0); +top-=(tip._outerHeight()-t._outerHeight())/2; +break; +case "top": +left-=(tip._outerWidth()-t._outerWidth())/2; +top-=tip._outerHeight()+12+(opts.trackMouse?12:0); +break; +case "bottom": +left-=(tip._outerWidth()-t._outerWidth())/2; +top+=t._outerHeight()+12+(opts.trackMouse?12:0); +break; +} +return {left:left,top:top}; +}; +}; +function _1f6(_1f7,e){ +var _1f8=$.data(_1f7,"tooltip"); +var opts=_1f8.options; +var tip=_1f8.tip; +if(!tip){ +tip=$("
                                                "+"
                                                "+"
                                                "+"
                                                "+"
                                                ").appendTo("body"); +_1f8.tip=tip; +_1f9(_1f7); +} +_1ee(_1f7); +_1f8.showTimer=setTimeout(function(){ +$(_1f7).tooltip("reposition"); +tip.show(); +opts.onShow.call(_1f7,e); +var _1fa=tip.children(".tooltip-arrow-outer"); +var _1fb=tip.children(".tooltip-arrow"); +var bc="border-"+opts.position+"-color"; +_1fa.add(_1fb).css({borderTopColor:"",borderBottomColor:"",borderLeftColor:"",borderRightColor:""}); +_1fa.css(bc,tip.css(bc)); +_1fb.css(bc,tip.css("backgroundColor")); +},opts.showDelay); +}; +function _1fc(_1fd,e){ +var _1fe=$.data(_1fd,"tooltip"); +if(_1fe&&_1fe.tip){ +_1ee(_1fd); +_1fe.hideTimer=setTimeout(function(){ +_1fe.tip.hide(); +_1fe.options.onHide.call(_1fd,e); +},_1fe.options.hideDelay); +} +}; +function _1f9(_1ff,_200){ +var _201=$.data(_1ff,"tooltip"); +var opts=_201.options; +if(_200){ +opts.content=_200; +} +if(!_201.tip){ +return; +} +var cc=typeof opts.content=="function"?opts.content.call(_1ff):opts.content; +_201.tip.children(".tooltip-content").html(cc); +opts.onUpdate.call(_1ff,cc); +}; +function _202(_203){ +var _204=$.data(_203,"tooltip"); +if(_204){ +_1ee(_203); +var opts=_204.options; +if(_204.tip){ +_204.tip.remove(); +} +if(opts._title){ +$(_203).attr("title",opts._title); +} +$.removeData(_203,"tooltip"); +$(_203).unbind(".tooltip").removeClass("tooltip-f"); +opts.onDestroy.call(_203); +} +}; +$.fn.tooltip=function(_205,_206){ +if(typeof _205=="string"){ +return $.fn.tooltip.methods[_205](this,_206); +} +_205=_205||{}; +return this.each(function(){ +var _207=$.data(this,"tooltip"); +if(_207){ +$.extend(_207.options,_205); +}else{ +$.data(this,"tooltip",{options:$.extend({},$.fn.tooltip.defaults,$.fn.tooltip.parseOptions(this),_205)}); +init(this); +} +_1ec(this); +_1f9(this); +}); +}; +$.fn.tooltip.methods={options:function(jq){ +return $.data(jq[0],"tooltip").options; +},tip:function(jq){ +return $.data(jq[0],"tooltip").tip; +},arrow:function(jq){ +return jq.tooltip("tip").children(".tooltip-arrow-outer,.tooltip-arrow"); +},show:function(jq,e){ +return jq.each(function(){ +_1f6(this,e); +}); +},hide:function(jq,e){ +return jq.each(function(){ +_1fc(this,e); +}); +},update:function(jq,_208){ +return jq.each(function(){ +_1f9(this,_208); +}); +},reposition:function(jq){ +return jq.each(function(){ +_1f1(this); +}); +},destroy:function(jq){ +return jq.each(function(){ +_202(this); +}); +}}; +$.fn.tooltip.parseOptions=function(_209){ +var t=$(_209); +var opts=$.extend({},$.parser.parseOptions(_209,["position","showEvent","hideEvent","content",{trackMouse:"boolean",deltaX:"number",deltaY:"number",showDelay:"number",hideDelay:"number"}]),{_title:t.attr("title")}); +t.attr("title",""); +if(!opts.content){ +opts.content=opts._title; +} +return opts; +}; +$.fn.tooltip.defaults={position:"bottom",content:null,trackMouse:false,deltaX:0,deltaY:0,showEvent:"mouseenter",hideEvent:"mouseleave",showDelay:200,hideDelay:100,onShow:function(e){ +},onHide:function(e){ +},onUpdate:function(_20a){ +},onPosition:function(left,top){ +},onDestroy:function(){ +}}; +})(jQuery); +(function($){ +$.fn._remove=function(){ +return this.each(function(){ +$(this).remove(); +try{ +this.outerHTML=""; +} +catch(err){ +} +}); +}; +function _20b(node){ +node._remove(); +}; +function _20c(_20d,_20e){ +var _20f=$.data(_20d,"panel"); +var opts=_20f.options; +var _210=_20f.panel; +var _211=_210.children(".panel-header"); +var _212=_210.children(".panel-body"); +var _213=_210.children(".panel-footer"); +if(_20e){ +$.extend(opts,{width:_20e.width,height:_20e.height,minWidth:_20e.minWidth,maxWidth:_20e.maxWidth,minHeight:_20e.minHeight,maxHeight:_20e.maxHeight,left:_20e.left,top:_20e.top}); +} +_210._size(opts); +_211.add(_212)._outerWidth(_210.width()); +if(!isNaN(parseInt(opts.height))){ +_212._outerHeight(_210.height()-_211._outerHeight()-_213._outerHeight()); +}else{ +_212.css("height",""); +var min=$.parser.parseValue("minHeight",opts.minHeight,_210.parent()); +var max=$.parser.parseValue("maxHeight",opts.maxHeight,_210.parent()); +var _214=_211._outerHeight()+_213._outerHeight()+_210._outerHeight()-_210.height(); +_212._size("minHeight",min?(min-_214):""); +_212._size("maxHeight",max?(max-_214):""); +} +_210.css({height:"",minHeight:"",maxHeight:"",left:opts.left,top:opts.top}); +opts.onResize.apply(_20d,[opts.width,opts.height]); +$(_20d).panel("doLayout"); +}; +function _215(_216,_217){ +var opts=$.data(_216,"panel").options; +var _218=$.data(_216,"panel").panel; +if(_217){ +if(_217.left!=null){ +opts.left=_217.left; +} +if(_217.top!=null){ +opts.top=_217.top; +} +} +_218.css({left:opts.left,top:opts.top}); +opts.onMove.apply(_216,[opts.left,opts.top]); +}; +function _219(_21a){ +$(_21a).addClass("panel-body")._size("clear"); +var _21b=$("
                                                ").insertBefore(_21a); +_21b[0].appendChild(_21a); +_21b.bind("_resize",function(e,_21c){ +if($(this).hasClass("easyui-fluid")||_21c){ +_20c(_21a); +} +return false; +}); +return _21b; +}; +function _21d(_21e){ +var _21f=$.data(_21e,"panel"); +var opts=_21f.options; +var _220=_21f.panel; +_220.css(opts.style); +_220.addClass(opts.cls); +_221(); +_222(); +var _223=$(_21e).panel("header"); +var body=$(_21e).panel("body"); +var _224=$(_21e).siblings(".panel-footer"); +if(opts.border){ +_223.removeClass("panel-header-noborder"); +body.removeClass("panel-body-noborder"); +_224.removeClass("panel-footer-noborder"); +}else{ +_223.addClass("panel-header-noborder"); +body.addClass("panel-body-noborder"); +_224.addClass("panel-footer-noborder"); +} +_223.addClass(opts.headerCls); +body.addClass(opts.bodyCls); +$(_21e).attr("id",opts.id||""); +if(opts.content){ +$(_21e).panel("clear"); +$(_21e).html(opts.content); +$.parser.parse($(_21e)); +} +function _221(){ +if(opts.noheader||(!opts.title&&!opts.header)){ +_20b(_220.children(".panel-header")); +_220.children(".panel-body").addClass("panel-body-noheader"); +}else{ +if(opts.header){ +$(opts.header).addClass("panel-header").prependTo(_220); +}else{ +var _225=_220.children(".panel-header"); +if(!_225.length){ +_225=$("
                                                ").prependTo(_220); +} +if(!$.isArray(opts.tools)){ +_225.find("div.panel-tool .panel-tool-a").appendTo(opts.tools); +} +_225.empty(); +var _226=$("
                                                ").html(opts.title).appendTo(_225); +if(opts.iconCls){ +_226.addClass("panel-with-icon"); +$("
                                                ").addClass(opts.iconCls).appendTo(_225); +} +var tool=$("
                                                ").appendTo(_225); +tool.bind("click",function(e){ +e.stopPropagation(); +}); +if(opts.tools){ +if($.isArray(opts.tools)){ +$.map(opts.tools,function(t){ +_227(tool,t.iconCls,eval(t.handler)); +}); +}else{ +$(opts.tools).children().each(function(){ +$(this).addClass($(this).attr("iconCls")).addClass("panel-tool-a").appendTo(tool); +}); +} +} +if(opts.collapsible){ +_227(tool,"panel-tool-collapse",function(){ +if(opts.collapsed==true){ +_245(_21e,true); +}else{ +_238(_21e,true); +} +}); +} +if(opts.minimizable){ +_227(tool,"panel-tool-min",function(){ +_24b(_21e); +}); +} +if(opts.maximizable){ +_227(tool,"panel-tool-max",function(){ +if(opts.maximized==true){ +_24e(_21e); +}else{ +_237(_21e); +} +}); +} +if(opts.closable){ +_227(tool,"panel-tool-close",function(){ +_239(_21e); +}); +} +} +_220.children("div.panel-body").removeClass("panel-body-noheader"); +} +}; +function _227(c,icon,_228){ +var a=$("").addClass(icon).appendTo(c); +a.bind("click",_228); +}; +function _222(){ +if(opts.footer){ +$(opts.footer).addClass("panel-footer").appendTo(_220); +$(_21e).addClass("panel-body-nobottom"); +}else{ +_220.children(".panel-footer").remove(); +$(_21e).removeClass("panel-body-nobottom"); +} +}; +}; +function _229(_22a,_22b){ +var _22c=$.data(_22a,"panel"); +var opts=_22c.options; +if(_22d){ +opts.queryParams=_22b; +} +if(!opts.href){ +return; +} +if(!_22c.isLoaded||!opts.cache){ +var _22d=$.extend({},opts.queryParams); +if(opts.onBeforeLoad.call(_22a,_22d)==false){ +return; +} +_22c.isLoaded=false; +$(_22a).panel("clear"); +if(opts.loadingMessage){ +$(_22a).html($("
                                                ").html(opts.loadingMessage)); +} +opts.loader.call(_22a,_22d,function(data){ +var _22e=opts.extractor.call(_22a,data); +$(_22a).html(_22e); +$.parser.parse($(_22a)); +opts.onLoad.apply(_22a,arguments); +_22c.isLoaded=true; +},function(){ +opts.onLoadError.apply(_22a,arguments); +}); +} +}; +function _22f(_230){ +var t=$(_230); +t.find(".combo-f").each(function(){ +$(this).combo("destroy"); +}); +t.find(".m-btn").each(function(){ +$(this).menubutton("destroy"); +}); +t.find(".s-btn").each(function(){ +$(this).splitbutton("destroy"); +}); +t.find(".tooltip-f").each(function(){ +$(this).tooltip("destroy"); +}); +t.children("div").each(function(){ +$(this)._size("unfit"); +}); +t.empty(); +}; +function _231(_232){ +$(_232).panel("doLayout",true); +}; +function _233(_234,_235){ +var opts=$.data(_234,"panel").options; +var _236=$.data(_234,"panel").panel; +if(_235!=true){ +if(opts.onBeforeOpen.call(_234)==false){ +return; +} +} +_236.stop(true,true); +if($.isFunction(opts.openAnimation)){ +opts.openAnimation.call(_234,cb); +}else{ +switch(opts.openAnimation){ +case "slide": +_236.slideDown(opts.openDuration,cb); +break; +case "fade": +_236.fadeIn(opts.openDuration,cb); +break; +case "show": +_236.show(opts.openDuration,cb); +break; +default: +_236.show(); +cb(); +} +} +function cb(){ +opts.closed=false; +opts.minimized=false; +var tool=_236.children(".panel-header").find("a.panel-tool-restore"); +if(tool.length){ +opts.maximized=true; +} +opts.onOpen.call(_234); +if(opts.maximized==true){ +opts.maximized=false; +_237(_234); +} +if(opts.collapsed==true){ +opts.collapsed=false; +_238(_234); +} +if(!opts.collapsed){ +_229(_234); +_231(_234); +} +}; +}; +function _239(_23a,_23b){ +var opts=$.data(_23a,"panel").options; +var _23c=$.data(_23a,"panel").panel; +if(_23b!=true){ +if(opts.onBeforeClose.call(_23a)==false){ +return; +} +} +_23c.stop(true,true); +_23c._size("unfit"); +if($.isFunction(opts.closeAnimation)){ +opts.closeAnimation.call(_23a,cb); +}else{ +switch(opts.closeAnimation){ +case "slide": +_23c.slideUp(opts.closeDuration,cb); +break; +case "fade": +_23c.fadeOut(opts.closeDuration,cb); +break; +case "hide": +_23c.hide(opts.closeDuration,cb); +break; +default: +_23c.hide(); +cb(); +} +} +function cb(){ +opts.closed=true; +opts.onClose.call(_23a); +}; +}; +function _23d(_23e,_23f){ +var _240=$.data(_23e,"panel"); +var opts=_240.options; +var _241=_240.panel; +if(_23f!=true){ +if(opts.onBeforeDestroy.call(_23e)==false){ +return; +} +} +$(_23e).panel("clear").panel("clear","footer"); +_20b(_241); +opts.onDestroy.call(_23e); +}; +function _238(_242,_243){ +var opts=$.data(_242,"panel").options; +var _244=$.data(_242,"panel").panel; +var body=_244.children(".panel-body"); +var tool=_244.children(".panel-header").find("a.panel-tool-collapse"); +if(opts.collapsed==true){ +return; +} +body.stop(true,true); +if(opts.onBeforeCollapse.call(_242)==false){ +return; +} +tool.addClass("panel-tool-expand"); +if(_243==true){ +body.slideUp("normal",function(){ +opts.collapsed=true; +opts.onCollapse.call(_242); +}); +}else{ +body.hide(); +opts.collapsed=true; +opts.onCollapse.call(_242); +} +}; +function _245(_246,_247){ +var opts=$.data(_246,"panel").options; +var _248=$.data(_246,"panel").panel; +var body=_248.children(".panel-body"); +var tool=_248.children(".panel-header").find("a.panel-tool-collapse"); +if(opts.collapsed==false){ +return; +} +body.stop(true,true); +if(opts.onBeforeExpand.call(_246)==false){ +return; +} +tool.removeClass("panel-tool-expand"); +if(_247==true){ +body.slideDown("normal",function(){ +opts.collapsed=false; +opts.onExpand.call(_246); +_229(_246); +_231(_246); +}); +}else{ +body.show(); +opts.collapsed=false; +opts.onExpand.call(_246); +_229(_246); +_231(_246); +} +}; +function _237(_249){ +var opts=$.data(_249,"panel").options; +var _24a=$.data(_249,"panel").panel; +var tool=_24a.children(".panel-header").find("a.panel-tool-max"); +if(opts.maximized==true){ +return; +} +tool.addClass("panel-tool-restore"); +if(!$.data(_249,"panel").original){ +$.data(_249,"panel").original={width:opts.width,height:opts.height,left:opts.left,top:opts.top,fit:opts.fit}; +} +opts.left=0; +opts.top=0; +opts.fit=true; +_20c(_249); +opts.minimized=false; +opts.maximized=true; +opts.onMaximize.call(_249); +}; +function _24b(_24c){ +var opts=$.data(_24c,"panel").options; +var _24d=$.data(_24c,"panel").panel; +_24d._size("unfit"); +_24d.hide(); +opts.minimized=true; +opts.maximized=false; +opts.onMinimize.call(_24c); +}; +function _24e(_24f){ +var opts=$.data(_24f,"panel").options; +var _250=$.data(_24f,"panel").panel; +var tool=_250.children(".panel-header").find("a.panel-tool-max"); +if(opts.maximized==false){ +return; +} +_250.show(); +tool.removeClass("panel-tool-restore"); +$.extend(opts,$.data(_24f,"panel").original); +_20c(_24f); +opts.minimized=false; +opts.maximized=false; +$.data(_24f,"panel").original=null; +opts.onRestore.call(_24f); +}; +function _251(_252,_253){ +$.data(_252,"panel").options.title=_253; +$(_252).panel("header").find("div.panel-title").html(_253); +}; +var _254=null; +$(window).unbind(".panel").bind("resize.panel",function(){ +if(_254){ +clearTimeout(_254); +} +_254=setTimeout(function(){ +var _255=$("body.layout"); +if(_255.length){ +_255.layout("resize"); +$("body").children(".easyui-fluid:visible").each(function(){ +$(this).triggerHandler("_resize"); +}); +}else{ +$("body").panel("doLayout"); +} +_254=null; +},100); +}); +$.fn.panel=function(_256,_257){ +if(typeof _256=="string"){ +return $.fn.panel.methods[_256](this,_257); +} +_256=_256||{}; +return this.each(function(){ +var _258=$.data(this,"panel"); +var opts; +if(_258){ +opts=$.extend(_258.options,_256); +_258.isLoaded=false; +}else{ +opts=$.extend({},$.fn.panel.defaults,$.fn.panel.parseOptions(this),_256); +$(this).attr("title",""); +_258=$.data(this,"panel",{options:opts,panel:_219(this),isLoaded:false}); +} +_21d(this); +if(opts.doSize==true){ +_258.panel.css("display","block"); +_20c(this); +} +if(opts.closed==true||opts.minimized==true){ +_258.panel.hide(); +}else{ +_233(this); +} +}); +}; +$.fn.panel.methods={options:function(jq){ +return $.data(jq[0],"panel").options; +},panel:function(jq){ +return $.data(jq[0],"panel").panel; +},header:function(jq){ +return $.data(jq[0],"panel").panel.children(".panel-header"); +},footer:function(jq){ +return jq.panel("panel").children(".panel-footer"); +},body:function(jq){ +return $.data(jq[0],"panel").panel.children(".panel-body"); +},setTitle:function(jq,_259){ +return jq.each(function(){ +_251(this,_259); +}); +},open:function(jq,_25a){ +return jq.each(function(){ +_233(this,_25a); +}); +},close:function(jq,_25b){ +return jq.each(function(){ +_239(this,_25b); +}); +},destroy:function(jq,_25c){ +return jq.each(function(){ +_23d(this,_25c); +}); +},clear:function(jq,type){ +return jq.each(function(){ +_22f(type=="footer"?$(this).panel("footer"):this); +}); +},refresh:function(jq,href){ +return jq.each(function(){ +var _25d=$.data(this,"panel"); +_25d.isLoaded=false; +if(href){ +if(typeof href=="string"){ +_25d.options.href=href; +}else{ +_25d.options.queryParams=href; +} +} +_229(this); +}); +},resize:function(jq,_25e){ +return jq.each(function(){ +_20c(this,_25e); +}); +},doLayout:function(jq,all){ +return jq.each(function(){ +_25f(this,"body"); +_25f($(this).siblings(".panel-footer")[0],"footer"); +function _25f(_260,type){ +if(!_260){ +return; +} +var _261=_260==$("body")[0]; +var s=$(_260).find("div.panel:visible,div.accordion:visible,div.tabs-container:visible,div.layout:visible,.easyui-fluid:visible").filter(function(_262,el){ +var p=$(el).parents(".panel-"+type+":first"); +return _261?p.length==0:p[0]==_260; +}); +s.each(function(){ +$(this).triggerHandler("_resize",[all||false]); +}); +}; +}); +},move:function(jq,_263){ +return jq.each(function(){ +_215(this,_263); +}); +},maximize:function(jq){ +return jq.each(function(){ +_237(this); +}); +},minimize:function(jq){ +return jq.each(function(){ +_24b(this); +}); +},restore:function(jq){ +return jq.each(function(){ +_24e(this); +}); +},collapse:function(jq,_264){ +return jq.each(function(){ +_238(this,_264); +}); +},expand:function(jq,_265){ +return jq.each(function(){ +_245(this,_265); +}); +}}; +$.fn.panel.parseOptions=function(_266){ +var t=$(_266); +var hh=t.children(".panel-header,header"); +var ff=t.children(".panel-footer,footer"); +return $.extend({},$.parser.parseOptions(_266,["id","width","height","left","top","title","iconCls","cls","headerCls","bodyCls","tools","href","method","header","footer",{cache:"boolean",fit:"boolean",border:"boolean",noheader:"boolean"},{collapsible:"boolean",minimizable:"boolean",maximizable:"boolean"},{closable:"boolean",collapsed:"boolean",minimized:"boolean",maximized:"boolean",closed:"boolean"},"openAnimation","closeAnimation",{openDuration:"number",closeDuration:"number"},]),{loadingMessage:(t.attr("loadingMessage")!=undefined?t.attr("loadingMessage"):undefined),header:(hh.length?hh.removeClass("panel-header"):undefined),footer:(ff.length?ff.removeClass("panel-footer"):undefined)}); +}; +$.fn.panel.defaults={id:null,title:null,iconCls:null,width:"auto",height:"auto",left:null,top:null,cls:null,headerCls:null,bodyCls:null,style:{},href:null,cache:true,fit:false,border:true,doSize:true,noheader:false,content:null,collapsible:false,minimizable:false,maximizable:false,closable:false,collapsed:false,minimized:false,maximized:false,closed:false,openAnimation:false,openDuration:400,closeAnimation:false,closeDuration:400,tools:null,footer:null,header:null,queryParams:{},method:"get",href:null,loadingMessage:"Loading...",loader:function(_267,_268,_269){ +var opts=$(this).panel("options"); +if(!opts.href){ +return false; +} +$.ajax({type:opts.method,url:opts.href,cache:false,data:_267,dataType:"html",success:function(data){ +_268(data); +},error:function(){ +_269.apply(this,arguments); +}}); +},extractor:function(data){ +var _26a=/]*>((.|[\n\r])*)<\/body>/im; +var _26b=_26a.exec(data); +if(_26b){ +return _26b[1]; +}else{ +return data; +} +},onBeforeLoad:function(_26c){ +},onLoad:function(){ +},onLoadError:function(){ +},onBeforeOpen:function(){ +},onOpen:function(){ +},onBeforeClose:function(){ +},onClose:function(){ +},onBeforeDestroy:function(){ +},onDestroy:function(){ +},onResize:function(_26d,_26e){ +},onMove:function(left,top){ +},onMaximize:function(){ +},onRestore:function(){ +},onMinimize:function(){ +},onBeforeCollapse:function(){ +},onBeforeExpand:function(){ +},onCollapse:function(){ +},onExpand:function(){ +}}; +})(jQuery); +(function($){ +function _26f(_270,_271){ +var _272=$.data(_270,"window"); +if(_271){ +if(_271.left!=null){ +_272.options.left=_271.left; +} +if(_271.top!=null){ +_272.options.top=_271.top; +} +} +$(_270).panel("move",_272.options); +if(_272.shadow){ +_272.shadow.css({left:_272.options.left,top:_272.options.top}); +} +}; +function _273(_274,_275){ +var opts=$.data(_274,"window").options; +var pp=$(_274).window("panel"); +var _276=pp._outerWidth(); +if(opts.inline){ +var _277=pp.parent(); +opts.left=Math.ceil((_277.width()-_276)/2+_277.scrollLeft()); +}else{ +opts.left=Math.ceil(($(window)._outerWidth()-_276)/2+$(document).scrollLeft()); +} +if(_275){ +_26f(_274); +} +}; +function _278(_279,_27a){ +var opts=$.data(_279,"window").options; +var pp=$(_279).window("panel"); +var _27b=pp._outerHeight(); +if(opts.inline){ +var _27c=pp.parent(); +opts.top=Math.ceil((_27c.height()-_27b)/2+_27c.scrollTop()); +}else{ +opts.top=Math.ceil(($(window)._outerHeight()-_27b)/2+$(document).scrollTop()); +} +if(_27a){ +_26f(_279); +} +}; +function _27d(_27e){ +var _27f=$.data(_27e,"window"); +var opts=_27f.options; +var win=$(_27e).panel($.extend({},_27f.options,{border:false,doSize:true,closed:true,cls:"window",headerCls:"window-header",bodyCls:"window-body "+(opts.noheader?"window-body-noheader":""),onBeforeDestroy:function(){ +if(opts.onBeforeDestroy.call(_27e)==false){ +return false; +} +if(_27f.shadow){ +_27f.shadow.remove(); +} +if(_27f.mask){ +_27f.mask.remove(); +} +},onClose:function(){ +if(_27f.shadow){ +_27f.shadow.hide(); +} +if(_27f.mask){ +_27f.mask.hide(); +} +opts.onClose.call(_27e); +},onOpen:function(){ +if(_27f.mask){ +_27f.mask.css($.extend({display:"block",zIndex:$.fn.window.defaults.zIndex++},$.fn.window.getMaskSize(_27e))); +} +if(_27f.shadow){ +_27f.shadow.css({display:"block",zIndex:$.fn.window.defaults.zIndex++,left:opts.left,top:opts.top,width:_27f.window._outerWidth(),height:_27f.window._outerHeight()}); +} +_27f.window.css("z-index",$.fn.window.defaults.zIndex++); +opts.onOpen.call(_27e); +},onResize:function(_280,_281){ +var _282=$(this).panel("options"); +$.extend(opts,{width:_282.width,height:_282.height,left:_282.left,top:_282.top}); +if(_27f.shadow){ +_27f.shadow.css({left:opts.left,top:opts.top,width:_27f.window._outerWidth(),height:_27f.window._outerHeight()}); +} +opts.onResize.call(_27e,_280,_281); +},onMinimize:function(){ +if(_27f.shadow){ +_27f.shadow.hide(); +} +if(_27f.mask){ +_27f.mask.hide(); +} +_27f.options.onMinimize.call(_27e); +},onBeforeCollapse:function(){ +if(opts.onBeforeCollapse.call(_27e)==false){ +return false; +} +if(_27f.shadow){ +_27f.shadow.hide(); +} +},onExpand:function(){ +if(_27f.shadow){ +_27f.shadow.show(); +} +opts.onExpand.call(_27e); +}})); +_27f.window=win.panel("panel"); +if(_27f.mask){ +_27f.mask.remove(); +} +if(opts.modal){ +_27f.mask=$("
                                                ").insertAfter(_27f.window); +} +if(_27f.shadow){ +_27f.shadow.remove(); +} +if(opts.shadow){ +_27f.shadow=$("
                                                ").insertAfter(_27f.window); +} +var _283=opts.closed; +if(opts.left==null){ +_273(_27e); +} +if(opts.top==null){ +_278(_27e); +} +_26f(_27e); +if(!_283){ +win.window("open"); +} +}; +function _284(_285){ +var _286=$.data(_285,"window"); +_286.window.draggable({handle:">div.panel-header>div.panel-title",disabled:_286.options.draggable==false,onStartDrag:function(e){ +if(_286.mask){ +_286.mask.css("z-index",$.fn.window.defaults.zIndex++); +} +if(_286.shadow){ +_286.shadow.css("z-index",$.fn.window.defaults.zIndex++); +} +_286.window.css("z-index",$.fn.window.defaults.zIndex++); +if(!_286.proxy){ +_286.proxy=$("
                                                ").insertAfter(_286.window); +} +_286.proxy.css({display:"none",zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top}); +_286.proxy._outerWidth(_286.window._outerWidth()); +_286.proxy._outerHeight(_286.window._outerHeight()); +setTimeout(function(){ +if(_286.proxy){ +_286.proxy.show(); +} +},500); +},onDrag:function(e){ +_286.proxy.css({display:"block",left:e.data.left,top:e.data.top}); +return false; +},onStopDrag:function(e){ +_286.options.left=e.data.left; +_286.options.top=e.data.top; +$(_285).window("move"); +_286.proxy.remove(); +_286.proxy=null; +}}); +_286.window.resizable({disabled:_286.options.resizable==false,onStartResize:function(e){ +if(_286.pmask){ +_286.pmask.remove(); +} +_286.pmask=$("
                                                ").insertAfter(_286.window); +_286.pmask.css({zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top,width:_286.window._outerWidth(),height:_286.window._outerHeight()}); +if(_286.proxy){ +_286.proxy.remove(); +} +_286.proxy=$("
                                                ").insertAfter(_286.window); +_286.proxy.css({zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top}); +_286.proxy._outerWidth(e.data.width)._outerHeight(e.data.height); +},onResize:function(e){ +_286.proxy.css({left:e.data.left,top:e.data.top}); +_286.proxy._outerWidth(e.data.width); +_286.proxy._outerHeight(e.data.height); +return false; +},onStopResize:function(e){ +$(_285).window("resize",e.data); +_286.pmask.remove(); +_286.pmask=null; +_286.proxy.remove(); +_286.proxy=null; +}}); +}; +$(window).resize(function(){ +$("body>div.window-mask").css({width:$(window)._outerWidth(),height:$(window)._outerHeight()}); +setTimeout(function(){ +$("body>div.window-mask").css($.fn.window.getMaskSize()); +},50); +}); +$.fn.window=function(_287,_288){ +if(typeof _287=="string"){ +var _289=$.fn.window.methods[_287]; +if(_289){ +return _289(this,_288); +}else{ +return this.panel(_287,_288); +} +} +_287=_287||{}; +return this.each(function(){ +var _28a=$.data(this,"window"); +if(_28a){ +$.extend(_28a.options,_287); +}else{ +_28a=$.data(this,"window",{options:$.extend({},$.fn.window.defaults,$.fn.window.parseOptions(this),_287)}); +if(!_28a.options.inline){ +document.body.appendChild(this); +} +} +_27d(this); +_284(this); +}); +}; +$.fn.window.methods={options:function(jq){ +var _28b=jq.panel("options"); +var _28c=$.data(jq[0],"window").options; +return $.extend(_28c,{closed:_28b.closed,collapsed:_28b.collapsed,minimized:_28b.minimized,maximized:_28b.maximized}); +},window:function(jq){ +return $.data(jq[0],"window").window; +},move:function(jq,_28d){ +return jq.each(function(){ +_26f(this,_28d); +}); +},hcenter:function(jq){ +return jq.each(function(){ +_273(this,true); +}); +},vcenter:function(jq){ +return jq.each(function(){ +_278(this,true); +}); +},center:function(jq){ +return jq.each(function(){ +_273(this); +_278(this); +_26f(this); +}); +}}; +$.fn.window.getMaskSize=function(_28e){ +var _28f=$(_28e).data("window"); +var _290=(_28f&&_28f.options.inline); +return {width:(_290?"100%":$(document).width()),height:(_290?"100%":$(document).height())}; +}; +$.fn.window.parseOptions=function(_291){ +return $.extend({},$.fn.panel.parseOptions(_291),$.parser.parseOptions(_291,[{draggable:"boolean",resizable:"boolean",shadow:"boolean",modal:"boolean",inline:"boolean"}])); +}; +$.fn.window.defaults=$.extend({},$.fn.panel.defaults,{zIndex:9000,draggable:true,resizable:true,shadow:true,modal:false,inline:false,title:"New Window",collapsible:true,minimizable:true,maximizable:true,closable:true,closed:false}); +})(jQuery); +(function($){ +function _292(_293){ +var opts=$.data(_293,"dialog").options; +opts.inited=false; +$(_293).window($.extend({},opts,{onResize:function(w,h){ +if(opts.inited){ +_298(this); +opts.onResize.call(this,w,h); +} +}})); +var win=$(_293).window("window"); +if(opts.toolbar){ +if($.isArray(opts.toolbar)){ +$(_293).siblings("div.dialog-toolbar").remove(); +var _294=$("
                                                ").appendTo(win); +var tr=_294.find("tr"); +for(var i=0;i
                                                ").appendTo(tr); +}else{ +var td=$("").appendTo(tr); +var tool=$("").appendTo(td); +tool[0].onclick=eval(btn.handler||function(){ +}); +tool.linkbutton($.extend({},btn,{plain:true})); +} +} +}else{ +$(opts.toolbar).addClass("dialog-toolbar").appendTo(win); +$(opts.toolbar).show(); +} +}else{ +$(_293).siblings("div.dialog-toolbar").remove(); +} +if(opts.buttons){ +if($.isArray(opts.buttons)){ +$(_293).siblings("div.dialog-button").remove(); +var _295=$("
                                                ").appendTo(win); +for(var i=0;i").appendTo(_295); +if(p.handler){ +_296[0].onclick=p.handler; +} +_296.linkbutton(p); +} +}else{ +$(opts.buttons).addClass("dialog-button").appendTo(win); +$(opts.buttons).show(); +} +}else{ +$(_293).siblings("div.dialog-button").remove(); +} +opts.inited=true; +var _297=opts.closed; +win.show(); +$(_293).window("resize"); +if(_297){ +win.hide(); +} +}; +function _298(_299,_29a){ +var t=$(_299); +var opts=t.dialog("options"); +var _29b=opts.noheader; +var tb=t.siblings(".dialog-toolbar"); +var bb=t.siblings(".dialog-button"); +tb.insertBefore(_299).css({position:"relative",borderTopWidth:(_29b?1:0),top:(_29b?tb.length:0)}); +bb.insertAfter(_299).css({position:"relative",top:-1}); +tb.add(bb)._outerWidth(t._outerWidth()).find(".easyui-fluid:visible").each(function(){ +$(this).triggerHandler("_resize"); +}); +var _29c=tb._outerHeight()+bb._outerHeight(); +if(!isNaN(parseInt(opts.height))){ +t._outerHeight(t._outerHeight()-_29c); +}else{ +var _29d=t._size("min-height"); +if(_29d){ +t._size("min-height",_29d-_29c); +} +var _29e=t._size("max-height"); +if(_29e){ +t._size("max-height",_29e-_29c); +} +} +var _29f=$.data(_299,"window").shadow; +if(_29f){ +var cc=t.panel("panel"); +_29f.css({width:cc._outerWidth(),height:cc._outerHeight()}); +} +}; +$.fn.dialog=function(_2a0,_2a1){ +if(typeof _2a0=="string"){ +var _2a2=$.fn.dialog.methods[_2a0]; +if(_2a2){ +return _2a2(this,_2a1); +}else{ +return this.window(_2a0,_2a1); +} +} +_2a0=_2a0||{}; +return this.each(function(){ +var _2a3=$.data(this,"dialog"); +if(_2a3){ +$.extend(_2a3.options,_2a0); +}else{ +$.data(this,"dialog",{options:$.extend({},$.fn.dialog.defaults,$.fn.dialog.parseOptions(this),_2a0)}); +} +_292(this); +}); +}; +$.fn.dialog.methods={options:function(jq){ +var _2a4=$.data(jq[0],"dialog").options; +var _2a5=jq.panel("options"); +$.extend(_2a4,{width:_2a5.width,height:_2a5.height,left:_2a5.left,top:_2a5.top,closed:_2a5.closed,collapsed:_2a5.collapsed,minimized:_2a5.minimized,maximized:_2a5.maximized}); +return _2a4; +},dialog:function(jq){ +return jq.window("window"); +}}; +$.fn.dialog.parseOptions=function(_2a6){ +var t=$(_2a6); +return $.extend({},$.fn.window.parseOptions(_2a6),$.parser.parseOptions(_2a6,["toolbar","buttons"]),{toolbar:(t.children(".dialog-toolbar").length?t.children(".dialog-toolbar").removeClass("dialog-toolbar"):undefined),buttons:(t.children(".dialog-button").length?t.children(".dialog-button").removeClass("dialog-button"):undefined)}); +}; +$.fn.dialog.defaults=$.extend({},$.fn.window.defaults,{title:"New Dialog",collapsible:false,minimizable:false,maximizable:false,resizable:false,toolbar:null,buttons:null}); +})(jQuery); +(function($){ +function _2a7(){ +$(document).unbind(".messager").bind("keydown.messager",function(e){ +if(e.keyCode==27){ +$("body").children("div.messager-window").children("div.messager-body").each(function(){ +$(this).dialog("close"); +}); +}else{ +if(e.keyCode==9){ +var win=$("body").children("div.messager-window"); +if(!win.length){ +return; +} +var _2a8=win.find(".messager-input,.messager-button .l-btn"); +for(var i=0;i<_2a8.length;i++){ +if($(_2a8[i]).is(":focus")){ +$(_2a8[i>=_2a8.length-1?0:i+1]).focus(); +return false; +} +} +} +} +}); +}; +function _2a9(){ +$(document).unbind(".messager"); +}; +function _2aa(_2ab){ +var opts=$.extend({},$.messager.defaults,{modal:false,shadow:false,draggable:false,resizable:false,closed:true,style:{left:"",top:"",right:0,zIndex:$.fn.window.defaults.zIndex++,bottom:-document.body.scrollTop-document.documentElement.scrollTop},title:"",width:250,height:100,minHeight:0,showType:"slide",showSpeed:600,content:_2ab.msg,timeout:4000},_2ab); +var dlg=$("
                                                ").appendTo("body"); +dlg.dialog($.extend({},opts,{noheader:(opts.title?false:true),openAnimation:(opts.showType),closeAnimation:(opts.showType=="show"?"hide":opts.showType),openDuration:opts.showSpeed,closeDuration:opts.showSpeed,onOpen:function(){ +dlg.dialog("dialog").hover(function(){ +if(opts.timer){ +clearTimeout(opts.timer); +} +},function(){ +_2ac(); +}); +_2ac(); +function _2ac(){ +if(opts.timeout>0){ +opts.timer=setTimeout(function(){ +if(dlg.length&&dlg.data("dialog")){ +dlg.dialog("close"); +} +},opts.timeout); +} +}; +if(_2ab.onOpen){ +_2ab.onOpen.call(this); +}else{ +opts.onOpen.call(this); +} +},onClose:function(){ +if(opts.timer){ +clearTimeout(opts.timer); +} +if(_2ab.onClose){ +_2ab.onClose.call(this); +}else{ +opts.onClose.call(this); +} +dlg.dialog("destroy"); +}})); +dlg.dialog("dialog").css(opts.style); +dlg.dialog("open"); +return dlg; +}; +function _2ad(_2ae){ +_2a7(); +var dlg=$("
                                                ").appendTo("body"); +dlg.dialog($.extend({},_2ae,{noheader:(_2ae.title?false:true),onClose:function(){ +_2a9(); +if(_2ae.onClose){ +_2ae.onClose.call(this); +} +setTimeout(function(){ +dlg.dialog("destroy"); +},100); +}})); +var win=dlg.dialog("dialog").addClass("messager-window"); +win.find(".dialog-button").addClass("messager-button").find("a:first").focus(); +return dlg; +}; +function _2af(dlg,_2b0){ +dlg.dialog("close"); +dlg.dialog("options").fn(_2b0); +}; +$.messager={show:function(_2b1){ +return _2aa(_2b1); +},alert:function(_2b2,msg,icon,fn){ +var opts=typeof _2b2=="object"?_2b2:{title:_2b2,msg:msg,icon:icon,fn:fn}; +var cls=opts.icon?"messager-icon messager-"+opts.icon:""; +opts=$.extend({},$.messager.defaults,{content:"
                                                "+"
                                                "+opts.msg+"
                                                "+"
                                                "},opts); +if(!opts.buttons){ +opts.buttons=[{text:opts.ok,onClick:function(){ +_2af(dlg); +}}]; +} +var dlg=_2ad(opts); +return dlg; +},confirm:function(_2b3,msg,fn){ +var opts=typeof _2b3=="object"?_2b3:{title:_2b3,msg:msg,fn:fn}; +opts=$.extend({},$.messager.defaults,{content:"
                                                "+"
                                                "+opts.msg+"
                                                "+"
                                                "},opts); +if(!opts.buttons){ +opts.buttons=[{text:opts.ok,onClick:function(){ +_2af(dlg,true); +}},{text:opts.cancel,onClick:function(){ +_2af(dlg,false); +}}]; +} +var dlg=_2ad(opts); +return dlg; +},prompt:function(_2b4,msg,fn){ +var opts=typeof _2b4=="object"?_2b4:{title:_2b4,msg:msg,fn:fn}; +opts=$.extend({},$.messager.defaults,{content:"
                                                "+"
                                                "+opts.msg+"
                                                "+"
                                                "+"
                                                "+"
                                                "},opts); +if(!opts.buttons){ +opts.buttons=[{text:opts.ok,onClick:function(){ +_2af(dlg,dlg.find(".messager-input").val()); +}},{text:opts.cancel,onClick:function(){ +_2af(dlg); +}}]; +} +var dlg=_2ad(opts); +dlg.find("input.messager-input").focus(); +return dlg; +},progress:function(_2b5){ +var _2b6={bar:function(){ +return $("body>div.messager-window").find("div.messager-p-bar"); +},close:function(){ +var dlg=$("body>div.messager-window>div.messager-body:has(div.messager-progress)"); +if(dlg.length){ +dlg.dialog("close"); +} +}}; +if(typeof _2b5=="string"){ +var _2b7=_2b6[_2b5]; +return _2b7(); +} +_2b5=_2b5||{}; +var opts=$.extend({},{title:"",minHeight:0,content:undefined,msg:"",text:undefined,interval:300},_2b5); +var dlg=_2ad($.extend({},$.messager.defaults,{content:"
                                                "+opts.msg+"
                                                ",closable:false,doSize:false},opts,{onClose:function(){ +if(this.timer){ +clearInterval(this.timer); +} +if(_2b5.onClose){ +_2b5.onClose.call(this); +}else{ +$.messager.defaults.onClose.call(this); +} +}})); +var bar=dlg.find("div.messager-p-bar"); +bar.progressbar({text:opts.text}); +dlg.dialog("resize"); +if(opts.interval){ +dlg[0].timer=setInterval(function(){ +var v=bar.progressbar("getValue"); +v+=10; +if(v>100){ +v=0; +} +bar.progressbar("setValue",v); +},opts.interval); +} +return dlg; +}}; +$.messager.defaults=$.extend({},$.fn.dialog.defaults,{ok:"Ok",cancel:"Cancel",width:300,height:"auto",minHeight:150,modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,fn:function(){ +}}); +})(jQuery); +(function($){ +function _2b8(_2b9,_2ba){ +var _2bb=$.data(_2b9,"accordion"); +var opts=_2bb.options; +var _2bc=_2bb.panels; +var cc=$(_2b9); +if(_2ba){ +$.extend(opts,{width:_2ba.width,height:_2ba.height}); +} +cc._size(opts); +var _2bd=0; +var _2be="auto"; +var _2bf=cc.find(">.panel>.accordion-header"); +if(_2bf.length){ +_2bd=$(_2bf[0]).css("height","")._outerHeight(); +} +if(!isNaN(parseInt(opts.height))){ +_2be=cc.height()-_2bd*_2bf.length; +} +_2c0(true,_2be-_2c0(false)+1); +function _2c0(_2c1,_2c2){ +var _2c3=0; +for(var i=0;i<_2bc.length;i++){ +var p=_2bc[i]; +var h=p.panel("header")._outerHeight(_2bd); +if(p.panel("options").collapsible==_2c1){ +var _2c4=isNaN(_2c2)?undefined:(_2c2+_2bd*h.length); +p.panel("resize",{width:cc.width(),height:(_2c1?_2c4:undefined)}); +_2c3+=p.panel("panel").outerHeight()-_2bd*h.length; +} +} +return _2c3; +}; +}; +function _2c5(_2c6,_2c7,_2c8,all){ +var _2c9=$.data(_2c6,"accordion").panels; +var pp=[]; +for(var i=0;i<_2c9.length;i++){ +var p=_2c9[i]; +if(_2c7){ +if(p.panel("options")[_2c7]==_2c8){ +pp.push(p); +} +}else{ +if(p[0]==$(_2c8)[0]){ +return i; +} +} +} +if(_2c7){ +return all?pp:(pp.length?pp[0]:null); +}else{ +return -1; +} +}; +function _2ca(_2cb){ +return _2c5(_2cb,"collapsed",false,true); +}; +function _2cc(_2cd){ +var pp=_2ca(_2cd); +return pp.length?pp[0]:null; +}; +function _2ce(_2cf,_2d0){ +return _2c5(_2cf,null,_2d0); +}; +function _2d1(_2d2,_2d3){ +var _2d4=$.data(_2d2,"accordion").panels; +if(typeof _2d3=="number"){ +if(_2d3<0||_2d3>=_2d4.length){ +return null; +}else{ +return _2d4[_2d3]; +} +} +return _2c5(_2d2,"title",_2d3); +}; +function _2d5(_2d6){ +var opts=$.data(_2d6,"accordion").options; +var cc=$(_2d6); +if(opts.border){ +cc.removeClass("accordion-noborder"); +}else{ +cc.addClass("accordion-noborder"); +} +}; +function init(_2d7){ +var _2d8=$.data(_2d7,"accordion"); +var cc=$(_2d7); +cc.addClass("accordion"); +_2d8.panels=[]; +cc.children("div").each(function(){ +var opts=$.extend({},$.parser.parseOptions(this),{selected:($(this).attr("selected")?true:undefined)}); +var pp=$(this); +_2d8.panels.push(pp); +_2da(_2d7,pp,opts); +}); +cc.bind("_resize",function(e,_2d9){ +if($(this).hasClass("easyui-fluid")||_2d9){ +_2b8(_2d7); +} +return false; +}); +}; +function _2da(_2db,pp,_2dc){ +var opts=$.data(_2db,"accordion").options; +pp.panel($.extend({},{collapsible:true,minimizable:false,maximizable:false,closable:false,doSize:false,collapsed:true,headerCls:"accordion-header",bodyCls:"accordion-body"},_2dc,{onBeforeExpand:function(){ +if(_2dc.onBeforeExpand){ +if(_2dc.onBeforeExpand.call(this)==false){ +return false; +} +} +if(!opts.multiple){ +var all=$.grep(_2ca(_2db),function(p){ +return p.panel("options").collapsible; +}); +for(var i=0;i").addClass("accordion-collapse accordion-expand").appendTo(tool); +t.bind("click",function(){ +_2e0(pp); +return false; +}); +pp.panel("options").collapsible?t.show():t.hide(); +_2df.click(function(){ +_2e0(pp); +return false; +}); +function _2e0(p){ +var _2e1=p.panel("options"); +if(_2e1.collapsible){ +var _2e2=_2ce(_2db,p); +if(_2e1.collapsed){ +_2e3(_2db,_2e2); +}else{ +_2e4(_2db,_2e2); +} +} +}; +}; +function _2e3(_2e5,_2e6){ +var p=_2d1(_2e5,_2e6); +if(!p){ +return; +} +_2e7(_2e5); +var opts=$.data(_2e5,"accordion").options; +p.panel("expand",opts.animate); +}; +function _2e4(_2e8,_2e9){ +var p=_2d1(_2e8,_2e9); +if(!p){ +return; +} +_2e7(_2e8); +var opts=$.data(_2e8,"accordion").options; +p.panel("collapse",opts.animate); +}; +function _2ea(_2eb){ +var opts=$.data(_2eb,"accordion").options; +var p=_2c5(_2eb,"selected",true); +if(p){ +_2ec(_2ce(_2eb,p)); +}else{ +_2ec(opts.selected); +} +function _2ec(_2ed){ +var _2ee=opts.animate; +opts.animate=false; +_2e3(_2eb,_2ed); +opts.animate=_2ee; +}; +}; +function _2e7(_2ef){ +var _2f0=$.data(_2ef,"accordion").panels; +for(var i=0;i<_2f0.length;i++){ +_2f0[i].stop(true,true); +} +}; +function add(_2f1,_2f2){ +var _2f3=$.data(_2f1,"accordion"); +var opts=_2f3.options; +var _2f4=_2f3.panels; +if(_2f2.selected==undefined){ +_2f2.selected=true; +} +_2e7(_2f1); +var pp=$("
                                                ").appendTo(_2f1); +_2f4.push(pp); +_2da(_2f1,pp,_2f2); +_2b8(_2f1); +opts.onAdd.call(_2f1,_2f2.title,_2f4.length-1); +if(_2f2.selected){ +_2e3(_2f1,_2f4.length-1); +} +}; +function _2f5(_2f6,_2f7){ +var _2f8=$.data(_2f6,"accordion"); +var opts=_2f8.options; +var _2f9=_2f8.panels; +_2e7(_2f6); +var _2fa=_2d1(_2f6,_2f7); +var _2fb=_2fa.panel("options").title; +var _2fc=_2ce(_2f6,_2fa); +if(!_2fa){ +return; +} +if(opts.onBeforeRemove.call(_2f6,_2fb,_2fc)==false){ +return; +} +_2f9.splice(_2fc,1); +_2fa.panel("destroy"); +if(_2f9.length){ +_2b8(_2f6); +var curr=_2cc(_2f6); +if(!curr){ +_2e3(_2f6,0); +} +} +opts.onRemove.call(_2f6,_2fb,_2fc); +}; +$.fn.accordion=function(_2fd,_2fe){ +if(typeof _2fd=="string"){ +return $.fn.accordion.methods[_2fd](this,_2fe); +} +_2fd=_2fd||{}; +return this.each(function(){ +var _2ff=$.data(this,"accordion"); +if(_2ff){ +$.extend(_2ff.options,_2fd); +}else{ +$.data(this,"accordion",{options:$.extend({},$.fn.accordion.defaults,$.fn.accordion.parseOptions(this),_2fd),accordion:$(this).addClass("accordion"),panels:[]}); +init(this); +} +_2d5(this); +_2b8(this); +_2ea(this); +}); +}; +$.fn.accordion.methods={options:function(jq){ +return $.data(jq[0],"accordion").options; +},panels:function(jq){ +return $.data(jq[0],"accordion").panels; +},resize:function(jq,_300){ +return jq.each(function(){ +_2b8(this,_300); +}); +},getSelections:function(jq){ +return _2ca(jq[0]); +},getSelected:function(jq){ +return _2cc(jq[0]); +},getPanel:function(jq,_301){ +return _2d1(jq[0],_301); +},getPanelIndex:function(jq,_302){ +return _2ce(jq[0],_302); +},select:function(jq,_303){ +return jq.each(function(){ +_2e3(this,_303); +}); +},unselect:function(jq,_304){ +return jq.each(function(){ +_2e4(this,_304); +}); +},add:function(jq,_305){ +return jq.each(function(){ +add(this,_305); +}); +},remove:function(jq,_306){ +return jq.each(function(){ +_2f5(this,_306); +}); +}}; +$.fn.accordion.parseOptions=function(_307){ +var t=$(_307); +return $.extend({},$.parser.parseOptions(_307,["width","height",{fit:"boolean",border:"boolean",animate:"boolean",multiple:"boolean",selected:"number"}])); +}; +$.fn.accordion.defaults={width:"auto",height:"auto",fit:false,border:true,animate:true,multiple:false,selected:0,onSelect:function(_308,_309){ +},onUnselect:function(_30a,_30b){ +},onAdd:function(_30c,_30d){ +},onBeforeRemove:function(_30e,_30f){ +},onRemove:function(_310,_311){ +}}; +})(jQuery); +(function($){ +function _312(c){ +var w=0; +$(c).children().each(function(){ +w+=$(this).outerWidth(true); +}); +return w; +}; +function _313(_314){ +var opts=$.data(_314,"tabs").options; +if(opts.tabPosition=="left"||opts.tabPosition=="right"||!opts.showHeader){ +return; +} +var _315=$(_314).children("div.tabs-header"); +var tool=_315.children("div.tabs-tool:not(.tabs-tool-hidden)"); +var _316=_315.children("div.tabs-scroller-left"); +var _317=_315.children("div.tabs-scroller-right"); +var wrap=_315.children("div.tabs-wrap"); +var _318=_315.outerHeight(); +if(opts.plain){ +_318-=_318-_315.height(); +} +tool._outerHeight(_318); +var _319=_312(_315.find("ul.tabs")); +var _31a=_315.width()-tool._outerWidth(); +if(_319>_31a){ +_316.add(_317).show()._outerHeight(_318); +if(opts.toolPosition=="left"){ +tool.css({left:_316.outerWidth(),right:""}); +wrap.css({marginLeft:_316.outerWidth()+tool._outerWidth(),marginRight:_317._outerWidth(),width:_31a-_316.outerWidth()-_317.outerWidth()}); +}else{ +tool.css({left:"",right:_317.outerWidth()}); +wrap.css({marginLeft:_316.outerWidth(),marginRight:_317.outerWidth()+tool._outerWidth(),width:_31a-_316.outerWidth()-_317.outerWidth()}); +} +}else{ +_316.add(_317).hide(); +if(opts.toolPosition=="left"){ +tool.css({left:0,right:""}); +wrap.css({marginLeft:tool._outerWidth(),marginRight:0,width:_31a}); +}else{ +tool.css({left:"",right:0}); +wrap.css({marginLeft:0,marginRight:tool._outerWidth(),width:_31a}); +} +} +}; +function _31b(_31c){ +var opts=$.data(_31c,"tabs").options; +var _31d=$(_31c).children("div.tabs-header"); +if(opts.tools){ +if(typeof opts.tools=="string"){ +$(opts.tools).addClass("tabs-tool").appendTo(_31d); +$(opts.tools).show(); +}else{ +_31d.children("div.tabs-tool").remove(); +var _31e=$("
                                                ").appendTo(_31d); +var tr=_31e.find("tr"); +for(var i=0;i").appendTo(tr); +var tool=$("").appendTo(td); +tool[0].onclick=eval(opts.tools[i].handler||function(){ +}); +tool.linkbutton($.extend({},opts.tools[i],{plain:true})); +} +} +}else{ +_31d.children("div.tabs-tool").remove(); +} +}; +function _31f(_320,_321){ +var _322=$.data(_320,"tabs"); +var opts=_322.options; +var cc=$(_320); +if(!opts.doSize){ +return; +} +if(_321){ +$.extend(opts,{width:_321.width,height:_321.height}); +} +cc._size(opts); +var _323=cc.children("div.tabs-header"); +var _324=cc.children("div.tabs-panels"); +var wrap=_323.find("div.tabs-wrap"); +var ul=wrap.find(".tabs"); +ul.children("li").removeClass("tabs-first tabs-last"); +ul.children("li:first").addClass("tabs-first"); +ul.children("li:last").addClass("tabs-last"); +if(opts.tabPosition=="left"||opts.tabPosition=="right"){ +_323._outerWidth(opts.showHeader?opts.headerWidth:0); +_324._outerWidth(cc.width()-_323.outerWidth()); +_323.add(_324)._size("height",isNaN(parseInt(opts.height))?"":cc.height()); +wrap._outerWidth(_323.width()); +ul._outerWidth(wrap.width()).css("height",""); +}else{ +_323.children("div.tabs-scroller-left,div.tabs-scroller-right,div.tabs-tool:not(.tabs-tool-hidden)").css("display",opts.showHeader?"block":"none"); +_323._outerWidth(cc.width()).css("height",""); +if(opts.showHeader){ +_323.css("background-color",""); +wrap.css("height",""); +}else{ +_323.css("background-color","transparent"); +_323._outerHeight(0); +wrap._outerHeight(0); +} +ul._outerHeight(opts.tabHeight).css("width",""); +ul._outerHeight(ul.outerHeight()-ul.height()-1+opts.tabHeight).css("width",""); +_324._size("height",isNaN(parseInt(opts.height))?"":(cc.height()-_323.outerHeight())); +_324._size("width",cc.width()); +} +if(_322.tabs.length){ +var d1=ul.outerWidth(true)-ul.width(); +var li=ul.children("li:first"); +var d2=li.outerWidth(true)-li.width(); +var _325=_323.width()-_323.children(".tabs-tool:not(.tabs-tool-hidden)")._outerWidth(); +var _326=Math.floor((_325-d1-d2*_322.tabs.length)/_322.tabs.length); +$.map(_322.tabs,function(p){ +_327(p,(opts.justified&&$.inArray(opts.tabPosition,["top","bottom"])>=0)?_326:undefined); +}); +if(opts.justified&&$.inArray(opts.tabPosition,["top","bottom"])>=0){ +var _328=_325-d1-_312(ul); +_327(_322.tabs[_322.tabs.length-1],_326+_328); +} +} +_313(_320); +function _327(p,_329){ +var _32a=p.panel("options"); +var p_t=_32a.tab.find("a.tabs-inner"); +var _329=_329?_329:(parseInt(_32a.tabWidth||opts.tabWidth||undefined)); +if(_329){ +p_t._outerWidth(_329); +}else{ +p_t.css("width",""); +} +p_t._outerHeight(opts.tabHeight); +p_t.css("lineHeight",p_t.height()+"px"); +p_t.find(".easyui-fluid:visible").triggerHandler("_resize"); +}; +}; +function _32b(_32c){ +var opts=$.data(_32c,"tabs").options; +var tab=_32d(_32c); +if(tab){ +var _32e=$(_32c).children("div.tabs-panels"); +var _32f=opts.width=="auto"?"auto":_32e.width(); +var _330=opts.height=="auto"?"auto":_32e.height(); +tab.panel("resize",{width:_32f,height:_330}); +} +}; +function _331(_332){ +var tabs=$.data(_332,"tabs").tabs; +var cc=$(_332).addClass("tabs-container"); +var _333=$("
                                                ").insertBefore(cc); +cc.children("div").each(function(){ +_333[0].appendChild(this); +}); +cc[0].appendChild(_333[0]); +$("
                                                "+"
                                                "+"
                                                "+"
                                                "+"
                                                  "+"
                                                  "+"
                                                  ").prependTo(_332); +cc.children("div.tabs-panels").children("div").each(function(i){ +var opts=$.extend({},$.parser.parseOptions(this),{disabled:($(this).attr("disabled")?true:undefined),selected:($(this).attr("selected")?true:undefined)}); +_340(_332,opts,$(this)); +}); +cc.children("div.tabs-header").find(".tabs-scroller-left, .tabs-scroller-right").hover(function(){ +$(this).addClass("tabs-scroller-over"); +},function(){ +$(this).removeClass("tabs-scroller-over"); +}); +cc.bind("_resize",function(e,_334){ +if($(this).hasClass("easyui-fluid")||_334){ +_31f(_332); +_32b(_332); +} +return false; +}); +}; +function _335(_336){ +var _337=$.data(_336,"tabs"); +var opts=_337.options; +$(_336).children("div.tabs-header").unbind().bind("click",function(e){ +if($(e.target).hasClass("tabs-scroller-left")){ +$(_336).tabs("scrollBy",-opts.scrollIncrement); +}else{ +if($(e.target).hasClass("tabs-scroller-right")){ +$(_336).tabs("scrollBy",opts.scrollIncrement); +}else{ +var li=$(e.target).closest("li"); +if(li.hasClass("tabs-disabled")){ +return false; +} +var a=$(e.target).closest("a.tabs-close"); +if(a.length){ +_359(_336,_338(li)); +}else{ +if(li.length){ +var _339=_338(li); +var _33a=_337.tabs[_339].panel("options"); +if(_33a.collapsible){ +_33a.closed?_350(_336,_339):_36d(_336,_339); +}else{ +_350(_336,_339); +} +} +} +return false; +} +} +}).bind("contextmenu",function(e){ +var li=$(e.target).closest("li"); +if(li.hasClass("tabs-disabled")){ +return; +} +if(li.length){ +opts.onContextMenu.call(_336,e,li.find("span.tabs-title").html(),_338(li)); +} +}); +function _338(li){ +var _33b=0; +li.parent().children("li").each(function(i){ +if(li[0]==this){ +_33b=i; +return false; +} +}); +return _33b; +}; +}; +function _33c(_33d){ +var opts=$.data(_33d,"tabs").options; +var _33e=$(_33d).children("div.tabs-header"); +var _33f=$(_33d).children("div.tabs-panels"); +_33e.removeClass("tabs-header-top tabs-header-bottom tabs-header-left tabs-header-right"); +_33f.removeClass("tabs-panels-top tabs-panels-bottom tabs-panels-left tabs-panels-right"); +if(opts.tabPosition=="top"){ +_33e.insertBefore(_33f); +}else{ +if(opts.tabPosition=="bottom"){ +_33e.insertAfter(_33f); +_33e.addClass("tabs-header-bottom"); +_33f.addClass("tabs-panels-top"); +}else{ +if(opts.tabPosition=="left"){ +_33e.addClass("tabs-header-left"); +_33f.addClass("tabs-panels-right"); +}else{ +if(opts.tabPosition=="right"){ +_33e.addClass("tabs-header-right"); +_33f.addClass("tabs-panels-left"); +} +} +} +} +if(opts.plain==true){ +_33e.addClass("tabs-header-plain"); +}else{ +_33e.removeClass("tabs-header-plain"); +} +_33e.removeClass("tabs-header-narrow").addClass(opts.narrow?"tabs-header-narrow":""); +var tabs=_33e.find(".tabs"); +tabs.removeClass("tabs-pill").addClass(opts.pill?"tabs-pill":""); +tabs.removeClass("tabs-narrow").addClass(opts.narrow?"tabs-narrow":""); +tabs.removeClass("tabs-justified").addClass(opts.justified?"tabs-justified":""); +if(opts.border==true){ +_33e.removeClass("tabs-header-noborder"); +_33f.removeClass("tabs-panels-noborder"); +}else{ +_33e.addClass("tabs-header-noborder"); +_33f.addClass("tabs-panels-noborder"); +} +opts.doSize=true; +}; +function _340(_341,_342,pp){ +_342=_342||{}; +var _343=$.data(_341,"tabs"); +var tabs=_343.tabs; +if(_342.index==undefined||_342.index>tabs.length){ +_342.index=tabs.length; +} +if(_342.index<0){ +_342.index=0; +} +var ul=$(_341).children("div.tabs-header").find("ul.tabs"); +var _344=$(_341).children("div.tabs-panels"); +var tab=$("
                                                • "+""+""+""+""+"
                                                • "); +if(!pp){ +pp=$("
                                                  "); +} +if(_342.index>=tabs.length){ +tab.appendTo(ul); +pp.appendTo(_344); +tabs.push(pp); +}else{ +tab.insertBefore(ul.children("li:eq("+_342.index+")")); +pp.insertBefore(_344.children("div.panel:eq("+_342.index+")")); +tabs.splice(_342.index,0,pp); +} +pp.panel($.extend({},_342,{tab:tab,border:false,noheader:true,closed:true,doSize:false,iconCls:(_342.icon?_342.icon:undefined),onLoad:function(){ +if(_342.onLoad){ +_342.onLoad.call(this,arguments); +} +_343.options.onLoad.call(_341,$(this)); +},onBeforeOpen:function(){ +if(_342.onBeforeOpen){ +if(_342.onBeforeOpen.call(this)==false){ +return false; +} +} +var p=$(_341).tabs("getSelected"); +if(p){ +if(p[0]!=this){ +$(_341).tabs("unselect",_34b(_341,p)); +p=$(_341).tabs("getSelected"); +if(p){ +return false; +} +}else{ +_32b(_341); +return false; +} +} +var _345=$(this).panel("options"); +_345.tab.addClass("tabs-selected"); +var wrap=$(_341).find(">div.tabs-header>div.tabs-wrap"); +var left=_345.tab.position().left; +var _346=left+_345.tab.outerWidth(); +if(left<0||_346>wrap.width()){ +var _347=left-(wrap.width()-_345.tab.width())/2; +$(_341).tabs("scrollBy",_347); +}else{ +$(_341).tabs("scrollBy",0); +} +var _348=$(this).panel("panel"); +_348.css("display","block"); +_32b(_341); +_348.css("display","none"); +},onOpen:function(){ +if(_342.onOpen){ +_342.onOpen.call(this); +} +var _349=$(this).panel("options"); +_343.selectHis.push(_349.title); +_343.options.onSelect.call(_341,_349.title,_34b(_341,this)); +},onBeforeClose:function(){ +if(_342.onBeforeClose){ +if(_342.onBeforeClose.call(this)==false){ +return false; +} +} +$(this).panel("options").tab.removeClass("tabs-selected"); +},onClose:function(){ +if(_342.onClose){ +_342.onClose.call(this); +} +var _34a=$(this).panel("options"); +_343.options.onUnselect.call(_341,_34a.title,_34b(_341,this)); +}})); +$(_341).tabs("update",{tab:pp,options:pp.panel("options"),type:"header"}); +}; +function _34c(_34d,_34e){ +var _34f=$.data(_34d,"tabs"); +var opts=_34f.options; +if(_34e.selected==undefined){ +_34e.selected=true; +} +_340(_34d,_34e); +opts.onAdd.call(_34d,_34e.title,_34e.index); +if(_34e.selected){ +_350(_34d,_34e.index); +} +}; +function _351(_352,_353){ +_353.type=_353.type||"all"; +var _354=$.data(_352,"tabs").selectHis; +var pp=_353.tab; +var opts=pp.panel("options"); +var _355=opts.title; +$.extend(opts,_353.options,{iconCls:(_353.options.icon?_353.options.icon:undefined)}); +if(_353.type=="all"||_353.type=="body"){ +pp.panel(); +} +if(_353.type=="all"||_353.type=="header"){ +var tab=opts.tab; +if(opts.header){ +tab.find(".tabs-inner").html($(opts.header)); +}else{ +var _356=tab.find("span.tabs-title"); +var _357=tab.find("span.tabs-icon"); +_356.html(opts.title); +_357.attr("class","tabs-icon"); +tab.find("a.tabs-close").remove(); +if(opts.closable){ +_356.addClass("tabs-closable"); +$("").appendTo(tab); +}else{ +_356.removeClass("tabs-closable"); +} +if(opts.iconCls){ +_356.addClass("tabs-with-icon"); +_357.addClass(opts.iconCls); +}else{ +_356.removeClass("tabs-with-icon"); +} +if(opts.tools){ +var _358=tab.find("span.tabs-p-tool"); +if(!_358.length){ +var _358=$("").insertAfter(tab.find("a.tabs-inner")); +} +if($.isArray(opts.tools)){ +_358.empty(); +for(var i=0;i").appendTo(_358); +t.addClass(opts.tools[i].iconCls); +if(opts.tools[i].handler){ +t.bind("click",{handler:opts.tools[i].handler},function(e){ +if($(this).parents("li").hasClass("tabs-disabled")){ +return; +} +e.data.handler.call(this); +}); +} +} +}else{ +$(opts.tools).children().appendTo(_358); +} +var pr=_358.children().length*12; +if(opts.closable){ +pr+=8; +}else{ +pr-=3; +_358.css("right","5px"); +} +_356.css("padding-right",pr+"px"); +}else{ +tab.find("span.tabs-p-tool").remove(); +_356.css("padding-right",""); +} +} +if(_355!=opts.title){ +for(var i=0;i<_354.length;i++){ +if(_354[i]==_355){ +_354[i]=opts.title; +} +} +} +} +if(opts.disabled){ +opts.tab.addClass("tabs-disabled"); +}else{ +opts.tab.removeClass("tabs-disabled"); +} +_31f(_352); +$.data(_352,"tabs").options.onUpdate.call(_352,opts.title,_34b(_352,pp)); +}; +function _359(_35a,_35b){ +var opts=$.data(_35a,"tabs").options; +var tabs=$.data(_35a,"tabs").tabs; +var _35c=$.data(_35a,"tabs").selectHis; +if(!_35d(_35a,_35b)){ +return; +} +var tab=_35e(_35a,_35b); +var _35f=tab.panel("options").title; +var _360=_34b(_35a,tab); +if(opts.onBeforeClose.call(_35a,_35f,_360)==false){ +return; +} +var tab=_35e(_35a,_35b,true); +tab.panel("options").tab.remove(); +tab.panel("destroy"); +opts.onClose.call(_35a,_35f,_360); +_31f(_35a); +for(var i=0;i<_35c.length;i++){ +if(_35c[i]==_35f){ +_35c.splice(i,1); +i--; +} +} +var _361=_35c.pop(); +if(_361){ +_350(_35a,_361); +}else{ +if(tabs.length){ +_350(_35a,0); +} +} +}; +function _35e(_362,_363,_364){ +var tabs=$.data(_362,"tabs").tabs; +if(typeof _363=="number"){ +if(_363<0||_363>=tabs.length){ +return null; +}else{ +var tab=tabs[_363]; +if(_364){ +tabs.splice(_363,1); +} +return tab; +} +} +for(var i=0;i.tabs-header>.tabs-tool"); +if(_378){ +tool.removeClass("tabs-tool-hidden").show(); +}else{ +tool.addClass("tabs-tool-hidden").hide(); +} +$(_377).tabs("resize").tabs("scrollBy",0); +}; +$.fn.tabs=function(_379,_37a){ +if(typeof _379=="string"){ +return $.fn.tabs.methods[_379](this,_37a); +} +_379=_379||{}; +return this.each(function(){ +var _37b=$.data(this,"tabs"); +if(_37b){ +$.extend(_37b.options,_379); +}else{ +$.data(this,"tabs",{options:$.extend({},$.fn.tabs.defaults,$.fn.tabs.parseOptions(this),_379),tabs:[],selectHis:[]}); +_331(this); +} +_31b(this); +_33c(this); +_31f(this); +_335(this); +_367(this); +}); +}; +$.fn.tabs.methods={options:function(jq){ +var cc=jq[0]; +var opts=$.data(cc,"tabs").options; +var s=_32d(cc); +opts.selected=s?_34b(cc,s):-1; +return opts; +},tabs:function(jq){ +return $.data(jq[0],"tabs").tabs; +},resize:function(jq,_37c){ +return jq.each(function(){ +_31f(this,_37c); +_32b(this); +}); +},add:function(jq,_37d){ +return jq.each(function(){ +_34c(this,_37d); +}); +},close:function(jq,_37e){ +return jq.each(function(){ +_359(this,_37e); +}); +},getTab:function(jq,_37f){ +return _35e(jq[0],_37f); +},getTabIndex:function(jq,tab){ +return _34b(jq[0],tab); +},getSelected:function(jq){ +return _32d(jq[0]); +},select:function(jq,_380){ +return jq.each(function(){ +_350(this,_380); +}); +},unselect:function(jq,_381){ +return jq.each(function(){ +_36d(this,_381); +}); +},exists:function(jq,_382){ +return _35d(jq[0],_382); +},update:function(jq,_383){ +return jq.each(function(){ +_351(this,_383); +}); +},enableTab:function(jq,_384){ +return jq.each(function(){ +var opts=$(this).tabs("getTab",_384).panel("options"); +opts.tab.removeClass("tabs-disabled"); +opts.disabled=false; +}); +},disableTab:function(jq,_385){ +return jq.each(function(){ +var opts=$(this).tabs("getTab",_385).panel("options"); +opts.tab.addClass("tabs-disabled"); +opts.disabled=true; +}); +},showHeader:function(jq){ +return jq.each(function(){ +_373(this,true); +}); +},hideHeader:function(jq){ +return jq.each(function(){ +_373(this,false); +}); +},showTool:function(jq){ +return jq.each(function(){ +_376(this,true); +}); +},hideTool:function(jq){ +return jq.each(function(){ +_376(this,false); +}); +},scrollBy:function(jq,_386){ +return jq.each(function(){ +var opts=$(this).tabs("options"); +var wrap=$(this).find(">div.tabs-header>div.tabs-wrap"); +var pos=Math.min(wrap._scrollLeft()+_386,_387()); +wrap.animate({scrollLeft:pos},opts.scrollDuration); +function _387(){ +var w=0; +var ul=wrap.children("ul"); +ul.children("li").each(function(){ +w+=$(this).outerWidth(true); +}); +return w-wrap.width()+(ul.outerWidth()-ul.width()); +}; +}); +}}; +$.fn.tabs.parseOptions=function(_388){ +return $.extend({},$.parser.parseOptions(_388,["tools","toolPosition","tabPosition",{fit:"boolean",border:"boolean",plain:"boolean"},{headerWidth:"number",tabWidth:"number",tabHeight:"number",selected:"number"},{showHeader:"boolean",justified:"boolean",narrow:"boolean",pill:"boolean"}])); +}; +$.fn.tabs.defaults={width:"auto",height:"auto",headerWidth:150,tabWidth:"auto",tabHeight:27,selected:0,showHeader:true,plain:false,fit:false,border:true,justified:false,narrow:false,pill:false,tools:null,toolPosition:"right",tabPosition:"top",scrollIncrement:100,scrollDuration:400,onLoad:function(_389){ +},onSelect:function(_38a,_38b){ +},onUnselect:function(_38c,_38d){ +},onBeforeClose:function(_38e,_38f){ +},onClose:function(_390,_391){ +},onAdd:function(_392,_393){ +},onUpdate:function(_394,_395){ +},onContextMenu:function(e,_396,_397){ +}}; +})(jQuery); +(function($){ +var _398=false; +function _399(_39a,_39b){ +var _39c=$.data(_39a,"layout"); +var opts=_39c.options; +var _39d=_39c.panels; +var cc=$(_39a); +if(_39b){ +$.extend(opts,{width:_39b.width,height:_39b.height}); +} +if(_39a.tagName.toLowerCase()=="body"){ +cc._size("fit"); +}else{ +cc._size(opts); +} +var cpos={top:0,left:0,width:cc.width(),height:cc.height()}; +_39e(_39f(_39d.expandNorth)?_39d.expandNorth:_39d.north,"n"); +_39e(_39f(_39d.expandSouth)?_39d.expandSouth:_39d.south,"s"); +_3a0(_39f(_39d.expandEast)?_39d.expandEast:_39d.east,"e"); +_3a0(_39f(_39d.expandWest)?_39d.expandWest:_39d.west,"w"); +_39d.center.panel("resize",cpos); +function _39e(pp,type){ +if(!pp.length||!_39f(pp)){ +return; +} +var opts=pp.panel("options"); +pp.panel("resize",{width:cc.width(),height:opts.height}); +var _3a1=pp.panel("panel").outerHeight(); +pp.panel("move",{left:0,top:(type=="n"?0:cc.height()-_3a1)}); +cpos.height-=_3a1; +if(type=="n"){ +cpos.top+=_3a1; +if(!opts.split&&opts.border){ +cpos.top--; +} +} +if(!opts.split&&opts.border){ +cpos.height++; +} +}; +function _3a0(pp,type){ +if(!pp.length||!_39f(pp)){ +return; +} +var opts=pp.panel("options"); +pp.panel("resize",{width:opts.width,height:cpos.height}); +var _3a2=pp.panel("panel").outerWidth(); +pp.panel("move",{left:(type=="e"?cc.width()-_3a2:0),top:cpos.top}); +cpos.width-=_3a2; +if(type=="w"){ +cpos.left+=_3a2; +if(!opts.split&&opts.border){ +cpos.left--; +} +} +if(!opts.split&&opts.border){ +cpos.width++; +} +}; +}; +function init(_3a3){ +var cc=$(_3a3); +cc.addClass("layout"); +function _3a4(cc){ +var opts=cc.layout("options"); +var _3a5=opts.onAdd; +opts.onAdd=function(){ +}; +cc.children("div").each(function(){ +var _3a6=$.fn.layout.parsePanelOptions(this); +if("north,south,east,west,center".indexOf(_3a6.region)>=0){ +_3a8(_3a3,_3a6,this); +} +}); +opts.onAdd=_3a5; +}; +cc.children("form").length?_3a4(cc.children("form")):_3a4(cc); +cc.append("
                                                  "); +cc.bind("_resize",function(e,_3a7){ +if($(this).hasClass("easyui-fluid")||_3a7){ +_399(_3a3); +} +return false; +}); +}; +function _3a8(_3a9,_3aa,el){ +_3aa.region=_3aa.region||"center"; +var _3ab=$.data(_3a9,"layout").panels; +var cc=$(_3a9); +var dir=_3aa.region; +if(_3ab[dir].length){ +return; +} +var pp=$(el); +if(!pp.length){ +pp=$("
                                                  ").appendTo(cc); +} +var _3ac=$.extend({},$.fn.layout.paneldefaults,{width:(pp.length?parseInt(pp[0].style.width)||pp.outerWidth():"auto"),height:(pp.length?parseInt(pp[0].style.height)||pp.outerHeight():"auto"),doSize:false,collapsible:true,onOpen:function(){ +var tool=$(this).panel("header").children("div.panel-tool"); +tool.children("a.panel-tool-collapse").hide(); +var _3ad={north:"up",south:"down",east:"right",west:"left"}; +if(!_3ad[dir]){ +return; +} +var _3ae="layout-button-"+_3ad[dir]; +var t=tool.children("a."+_3ae); +if(!t.length){ +t=$("").addClass(_3ae).appendTo(tool); +t.bind("click",{dir:dir},function(e){ +_3ba(_3a9,e.data.dir); +return false; +}); +} +$(this).panel("options").collapsible?t.show():t.hide(); +}},_3aa,{cls:((_3aa.cls||"")+" layout-panel layout-panel-"+dir),bodyCls:((_3aa.bodyCls||"")+" layout-body")}); +pp.panel(_3ac); +_3ab[dir]=pp; +var _3af={north:"s",south:"n",east:"w",west:"e"}; +var _3b0=pp.panel("panel"); +if(pp.panel("options").split){ +_3b0.addClass("layout-split-"+dir); +} +_3b0.resizable($.extend({},{handles:(_3af[dir]||""),disabled:(!pp.panel("options").split),onStartResize:function(e){ +_398=true; +if(dir=="north"||dir=="south"){ +var _3b1=$(">div.layout-split-proxy-v",_3a9); +}else{ +var _3b1=$(">div.layout-split-proxy-h",_3a9); +} +var top=0,left=0,_3b2=0,_3b3=0; +var pos={display:"block"}; +if(dir=="north"){ +pos.top=parseInt(_3b0.css("top"))+_3b0.outerHeight()-_3b1.height(); +pos.left=parseInt(_3b0.css("left")); +pos.width=_3b0.outerWidth(); +pos.height=_3b1.height(); +}else{ +if(dir=="south"){ +pos.top=parseInt(_3b0.css("top")); +pos.left=parseInt(_3b0.css("left")); +pos.width=_3b0.outerWidth(); +pos.height=_3b1.height(); +}else{ +if(dir=="east"){ +pos.top=parseInt(_3b0.css("top"))||0; +pos.left=parseInt(_3b0.css("left"))||0; +pos.width=_3b1.width(); +pos.height=_3b0.outerHeight(); +}else{ +if(dir=="west"){ +pos.top=parseInt(_3b0.css("top"))||0; +pos.left=_3b0.outerWidth()-_3b1.width(); +pos.width=_3b1.width(); +pos.height=_3b0.outerHeight(); +} +} +} +} +_3b1.css(pos); +$("
                                                  ").css({left:0,top:0,width:cc.width(),height:cc.height()}).appendTo(cc); +},onResize:function(e){ +if(dir=="north"||dir=="south"){ +var _3b4=$(">div.layout-split-proxy-v",_3a9); +_3b4.css("top",e.pageY-$(_3a9).offset().top-_3b4.height()/2); +}else{ +var _3b4=$(">div.layout-split-proxy-h",_3a9); +_3b4.css("left",e.pageX-$(_3a9).offset().left-_3b4.width()/2); +} +return false; +},onStopResize:function(e){ +cc.children("div.layout-split-proxy-v,div.layout-split-proxy-h").hide(); +pp.panel("resize",e.data); +_399(_3a9); +_398=false; +cc.find(">div.layout-mask").remove(); +}},_3aa)); +cc.layout("options").onAdd.call(_3a9,dir); +}; +function _3b5(_3b6,_3b7){ +var _3b8=$.data(_3b6,"layout").panels; +if(_3b8[_3b7].length){ +_3b8[_3b7].panel("destroy"); +_3b8[_3b7]=$(); +var _3b9="expand"+_3b7.substring(0,1).toUpperCase()+_3b7.substring(1); +if(_3b8[_3b9]){ +_3b8[_3b9].panel("destroy"); +_3b8[_3b9]=undefined; +} +$(_3b6).layout("options").onRemove.call(_3b6,_3b7); +} +}; +function _3ba(_3bb,_3bc,_3bd){ +if(_3bd==undefined){ +_3bd="normal"; +} +var _3be=$.data(_3bb,"layout").panels; +var p=_3be[_3bc]; +var _3bf=p.panel("options"); +if(_3bf.onBeforeCollapse.call(p)==false){ +return; +} +var _3c0="expand"+_3bc.substring(0,1).toUpperCase()+_3bc.substring(1); +if(!_3be[_3c0]){ +_3be[_3c0]=_3c1(_3bc); +var ep=_3be[_3c0].panel("panel"); +if(!_3bf.expandMode){ +ep.css("cursor","default"); +}else{ +ep.bind("click",function(){ +if(_3bf.expandMode=="dock"){ +_3cc(_3bb,_3bc); +}else{ +p.panel("expand",false).panel("open"); +var _3c2=_3c3(); +p.panel("resize",_3c2.collapse); +p.panel("panel").animate(_3c2.expand,function(){ +$(this).unbind(".layout").bind("mouseleave.layout",{region:_3bc},function(e){ +if(_398==true){ +return; +} +if($("body>div.combo-p>div.combo-panel:visible").length){ +return; +} +_3ba(_3bb,e.data.region); +}); +$(_3bb).layout("options").onExpand.call(_3bb,_3bc); +}); +} +return false; +}); +} +} +var _3c4=_3c3(); +if(!_39f(_3be[_3c0])){ +_3be.center.panel("resize",_3c4.resizeC); +} +p.panel("panel").animate(_3c4.collapse,_3bd,function(){ +p.panel("collapse",false).panel("close"); +_3be[_3c0].panel("open").panel("resize",_3c4.expandP); +$(this).unbind(".layout"); +$(_3bb).layout("options").onCollapse.call(_3bb,_3bc); +}); +function _3c1(dir){ +var _3c5={"east":"left","west":"right","north":"down","south":"up"}; +var isns=(_3bf.region=="north"||_3bf.region=="south"); +var icon="layout-button-"+_3c5[dir]; +var p=$("
                                                  ").appendTo(_3bb); +p.panel($.extend({},$.fn.layout.paneldefaults,{cls:("layout-expand layout-expand-"+dir),title:" ",iconCls:(_3bf.hideCollapsedContent?null:_3bf.iconCls),closed:true,minWidth:0,minHeight:0,doSize:false,region:_3bf.region,collapsedSize:_3bf.collapsedSize,noheader:(!isns&&_3bf.hideExpandTool),tools:((isns&&_3bf.hideExpandTool)?null:[{iconCls:icon,handler:function(){ +_3cc(_3bb,_3bc); +return false; +}}])})); +if(!_3bf.hideCollapsedContent){ +var _3c6=typeof _3bf.collapsedContent=="function"?_3bf.collapsedContent.call(p[0],_3bf.title):_3bf.collapsedContent; +isns?p.panel("setTitle",_3c6):p.html(_3c6); +} +p.panel("panel").hover(function(){ +$(this).addClass("layout-expand-over"); +},function(){ +$(this).removeClass("layout-expand-over"); +}); +return p; +}; +function _3c3(){ +var cc=$(_3bb); +var _3c7=_3be.center.panel("options"); +var _3c8=_3bf.collapsedSize; +if(_3bc=="east"){ +var _3c9=p.panel("panel")._outerWidth(); +var _3ca=_3c7.width+_3c9-_3c8; +if(_3bf.split||!_3bf.border){ +_3ca++; +} +return {resizeC:{width:_3ca},expand:{left:cc.width()-_3c9},expandP:{top:_3c7.top,left:cc.width()-_3c8,width:_3c8,height:_3c7.height},collapse:{left:cc.width(),top:_3c7.top,height:_3c7.height}}; +}else{ +if(_3bc=="west"){ +var _3c9=p.panel("panel")._outerWidth(); +var _3ca=_3c7.width+_3c9-_3c8; +if(_3bf.split||!_3bf.border){ +_3ca++; +} +return {resizeC:{width:_3ca,left:_3c8-1},expand:{left:0},expandP:{left:0,top:_3c7.top,width:_3c8,height:_3c7.height},collapse:{left:-_3c9,top:_3c7.top,height:_3c7.height}}; +}else{ +if(_3bc=="north"){ +var _3cb=p.panel("panel")._outerHeight(); +var hh=_3c7.height; +if(!_39f(_3be.expandNorth)){ +hh+=_3cb-_3c8+((_3bf.split||!_3bf.border)?1:0); +} +_3be.east.add(_3be.west).add(_3be.expandEast).add(_3be.expandWest).panel("resize",{top:_3c8-1,height:hh}); +return {resizeC:{top:_3c8-1,height:hh},expand:{top:0},expandP:{top:0,left:0,width:cc.width(),height:_3c8},collapse:{top:-_3cb,width:cc.width()}}; +}else{ +if(_3bc=="south"){ +var _3cb=p.panel("panel")._outerHeight(); +var hh=_3c7.height; +if(!_39f(_3be.expandSouth)){ +hh+=_3cb-_3c8+((_3bf.split||!_3bf.border)?1:0); +} +_3be.east.add(_3be.west).add(_3be.expandEast).add(_3be.expandWest).panel("resize",{height:hh}); +return {resizeC:{height:hh},expand:{top:cc.height()-_3cb},expandP:{top:cc.height()-_3c8,left:0,width:cc.width(),height:_3c8},collapse:{top:cc.height(),width:cc.width()}}; +} +} +} +} +}; +}; +function _3cc(_3cd,_3ce){ +var _3cf=$.data(_3cd,"layout").panels; +var p=_3cf[_3ce]; +var _3d0=p.panel("options"); +if(_3d0.onBeforeExpand.call(p)==false){ +return; +} +var _3d1="expand"+_3ce.substring(0,1).toUpperCase()+_3ce.substring(1); +if(_3cf[_3d1]){ +_3cf[_3d1].panel("close"); +p.panel("panel").stop(true,true); +p.panel("expand",false).panel("open"); +var _3d2=_3d3(); +p.panel("resize",_3d2.collapse); +p.panel("panel").animate(_3d2.expand,function(){ +_399(_3cd); +$(_3cd).layout("options").onExpand.call(_3cd,_3ce); +}); +} +function _3d3(){ +var cc=$(_3cd); +var _3d4=_3cf.center.panel("options"); +if(_3ce=="east"&&_3cf.expandEast){ +return {collapse:{left:cc.width(),top:_3d4.top,height:_3d4.height},expand:{left:cc.width()-p.panel("panel")._outerWidth()}}; +}else{ +if(_3ce=="west"&&_3cf.expandWest){ +return {collapse:{left:-p.panel("panel")._outerWidth(),top:_3d4.top,height:_3d4.height},expand:{left:0}}; +}else{ +if(_3ce=="north"&&_3cf.expandNorth){ +return {collapse:{top:-p.panel("panel")._outerHeight(),width:cc.width()},expand:{top:0}}; +}else{ +if(_3ce=="south"&&_3cf.expandSouth){ +return {collapse:{top:cc.height(),width:cc.width()},expand:{top:cc.height()-p.panel("panel")._outerHeight()}}; +} +} +} +} +}; +}; +function _39f(pp){ +if(!pp){ +return false; +} +if(pp.length){ +return pp.panel("panel").is(":visible"); +}else{ +return false; +} +}; +function _3d5(_3d6){ +var _3d7=$.data(_3d6,"layout"); +var opts=_3d7.options; +var _3d8=_3d7.panels; +var _3d9=opts.onCollapse; +opts.onCollapse=function(){ +}; +_3da("east"); +_3da("west"); +_3da("north"); +_3da("south"); +opts.onCollapse=_3d9; +function _3da(_3db){ +var p=_3d8[_3db]; +if(p.length&&p.panel("options").collapsed){ +_3ba(_3d6,_3db,0); +} +}; +}; +function _3dc(_3dd,_3de,_3df){ +var p=$(_3dd).layout("panel",_3de); +p.panel("options").split=_3df; +var cls="layout-split-"+_3de; +var _3e0=p.panel("panel").removeClass(cls); +if(_3df){ +_3e0.addClass(cls); +} +_3e0.resizable({disabled:(!_3df)}); +_399(_3dd); +}; +$.fn.layout=function(_3e1,_3e2){ +if(typeof _3e1=="string"){ +return $.fn.layout.methods[_3e1](this,_3e2); +} +_3e1=_3e1||{}; +return this.each(function(){ +var _3e3=$.data(this,"layout"); +if(_3e3){ +$.extend(_3e3.options,_3e1); +}else{ +var opts=$.extend({},$.fn.layout.defaults,$.fn.layout.parseOptions(this),_3e1); +$.data(this,"layout",{options:opts,panels:{center:$(),north:$(),south:$(),east:$(),west:$()}}); +init(this); +} +_399(this); +_3d5(this); +}); +}; +$.fn.layout.methods={options:function(jq){ +return $.data(jq[0],"layout").options; +},resize:function(jq,_3e4){ +return jq.each(function(){ +_399(this,_3e4); +}); +},panel:function(jq,_3e5){ +return $.data(jq[0],"layout").panels[_3e5]; +},collapse:function(jq,_3e6){ +return jq.each(function(){ +_3ba(this,_3e6); +}); +},expand:function(jq,_3e7){ +return jq.each(function(){ +_3cc(this,_3e7); +}); +},add:function(jq,_3e8){ +return jq.each(function(){ +_3a8(this,_3e8); +_399(this); +if($(this).layout("panel",_3e8.region).panel("options").collapsed){ +_3ba(this,_3e8.region,0); +} +}); +},remove:function(jq,_3e9){ +return jq.each(function(){ +_3b5(this,_3e9); +_399(this); +}); +},split:function(jq,_3ea){ +return jq.each(function(){ +_3dc(this,_3ea,true); +}); +},unsplit:function(jq,_3eb){ +return jq.each(function(){ +_3dc(this,_3eb,false); +}); +}}; +$.fn.layout.parseOptions=function(_3ec){ +return $.extend({},$.parser.parseOptions(_3ec,[{fit:"boolean"}])); +}; +$.fn.layout.defaults={fit:false,onExpand:function(_3ed){ +},onCollapse:function(_3ee){ +},onAdd:function(_3ef){ +},onRemove:function(_3f0){ +}}; +$.fn.layout.parsePanelOptions=function(_3f1){ +var t=$(_3f1); +return $.extend({},$.fn.panel.parseOptions(_3f1),$.parser.parseOptions(_3f1,["region",{split:"boolean",collpasedSize:"number",minWidth:"number",minHeight:"number",maxWidth:"number",maxHeight:"number"}])); +}; +$.fn.layout.paneldefaults=$.extend({},$.fn.panel.defaults,{region:null,split:false,collapsedSize:28,expandMode:"float",hideExpandTool:false,hideCollapsedContent:true,collapsedContent:function(_3f2){ +var p=$(this); +var opts=p.panel("options"); +if(opts.region=="north"||opts.region=="south"){ +return _3f2; +} +var size=opts.collapsedSize-2; +var left=(size-16)/2; +left=size-left; +var cc=[]; +if(opts.iconCls){ +cc.push("
                                                  "); +} +cc.push("
                                                  "); +cc.push(_3f2); +cc.push("
                                                  "); +return cc.join(""); +},minWidth:10,minHeight:10,maxWidth:10000,maxHeight:10000}); +})(jQuery); +(function($){ +$(function(){ +$(document).unbind(".menu").bind("mousedown.menu",function(e){ +var m=$(e.target).closest("div.menu,div.combo-p"); +if(m.length){ +return; +} +$("body>div.menu-top:visible").not(".menu-inline").menu("hide"); +_3f3($("body>div.menu:visible").not(".menu-inline")); +}); +}); +function init(_3f4){ +var opts=$.data(_3f4,"menu").options; +$(_3f4).addClass("menu-top"); +opts.inline?$(_3f4).addClass("menu-inline"):$(_3f4).appendTo("body"); +$(_3f4).bind("_resize",function(e,_3f5){ +if($(this).hasClass("easyui-fluid")||_3f5){ +$(_3f4).menu("resize",_3f4); +} +return false; +}); +var _3f6=_3f7($(_3f4)); +for(var i=0;i<_3f6.length;i++){ +_3f8(_3f6[i]); +} +function _3f7(menu){ +var _3f9=[]; +menu.addClass("menu"); +_3f9.push(menu); +if(!menu.hasClass("menu-content")){ +menu.children("div").each(function(){ +var _3fa=$(this).children("div"); +if(_3fa.length){ +_3fa.appendTo("body"); +this.submenu=_3fa; +var mm=_3f7(_3fa); +_3f9=_3f9.concat(mm); +} +}); +} +return _3f9; +}; +function _3f8(menu){ +var wh=$.parser.parseOptions(menu[0],["width","height"]); +menu[0].originalHeight=wh.height||0; +if(menu.hasClass("menu-content")){ +menu[0].originalWidth=wh.width||menu._outerWidth(); +}else{ +menu[0].originalWidth=wh.width||0; +menu.children("div").each(function(){ +var item=$(this); +var _3fb=$.extend({},$.parser.parseOptions(this,["name","iconCls","href",{separator:"boolean"}]),{disabled:(item.attr("disabled")?true:undefined)}); +if(_3fb.separator){ +item.addClass("menu-sep"); +} +if(!item.hasClass("menu-sep")){ +item[0].itemName=_3fb.name||""; +item[0].itemHref=_3fb.href||""; +var text=item.addClass("menu-item").html(); +item.empty().append($("
                                                  ").html(text)); +if(_3fb.iconCls){ +$("
                                                  ").addClass(_3fb.iconCls).appendTo(item); +} +if(_3fb.disabled){ +_3fc(_3f4,item[0],true); +} +if(item[0].submenu){ +$("
                                                  ").appendTo(item); +} +_3fd(_3f4,item); +} +}); +$("
                                                  ").prependTo(menu); +} +_3fe(_3f4,menu); +if(!menu.hasClass("menu-inline")){ +menu.hide(); +} +_3ff(_3f4,menu); +}; +}; +function _3fe(_400,menu){ +var opts=$.data(_400,"menu").options; +var _401=menu.attr("style")||""; +menu.css({display:"block",left:-10000,height:"auto",overflow:"hidden"}); +menu.find(".menu-item").each(function(){ +$(this)._outerHeight(opts.itemHeight); +$(this).find(".menu-text").css({height:(opts.itemHeight-2)+"px",lineHeight:(opts.itemHeight-2)+"px"}); +}); +menu.removeClass("menu-noline").addClass(opts.noline?"menu-noline":""); +var _402=menu[0].originalWidth||"auto"; +if(isNaN(parseInt(_402))){ +_402=0; +menu.find("div.menu-text").each(function(){ +if(_402<$(this)._outerWidth()){ +_402=$(this)._outerWidth(); +} +}); +_402+=40; +} +var _403=menu.outerHeight(); +var _404=menu[0].originalHeight||"auto"; +if(isNaN(parseInt(_404))){ +_404=_403; +if(menu.hasClass("menu-top")&&opts.alignTo){ +var at=$(opts.alignTo); +var h1=at.offset().top-$(document).scrollTop(); +var h2=$(window)._outerHeight()+$(document).scrollTop()-at.offset().top-at._outerHeight(); +_404=Math.min(_404,Math.max(h1,h2)); +}else{ +if(_404>$(window)._outerHeight()){ +_404=$(window).height(); +} +} +} +menu.attr("style",_401); +menu._size({fit:(menu[0]==_400?opts.fit:false),width:_402,minWidth:opts.minWidth,height:_404}); +menu.css("overflow",menu.outerHeight()<_403?"auto":"hidden"); +menu.children("div.menu-line")._outerHeight(_403-2); +}; +function _3ff(_405,menu){ +if(menu.hasClass("menu-inline")){ +return; +} +var _406=$.data(_405,"menu"); +menu.unbind(".menu").bind("mouseenter.menu",function(){ +if(_406.timer){ +clearTimeout(_406.timer); +_406.timer=null; +} +}).bind("mouseleave.menu",function(){ +if(_406.options.hideOnUnhover){ +_406.timer=setTimeout(function(){ +_407(_405,$(_405).hasClass("menu-inline")); +},_406.options.duration); +} +}); +}; +function _3fd(_408,item){ +if(!item.hasClass("menu-item")){ +return; +} +item.unbind(".menu"); +item.bind("click.menu",function(){ +if($(this).hasClass("menu-item-disabled")){ +return; +} +if(!this.submenu){ +_407(_408,$(_408).hasClass("menu-inline")); +var href=this.itemHref; +if(href){ +location.href=href; +} +} +$(this).trigger("mouseenter"); +var item=$(_408).menu("getItem",this); +$.data(_408,"menu").options.onClick.call(_408,item); +}).bind("mouseenter.menu",function(e){ +item.siblings().each(function(){ +if(this.submenu){ +_3f3(this.submenu); +} +$(this).removeClass("menu-active"); +}); +item.addClass("menu-active"); +if($(this).hasClass("menu-item-disabled")){ +item.addClass("menu-active-disabled"); +return; +} +var _409=item[0].submenu; +if(_409){ +$(_408).menu("show",{menu:_409,parent:item}); +} +}).bind("mouseleave.menu",function(e){ +item.removeClass("menu-active menu-active-disabled"); +var _40a=item[0].submenu; +if(_40a){ +if(e.pageX>=parseInt(_40a.css("left"))){ +item.addClass("menu-active"); +}else{ +_3f3(_40a); +} +}else{ +item.removeClass("menu-active"); +} +}); +}; +function _407(_40b,_40c){ +var _40d=$.data(_40b,"menu"); +if(_40d){ +if($(_40b).is(":visible")){ +_3f3($(_40b)); +if(_40c){ +$(_40b).show(); +}else{ +_40d.options.onHide.call(_40b); +} +} +} +return false; +}; +function _40e(_40f,_410){ +var left,top; +_410=_410||{}; +var menu=$(_410.menu||_40f); +$(_40f).menu("resize",menu[0]); +if(menu.hasClass("menu-top")){ +var opts=$.data(_40f,"menu").options; +$.extend(opts,_410); +left=opts.left; +top=opts.top; +if(opts.alignTo){ +var at=$(opts.alignTo); +left=at.offset().left; +top=at.offset().top+at._outerHeight(); +if(opts.align=="right"){ +left+=at.outerWidth()-menu.outerWidth(); +} +} +if(left+menu.outerWidth()>$(window)._outerWidth()+$(document)._scrollLeft()){ +left=$(window)._outerWidth()+$(document).scrollLeft()-menu.outerWidth()-5; +} +if(left<0){ +left=0; +} +top=_411(top,opts.alignTo); +}else{ +var _412=_410.parent; +left=_412.offset().left+_412.outerWidth()-2; +if(left+menu.outerWidth()+5>$(window)._outerWidth()+$(document).scrollLeft()){ +left=_412.offset().left-menu.outerWidth()+2; +} +top=_411(_412.offset().top-3); +} +function _411(top,_413){ +if(top+menu.outerHeight()>$(window)._outerHeight()+$(document).scrollTop()){ +if(_413){ +top=$(_413).offset().top-menu._outerHeight(); +}else{ +top=$(window)._outerHeight()+$(document).scrollTop()-menu.outerHeight(); +} +} +if(top<0){ +top=0; +} +return top; +}; +menu.css({left:left,top:top}); +menu.show(0,function(){ +if(!menu[0].shadow){ +menu[0].shadow=$("
                                                  ").insertAfter(menu); +} +menu[0].shadow.css({display:(menu.hasClass("menu-inline")?"none":"block"),zIndex:$.fn.menu.defaults.zIndex++,left:menu.css("left"),top:menu.css("top"),width:menu.outerWidth(),height:menu.outerHeight()}); +menu.css("z-index",$.fn.menu.defaults.zIndex++); +if(menu.hasClass("menu-top")){ +$.data(menu[0],"menu").options.onShow.call(menu[0]); +} +}); +}; +function _3f3(menu){ +if(menu&&menu.length){ +_414(menu); +menu.find("div.menu-item").each(function(){ +if(this.submenu){ +_3f3(this.submenu); +} +$(this).removeClass("menu-active"); +}); +} +function _414(m){ +m.stop(true,true); +if(m[0].shadow){ +m[0].shadow.hide(); +} +m.hide(); +}; +}; +function _415(_416,text){ +var _417=null; +var tmp=$("
                                                  "); +function find(menu){ +menu.children("div.menu-item").each(function(){ +var item=$(_416).menu("getItem",this); +var s=tmp.empty().html(item.text).text(); +if(text==$.trim(s)){ +_417=item; +}else{ +if(this.submenu&&!_417){ +find(this.submenu); +} +} +}); +}; +find($(_416)); +tmp.remove(); +return _417; +}; +function _3fc(_418,_419,_41a){ +var t=$(_419); +if(!t.hasClass("menu-item")){ +return; +} +if(_41a){ +t.addClass("menu-item-disabled"); +if(_419.onclick){ +_419.onclick1=_419.onclick; +_419.onclick=null; +} +}else{ +t.removeClass("menu-item-disabled"); +if(_419.onclick1){ +_419.onclick=_419.onclick1; +_419.onclick1=null; +} +} +}; +function _41b(_41c,_41d){ +var opts=$.data(_41c,"menu").options; +var menu=$(_41c); +if(_41d.parent){ +if(!_41d.parent.submenu){ +var _41e=$("
                                                  ").appendTo("body"); +_41e.hide(); +_41d.parent.submenu=_41e; +$("
                                                  ").appendTo(_41d.parent); +} +menu=_41d.parent.submenu; +} +if(_41d.separator){ +var item=$("
                                                  ").appendTo(menu); +}else{ +var item=$("
                                                  ").appendTo(menu); +$("
                                                  ").html(_41d.text).appendTo(item); +} +if(_41d.iconCls){ +$("
                                                  ").addClass(_41d.iconCls).appendTo(item); +} +if(_41d.id){ +item.attr("id",_41d.id); +} +if(_41d.name){ +item[0].itemName=_41d.name; +} +if(_41d.href){ +item[0].itemHref=_41d.href; +} +if(_41d.onclick){ +if(typeof _41d.onclick=="string"){ +item.attr("onclick",_41d.onclick); +}else{ +item[0].onclick=eval(_41d.onclick); +} +} +if(_41d.handler){ +item[0].onclick=eval(_41d.handler); +} +if(_41d.disabled){ +_3fc(_41c,item[0],true); +} +_3fd(_41c,item); +_3ff(_41c,menu); +_3fe(_41c,menu); +}; +function _41f(_420,_421){ +function _422(el){ +if(el.submenu){ +el.submenu.children("div.menu-item").each(function(){ +_422(this); +}); +var _423=el.submenu[0].shadow; +if(_423){ +_423.remove(); +} +el.submenu.remove(); +} +$(el).remove(); +}; +var menu=$(_421).parent(); +_422(_421); +_3fe(_420,menu); +}; +function _424(_425,_426,_427){ +var menu=$(_426).parent(); +if(_427){ +$(_426).show(); +}else{ +$(_426).hide(); +} +_3fe(_425,menu); +}; +function _428(_429){ +$(_429).children("div.menu-item").each(function(){ +_41f(_429,this); +}); +if(_429.shadow){ +_429.shadow.remove(); +} +$(_429).remove(); +}; +$.fn.menu=function(_42a,_42b){ +if(typeof _42a=="string"){ +return $.fn.menu.methods[_42a](this,_42b); +} +_42a=_42a||{}; +return this.each(function(){ +var _42c=$.data(this,"menu"); +if(_42c){ +$.extend(_42c.options,_42a); +}else{ +_42c=$.data(this,"menu",{options:$.extend({},$.fn.menu.defaults,$.fn.menu.parseOptions(this),_42a)}); +init(this); +} +$(this).css({left:_42c.options.left,top:_42c.options.top}); +}); +}; +$.fn.menu.methods={options:function(jq){ +return $.data(jq[0],"menu").options; +},show:function(jq,pos){ +return jq.each(function(){ +_40e(this,pos); +}); +},hide:function(jq){ +return jq.each(function(){ +_407(this); +}); +},destroy:function(jq){ +return jq.each(function(){ +_428(this); +}); +},setText:function(jq,_42d){ +return jq.each(function(){ +$(_42d.target).children("div.menu-text").html(_42d.text); +}); +},setIcon:function(jq,_42e){ +return jq.each(function(){ +$(_42e.target).children("div.menu-icon").remove(); +if(_42e.iconCls){ +$("
                                                  ").addClass(_42e.iconCls).appendTo(_42e.target); +} +}); +},getItem:function(jq,_42f){ +var t=$(_42f); +var item={target:_42f,id:t.attr("id"),text:$.trim(t.children("div.menu-text").html()),disabled:t.hasClass("menu-item-disabled"),name:_42f.itemName,href:_42f.itemHref,onclick:_42f.onclick}; +var icon=t.children("div.menu-icon"); +if(icon.length){ +var cc=[]; +var aa=icon.attr("class").split(" "); +for(var i=0;i").addClass(opts.cls.arrow).appendTo(_439); +$("").addClass("m-btn-line").appendTo(_439); +} +$(_438).menubutton("resize"); +if(opts.menu){ +$(opts.menu).menu({duration:opts.duration}); +var _43a=$(opts.menu).menu("options"); +var _43b=_43a.onShow; +var _43c=_43a.onHide; +$.extend(_43a,{onShow:function(){ +var _43d=$(this).menu("options"); +var btn=$(_43d.alignTo); +var opts=btn.menubutton("options"); +btn.addClass((opts.plain==true)?opts.cls.btn2:opts.cls.btn1); +_43b.call(this); +},onHide:function(){ +var _43e=$(this).menu("options"); +var btn=$(_43e.alignTo); +var opts=btn.menubutton("options"); +btn.removeClass((opts.plain==true)?opts.cls.btn2:opts.cls.btn1); +_43c.call(this); +}}); +} +}; +function _43f(_440){ +var opts=$.data(_440,"menubutton").options; +var btn=$(_440); +var t=btn.find("."+opts.cls.trigger); +if(!t.length){ +t=btn; +} +t.unbind(".menubutton"); +var _441=null; +t.bind("click.menubutton",function(){ +if(!_442()){ +_443(_440); +return false; +} +}).bind("mouseenter.menubutton",function(){ +if(!_442()){ +_441=setTimeout(function(){ +_443(_440); +},opts.duration); +return false; +} +}).bind("mouseleave.menubutton",function(){ +if(_441){ +clearTimeout(_441); +} +$(opts.menu).triggerHandler("mouseleave"); +}); +function _442(){ +return $(_440).linkbutton("options").disabled; +}; +}; +function _443(_444){ +var opts=$(_444).menubutton("options"); +if(opts.disabled||!opts.menu){ +return; +} +$("body>div.menu-top").menu("hide"); +var btn=$(_444); +var mm=$(opts.menu); +if(mm.length){ +mm.menu("options").alignTo=btn; +mm.menu("show",{alignTo:btn,align:opts.menuAlign}); +} +btn.blur(); +}; +$.fn.menubutton=function(_445,_446){ +if(typeof _445=="string"){ +var _447=$.fn.menubutton.methods[_445]; +if(_447){ +return _447(this,_446); +}else{ +return this.linkbutton(_445,_446); +} +} +_445=_445||{}; +return this.each(function(){ +var _448=$.data(this,"menubutton"); +if(_448){ +$.extend(_448.options,_445); +}else{ +$.data(this,"menubutton",{options:$.extend({},$.fn.menubutton.defaults,$.fn.menubutton.parseOptions(this),_445)}); +$(this).removeAttr("disabled"); +} +init(this); +_43f(this); +}); +}; +$.fn.menubutton.methods={options:function(jq){ +var _449=jq.linkbutton("options"); +return $.extend($.data(jq[0],"menubutton").options,{toggle:_449.toggle,selected:_449.selected,disabled:_449.disabled}); +},destroy:function(jq){ +return jq.each(function(){ +var opts=$(this).menubutton("options"); +if(opts.menu){ +$(opts.menu).menu("destroy"); +} +$(this).remove(); +}); +}}; +$.fn.menubutton.parseOptions=function(_44a){ +var t=$(_44a); +return $.extend({},$.fn.linkbutton.parseOptions(_44a),$.parser.parseOptions(_44a,["menu",{plain:"boolean",hasDownArrow:"boolean",duration:"number"}])); +}; +$.fn.menubutton.defaults=$.extend({},$.fn.linkbutton.defaults,{plain:true,hasDownArrow:true,menu:null,menuAlign:"left",duration:100,cls:{btn1:"m-btn-active",btn2:"m-btn-plain-active",arrow:"m-btn-downarrow",trigger:"m-btn"}}); +})(jQuery); +(function($){ +function init(_44b){ +var opts=$.data(_44b,"splitbutton").options; +$(_44b).menubutton(opts); +$(_44b).addClass("s-btn"); +}; +$.fn.splitbutton=function(_44c,_44d){ +if(typeof _44c=="string"){ +var _44e=$.fn.splitbutton.methods[_44c]; +if(_44e){ +return _44e(this,_44d); +}else{ +return this.menubutton(_44c,_44d); +} +} +_44c=_44c||{}; +return this.each(function(){ +var _44f=$.data(this,"splitbutton"); +if(_44f){ +$.extend(_44f.options,_44c); +}else{ +$.data(this,"splitbutton",{options:$.extend({},$.fn.splitbutton.defaults,$.fn.splitbutton.parseOptions(this),_44c)}); +$(this).removeAttr("disabled"); +} +init(this); +}); +}; +$.fn.splitbutton.methods={options:function(jq){ +var _450=jq.menubutton("options"); +var _451=$.data(jq[0],"splitbutton").options; +$.extend(_451,{disabled:_450.disabled,toggle:_450.toggle,selected:_450.selected}); +return _451; +}}; +$.fn.splitbutton.parseOptions=function(_452){ +var t=$(_452); +return $.extend({},$.fn.linkbutton.parseOptions(_452),$.parser.parseOptions(_452,["menu",{plain:"boolean",duration:"number"}])); +}; +$.fn.splitbutton.defaults=$.extend({},$.fn.linkbutton.defaults,{plain:true,menu:null,duration:100,cls:{btn1:"m-btn-active s-btn-active",btn2:"m-btn-plain-active s-btn-plain-active",arrow:"m-btn-downarrow",trigger:"m-btn-line"}}); +})(jQuery); +(function($){ +function init(_453){ +var _454=$(""+""+""+""+""+""+""+"").insertAfter(_453); +var t=$(_453); +t.addClass("switchbutton-f").hide(); +var name=t.attr("name"); +if(name){ +t.removeAttr("name").attr("switchbuttonName",name); +_454.find(".switchbutton-value").attr("name",name); +} +_454.bind("_resize",function(e,_455){ +if($(this).hasClass("easyui-fluid")||_455){ +_456(_453); +} +return false; +}); +return _454; +}; +function _456(_457,_458){ +var _459=$.data(_457,"switchbutton"); +var opts=_459.options; +var _45a=_459.switchbutton; +if(_458){ +$.extend(opts,_458); +} +var _45b=_45a.is(":visible"); +if(!_45b){ +_45a.appendTo("body"); +} +_45a._size(opts); +var w=_45a.width(); +var h=_45a.height(); +var w=_45a.outerWidth(); +var h=_45a.outerHeight(); +var _45c=parseInt(opts.handleWidth)||_45a.height(); +var _45d=w*2-_45c; +_45a.find(".switchbutton-inner").css({width:_45d+"px",height:h+"px",lineHeight:h+"px"}); +_45a.find(".switchbutton-handle")._outerWidth(_45c)._outerHeight(h).css({marginLeft:-_45c/2+"px"}); +_45a.find(".switchbutton-on").css({width:(w-_45c/2)+"px",textIndent:(opts.reversed?"":"-")+_45c/2+"px"}); +_45a.find(".switchbutton-off").css({width:(w-_45c/2)+"px",textIndent:(opts.reversed?"-":"")+_45c/2+"px"}); +opts.marginWidth=w-_45c; +_45e(_457,opts.checked,false); +if(!_45b){ +_45a.insertAfter(_457); +} +}; +function _45f(_460){ +var _461=$.data(_460,"switchbutton"); +var opts=_461.options; +var _462=_461.switchbutton; +var _463=_462.find(".switchbutton-inner"); +var on=_463.find(".switchbutton-on").html(opts.onText); +var off=_463.find(".switchbutton-off").html(opts.offText); +var _464=_463.find(".switchbutton-handle").html(opts.handleText); +if(opts.reversed){ +off.prependTo(_463); +on.insertAfter(_464); +}else{ +on.prependTo(_463); +off.insertAfter(_464); +} +_462.find(".switchbutton-value")._propAttr("checked",opts.checked); +_462.removeClass("switchbutton-disabled").addClass(opts.disabled?"switchbutton-disabled":""); +_462.removeClass("switchbutton-reversed").addClass(opts.reversed?"switchbutton-reversed":""); +_45e(_460,opts.checked); +_465(_460,opts.readonly); +$(_460).switchbutton("setValue",opts.value); +}; +function _45e(_466,_467,_468){ +var _469=$.data(_466,"switchbutton"); +var opts=_469.options; +opts.checked=_467; +var _46a=_469.switchbutton.find(".switchbutton-inner"); +var _46b=_46a.find(".switchbutton-on"); +var _46c=opts.reversed?(opts.checked?opts.marginWidth:0):(opts.checked?0:opts.marginWidth); +var dir=_46b.css("float").toLowerCase(); +var css={}; +css["margin-"+dir]=-_46c+"px"; +_468?_46a.animate(css,200):_46a.css(css); +var _46d=_46a.find(".switchbutton-value"); +var ck=_46d.is(":checked"); +$(_466).add(_46d)._propAttr("checked",opts.checked); +if(ck!=opts.checked){ +opts.onChange.call(_466,opts.checked); +} +}; +function _46e(_46f,_470){ +var _471=$.data(_46f,"switchbutton"); +var opts=_471.options; +var _472=_471.switchbutton; +var _473=_472.find(".switchbutton-value"); +if(_470){ +opts.disabled=true; +$(_46f).add(_473).attr("disabled","disabled"); +_472.addClass("switchbutton-disabled"); +}else{ +opts.disabled=false; +$(_46f).add(_473).removeAttr("disabled"); +_472.removeClass("switchbutton-disabled"); +} +}; +function _465(_474,mode){ +var _475=$.data(_474,"switchbutton"); +var opts=_475.options; +opts.readonly=mode==undefined?true:mode; +_475.switchbutton.removeClass("switchbutton-readonly").addClass(opts.readonly?"switchbutton-readonly":""); +}; +function _476(_477){ +var _478=$.data(_477,"switchbutton"); +var opts=_478.options; +_478.switchbutton.unbind(".switchbutton").bind("click.switchbutton",function(){ +if(!opts.disabled&&!opts.readonly){ +_45e(_477,opts.checked?false:true,true); +} +}); +}; +$.fn.switchbutton=function(_479,_47a){ +if(typeof _479=="string"){ +return $.fn.switchbutton.methods[_479](this,_47a); +} +_479=_479||{}; +return this.each(function(){ +var _47b=$.data(this,"switchbutton"); +if(_47b){ +$.extend(_47b.options,_479); +}else{ +_47b=$.data(this,"switchbutton",{options:$.extend({},$.fn.switchbutton.defaults,$.fn.switchbutton.parseOptions(this),_479),switchbutton:init(this)}); +} +_47b.options.originalChecked=_47b.options.checked; +_45f(this); +_456(this); +_476(this); +}); +}; +$.fn.switchbutton.methods={options:function(jq){ +var _47c=jq.data("switchbutton"); +return $.extend(_47c.options,{value:_47c.switchbutton.find(".switchbutton-value").val()}); +},resize:function(jq,_47d){ +return jq.each(function(){ +_456(this,_47d); +}); +},enable:function(jq){ +return jq.each(function(){ +_46e(this,false); +}); +},disable:function(jq){ +return jq.each(function(){ +_46e(this,true); +}); +},readonly:function(jq,mode){ +return jq.each(function(){ +_465(this,mode); +}); +},check:function(jq){ +return jq.each(function(){ +_45e(this,true); +}); +},uncheck:function(jq){ +return jq.each(function(){ +_45e(this,false); +}); +},clear:function(jq){ +return jq.each(function(){ +_45e(this,false); +}); +},reset:function(jq){ +return jq.each(function(){ +var opts=$(this).switchbutton("options"); +_45e(this,opts.originalChecked); +}); +},setValue:function(jq,_47e){ +return jq.each(function(){ +$(this).val(_47e); +$.data(this,"switchbutton").switchbutton.find(".switchbutton-value").val(_47e); +}); +}}; +$.fn.switchbutton.parseOptions=function(_47f){ +var t=$(_47f); +return $.extend({},$.parser.parseOptions(_47f,["onText","offText","handleText",{handleWidth:"number",reversed:"boolean"}]),{value:(t.val()||undefined),checked:(t.attr("checked")?true:undefined),disabled:(t.attr("disabled")?true:undefined),readonly:(t.attr("readonly")?true:undefined)}); +}; +$.fn.switchbutton.defaults={handleWidth:"auto",width:60,height:26,checked:false,disabled:false,readonly:false,reversed:false,onText:"ON",offText:"OFF",handleText:"",value:"on",onChange:function(_480){ +}}; +})(jQuery); +(function($){ +function init(_481){ +$(_481).addClass("validatebox-text"); +}; +function _482(_483){ +var _484=$.data(_483,"validatebox"); +_484.validating=false; +if(_484.timer){ +clearTimeout(_484.timer); +} +$(_483).tooltip("destroy"); +$(_483).unbind(); +$(_483).remove(); +}; +function _485(_486){ +var opts=$.data(_486,"validatebox").options; +var box=$(_486); +box.unbind(".validatebox"); +if(opts.novalidate||box.is(":disabled")){ +return; +} +for(var _487 in opts.events){ +$(_486).bind(_487+".validatebox",{target:_486},opts.events[_487]); +} +}; +function _488(e){ +var _489=e.data.target; +var _48a=$.data(_489,"validatebox"); +var box=$(_489); +if($(_489).attr("readonly")){ +return; +} +_48a.validating=true; +_48a.value=undefined; +(function(){ +if(_48a.validating){ +if(_48a.value!=box.val()){ +_48a.value=box.val(); +if(_48a.timer){ +clearTimeout(_48a.timer); +} +_48a.timer=setTimeout(function(){ +$(_489).validatebox("validate"); +},_48a.options.delay); +}else{ +_48b(_489); +} +setTimeout(arguments.callee,200); +} +})(); +}; +function _48c(e){ +var _48d=e.data.target; +var _48e=$.data(_48d,"validatebox"); +if(_48e.timer){ +clearTimeout(_48e.timer); +_48e.timer=undefined; +} +_48e.validating=false; +_48f(_48d); +}; +function _490(e){ +var _491=e.data.target; +if($(_491).hasClass("validatebox-invalid")){ +_492(_491); +} +}; +function _493(e){ +var _494=e.data.target; +var _495=$.data(_494,"validatebox"); +if(!_495.validating){ +_48f(_494); +} +}; +function _492(_496){ +var _497=$.data(_496,"validatebox"); +var opts=_497.options; +$(_496).tooltip($.extend({},opts.tipOptions,{content:_497.message,position:opts.tipPosition,deltaX:opts.deltaX})).tooltip("show"); +_497.tip=true; +}; +function _48b(_498){ +var _499=$.data(_498,"validatebox"); +if(_499&&_499.tip){ +$(_498).tooltip("reposition"); +} +}; +function _48f(_49a){ +var _49b=$.data(_49a,"validatebox"); +_49b.tip=false; +$(_49a).tooltip("hide"); +}; +function _49c(_49d){ +var _49e=$.data(_49d,"validatebox"); +var opts=_49e.options; +var box=$(_49d); +opts.onBeforeValidate.call(_49d); +var _49f=_4a0(); +opts.onValidate.call(_49d,_49f); +return _49f; +function _4a1(msg){ +_49e.message=msg; +}; +function _4a2(_4a3,_4a4){ +var _4a5=box.val(); +var _4a6=/([a-zA-Z_]+)(.*)/.exec(_4a3); +var rule=opts.rules[_4a6[1]]; +if(rule&&_4a5){ +var _4a7=_4a4||opts.validParams||eval(_4a6[2]); +if(!rule["validator"].call(_49d,_4a5,_4a7)){ +box.addClass("validatebox-invalid"); +var _4a8=rule["message"]; +if(_4a7){ +for(var i=0;i<_4a7.length;i++){ +_4a8=_4a8.replace(new RegExp("\\{"+i+"\\}","g"),_4a7[i]); +} +} +_4a1(opts.invalidMessage||_4a8); +if(_49e.validating){ +_492(_49d); +} +return false; +} +} +return true; +}; +function _4a0(){ +box.removeClass("validatebox-invalid"); +_48f(_49d); +if(opts.novalidate||box.is(":disabled")){ +return true; +} +if(opts.required){ +if(box.val()==""){ +box.addClass("validatebox-invalid"); +_4a1(opts.missingMessage); +if(_49e.validating){ +_492(_49d); +} +return false; +} +} +if(opts.validType){ +if($.isArray(opts.validType)){ +for(var i=0;i=_4b5[0]&&len<=_4b5[1]; +},message:"Please enter a value between {0} and {1}."},remote:{validator:function(_4b6,_4b7){ +var data={}; +data[_4b7[1]]=_4b6; +var _4b8=$.ajax({url:_4b7[0],dataType:"json",data:data,async:false,cache:false,type:"post"}).responseText; +return _4b8=="true"; +},message:"Please fix this field."}},onBeforeValidate:function(){ +},onValidate:function(_4b9){ +}}; +})(jQuery); +(function($){ +function init(_4ba){ +$(_4ba).addClass("textbox-f").hide(); +var span=$(""+""+""+"").insertAfter(_4ba); +var name=$(_4ba).attr("name"); +if(name){ +span.find("input.textbox-value").attr("name",name); +$(_4ba).removeAttr("name").attr("textboxName",name); +} +return span; +}; +function _4bb(_4bc){ +var _4bd=$.data(_4bc,"textbox"); +var opts=_4bd.options; +var tb=_4bd.textbox; +tb.find(".textbox-text").remove(); +if(opts.multiline){ +$("").prependTo(tb); +}else{ +$("").prependTo(tb); +} +tb.find(".textbox-addon").remove(); +var bb=opts.icons?$.extend(true,[],opts.icons):[]; +if(opts.iconCls){ +bb.push({iconCls:opts.iconCls,disabled:true}); +} +if(bb.length){ +var bc=$("").prependTo(tb); +bc.addClass("textbox-addon-"+opts.iconAlign); +for(var i=0;i"); +} +} +tb.find(".textbox-button").remove(); +if(opts.buttonText||opts.buttonIcon){ +var btn=$("").prependTo(tb); +btn.addClass("textbox-button-"+opts.buttonAlign).linkbutton({text:opts.buttonText,iconCls:opts.buttonIcon}); +} +_4be(_4bc,opts.disabled); +_4bf(_4bc,opts.readonly); +}; +function _4c0(_4c1){ +var tb=$.data(_4c1,"textbox").textbox; +tb.find(".textbox-text").validatebox("destroy"); +tb.remove(); +$(_4c1).remove(); +}; +function _4c2(_4c3,_4c4){ +var _4c5=$.data(_4c3,"textbox"); +var opts=_4c5.options; +var tb=_4c5.textbox; +var _4c6=tb.parent(); +if(_4c4){ +opts.width=_4c4; +} +if(isNaN(parseInt(opts.width))){ +var c=$(_4c3).clone(); +c.css("visibility","hidden"); +c.insertAfter(_4c3); +opts.width=c.outerWidth(); +c.remove(); +} +var _4c7=tb.is(":visible"); +if(!_4c7){ +tb.appendTo("body"); +} +var _4c8=tb.find(".textbox-text"); +var btn=tb.find(".textbox-button"); +var _4c9=tb.find(".textbox-addon"); +var _4ca=_4c9.find(".textbox-icon"); +tb._size(opts,_4c6); +btn.linkbutton("resize",{height:tb.height()}); +btn.css({left:(opts.buttonAlign=="left"?0:""),right:(opts.buttonAlign=="right"?0:"")}); +_4c9.css({left:(opts.iconAlign=="left"?(opts.buttonAlign=="left"?btn._outerWidth():0):""),right:(opts.iconAlign=="right"?(opts.buttonAlign=="right"?btn._outerWidth():0):"")}); +_4ca.css({width:opts.iconWidth+"px",height:tb.height()+"px"}); +_4c8.css({paddingLeft:(_4c3.style.paddingLeft||""),paddingRight:(_4c3.style.paddingRight||""),marginLeft:_4cb("left"),marginRight:_4cb("right")}); +if(opts.multiline){ +_4c8.css({paddingTop:(_4c3.style.paddingTop||""),paddingBottom:(_4c3.style.paddingBottom||"")}); +_4c8._outerHeight(tb.height()); +}else{ +var _4cc=Math.floor((tb.height()-_4c8.height())/2); +_4c8.css({paddingTop:_4cc+"px",paddingBottom:_4cc+"px"}); +} +_4c8._outerWidth(tb.width()-_4ca.length*opts.iconWidth-btn._outerWidth()); +if(!_4c7){ +tb.insertAfter(_4c3); +} +opts.onResize.call(_4c3,opts.width,opts.height); +function _4cb(_4cd){ +return (opts.iconAlign==_4cd?_4c9._outerWidth():0)+(opts.buttonAlign==_4cd?btn._outerWidth():0); +}; +}; +function _4ce(_4cf){ +var opts=$(_4cf).textbox("options"); +var _4d0=$(_4cf).textbox("textbox"); +_4d0.validatebox($.extend({},opts,{deltaX:$(_4cf).textbox("getTipX"),onBeforeValidate:function(){ +var box=$(this); +if(!box.is(":focus")){ +opts.oldInputValue=box.val(); +box.val(opts.value); +} +},onValidate:function(_4d1){ +var box=$(this); +if(opts.oldInputValue!=undefined){ +box.val(opts.oldInputValue); +opts.oldInputValue=undefined; +} +var tb=box.parent(); +if(_4d1){ +tb.removeClass("textbox-invalid"); +}else{ +tb.addClass("textbox-invalid"); +} +}})); +}; +function _4d2(_4d3){ +var _4d4=$.data(_4d3,"textbox"); +var opts=_4d4.options; +var tb=_4d4.textbox; +var _4d5=tb.find(".textbox-text"); +_4d5.attr("placeholder",opts.prompt); +_4d5.unbind(".textbox"); +if(!opts.disabled&&!opts.readonly){ +_4d5.bind("blur.textbox",function(e){ +if(!tb.hasClass("textbox-focused")){ +return; +} +opts.value=$(this).val(); +if(opts.value==""){ +$(this).val(opts.prompt).addClass("textbox-prompt"); +}else{ +$(this).removeClass("textbox-prompt"); +} +tb.removeClass("textbox-focused"); +}).bind("focus.textbox",function(e){ +if(tb.hasClass("textbox-focused")){ +return; +} +if($(this).val()!=opts.value){ +$(this).val(opts.value); +} +$(this).removeClass("textbox-prompt"); +tb.addClass("textbox-focused"); +}); +for(var _4d6 in opts.inputEvents){ +_4d5.bind(_4d6+".textbox",{target:_4d3},opts.inputEvents[_4d6]); +} +} +var _4d7=tb.find(".textbox-addon"); +_4d7.unbind().bind("click",{target:_4d3},function(e){ +var icon=$(e.target).closest("a.textbox-icon:not(.textbox-icon-disabled)"); +if(icon.length){ +var _4d8=parseInt(icon.attr("icon-index")); +var conf=opts.icons[_4d8]; +if(conf&&conf.handler){ +conf.handler.call(icon[0],e); +opts.onClickIcon.call(_4d3,_4d8); +} +} +}); +_4d7.find(".textbox-icon").each(function(_4d9){ +var conf=opts.icons[_4d9]; +var icon=$(this); +if(!conf||conf.disabled||opts.disabled||opts.readonly){ +icon.addClass("textbox-icon-disabled"); +}else{ +icon.removeClass("textbox-icon-disabled"); +} +}); +var btn=tb.find(".textbox-button"); +btn.unbind(".textbox").bind("click.textbox",function(){ +if(!btn.linkbutton("options").disabled){ +opts.onClickButton.call(_4d3); +} +}); +btn.linkbutton((opts.disabled||opts.readonly)?"disable":"enable"); +tb.unbind(".textbox").bind("_resize.textbox",function(e,_4da){ +if($(this).hasClass("easyui-fluid")||_4da){ +_4c2(_4d3); +} +return false; +}); +}; +function _4be(_4db,_4dc){ +var _4dd=$.data(_4db,"textbox"); +var opts=_4dd.options; +var tb=_4dd.textbox; +if(_4dc){ +opts.disabled=true; +$(_4db).attr("disabled","disabled"); +tb.addClass("textbox-disabled"); +tb.find(".textbox-text,.textbox-value").attr("disabled","disabled"); +}else{ +opts.disabled=false; +tb.removeClass("textbox-disabled"); +$(_4db).removeAttr("disabled"); +tb.find(".textbox-text,.textbox-value").removeAttr("disabled"); +} +}; +function _4bf(_4de,mode){ +var _4df=$.data(_4de,"textbox"); +var opts=_4df.options; +opts.readonly=mode==undefined?true:mode; +_4df.textbox.removeClass("textbox-readonly").addClass(opts.readonly?"textbox-readonly":""); +var _4e0=_4df.textbox.find(".textbox-text"); +_4e0.removeAttr("readonly"); +if(opts.readonly||!opts.editable){ +_4e0.attr("readonly","readonly"); +} +}; +$.fn.textbox=function(_4e1,_4e2){ +if(typeof _4e1=="string"){ +var _4e3=$.fn.textbox.methods[_4e1]; +if(_4e3){ +return _4e3(this,_4e2); +}else{ +return this.each(function(){ +var _4e4=$(this).textbox("textbox"); +_4e4.validatebox(_4e1,_4e2); +}); +} +} +_4e1=_4e1||{}; +return this.each(function(){ +var _4e5=$.data(this,"textbox"); +if(_4e5){ +$.extend(_4e5.options,_4e1); +if(_4e1.value!=undefined){ +_4e5.options.originalValue=_4e1.value; +} +}else{ +_4e5=$.data(this,"textbox",{options:$.extend({},$.fn.textbox.defaults,$.fn.textbox.parseOptions(this),_4e1),textbox:init(this)}); +_4e5.options.originalValue=_4e5.options.value; +} +_4bb(this); +_4d2(this); +_4c2(this); +_4ce(this); +$(this).textbox("initValue",_4e5.options.value); +}); +}; +$.fn.textbox.methods={options:function(jq){ +return $.data(jq[0],"textbox").options; +},cloneFrom:function(jq,from){ +return jq.each(function(){ +var t=$(this); +if(t.data("textbox")){ +return; +} +if(!$(from).data("textbox")){ +$(from).textbox(); +} +var name=t.attr("name")||""; +t.addClass("textbox-f").hide(); +t.removeAttr("name").attr("textboxName",name); +var span=$(from).next().clone().insertAfter(t); +span.find("input.textbox-value").attr("name",name); +$.data(this,"textbox",{options:$.extend(true,{},$(from).textbox("options")),textbox:span}); +var _4e6=$(from).textbox("button"); +if(_4e6.length){ +t.textbox("button").linkbutton($.extend(true,{},_4e6.linkbutton("options"))); +} +_4d2(this); +_4ce(this); +}); +},textbox:function(jq){ +return $.data(jq[0],"textbox").textbox.find(".textbox-text"); +},button:function(jq){ +return $.data(jq[0],"textbox").textbox.find(".textbox-button"); +},destroy:function(jq){ +return jq.each(function(){ +_4c0(this); +}); +},resize:function(jq,_4e7){ +return jq.each(function(){ +_4c2(this,_4e7); +}); +},disable:function(jq){ +return jq.each(function(){ +_4be(this,true); +_4d2(this); +}); +},enable:function(jq){ +return jq.each(function(){ +_4be(this,false); +_4d2(this); +}); +},readonly:function(jq,mode){ +return jq.each(function(){ +_4bf(this,mode); +_4d2(this); +}); +},isValid:function(jq){ +return jq.textbox("textbox").validatebox("isValid"); +},clear:function(jq){ +return jq.each(function(){ +$(this).textbox("setValue",""); +}); +},setText:function(jq,_4e8){ +return jq.each(function(){ +var opts=$(this).textbox("options"); +var _4e9=$(this).textbox("textbox"); +_4e8=_4e8==undefined?"":String(_4e8); +if($(this).textbox("getText")!=_4e8){ +_4e9.val(_4e8); +} +opts.value=_4e8; +if(!_4e9.is(":focus")){ +if(_4e8){ +_4e9.removeClass("textbox-prompt"); +}else{ +_4e9.val(opts.prompt).addClass("textbox-prompt"); +} +} +$(this).textbox("validate"); +}); +},initValue:function(jq,_4ea){ +return jq.each(function(){ +var _4eb=$.data(this,"textbox"); +_4eb.options.value=""; +$(this).textbox("setText",_4ea); +_4eb.textbox.find(".textbox-value").val(_4ea); +$(this).val(_4ea); +}); +},setValue:function(jq,_4ec){ +return jq.each(function(){ +var opts=$.data(this,"textbox").options; +var _4ed=$(this).textbox("getValue"); +$(this).textbox("initValue",_4ec); +if(_4ed!=_4ec){ +opts.onChange.call(this,_4ec,_4ed); +$(this).closest("form").trigger("_change",[this]); +} +}); +},getText:function(jq){ +var _4ee=jq.textbox("textbox"); +if(_4ee.is(":focus")){ +return _4ee.val(); +}else{ +return jq.textbox("options").value; +} +},getValue:function(jq){ +return jq.data("textbox").textbox.find(".textbox-value").val(); +},reset:function(jq){ +return jq.each(function(){ +var opts=$(this).textbox("options"); +$(this).textbox("setValue",opts.originalValue); +}); +},getIcon:function(jq,_4ef){ +return jq.data("textbox").textbox.find(".textbox-icon:eq("+_4ef+")"); +},getTipX:function(jq){ +var _4f0=jq.data("textbox"); +var opts=_4f0.options; +var tb=_4f0.textbox; +var _4f1=tb.find(".textbox-text"); +var _4f2=tb.find(".textbox-addon")._outerWidth(); +var _4f3=tb.find(".textbox-button")._outerWidth(); +if(opts.tipPosition=="right"){ +return (opts.iconAlign=="right"?_4f2:0)+(opts.buttonAlign=="right"?_4f3:0)+1; +}else{ +if(opts.tipPosition=="left"){ +return (opts.iconAlign=="left"?-_4f2:0)+(opts.buttonAlign=="left"?-_4f3:0)-1; +}else{ +return _4f2/2*(opts.iconAlign=="right"?1:-1); +} +} +}}; +$.fn.textbox.parseOptions=function(_4f4){ +var t=$(_4f4); +return $.extend({},$.fn.validatebox.parseOptions(_4f4),$.parser.parseOptions(_4f4,["prompt","iconCls","iconAlign","buttonText","buttonIcon","buttonAlign",{multiline:"boolean",editable:"boolean",iconWidth:"number"}]),{value:(t.val()||undefined),type:(t.attr("type")?t.attr("type"):undefined),disabled:(t.attr("disabled")?true:undefined),readonly:(t.attr("readonly")?true:undefined)}); +}; +$.fn.textbox.defaults=$.extend({},$.fn.validatebox.defaults,{width:"auto",height:22,prompt:"",value:"",type:"text",multiline:false,editable:true,disabled:false,readonly:false,icons:[],iconCls:null,iconAlign:"right",iconWidth:18,buttonText:"",buttonIcon:null,buttonAlign:"right",inputEvents:{blur:function(e){ +var t=$(e.data.target); +var opts=t.textbox("options"); +t.textbox("setValue",opts.value); +},keydown:function(e){ +if(e.keyCode==13){ +var t=$(e.data.target); +t.textbox("setValue",t.textbox("getText")); +} +}},onChange:function(_4f5,_4f6){ +},onResize:function(_4f7,_4f8){ +},onClickButton:function(){ +},onClickIcon:function(_4f9){ +}}); +})(jQuery); +(function($){ +var _4fa=0; +function _4fb(_4fc){ +var _4fd=$.data(_4fc,"filebox"); +var opts=_4fd.options; +opts.fileboxId="filebox_file_id_"+(++_4fa); +$(_4fc).addClass("filebox-f").textbox(opts); +$(_4fc).textbox("textbox").attr("readonly","readonly"); +_4fd.filebox=$(_4fc).next().addClass("filebox"); +var file=_4fe(_4fc); +var btn=$(_4fc).filebox("button"); +if(btn.length){ +$("").appendTo(btn); +if(btn.linkbutton("options").disabled){ +file.attr("disabled","disabled"); +}else{ +file.removeAttr("disabled"); +} +} +}; +function _4fe(_4ff){ +var _500=$.data(_4ff,"filebox"); +var opts=_500.options; +_500.filebox.find(".textbox-value").remove(); +opts.oldValue=""; +var file=$("").appendTo(_500.filebox); +file.attr("id",opts.fileboxId).attr("name",$(_4ff).attr("textboxName")||""); +file.change(function(){ +$(_4ff).filebox("setText",this.value); +opts.onChange.call(_4ff,this.value,opts.oldValue); +opts.oldValue=this.value; +}); +return file; +}; +$.fn.filebox=function(_501,_502){ +if(typeof _501=="string"){ +var _503=$.fn.filebox.methods[_501]; +if(_503){ +return _503(this,_502); +}else{ +return this.textbox(_501,_502); +} +} +_501=_501||{}; +return this.each(function(){ +var _504=$.data(this,"filebox"); +if(_504){ +$.extend(_504.options,_501); +}else{ +$.data(this,"filebox",{options:$.extend({},$.fn.filebox.defaults,$.fn.filebox.parseOptions(this),_501)}); +} +_4fb(this); +}); +}; +$.fn.filebox.methods={options:function(jq){ +var opts=jq.textbox("options"); +return $.extend($.data(jq[0],"filebox").options,{width:opts.width,value:opts.value,originalValue:opts.originalValue,disabled:opts.disabled,readonly:opts.readonly}); +},clear:function(jq){ +return jq.each(function(){ +$(this).textbox("clear"); +_4fe(this); +}); +},reset:function(jq){ +return jq.each(function(){ +$(this).filebox("clear"); +}); +}}; +$.fn.filebox.parseOptions=function(_505){ +return $.extend({},$.fn.textbox.parseOptions(_505),{}); +}; +$.fn.filebox.defaults=$.extend({},$.fn.textbox.defaults,{buttonIcon:null,buttonText:"Choose File",buttonAlign:"right",inputEvents:{}}); +})(jQuery); +(function($){ +function _506(_507){ +var _508=$.data(_507,"searchbox"); +var opts=_508.options; +var _509=$.extend(true,[],opts.icons); +_509.push({iconCls:"searchbox-button",handler:function(e){ +var t=$(e.data.target); +var opts=t.searchbox("options"); +opts.searcher.call(e.data.target,t.searchbox("getValue"),t.searchbox("getName")); +}}); +_50a(); +var _50b=_50c(); +$(_507).addClass("searchbox-f").textbox($.extend({},opts,{icons:_509,buttonText:(_50b?_50b.text:"")})); +$(_507).attr("searchboxName",$(_507).attr("textboxName")); +_508.searchbox=$(_507).next(); +_508.searchbox.addClass("searchbox"); +_50d(_50b); +function _50a(){ +if(opts.menu){ +_508.menu=$(opts.menu).menu(); +var _50e=_508.menu.menu("options"); +var _50f=_50e.onClick; +_50e.onClick=function(item){ +_50d(item); +_50f.call(this,item); +}; +}else{ +if(_508.menu){ +_508.menu.menu("destroy"); +} +_508.menu=null; +} +}; +function _50c(){ +if(_508.menu){ +var item=_508.menu.children("div.menu-item:first"); +_508.menu.children("div.menu-item").each(function(){ +var _510=$.extend({},$.parser.parseOptions(this),{selected:($(this).attr("selected")?true:undefined)}); +if(_510.selected){ +item=$(this); +return false; +} +}); +return _508.menu.menu("getItem",item[0]); +}else{ +return null; +} +}; +function _50d(item){ +if(!item){ +return; +} +$(_507).textbox("button").menubutton({text:item.text,iconCls:(item.iconCls||null),menu:_508.menu,menuAlign:opts.buttonAlign,plain:false}); +_508.searchbox.find("input.textbox-value").attr("name",item.name||item.text); +$(_507).searchbox("resize"); +}; +}; +$.fn.searchbox=function(_511,_512){ +if(typeof _511=="string"){ +var _513=$.fn.searchbox.methods[_511]; +if(_513){ +return _513(this,_512); +}else{ +return this.textbox(_511,_512); +} +} +_511=_511||{}; +return this.each(function(){ +var _514=$.data(this,"searchbox"); +if(_514){ +$.extend(_514.options,_511); +}else{ +$.data(this,"searchbox",{options:$.extend({},$.fn.searchbox.defaults,$.fn.searchbox.parseOptions(this),_511)}); +} +_506(this); +}); +}; +$.fn.searchbox.methods={options:function(jq){ +var opts=jq.textbox("options"); +return $.extend($.data(jq[0],"searchbox").options,{width:opts.width,value:opts.value,originalValue:opts.originalValue,disabled:opts.disabled,readonly:opts.readonly}); +},menu:function(jq){ +return $.data(jq[0],"searchbox").menu; +},getName:function(jq){ +return $.data(jq[0],"searchbox").searchbox.find("input.textbox-value").attr("name"); +},selectName:function(jq,name){ +return jq.each(function(){ +var menu=$.data(this,"searchbox").menu; +if(menu){ +menu.children("div.menu-item").each(function(){ +var item=menu.menu("getItem",this); +if(item.name==name){ +$(this).triggerHandler("click"); +return false; +} +}); +} +}); +},destroy:function(jq){ +return jq.each(function(){ +var menu=$(this).searchbox("menu"); +if(menu){ +menu.menu("destroy"); +} +$(this).textbox("destroy"); +}); +}}; +$.fn.searchbox.parseOptions=function(_515){ +var t=$(_515); +return $.extend({},$.fn.textbox.parseOptions(_515),$.parser.parseOptions(_515,["menu"]),{searcher:(t.attr("searcher")?eval(t.attr("searcher")):undefined)}); +}; +$.fn.searchbox.defaults=$.extend({},$.fn.textbox.defaults,{inputEvents:$.extend({},$.fn.textbox.defaults.inputEvents,{keydown:function(e){ +if(e.keyCode==13){ +e.preventDefault(); +var t=$(e.data.target); +var opts=t.searchbox("options"); +t.searchbox("setValue",$(this).val()); +opts.searcher.call(e.data.target,t.searchbox("getValue"),t.searchbox("getName")); +return false; +} +}}),buttonAlign:"left",menu:null,searcher:function(_516,name){ +}}); +})(jQuery); +(function($){ +function _517(_518,_519){ +var opts=$.data(_518,"form").options; +$.extend(opts,_519||{}); +var _51a=$.extend({},opts.queryParams); +if(opts.onSubmit.call(_518,_51a)==false){ +return; +} +$(_518).find(".textbox-text:focus").blur(); +var _51b="easyui_frame_"+(new Date().getTime()); +var _51c=$("").appendTo("body"); +_51c.attr("src",window.ActiveXObject?"javascript:false":"about:blank"); +_51c.css({position:"absolute",top:-1000,left:-1000}); +_51c.bind("load",cb); +_51d(_51a); +function _51d(_51e){ +var form=$(_518); +if(opts.url){ +form.attr("action",opts.url); +} +var t=form.attr("target"),a=form.attr("action"); +form.attr("target",_51b); +var _51f=$(); +try{ +for(var n in _51e){ +var _520=$("").val(_51e[n]).appendTo(form); +_51f=_51f.add(_520); +} +_521(); +form[0].submit(); +} +finally{ +form.attr("action",a); +t?form.attr("target",t):form.removeAttr("target"); +_51f.remove(); +} +}; +function _521(){ +var f=$("#"+_51b); +if(!f.length){ +return; +} +try{ +var s=f.contents()[0].readyState; +if(s&&s.toLowerCase()=="uninitialized"){ +setTimeout(_521,100); +} +} +catch(e){ +cb(); +} +}; +var _522=10; +function cb(){ +var f=$("#"+_51b); +if(!f.length){ +return; +} +f.unbind(); +var data=""; +try{ +var body=f.contents().find("body"); +data=body.html(); +if(data==""){ +if(--_522){ +setTimeout(cb,100); +return; +} +} +var ta=body.find(">textarea"); +if(ta.length){ +data=ta.val(); +}else{ +var pre=body.find(">pre"); +if(pre.length){ +data=pre.html(); +} +} +} +catch(e){ +} +opts.success(data); +setTimeout(function(){ +f.unbind(); +f.remove(); +},100); +}; +}; +function load(_523,data){ +var opts=$.data(_523,"form").options; +if(typeof data=="string"){ +var _524={}; +if(opts.onBeforeLoad.call(_523,_524)==false){ +return; +} +$.ajax({url:data,data:_524,dataType:"json",success:function(data){ +_525(data); +},error:function(){ +opts.onLoadError.apply(_523,arguments); +}}); +}else{ +_525(data); +} +function _525(data){ +var form=$(_523); +for(var name in data){ +var val=data[name]; +if(!_526(name,val)){ +if(!_527(name,val)){ +form.find("input[name=\""+name+"\"]").val(val); +form.find("textarea[name=\""+name+"\"]").val(val); +form.find("select[name=\""+name+"\"]").val(val); +} +} +} +opts.onLoadSuccess.call(_523,data); +form.form("validate"); +}; +function _526(name,val){ +var cc=$(_523).find("[switchbuttonName=\""+name+"\"]"); +if(cc.length){ +cc.switchbutton("uncheck"); +cc.each(function(){ +if(_528($(this).switchbutton("options").value,val)){ +$(this).switchbutton("check"); +} +}); +return true; +} +cc=$(_523).find("input[name=\""+name+"\"][type=radio], input[name=\""+name+"\"][type=checkbox]"); +if(cc.length){ +cc._propAttr("checked",false); +cc.each(function(){ +if(_528($(this).val(),val)){ +$(this)._propAttr("checked",true); +} +}); +return true; +} +return false; +}; +function _528(v,val){ +if(v==String(val)||$.inArray(v,$.isArray(val)?val:[val])>=0){ +return true; +}else{ +return false; +} +}; +function _527(name,val){ +var _529=$(_523).find("[textboxName=\""+name+"\"],[sliderName=\""+name+"\"]"); +if(_529.length){ +for(var i=0;i=0;i--){ +var type=opts.fieldTypes[i]; +var _52e=form.find("."+type+"-f"); +if(_52e.length&&_52e[type]){ +_52e[type]("clear"); +} +} +form.form("validate"); +}; +function _52f(_530){ +_530.reset(); +var form=$(_530); +var opts=$.data(_530,"form").options; +for(var i=opts.fieldTypes.length-1;i>=0;i--){ +var type=opts.fieldTypes[i]; +var _531=form.find("."+type+"-f"); +if(_531.length&&_531[type]){ +_531[type]("reset"); +} +} +form.form("validate"); +}; +function _532(_533){ +var _534=$.data(_533,"form").options; +$(_533).unbind(".form"); +if(_534.ajax){ +$(_533).bind("submit.form",function(){ +setTimeout(function(){ +_517(_533,_534); +},0); +return false; +}); +} +$(_533).bind("_change.form",function(e,t){ +_534.onChange.call(this,t); +}).bind("change.form",function(e){ +var t=e.target; +if(!$(t).hasClass("textbox-text")){ +_534.onChange.call(this,t); +} +}); +_535(_533,_534.novalidate); +}; +function _536(_537,_538){ +_538=_538||{}; +var _539=$.data(_537,"form"); +if(_539){ +$.extend(_539.options,_538); +}else{ +$.data(_537,"form",{options:$.extend({},$.fn.form.defaults,$.fn.form.parseOptions(_537),_538)}); +} +}; +function _53a(_53b){ +if($.fn.validatebox){ +var t=$(_53b); +t.find(".validatebox-text:not(:disabled)").validatebox("validate"); +var _53c=t.find(".validatebox-invalid"); +_53c.filter(":not(:disabled):first").focus(); +return _53c.length==0; +} +return true; +}; +function _535(_53d,_53e){ +var opts=$.data(_53d,"form").options; +opts.novalidate=_53e; +$(_53d).find(".validatebox-text:not(:disabled)").validatebox(_53e?"disableValidation":"enableValidation"); +}; +$.fn.form=function(_53f,_540){ +if(typeof _53f=="string"){ +this.each(function(){ +_536(this); +}); +return $.fn.form.methods[_53f](this,_540); +} +return this.each(function(){ +_536(this,_53f); +_532(this); +}); +}; +$.fn.form.methods={options:function(jq){ +return $.data(jq[0],"form").options; +},submit:function(jq,_541){ +return jq.each(function(){ +_517(this,_541); +}); +},load:function(jq,data){ +return jq.each(function(){ +load(this,data); +}); +},clear:function(jq){ +return jq.each(function(){ +_52b(this); +}); +},reset:function(jq){ +return jq.each(function(){ +_52f(this); +}); +},validate:function(jq){ +return _53a(jq[0]); +},disableValidation:function(jq){ +return jq.each(function(){ +_535(this,true); +}); +},enableValidation:function(jq){ +return jq.each(function(){ +_535(this,false); +}); +}}; +$.fn.form.parseOptions=function(_542){ +var t=$(_542); +return $.extend({},$.parser.parseOptions(_542,[{ajax:"boolean"}]),{url:(t.attr("action")?t.attr("action"):undefined)}); +}; +$.fn.form.defaults={fieldTypes:["combobox","combotree","combogrid","datetimebox","datebox","combo","datetimespinner","timespinner","numberspinner","spinner","slider","searchbox","numberbox","textbox","switchbutton"],novalidate:false,ajax:true,url:null,queryParams:{},onSubmit:function(_543){ +return $(this).form("validate"); +},success:function(data){ +},onBeforeLoad:function(_544){ +},onLoadSuccess:function(data){ +},onLoadError:function(){ +},onChange:function(_545){ +}}; +})(jQuery); +(function($){ +function _546(_547){ +var _548=$.data(_547,"numberbox"); +var opts=_548.options; +$(_547).addClass("numberbox-f").textbox(opts); +$(_547).textbox("textbox").css({imeMode:"disabled"}); +$(_547).attr("numberboxName",$(_547).attr("textboxName")); +_548.numberbox=$(_547).next(); +_548.numberbox.addClass("numberbox"); +var _549=opts.parser.call(_547,opts.value); +var _54a=opts.formatter.call(_547,_549); +$(_547).numberbox("initValue",_549).numberbox("setText",_54a); +}; +function _54b(_54c,_54d){ +var _54e=$.data(_54c,"numberbox"); +var opts=_54e.options; +var _54d=opts.parser.call(_54c,_54d); +var text=opts.formatter.call(_54c,_54d); +opts.value=_54d; +$(_54c).textbox("setText",text).textbox("setValue",_54d); +text=opts.formatter.call(_54c,$(_54c).textbox("getValue")); +$(_54c).textbox("setText",text); +}; +$.fn.numberbox=function(_54f,_550){ +if(typeof _54f=="string"){ +var _551=$.fn.numberbox.methods[_54f]; +if(_551){ +return _551(this,_550); +}else{ +return this.textbox(_54f,_550); +} +} +_54f=_54f||{}; +return this.each(function(){ +var _552=$.data(this,"numberbox"); +if(_552){ +$.extend(_552.options,_54f); +}else{ +_552=$.data(this,"numberbox",{options:$.extend({},$.fn.numberbox.defaults,$.fn.numberbox.parseOptions(this),_54f)}); +} +_546(this); +}); +}; +$.fn.numberbox.methods={options:function(jq){ +var opts=jq.data("textbox")?jq.textbox("options"):{}; +return $.extend($.data(jq[0],"numberbox").options,{width:opts.width,originalValue:opts.originalValue,disabled:opts.disabled,readonly:opts.readonly}); +},fix:function(jq){ +return jq.each(function(){ +$(this).numberbox("setValue",$(this).numberbox("getText")); +}); +},setValue:function(jq,_553){ +return jq.each(function(){ +_54b(this,_553); +}); +},clear:function(jq){ +return jq.each(function(){ +$(this).textbox("clear"); +$(this).numberbox("options").value=""; +}); +},reset:function(jq){ +return jq.each(function(){ +$(this).textbox("reset"); +$(this).numberbox("setValue",$(this).numberbox("getValue")); +}); +}}; +$.fn.numberbox.parseOptions=function(_554){ +var t=$(_554); +return $.extend({},$.fn.textbox.parseOptions(_554),$.parser.parseOptions(_554,["decimalSeparator","groupSeparator","suffix",{min:"number",max:"number",precision:"number"}]),{prefix:(t.attr("prefix")?t.attr("prefix"):undefined)}); +}; +$.fn.numberbox.defaults=$.extend({},$.fn.textbox.defaults,{inputEvents:{keypress:function(e){ +var _555=e.data.target; +var opts=$(_555).numberbox("options"); +return opts.filter.call(_555,e); +},blur:function(e){ +var _556=e.data.target; +$(_556).numberbox("setValue",$(_556).numberbox("getText")); +},keydown:function(e){ +if(e.keyCode==13){ +var _557=e.data.target; +$(_557).numberbox("setValue",$(_557).numberbox("getText")); +} +}},min:null,max:null,precision:0,decimalSeparator:".",groupSeparator:"",prefix:"",suffix:"",filter:function(e){ +var opts=$(this).numberbox("options"); +var s=$(this).numberbox("getText"); +if(e.which==13){ +return true; +} +if(e.which==45){ +return (s.indexOf("-")==-1?true:false); +} +var c=String.fromCharCode(e.which); +if(c==opts.decimalSeparator){ +return (s.indexOf(c)==-1?true:false); +}else{ +if(c==opts.groupSeparator){ +return true; +}else{ +if((e.which>=48&&e.which<=57&&e.ctrlKey==false&&e.shiftKey==false)||e.which==0||e.which==8){ +return true; +}else{ +if(e.ctrlKey==true&&(e.which==99||e.which==118)){ +return true; +}else{ +return false; +} +} +} +} +},formatter:function(_558){ +if(!_558){ +return _558; +} +_558=_558+""; +var opts=$(this).numberbox("options"); +var s1=_558,s2=""; +var dpos=_558.indexOf("."); +if(dpos>=0){ +s1=_558.substring(0,dpos); +s2=_558.substring(dpos+1,_558.length); +} +if(opts.groupSeparator){ +var p=/(\d+)(\d{3})/; +while(p.test(s1)){ +s1=s1.replace(p,"$1"+opts.groupSeparator+"$2"); +} +} +if(s2){ +return opts.prefix+s1+opts.decimalSeparator+s2+opts.suffix; +}else{ +return opts.prefix+s1+opts.suffix; +} +},parser:function(s){ +s=s+""; +var opts=$(this).numberbox("options"); +if(parseFloat(s)!=s){ +if(opts.prefix){ +s=$.trim(s.replace(new RegExp("\\"+$.trim(opts.prefix),"g"),"")); +} +if(opts.suffix){ +s=$.trim(s.replace(new RegExp("\\"+$.trim(opts.suffix),"g"),"")); +} +if(opts.groupSeparator){ +s=$.trim(s.replace(new RegExp("\\"+opts.groupSeparator,"g"),"")); +} +if(opts.decimalSeparator){ +s=$.trim(s.replace(new RegExp("\\"+opts.decimalSeparator,"g"),".")); +} +s=s.replace(/\s/g,""); +} +var val=parseFloat(s).toFixed(opts.precision); +if(isNaN(val)){ +val=""; +}else{ +if(typeof (opts.min)=="number"&&valopts.max){ +val=opts.max.toFixed(opts.precision); +} +} +} +return val; +}}); +})(jQuery); +(function($){ +function _559(_55a,_55b){ +var opts=$.data(_55a,"calendar").options; +var t=$(_55a); +if(_55b){ +$.extend(opts,{width:_55b.width,height:_55b.height}); +} +t._size(opts,t.parent()); +t.find(".calendar-body")._outerHeight(t.height()-t.find(".calendar-header")._outerHeight()); +if(t.find(".calendar-menu").is(":visible")){ +_55c(_55a); +} +}; +function init(_55d){ +$(_55d).addClass("calendar").html("
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+""+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+""+""+""+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "); +$(_55d).bind("_resize",function(e,_55e){ +if($(this).hasClass("easyui-fluid")||_55e){ +_559(_55d); +} +return false; +}); +}; +function _55f(_560){ +var opts=$.data(_560,"calendar").options; +var menu=$(_560).find(".calendar-menu"); +menu.find(".calendar-menu-year").unbind(".calendar").bind("keypress.calendar",function(e){ +if(e.keyCode==13){ +_561(true); +} +}); +$(_560).unbind(".calendar").bind("mouseover.calendar",function(e){ +var t=_562(e.target); +if(t.hasClass("calendar-nav")||t.hasClass("calendar-text")||(t.hasClass("calendar-day")&&!t.hasClass("calendar-disabled"))){ +t.addClass("calendar-nav-hover"); +} +}).bind("mouseout.calendar",function(e){ +var t=_562(e.target); +if(t.hasClass("calendar-nav")||t.hasClass("calendar-text")||(t.hasClass("calendar-day")&&!t.hasClass("calendar-disabled"))){ +t.removeClass("calendar-nav-hover"); +} +}).bind("click.calendar",function(e){ +var t=_562(e.target); +if(t.hasClass("calendar-menu-next")||t.hasClass("calendar-nextyear")){ +_563(1); +}else{ +if(t.hasClass("calendar-menu-prev")||t.hasClass("calendar-prevyear")){ +_563(-1); +}else{ +if(t.hasClass("calendar-menu-month")){ +menu.find(".calendar-selected").removeClass("calendar-selected"); +t.addClass("calendar-selected"); +_561(true); +}else{ +if(t.hasClass("calendar-prevmonth")){ +_564(-1); +}else{ +if(t.hasClass("calendar-nextmonth")){ +_564(1); +}else{ +if(t.hasClass("calendar-text")){ +if(menu.is(":visible")){ +menu.hide(); +}else{ +_55c(_560); +} +}else{ +if(t.hasClass("calendar-day")){ +if(t.hasClass("calendar-disabled")){ +return; +} +var _565=opts.current; +t.closest("div.calendar-body").find(".calendar-selected").removeClass("calendar-selected"); +t.addClass("calendar-selected"); +var _566=t.attr("abbr").split(","); +var y=parseInt(_566[0]); +var m=parseInt(_566[1]); +var d=parseInt(_566[2]); +opts.current=new Date(y,m-1,d); +opts.onSelect.call(_560,opts.current); +if(!_565||_565.getTime()!=opts.current.getTime()){ +opts.onChange.call(_560,opts.current,_565); +} +if(opts.year!=y||opts.month!=m){ +opts.year=y; +opts.month=m; +show(_560); +} +} +} +} +} +} +} +} +}); +function _562(t){ +var day=$(t).closest(".calendar-day"); +if(day.length){ +return day; +}else{ +return $(t); +} +}; +function _561(_567){ +var menu=$(_560).find(".calendar-menu"); +var year=menu.find(".calendar-menu-year").val(); +var _568=menu.find(".calendar-selected").attr("abbr"); +if(!isNaN(year)){ +opts.year=parseInt(year); +opts.month=parseInt(_568); +show(_560); +} +if(_567){ +menu.hide(); +} +}; +function _563(_569){ +opts.year+=_569; +show(_560); +menu.find(".calendar-menu-year").val(opts.year); +}; +function _564(_56a){ +opts.month+=_56a; +if(opts.month>12){ +opts.year++; +opts.month=1; +}else{ +if(opts.month<1){ +opts.year--; +opts.month=12; +} +} +show(_560); +menu.find("td.calendar-selected").removeClass("calendar-selected"); +menu.find("td:eq("+(opts.month-1)+")").addClass("calendar-selected"); +}; +}; +function _55c(_56b){ +var opts=$.data(_56b,"calendar").options; +$(_56b).find(".calendar-menu").show(); +if($(_56b).find(".calendar-menu-month-inner").is(":empty")){ +$(_56b).find(".calendar-menu-month-inner").empty(); +var t=$("
                                                  ").appendTo($(_56b).find(".calendar-menu-month-inner")); +var idx=0; +for(var i=0;i<3;i++){ +var tr=$("").appendTo(t); +for(var j=0;j<4;j++){ +$("").html(opts.months[idx++]).attr("abbr",idx).appendTo(tr); +} +} +} +var body=$(_56b).find(".calendar-body"); +var sele=$(_56b).find(".calendar-menu"); +var _56c=sele.find(".calendar-menu-year-inner"); +var _56d=sele.find(".calendar-menu-month-inner"); +_56c.find("input").val(opts.year).focus(); +_56d.find("td.calendar-selected").removeClass("calendar-selected"); +_56d.find("td:eq("+(opts.month-1)+")").addClass("calendar-selected"); +sele._outerWidth(body._outerWidth()); +sele._outerHeight(body._outerHeight()); +_56d._outerHeight(sele.height()-_56c._outerHeight()); +}; +function _56e(_56f,year,_570){ +var opts=$.data(_56f,"calendar").options; +var _571=[]; +var _572=new Date(year,_570,0).getDate(); +for(var i=1;i<=_572;i++){ +_571.push([year,_570,i]); +} +var _573=[],week=[]; +var _574=-1; +while(_571.length>0){ +var date=_571.shift(); +week.push(date); +var day=new Date(date[0],date[1]-1,date[2]).getDay(); +if(_574==day){ +day=0; +}else{ +if(day==(opts.firstDay==0?7:opts.firstDay)-1){ +_573.push(week); +week=[]; +} +} +_574=day; +} +if(week.length){ +_573.push(week); +} +var _575=_573[0]; +if(_575.length<7){ +while(_575.length<7){ +var _576=_575[0]; +var date=new Date(_576[0],_576[1]-1,_576[2]-1); +_575.unshift([date.getFullYear(),date.getMonth()+1,date.getDate()]); +} +}else{ +var _576=_575[0]; +var week=[]; +for(var i=1;i<=7;i++){ +var date=new Date(_576[0],_576[1]-1,_576[2]-i); +week.unshift([date.getFullYear(),date.getMonth()+1,date.getDate()]); +} +_573.unshift(week); +} +var _577=_573[_573.length-1]; +while(_577.length<7){ +var _578=_577[_577.length-1]; +var date=new Date(_578[0],_578[1]-1,_578[2]+1); +_577.push([date.getFullYear(),date.getMonth()+1,date.getDate()]); +} +if(_573.length<6){ +var _578=_577[_577.length-1]; +var week=[]; +for(var i=1;i<=7;i++){ +var date=new Date(_578[0],_578[1]-1,_578[2]+i); +week.push([date.getFullYear(),date.getMonth()+1,date.getDate()]); +} +_573.push(week); +} +return _573; +}; +function show(_579){ +var opts=$.data(_579,"calendar").options; +if(opts.current&&!opts.validator.call(_579,opts.current)){ +opts.current=null; +} +var now=new Date(); +var _57a=now.getFullYear()+","+(now.getMonth()+1)+","+now.getDate(); +var _57b=opts.current?(opts.current.getFullYear()+","+(opts.current.getMonth()+1)+","+opts.current.getDate()):""; +var _57c=6-opts.firstDay; +var _57d=_57c+1; +if(_57c>=7){ +_57c-=7; +} +if(_57d>=7){ +_57d-=7; +} +$(_579).find(".calendar-title span").html(opts.months[opts.month-1]+" "+opts.year); +var body=$(_579).find("div.calendar-body"); +body.children("table").remove(); +var data=[""]; +data.push(""); +for(var i=opts.firstDay;i"+opts.weeks[i]+""); +} +for(var i=0;i"+opts.weeks[i]+""); +} +data.push(""); +data.push(""); +var _57e=_56e(_579,opts.year,opts.month); +for(var i=0;i<_57e.length;i++){ +var week=_57e[i]; +var cls=""; +if(i==0){ +cls="calendar-first"; +}else{ +if(i==_57e.length-1){ +cls="calendar-last"; +} +} +data.push(""); +for(var j=0;j"+d+""); +} +data.push(""); +} +data.push(""); +data.push("
                                                  "); +body.append(data.join("")); +body.children("table.calendar-dtable").prependTo(body); +opts.onNavigate.call(_579,opts.year,opts.month); +}; +$.fn.calendar=function(_582,_583){ +if(typeof _582=="string"){ +return $.fn.calendar.methods[_582](this,_583); +} +_582=_582||{}; +return this.each(function(){ +var _584=$.data(this,"calendar"); +if(_584){ +$.extend(_584.options,_582); +}else{ +_584=$.data(this,"calendar",{options:$.extend({},$.fn.calendar.defaults,$.fn.calendar.parseOptions(this),_582)}); +init(this); +} +if(_584.options.border==false){ +$(this).addClass("calendar-noborder"); +} +_559(this); +_55f(this); +show(this); +$(this).find("div.calendar-menu").hide(); +}); +}; +$.fn.calendar.methods={options:function(jq){ +return $.data(jq[0],"calendar").options; +},resize:function(jq,_585){ +return jq.each(function(){ +_559(this,_585); +}); +},moveTo:function(jq,date){ +return jq.each(function(){ +if(!date){ +var now=new Date(); +$(this).calendar({year:now.getFullYear(),month:now.getMonth()+1,current:date}); +return; +} +var opts=$(this).calendar("options"); +if(opts.validator.call(this,date)){ +var _586=opts.current; +$(this).calendar({year:date.getFullYear(),month:date.getMonth()+1,current:date}); +if(!_586||_586.getTime()!=date.getTime()){ +opts.onChange.call(this,opts.current,_586); +} +} +}); +}}; +$.fn.calendar.parseOptions=function(_587){ +var t=$(_587); +return $.extend({},$.parser.parseOptions(_587,[{firstDay:"number",fit:"boolean",border:"boolean"}])); +}; +$.fn.calendar.defaults={width:180,height:180,fit:false,border:true,firstDay:0,weeks:["S","M","T","W","T","F","S"],months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],year:new Date().getFullYear(),month:new Date().getMonth()+1,current:(function(){ +var d=new Date(); +return new Date(d.getFullYear(),d.getMonth(),d.getDate()); +})(),formatter:function(date){ +return date.getDate(); +},styler:function(date){ +return ""; +},validator:function(date){ +return true; +},onSelect:function(date){ +},onChange:function(_588,_589){ +},onNavigate:function(year,_58a){ +}}; +})(jQuery); +(function($){ +function _58b(_58c){ +var _58d=$.data(_58c,"spinner"); +var opts=_58d.options; +var _58e=$.extend(true,[],opts.icons); +_58e.push({iconCls:"spinner-arrow",handler:function(e){ +_58f(e); +}}); +$(_58c).addClass("spinner-f").textbox($.extend({},opts,{icons:_58e})); +var _590=$(_58c).textbox("getIcon",_58e.length-1); +_590.append(""); +_590.append(""); +$(_58c).attr("spinnerName",$(_58c).attr("textboxName")); +_58d.spinner=$(_58c).next(); +_58d.spinner.addClass("spinner"); +}; +function _58f(e){ +var _591=e.data.target; +var opts=$(_591).spinner("options"); +var up=$(e.target).closest("a.spinner-arrow-up"); +if(up.length){ +opts.spin.call(_591,false); +opts.onSpinUp.call(_591); +$(_591).spinner("validate"); +} +var down=$(e.target).closest("a.spinner-arrow-down"); +if(down.length){ +opts.spin.call(_591,true); +opts.onSpinDown.call(_591); +$(_591).spinner("validate"); +} +}; +$.fn.spinner=function(_592,_593){ +if(typeof _592=="string"){ +var _594=$.fn.spinner.methods[_592]; +if(_594){ +return _594(this,_593); +}else{ +return this.textbox(_592,_593); +} +} +_592=_592||{}; +return this.each(function(){ +var _595=$.data(this,"spinner"); +if(_595){ +$.extend(_595.options,_592); +}else{ +_595=$.data(this,"spinner",{options:$.extend({},$.fn.spinner.defaults,$.fn.spinner.parseOptions(this),_592)}); +} +_58b(this); +}); +}; +$.fn.spinner.methods={options:function(jq){ +var opts=jq.textbox("options"); +return $.extend($.data(jq[0],"spinner").options,{width:opts.width,value:opts.value,originalValue:opts.originalValue,disabled:opts.disabled,readonly:opts.readonly}); +}}; +$.fn.spinner.parseOptions=function(_596){ +return $.extend({},$.fn.textbox.parseOptions(_596),$.parser.parseOptions(_596,["min","max",{increment:"number"}])); +}; +$.fn.spinner.defaults=$.extend({},$.fn.textbox.defaults,{min:null,max:null,increment:1,spin:function(down){ +},onSpinUp:function(){ +},onSpinDown:function(){ +}}); +})(jQuery); +(function($){ +function _597(_598){ +$(_598).addClass("numberspinner-f"); +var opts=$.data(_598,"numberspinner").options; +$(_598).numberbox(opts).spinner(opts); +$(_598).numberbox("setValue",opts.value); +}; +function _599(_59a,down){ +var opts=$.data(_59a,"numberspinner").options; +var v=parseFloat($(_59a).numberbox("getValue")||opts.value)||0; +if(down){ +v-=opts.increment; +}else{ +v+=opts.increment; +} +$(_59a).numberbox("setValue",v); +}; +$.fn.numberspinner=function(_59b,_59c){ +if(typeof _59b=="string"){ +var _59d=$.fn.numberspinner.methods[_59b]; +if(_59d){ +return _59d(this,_59c); +}else{ +return this.numberbox(_59b,_59c); +} +} +_59b=_59b||{}; +return this.each(function(){ +var _59e=$.data(this,"numberspinner"); +if(_59e){ +$.extend(_59e.options,_59b); +}else{ +$.data(this,"numberspinner",{options:$.extend({},$.fn.numberspinner.defaults,$.fn.numberspinner.parseOptions(this),_59b)}); +} +_597(this); +}); +}; +$.fn.numberspinner.methods={options:function(jq){ +var opts=jq.numberbox("options"); +return $.extend($.data(jq[0],"numberspinner").options,{width:opts.width,value:opts.value,originalValue:opts.originalValue,disabled:opts.disabled,readonly:opts.readonly}); +}}; +$.fn.numberspinner.parseOptions=function(_59f){ +return $.extend({},$.fn.spinner.parseOptions(_59f),$.fn.numberbox.parseOptions(_59f),{}); +}; +$.fn.numberspinner.defaults=$.extend({},$.fn.spinner.defaults,$.fn.numberbox.defaults,{spin:function(down){ +_599(this,down); +}}); +})(jQuery); +(function($){ +function _5a0(_5a1){ +var _5a2=0; +if(typeof _5a1.selectionStart=="number"){ +_5a2=_5a1.selectionStart; +}else{ +if(_5a1.createTextRange){ +var _5a3=_5a1.createTextRange(); +var s=document.selection.createRange(); +s.setEndPoint("StartToStart",_5a3); +_5a2=s.text.length; +} +} +return _5a2; +}; +function _5a4(_5a5,_5a6,end){ +if(_5a5.setSelectionRange){ +_5a5.setSelectionRange(_5a6,end); +}else{ +if(_5a5.createTextRange){ +var _5a7=_5a5.createTextRange(); +_5a7.collapse(); +_5a7.moveEnd("character",end); +_5a7.moveStart("character",_5a6); +_5a7.select(); +} +} +}; +function _5a8(_5a9){ +var opts=$.data(_5a9,"timespinner").options; +$(_5a9).addClass("timespinner-f").spinner(opts); +var _5aa=opts.formatter.call(_5a9,opts.parser.call(_5a9,opts.value)); +$(_5a9).timespinner("initValue",_5aa); +}; +function _5ab(e){ +var _5ac=e.data.target; +var opts=$.data(_5ac,"timespinner").options; +var _5ad=_5a0(this); +for(var i=0;i=_5ae[0]&&_5ad<=_5ae[1]){ +_5af(_5ac,i); +return; +} +} +}; +function _5af(_5b0,_5b1){ +var opts=$.data(_5b0,"timespinner").options; +if(_5b1!=undefined){ +opts.highlight=_5b1; +} +var _5b2=opts.selections[opts.highlight]; +if(_5b2){ +var tb=$(_5b0).timespinner("textbox"); +_5a4(tb[0],_5b2[0],_5b2[1]); +tb.focus(); +} +}; +function _5b3(_5b4,_5b5){ +var opts=$.data(_5b4,"timespinner").options; +var _5b5=opts.parser.call(_5b4,_5b5); +var text=opts.formatter.call(_5b4,_5b5); +$(_5b4).spinner("setValue",text); +}; +function _5b6(_5b7,down){ +var opts=$.data(_5b7,"timespinner").options; +var s=$(_5b7).timespinner("getValue"); +var _5b8=opts.selections[opts.highlight]; +var s1=s.substring(0,_5b8[0]); +var s2=s.substring(_5b8[0],_5b8[1]); +var s3=s.substring(_5b8[1]); +var v=s1+((parseInt(s2,10)||0)+opts.increment*(down?-1:1))+s3; +$(_5b7).timespinner("setValue",v); +_5af(_5b7); +}; +$.fn.timespinner=function(_5b9,_5ba){ +if(typeof _5b9=="string"){ +var _5bb=$.fn.timespinner.methods[_5b9]; +if(_5bb){ +return _5bb(this,_5ba); +}else{ +return this.spinner(_5b9,_5ba); +} +} +_5b9=_5b9||{}; +return this.each(function(){ +var _5bc=$.data(this,"timespinner"); +if(_5bc){ +$.extend(_5bc.options,_5b9); +}else{ +$.data(this,"timespinner",{options:$.extend({},$.fn.timespinner.defaults,$.fn.timespinner.parseOptions(this),_5b9)}); +} +_5a8(this); +}); +}; +$.fn.timespinner.methods={options:function(jq){ +var opts=jq.data("spinner")?jq.spinner("options"):{}; +return $.extend($.data(jq[0],"timespinner").options,{width:opts.width,value:opts.value,originalValue:opts.originalValue,disabled:opts.disabled,readonly:opts.readonly}); +},setValue:function(jq,_5bd){ +return jq.each(function(){ +_5b3(this,_5bd); +}); +},getHours:function(jq){ +var opts=$.data(jq[0],"timespinner").options; +var vv=jq.timespinner("getValue").split(opts.separator); +return parseInt(vv[0],10); +},getMinutes:function(jq){ +var opts=$.data(jq[0],"timespinner").options; +var vv=jq.timespinner("getValue").split(opts.separator); +return parseInt(vv[1],10); +},getSeconds:function(jq){ +var opts=$.data(jq[0],"timespinner").options; +var vv=jq.timespinner("getValue").split(opts.separator); +return parseInt(vv[2],10)||0; +}}; +$.fn.timespinner.parseOptions=function(_5be){ +return $.extend({},$.fn.spinner.parseOptions(_5be),$.parser.parseOptions(_5be,["separator",{showSeconds:"boolean",highlight:"number"}])); +}; +$.fn.timespinner.defaults=$.extend({},$.fn.spinner.defaults,{inputEvents:$.extend({},$.fn.spinner.defaults.inputEvents,{click:function(e){ +_5ab.call(this,e); +},blur:function(e){ +var t=$(e.data.target); +t.timespinner("setValue",t.timespinner("getText")); +},keydown:function(e){ +if(e.keyCode==13){ +var t=$(e.data.target); +t.timespinner("setValue",t.timespinner("getText")); +} +}}),formatter:function(date){ +if(!date){ +return ""; +} +var opts=$(this).timespinner("options"); +var tt=[_5bf(date.getHours()),_5bf(date.getMinutes())]; +if(opts.showSeconds){ +tt.push(_5bf(date.getSeconds())); +} +return tt.join(opts.separator); +function _5bf(_5c0){ +return (_5c0<10?"0":"")+_5c0; +}; +},parser:function(s){ +var opts=$(this).timespinner("options"); +var date=_5c1(s); +if(date){ +var min=_5c1(opts.min); +var max=_5c1(opts.max); +if(min&&min>date){ +date=min; +} +if(max&&max"]; +for(var i=0;i<_5d7.length;i++){ +_5d6.cache[_5d7[i][0]]={width:_5d7[i][1]}; +} +var _5d8=0; +for(var s in _5d6.cache){ +var item=_5d6.cache[s]; +item.index=_5d8++; +ss.push(s+"{width:"+item.width+"}"); +} +ss.push(""); +$(ss.join("\n")).appendTo(cc); +cc.children("style[easyui]:not(:last)").remove(); +},getRule:function(_5d9){ +var _5da=cc.children("style[easyui]:last")[0]; +var _5db=_5da.styleSheet?_5da.styleSheet:(_5da.sheet||document.styleSheets[document.styleSheets.length-1]); +var _5dc=_5db.cssRules||_5db.rules; +return _5dc[_5d9]; +},set:function(_5dd,_5de){ +var item=_5d6.cache[_5dd]; +if(item){ +item.width=_5de; +var rule=this.getRule(item.index); +if(rule){ +rule.style["width"]=_5de; +} +} +},remove:function(_5df){ +var tmp=[]; +for(var s in _5d6.cache){ +if(s.indexOf(_5df)==-1){ +tmp.push([s,_5d6.cache[s].width]); +} +} +_5d6.cache={}; +this.add(tmp); +},dirty:function(_5e0){ +if(_5e0){ +_5d6.dirty.push(_5e0); +} +},clean:function(){ +for(var i=0;i<_5d6.dirty.length;i++){ +this.remove(_5d6.dirty[i]); +} +_5d6.dirty=[]; +}}; +}; +function _5e1(_5e2,_5e3){ +var _5e4=$.data(_5e2,"datagrid"); +var opts=_5e4.options; +var _5e5=_5e4.panel; +if(_5e3){ +$.extend(opts,_5e3); +} +if(opts.fit==true){ +var p=_5e5.panel("panel").parent(); +opts.width=p.width(); +opts.height=p.height(); +} +_5e5.panel("resize",opts); +}; +function _5e6(_5e7){ +var _5e8=$.data(_5e7,"datagrid"); +var opts=_5e8.options; +var dc=_5e8.dc; +var wrap=_5e8.panel; +var _5e9=wrap.width(); +var _5ea=wrap.height(); +var view=dc.view; +var _5eb=dc.view1; +var _5ec=dc.view2; +var _5ed=_5eb.children("div.datagrid-header"); +var _5ee=_5ec.children("div.datagrid-header"); +var _5ef=_5ed.find("table"); +var _5f0=_5ee.find("table"); +view.width(_5e9); +var _5f1=_5ed.children("div.datagrid-header-inner").show(); +_5eb.width(_5f1.find("table").width()); +if(!opts.showHeader){ +_5f1.hide(); +} +_5ec.width(_5e9-_5eb._outerWidth()); +_5eb.children()._outerWidth(_5eb.width()); +_5ec.children()._outerWidth(_5ec.width()); +var all=_5ed.add(_5ee).add(_5ef).add(_5f0); +all.css("height",""); +var hh=Math.max(_5ef.height(),_5f0.height()); +all._outerHeight(hh); +dc.body1.add(dc.body2).children("table.datagrid-btable-frozen").css({position:"absolute",top:dc.header2._outerHeight()}); +var _5f2=dc.body2.children("table.datagrid-btable-frozen")._outerHeight(); +var _5f3=_5f2+_5ee._outerHeight()+_5ec.children(".datagrid-footer")._outerHeight(); +wrap.children(":not(.datagrid-view,.datagrid-mask,.datagrid-mask-msg)").each(function(){ +_5f3+=$(this)._outerHeight(); +}); +var _5f4=wrap.outerHeight()-wrap.height(); +var _5f5=wrap._size("minHeight")||""; +var _5f6=wrap._size("maxHeight")||""; +_5eb.add(_5ec).children("div.datagrid-body").css({marginTop:_5f2,height:(isNaN(parseInt(opts.height))?"":(_5ea-_5f3)),minHeight:(_5f5?_5f5-_5f4-_5f3:""),maxHeight:(_5f6?_5f6-_5f4-_5f3:"")}); +view.height(_5ec.height()); +}; +function _5f7(_5f8,_5f9,_5fa){ +var rows=$.data(_5f8,"datagrid").data.rows; +var opts=$.data(_5f8,"datagrid").options; +var dc=$.data(_5f8,"datagrid").dc; +if(!dc.body1.is(":empty")&&(!opts.nowrap||opts.autoRowHeight||_5fa)){ +if(_5f9!=undefined){ +var tr1=opts.finder.getTr(_5f8,_5f9,"body",1); +var tr2=opts.finder.getTr(_5f8,_5f9,"body",2); +_5fb(tr1,tr2); +}else{ +var tr1=opts.finder.getTr(_5f8,0,"allbody",1); +var tr2=opts.finder.getTr(_5f8,0,"allbody",2); +_5fb(tr1,tr2); +if(opts.showFooter){ +var tr1=opts.finder.getTr(_5f8,0,"allfooter",1); +var tr2=opts.finder.getTr(_5f8,0,"allfooter",2); +_5fb(tr1,tr2); +} +} +} +_5e6(_5f8); +if(opts.height=="auto"){ +var _5fc=dc.body1.parent(); +var _5fd=dc.body2; +var _5fe=_5ff(_5fd); +var _600=_5fe.height; +if(_5fe.width>_5fd.width()){ +_600+=18; +} +_600-=parseInt(_5fd.css("marginTop"))||0; +_5fc.height(_600); +_5fd.height(_600); +dc.view.height(dc.view2.height()); +} +dc.body2.triggerHandler("scroll"); +function _5fb(trs1,trs2){ +for(var i=0;i"); +} +_608(true); +_608(false); +_5e6(_605); +function _608(_609){ +var _60a=_609?1:2; +var tr=opts.finder.getTr(_605,_606,"body",_60a); +(_609?dc.body1:dc.body2).children("table.datagrid-btable-frozen").append(tr); +}; +}; +function _60b(_60c,_60d){ +function _60e(){ +var _60f=[]; +var _610=[]; +$(_60c).children("thead").each(function(){ +var opt=$.parser.parseOptions(this,[{frozen:"boolean"}]); +$(this).find("tr").each(function(){ +var cols=[]; +$(this).find("th").each(function(){ +var th=$(this); +var col=$.extend({},$.parser.parseOptions(this,["field","align","halign","order","width",{sortable:"boolean",checkbox:"boolean",resizable:"boolean",fixed:"boolean"},{rowspan:"number",colspan:"number"}]),{title:(th.html()||undefined),hidden:(th.attr("hidden")?true:undefined),formatter:(th.attr("formatter")?eval(th.attr("formatter")):undefined),styler:(th.attr("styler")?eval(th.attr("styler")):undefined),sorter:(th.attr("sorter")?eval(th.attr("sorter")):undefined)}); +if(col.width&&String(col.width).indexOf("%")==-1){ +col.width=parseInt(col.width); +} +if(th.attr("editor")){ +var s=$.trim(th.attr("editor")); +if(s.substr(0,1)=="{"){ +col.editor=eval("("+s+")"); +}else{ +col.editor=s; +} +} +cols.push(col); +}); +opt.frozen?_60f.push(cols):_610.push(cols); +}); +}); +return [_60f,_610]; +}; +var _611=$("
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+""+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  "+""+"
                                                  "+"
                                                  "+"
                                                  "+"
                                                  ").insertAfter(_60c); +_611.panel({doSize:false,cls:"datagrid"}); +$(_60c).addClass("datagrid-f").hide().appendTo(_611.children("div.datagrid-view")); +var cc=_60e(); +var view=_611.children("div.datagrid-view"); +var _612=view.children("div.datagrid-view1"); +var _613=view.children("div.datagrid-view2"); +return {panel:_611,frozenColumns:cc[0],columns:cc[1],dc:{view:view,view1:_612,view2:_613,header1:_612.children("div.datagrid-header").children("div.datagrid-header-inner"),header2:_613.children("div.datagrid-header").children("div.datagrid-header-inner"),body1:_612.children("div.datagrid-body").children("div.datagrid-body-inner"),body2:_613.children("div.datagrid-body"),footer1:_612.children("div.datagrid-footer").children("div.datagrid-footer-inner"),footer2:_613.children("div.datagrid-footer").children("div.datagrid-footer-inner")}}; +}; +function _614(_615){ +var _616=$.data(_615,"datagrid"); +var opts=_616.options; +var dc=_616.dc; +var _617=_616.panel; +_616.ss=$(_615).datagrid("createStyleSheet"); +_617.panel($.extend({},opts,{id:null,doSize:false,onResize:function(_618,_619){ +if($.data(_615,"datagrid")){ +_5e6(_615); +$(_615).datagrid("fitColumns"); +opts.onResize.call(_617,_618,_619); +} +},onExpand:function(){ +if($.data(_615,"datagrid")){ +$(_615).datagrid("fixRowHeight").datagrid("fitColumns"); +opts.onExpand.call(_617); +} +}})); +_616.rowIdPrefix="datagrid-row-r"+(++_5cb); +_616.cellClassPrefix="datagrid-cell-c"+_5cb; +_61a(dc.header1,opts.frozenColumns,true); +_61a(dc.header2,opts.columns,false); +_61b(); +dc.header1.add(dc.header2).css("display",opts.showHeader?"block":"none"); +dc.footer1.add(dc.footer2).css("display",opts.showFooter?"block":"none"); +if(opts.toolbar){ +if($.isArray(opts.toolbar)){ +$("div.datagrid-toolbar",_617).remove(); +var tb=$("
                                                  ").prependTo(_617); +var tr=tb.find("tr"); +for(var i=0;i
                                                  ").appendTo(tr); +}else{ +var td=$("").appendTo(tr); +var tool=$("").appendTo(td); +tool[0].onclick=eval(btn.handler||function(){ +}); +tool.linkbutton($.extend({},btn,{plain:true})); +} +} +}else{ +$(opts.toolbar).addClass("datagrid-toolbar").prependTo(_617); +$(opts.toolbar).show(); +} +}else{ +$("div.datagrid-toolbar",_617).remove(); +} +$("div.datagrid-pager",_617).remove(); +if(opts.pagination){ +var _61c=$("
                                                  "); +if(opts.pagePosition=="bottom"){ +_61c.appendTo(_617); +}else{ +if(opts.pagePosition=="top"){ +_61c.addClass("datagrid-pager-top").prependTo(_617); +}else{ +var ptop=$("
                                                  ").prependTo(_617); +_61c.appendTo(_617); +_61c=_61c.add(ptop); +} +} +_61c.pagination({total:(opts.pageNumber*opts.pageSize),pageNumber:opts.pageNumber,pageSize:opts.pageSize,pageList:opts.pageList,onSelectPage:function(_61d,_61e){ +opts.pageNumber=_61d||1; +opts.pageSize=_61e; +_61c.pagination("refresh",{pageNumber:_61d,pageSize:_61e}); +_65a(_615); +}}); +opts.pageSize=_61c.pagination("options").pageSize; +} +function _61a(_61f,_620,_621){ +if(!_620){ +return; +} +$(_61f).show(); +$(_61f).empty(); +var _622=[]; +var _623=[]; +if(opts.sortName){ +_622=opts.sortName.split(","); +_623=opts.sortOrder.split(","); +} +var t=$("
                                                  ").appendTo(_61f); +for(var i=0;i<_620.length;i++){ +var tr=$("").appendTo($("tbody",t)); +var cols=_620[i]; +for(var j=0;j").appendTo(tr); +if(col.checkbox){ +td.attr("field",col.field); +$("
                                                  ").html("").appendTo(td); +}else{ +if(col.field){ +td.attr("field",col.field); +td.append("
                                                   
                                                  "); +td.find("span:first").html(col.title); +var cell=td.find("div.datagrid-cell"); +var pos=_5cc(_622,col.field); +if(pos>=0){ +cell.addClass("datagrid-sort-"+_623[pos]); +} +if(col.sortable){ +cell.addClass("datagrid-sort"); +} +if(col.resizable==false){ +cell.attr("resizable","false"); +} +if(col.width){ +var _624=$.parser.parseValue("width",col.width,dc.view,opts.scrollbarSize); +cell._outerWidth(_624-1); +col.boxWidth=parseInt(cell[0].style.width); +col.deltaWidth=_624-col.boxWidth; +}else{ +col.auto=true; +} +cell.css("text-align",(col.halign||col.align||"")); +col.cellClass=_616.cellClassPrefix+"-"+col.field.replace(/[\.|\s]/g,"-"); +cell.addClass(col.cellClass).css("width",""); +}else{ +$("
                                                  ").html(col.title).appendTo(td); +} +} +if(col.hidden){ +td.hide(); +} +} +} +if(_621&&opts.rownumbers){ +var td=$("
                                                  "); +if($("tr",t).length==0){ +td.wrap("").parent().appendTo($("tbody",t)); +}else{ +td.prependTo($("tr:first",t)); +} +} +}; +function _61b(){ +var _625=[]; +var _626=_627(_615,true).concat(_627(_615)); +for(var i=0;i<_626.length;i++){ +var col=_628(_615,_626[i]); +if(col&&!col.checkbox){ +_625.push(["."+col.cellClass,col.boxWidth?col.boxWidth+"px":"auto"]); +} +} +_616.ss.add(_625); +_616.ss.dirty(_616.cellSelectorPrefix); +_616.cellSelectorPrefix="."+_616.cellClassPrefix; +}; +}; +function _629(_62a){ +var _62b=$.data(_62a,"datagrid"); +var _62c=_62b.panel; +var opts=_62b.options; +var dc=_62b.dc; +var _62d=dc.header1.add(dc.header2); +_62d.find("input[type=checkbox]").unbind(".datagrid").bind("click.datagrid",function(e){ +if(opts.singleSelect&&opts.selectOnCheck){ +return false; +} +if($(this).is(":checked")){ +_6c4(_62a); +}else{ +_6ca(_62a); +} +e.stopPropagation(); +}); +var _62e=_62d.find("div.datagrid-cell"); +_62e.closest("td").unbind(".datagrid").bind("mouseenter.datagrid",function(){ +if(_62b.resizing){ +return; +} +$(this).addClass("datagrid-header-over"); +}).bind("mouseleave.datagrid",function(){ +$(this).removeClass("datagrid-header-over"); +}).bind("contextmenu.datagrid",function(e){ +var _62f=$(this).attr("field"); +opts.onHeaderContextMenu.call(_62a,e,_62f); +}); +_62e.unbind(".datagrid").bind("click.datagrid",function(e){ +var p1=$(this).offset().left+5; +var p2=$(this).offset().left+$(this)._outerWidth()-5; +if(e.pageXp1){ +_64f(_62a,$(this).parent().attr("field")); +} +}).bind("dblclick.datagrid",function(e){ +var p1=$(this).offset().left+5; +var p2=$(this).offset().left+$(this)._outerWidth()-5; +var cond=opts.resizeHandle=="right"?(e.pageX>p2):(opts.resizeHandle=="left"?(e.pageXp2)); +if(cond){ +var _630=$(this).parent().attr("field"); +var col=_628(_62a,_630); +if(col.resizable==false){ +return; +} +$(_62a).datagrid("autoSizeColumn",_630); +col.auto=false; +} +}); +var _631=opts.resizeHandle=="right"?"e":(opts.resizeHandle=="left"?"w":"e,w"); +_62e.each(function(){ +$(this).resizable({handles:_631,disabled:($(this).attr("resizable")?$(this).attr("resizable")=="false":false),minWidth:25,onStartResize:function(e){ +_62b.resizing=true; +_62d.css("cursor",$("body").css("cursor")); +if(!_62b.proxy){ +_62b.proxy=$("
                                                  ").appendTo(dc.view); +} +_62b.proxy.css({left:e.pageX-$(_62c).offset().left-1,display:"none"}); +setTimeout(function(){ +if(_62b.proxy){ +_62b.proxy.show(); +} +},500); +},onResize:function(e){ +_62b.proxy.css({left:e.pageX-$(_62c).offset().left-1,display:"block"}); +return false; +},onStopResize:function(e){ +_62d.css("cursor",""); +$(this).css("height",""); +var _632=$(this).parent().attr("field"); +var col=_628(_62a,_632); +col.width=$(this)._outerWidth(); +col.boxWidth=col.width-col.deltaWidth; +col.auto=undefined; +$(this).css("width",""); +$(_62a).datagrid("fixColumnSize",_632); +_62b.proxy.remove(); +_62b.proxy=null; +if($(this).parents("div:first.datagrid-header").parent().hasClass("datagrid-view1")){ +_5e6(_62a); +} +$(_62a).datagrid("fitColumns"); +opts.onResizeColumn.call(_62a,_632,col.width); +setTimeout(function(){ +_62b.resizing=false; +},0); +}}); +}); +var bb=dc.body1.add(dc.body2); +bb.unbind(); +for(var _633 in opts.rowEvents){ +bb.bind(_633,opts.rowEvents[_633]); +} +dc.body1.bind("mousewheel DOMMouseScroll",function(e){ +var e1=e.originalEvent||window.event; +var _634=e1.wheelDelta||e1.detail*(-1); +var dg=$(e.target).closest("div.datagrid-view").children(".datagrid-f"); +var dc=dg.data("datagrid").dc; +dc.body2.scrollTop(dc.body2.scrollTop()-_634); +}); +dc.body2.bind("scroll",function(){ +var b1=dc.view1.children("div.datagrid-body"); +b1.scrollTop($(this).scrollTop()); +var c1=dc.body1.children(":first"); +var c2=dc.body2.children(":first"); +if(c1.length&&c2.length){ +var top1=c1.offset().top; +var top2=c2.offset().top; +if(top1!=top2){ +b1.scrollTop(b1.scrollTop()+top1-top2); +} +} +dc.view2.children("div.datagrid-header,div.datagrid-footer")._scrollLeft($(this)._scrollLeft()); +dc.body2.children("table.datagrid-btable-frozen").css("left",-$(this)._scrollLeft()); +}); +}; +function _635(_636){ +return function(e){ +var tr=_637(e.target); +if(!tr){ +return; +} +var _638=_639(tr); +if($.data(_638,"datagrid").resizing){ +return; +} +var _63a=_63b(tr); +if(_636){ +_63c(_638,_63a); +}else{ +var opts=$.data(_638,"datagrid").options; +opts.finder.getTr(_638,_63a).removeClass("datagrid-row-over"); +} +}; +}; +function _63d(e){ +var tr=_637(e.target); +if(!tr){ +return; +} +var _63e=_639(tr); +var opts=$.data(_63e,"datagrid").options; +var _63f=_63b(tr); +var tt=$(e.target); +if(tt.parent().hasClass("datagrid-cell-check")){ +if(opts.singleSelect&&opts.selectOnCheck){ +tt._propAttr("checked",!tt.is(":checked")); +_640(_63e,_63f); +}else{ +if(tt.is(":checked")){ +tt._propAttr("checked",false); +_640(_63e,_63f); +}else{ +tt._propAttr("checked",true); +_641(_63e,_63f); +} +} +}else{ +var row=opts.finder.getRow(_63e,_63f); +var td=tt.closest("td[field]",tr); +if(td.length){ +var _642=td.attr("field"); +opts.onClickCell.call(_63e,_63f,_642,row[_642]); +} +if(opts.singleSelect==true){ +_643(_63e,_63f); +}else{ +if(opts.ctrlSelect){ +if(e.ctrlKey){ +if(tr.hasClass("datagrid-row-selected")){ +_644(_63e,_63f); +}else{ +_643(_63e,_63f); +} +}else{ +if(e.shiftKey){ +$(_63e).datagrid("clearSelections"); +var _645=Math.min(opts.lastSelectedIndex||0,_63f); +var _646=Math.max(opts.lastSelectedIndex||0,_63f); +for(var i=_645;i<=_646;i++){ +_643(_63e,i); +} +}else{ +$(_63e).datagrid("clearSelections"); +_643(_63e,_63f); +opts.lastSelectedIndex=_63f; +} +} +}else{ +if(tr.hasClass("datagrid-row-selected")){ +_644(_63e,_63f); +}else{ +_643(_63e,_63f); +} +} +} +opts.onClickRow.apply(_63e,_5d0(_63e,[_63f,row])); +} +}; +function _647(e){ +var tr=_637(e.target); +if(!tr){ +return; +} +var _648=_639(tr); +var opts=$.data(_648,"datagrid").options; +var _649=_63b(tr); +var row=opts.finder.getRow(_648,_649); +var td=$(e.target).closest("td[field]",tr); +if(td.length){ +var _64a=td.attr("field"); +opts.onDblClickCell.call(_648,_649,_64a,row[_64a]); +} +opts.onDblClickRow.apply(_648,_5d0(_648,[_649,row])); +}; +function _64b(e){ +var tr=_637(e.target); +if(tr){ +var _64c=_639(tr); +var opts=$.data(_64c,"datagrid").options; +var _64d=_63b(tr); +var row=opts.finder.getRow(_64c,_64d); +opts.onRowContextMenu.call(_64c,e,_64d,row); +}else{ +var body=_637(e.target,".datagrid-body"); +if(body){ +var _64c=_639(body); +var opts=$.data(_64c,"datagrid").options; +opts.onRowContextMenu.call(_64c,e,-1,null); +} +} +}; +function _639(t){ +return $(t).closest("div.datagrid-view").children(".datagrid-f")[0]; +}; +function _637(t,_64e){ +var tr=$(t).closest(_64e||"tr.datagrid-row"); +if(tr.length&&tr.parent().length){ +return tr; +}else{ +return undefined; +} +}; +function _63b(tr){ +if(tr.attr("datagrid-row-index")){ +return parseInt(tr.attr("datagrid-row-index")); +}else{ +return tr.attr("node-id"); +} +}; +function _64f(_650,_651){ +var _652=$.data(_650,"datagrid"); +var opts=_652.options; +_651=_651||{}; +var _653={sortName:opts.sortName,sortOrder:opts.sortOrder}; +if(typeof _651=="object"){ +$.extend(_653,_651); +} +var _654=[]; +var _655=[]; +if(_653.sortName){ +_654=_653.sortName.split(","); +_655=_653.sortOrder.split(","); +} +if(typeof _651=="string"){ +var _656=_651; +var col=_628(_650,_656); +if(!col.sortable||_652.resizing){ +return; +} +var _657=col.order||"asc"; +var pos=_5cc(_654,_656); +if(pos>=0){ +var _658=_655[pos]=="asc"?"desc":"asc"; +if(opts.multiSort&&_658==_657){ +_654.splice(pos,1); +_655.splice(pos,1); +}else{ +_655[pos]=_658; +} +}else{ +if(opts.multiSort){ +_654.push(_656); +_655.push(_657); +}else{ +_654=[_656]; +_655=[_657]; +} +} +_653.sortName=_654.join(","); +_653.sortOrder=_655.join(","); +} +if(opts.onBeforeSortColumn.call(_650,_653.sortName,_653.sortOrder)==false){ +return; +} +$.extend(opts,_653); +var dc=_652.dc; +var _659=dc.header1.add(dc.header2); +_659.find("div.datagrid-cell").removeClass("datagrid-sort-asc datagrid-sort-desc"); +for(var i=0;i<_654.length;i++){ +var col=_628(_650,_654[i]); +_659.find("div."+col.cellClass).addClass("datagrid-sort-"+_655[i]); +} +if(opts.remoteSort){ +_65a(_650); +}else{ +_65b(_650,$(_650).datagrid("getData")); +} +opts.onSortColumn.call(_650,opts.sortName,opts.sortOrder); +}; +function _65c(_65d){ +var _65e=$.data(_65d,"datagrid"); +var opts=_65e.options; +var dc=_65e.dc; +var _65f=dc.view2.children("div.datagrid-header"); +dc.body2.css("overflow-x",""); +_660(); +_661(); +_662(); +_660(true); +if(_65f.width()>=_65f.find("table").width()){ +dc.body2.css("overflow-x","hidden"); +} +function _662(){ +if(!opts.fitColumns){ +return; +} +if(!_65e.leftWidth){ +_65e.leftWidth=0; +} +var _663=0; +var cc=[]; +var _664=_627(_65d,false); +for(var i=0;i<_664.length;i++){ +var col=_628(_65d,_664[i]); +if(_665(col)){ +_663+=col.width; +cc.push({field:col.field,col:col,addingWidth:0}); +} +} +if(!_663){ +return; +} +cc[cc.length-1].addingWidth-=_65e.leftWidth; +var _666=_65f.children("div.datagrid-header-inner").show(); +var _667=_65f.width()-_65f.find("table").width()-opts.scrollbarSize+_65e.leftWidth; +var rate=_667/_663; +if(!opts.showHeader){ +_666.hide(); +} +for(var i=0;i0){ +c.col.boxWidth+=c.addingWidth; +c.col.width+=c.addingWidth; +} +} +_65e.leftWidth=_667; +$(_65d).datagrid("fixColumnSize"); +}; +function _661(){ +var _669=false; +var _66a=_627(_65d,true).concat(_627(_65d,false)); +$.map(_66a,function(_66b){ +var col=_628(_65d,_66b); +if(String(col.width||"").indexOf("%")>=0){ +var _66c=$.parser.parseValue("width",col.width,dc.view,opts.scrollbarSize)-col.deltaWidth; +if(_66c>0){ +col.boxWidth=_66c; +_669=true; +} +} +}); +if(_669){ +$(_65d).datagrid("fixColumnSize"); +} +}; +function _660(fit){ +var _66d=dc.header1.add(dc.header2).find(".datagrid-cell-group"); +if(_66d.length){ +_66d.each(function(){ +$(this)._outerWidth(fit?$(this).parent().width():10); +}); +if(fit){ +_5e6(_65d); +} +} +}; +function _665(col){ +if(String(col.width||"").indexOf("%")>=0){ +return false; +} +if(!col.hidden&&!col.checkbox&&!col.auto&&!col.fixed){ +return true; +} +}; +}; +function _66e(_66f,_670){ +var _671=$.data(_66f,"datagrid"); +var opts=_671.options; +var dc=_671.dc; +var tmp=$("
                                                  ").appendTo("body"); +if(_670){ +_5e1(_670); +$(_66f).datagrid("fitColumns"); +}else{ +var _672=false; +var _673=_627(_66f,true).concat(_627(_66f,false)); +for(var i=0;i<_673.length;i++){ +var _670=_673[i]; +var col=_628(_66f,_670); +if(col.auto){ +_5e1(_670); +_672=true; +} +} +if(_672){ +$(_66f).datagrid("fitColumns"); +} +} +tmp.remove(); +function _5e1(_674){ +var _675=dc.view.find("div.datagrid-header td[field=\""+_674+"\"] div.datagrid-cell"); +_675.css("width",""); +var col=$(_66f).datagrid("getColumnOption",_674); +col.width=undefined; +col.boxWidth=undefined; +col.auto=true; +$(_66f).datagrid("fixColumnSize",_674); +var _676=Math.max(_677("header"),_677("allbody"),_677("allfooter"))+1; +_675._outerWidth(_676-1); +col.width=_676; +col.boxWidth=parseInt(_675[0].style.width); +col.deltaWidth=_676-col.boxWidth; +_675.css("width",""); +$(_66f).datagrid("fixColumnSize",_674); +opts.onResizeColumn.call(_66f,_674,col.width); +function _677(type){ +var _678=0; +if(type=="header"){ +_678=_679(_675); +}else{ +opts.finder.getTr(_66f,0,type).find("td[field=\""+_674+"\"] div.datagrid-cell").each(function(){ +var w=_679($(this)); +if(_678=0){ +var _692=col.field||""; +for(var c=0;c<(col.colspan||1);c++){ +for(var r=0;r<(col.rowspan||1);r++){ +aa[_68f+r][_690]=_692; +} +_690++; +} +} +}); +} +return aa[aa.length-1]; +function _68e(){ +var _693=0; +$.map(_68c[0],function(col){ +_693+=col.colspan||1; +}); +return _693; +}; +function _691(a){ +for(var i=0;ib?1:-1); +}; +r=_698(r1[sn],r2[sn])*(so=="asc"?1:-1); +if(r!=0){ +return r; +} +} +return r; +}); +} +if(opts.view.onBeforeRender){ +opts.view.onBeforeRender.call(opts.view,_694,data.rows); +} +opts.view.render.call(opts.view,_694,dc.body2,false); +opts.view.render.call(opts.view,_694,dc.body1,true); +if(opts.showFooter){ +opts.view.renderFooter.call(opts.view,_694,dc.footer2,false); +opts.view.renderFooter.call(opts.view,_694,dc.footer1,true); +} +if(opts.view.onAfterRender){ +opts.view.onAfterRender.call(opts.view,_694); +} +_695.ss.clean(); +var _699=$(_694).datagrid("getPager"); +if(_699.length){ +var _69a=_699.pagination("options"); +if(_69a.total!=data.total){ +_699.pagination("refresh",{total:data.total}); +if(opts.pageNumber!=_69a.pageNumber&&_69a.pageNumber>0){ +opts.pageNumber=_69a.pageNumber; +_65a(_694); +} +} +} +_5f7(_694); +dc.body2.triggerHandler("scroll"); +$(_694).datagrid("setSelectionState"); +$(_694).datagrid("autoSizeColumn"); +opts.onLoadSuccess.call(_694,data); +}; +function _69b(_69c){ +var _69d=$.data(_69c,"datagrid"); +var opts=_69d.options; +var dc=_69d.dc; +dc.header1.add(dc.header2).find("input[type=checkbox]")._propAttr("checked",false); +if(opts.idField){ +var _69e=$.data(_69c,"treegrid")?true:false; +var _69f=opts.onSelect; +var _6a0=opts.onCheck; +opts.onSelect=opts.onCheck=function(){ +}; +var rows=opts.finder.getRows(_69c); +for(var i=0;i_6b1.height()-18){ +_6b1.scrollTop(_6b1.scrollTop()+top+tr._outerHeight()-_6b1.height()+18); +} +} +} +}; +function _63c(_6b3,_6b4){ +var _6b5=$.data(_6b3,"datagrid"); +var opts=_6b5.options; +opts.finder.getTr(_6b3,_6b5.highlightIndex).removeClass("datagrid-row-over"); +opts.finder.getTr(_6b3,_6b4).addClass("datagrid-row-over"); +_6b5.highlightIndex=_6b4; +}; +function _643(_6b6,_6b7,_6b8){ +var _6b9=$.data(_6b6,"datagrid"); +var opts=_6b9.options; +var row=opts.finder.getRow(_6b6,_6b7); +if(opts.onBeforeSelect.apply(_6b6,_5d0(_6b6,[_6b7,row]))==false){ +return; +} +if(opts.singleSelect){ +_6ba(_6b6,true); +_6b9.selectedRows=[]; +} +if(!_6b8&&opts.checkOnSelect){ +_640(_6b6,_6b7,true); +} +if(opts.idField){ +_5cf(_6b9.selectedRows,opts.idField,row); +} +opts.finder.getTr(_6b6,_6b7).addClass("datagrid-row-selected"); +opts.onSelect.apply(_6b6,_5d0(_6b6,[_6b7,row])); +_6ac(_6b6,_6b7); +}; +function _644(_6bb,_6bc,_6bd){ +var _6be=$.data(_6bb,"datagrid"); +var dc=_6be.dc; +var opts=_6be.options; +var row=opts.finder.getRow(_6bb,_6bc); +if(opts.onBeforeUnselect.apply(_6bb,_5d0(_6bb,[_6bc,row]))==false){ +return; +} +if(!_6bd&&opts.checkOnSelect){ +_641(_6bb,_6bc,true); +} +opts.finder.getTr(_6bb,_6bc).removeClass("datagrid-row-selected"); +if(opts.idField){ +_5cd(_6be.selectedRows,opts.idField,row[opts.idField]); +} +opts.onUnselect.apply(_6bb,_5d0(_6bb,[_6bc,row])); +}; +function _6bf(_6c0,_6c1){ +var _6c2=$.data(_6c0,"datagrid"); +var opts=_6c2.options; +var rows=opts.finder.getRows(_6c0); +var _6c3=$.data(_6c0,"datagrid").selectedRows; +if(!_6c1&&opts.checkOnSelect){ +_6c4(_6c0,true); +} +opts.finder.getTr(_6c0,"","allbody").addClass("datagrid-row-selected"); +if(opts.idField){ +for(var _6c5=0;_6c5"); +cell.children("table").bind("click dblclick contextmenu",function(e){ +e.stopPropagation(); +}); +$.data(cell[0],"datagrid.editor",{actions:_6fb,target:_6fb.init(cell.find("td"),_6fa),field:_6f8,type:_6f9,oldHtml:_6fc}); +} +} +}); +_5f7(_6f6,_6f7,true); +}; +function _6ed(_6fe,_6ff){ +var opts=$.data(_6fe,"datagrid").options; +var tr=opts.finder.getTr(_6fe,_6ff); +tr.children("td").each(function(){ +var cell=$(this).find("div.datagrid-editable"); +if(cell.length){ +var ed=$.data(cell[0],"datagrid.editor"); +if(ed.actions.destroy){ +ed.actions.destroy(ed.target); +} +cell.html(ed.oldHtml); +$.removeData(cell[0],"datagrid.editor"); +cell.removeClass("datagrid-editable"); +cell.css("width",""); +} +}); +}; +function _6e0(_700,_701){ +var tr=$.data(_700,"datagrid").options.finder.getTr(_700,_701); +if(!tr.hasClass("datagrid-row-editing")){ +return true; +} +var vbox=tr.find(".validatebox-text"); +vbox.validatebox("validate"); +vbox.trigger("mouseleave"); +var _702=tr.find(".validatebox-invalid"); +return _702.length==0; +}; +function _703(_704,_705){ +var _706=$.data(_704,"datagrid").insertedRows; +var _707=$.data(_704,"datagrid").deletedRows; +var _708=$.data(_704,"datagrid").updatedRows; +if(!_705){ +var rows=[]; +rows=rows.concat(_706); +rows=rows.concat(_707); +rows=rows.concat(_708); +return rows; +}else{ +if(_705=="inserted"){ +return _706; +}else{ +if(_705=="deleted"){ +return _707; +}else{ +if(_705=="updated"){ +return _708; +} +} +} +} +return []; +}; +function _709(_70a,_70b){ +var _70c=$.data(_70a,"datagrid"); +var opts=_70c.options; +var data=_70c.data; +var _70d=_70c.insertedRows; +var _70e=_70c.deletedRows; +$(_70a).datagrid("cancelEdit",_70b); +var row=opts.finder.getRow(_70a,_70b); +if(_5cc(_70d,row)>=0){ +_5cd(_70d,row); +}else{ +_70e.push(row); +} +_5cd(_70c.selectedRows,opts.idField,row[opts.idField]); +_5cd(_70c.checkedRows,opts.idField,row[opts.idField]); +opts.view.deleteRow.call(opts.view,_70a,_70b); +if(opts.height=="auto"){ +_5f7(_70a); +} +$(_70a).datagrid("getPager").pagination("refresh",{total:data.total}); +}; +function _70f(_710,_711){ +var data=$.data(_710,"datagrid").data; +var view=$.data(_710,"datagrid").options.view; +var _712=$.data(_710,"datagrid").insertedRows; +view.insertRow.call(view,_710,_711.index,_711.row); +_712.push(_711.row); +$(_710).datagrid("getPager").pagination("refresh",{total:data.total}); +}; +function _713(_714,row){ +var data=$.data(_714,"datagrid").data; +var view=$.data(_714,"datagrid").options.view; +var _715=$.data(_714,"datagrid").insertedRows; +view.insertRow.call(view,_714,null,row); +_715.push(row); +$(_714).datagrid("getPager").pagination("refresh",{total:data.total}); +}; +function _716(_717){ +var _718=$.data(_717,"datagrid"); +var data=_718.data; +var rows=data.rows; +var _719=[]; +for(var i=0;i=0){ +(_726=="s"?_643:_640)(_71d,_727,true); +} +} +}; +for(var i=0;i0){ +$(this).datagrid("loadData",data); +}else{ +opts.view.renderEmptyRow(this); +$(this).datagrid("autoSizeColumn"); +} +} +_65a(this); +}); +}; +function _737(_738){ +var _739={}; +$.map(_738,function(name){ +_739[name]=_73a(name); +}); +return _739; +function _73a(name){ +function isA(_73b){ +return $.data($(_73b)[0],name)!=undefined; +}; +return {init:function(_73c,_73d){ +var _73e=$("").appendTo(_73c); +if(_73e[name]&&name!="text"){ +return _73e[name](_73d); +}else{ +return _73e; +} +},destroy:function(_73f){ +if(isA(_73f,name)){ +$(_73f)[name]("destroy"); +} +},getValue:function(_740){ +if(isA(_740,name)){ +var opts=$(_740)[name]("options"); +if(opts.multiple){ +return $(_740)[name]("getValues").join(opts.separator); +}else{ +return $(_740)[name]("getValue"); +} +}else{ +return $(_740).val(); +} +},setValue:function(_741,_742){ +if(isA(_741,name)){ +var opts=$(_741)[name]("options"); +if(opts.multiple){ +if(_742){ +$(_741)[name]("setValues",_742.split(opts.separator)); +}else{ +$(_741)[name]("clear"); +} +}else{ +$(_741)[name]("setValue",_742); +} +}else{ +$(_741).val(_742); +} +},resize:function(_743,_744){ +if(isA(_743,name)){ +$(_743)[name]("resize",_744); +}else{ +$(_743)._outerWidth(_744)._outerHeight(22); +} +}}; +}; +}; +var _745=$.extend({},_737(["text","textbox","numberbox","numberspinner","combobox","combotree","combogrid","datebox","datetimebox","timespinner","datetimespinner"]),{textarea:{init:function(_746,_747){ +var _748=$("").appendTo(_746); +return _748; +},getValue:function(_749){ +return $(_749).val(); +},setValue:function(_74a,_74b){ +$(_74a).val(_74b); +},resize:function(_74c,_74d){ +$(_74c)._outerWidth(_74d); +}},checkbox:{init:function(_74e,_74f){ +var _750=$("").appendTo(_74e); +_750.val(_74f.on); +_750.attr("offval",_74f.off); +return _750; +},getValue:function(_751){ +if($(_751).is(":checked")){ +return $(_751).val(); +}else{ +return $(_751).attr("offval"); +} +},setValue:function(_752,_753){ +var _754=false; +if($(_752).val()==_753){ +_754=true; +} +$(_752)._propAttr("checked",_754); +}},validatebox:{init:function(_755,_756){ +var _757=$("").appendTo(_755); +_757.validatebox(_756); +return _757; +},destroy:function(_758){ +$(_758).validatebox("destroy"); +},getValue:function(_759){ +return $(_759).val(); +},setValue:function(_75a,_75b){ +$(_75a).val(_75b); +},resize:function(_75c,_75d){ +$(_75c)._outerWidth(_75d)._outerHeight(22); +}}}); +$.fn.datagrid.methods={options:function(jq){ +var _75e=$.data(jq[0],"datagrid").options; +var _75f=$.data(jq[0],"datagrid").panel.panel("options"); +var opts=$.extend(_75e,{width:_75f.width,height:_75f.height,closed:_75f.closed,collapsed:_75f.collapsed,minimized:_75f.minimized,maximized:_75f.maximized}); +return opts; +},setSelectionState:function(jq){ +return jq.each(function(){ +_69b(this); +}); +},createStyleSheet:function(jq){ +return _5d2(jq[0]); +},getPanel:function(jq){ +return $.data(jq[0],"datagrid").panel; +},getPager:function(jq){ +return $.data(jq[0],"datagrid").panel.children("div.datagrid-pager"); +},getColumnFields:function(jq,_760){ +return _627(jq[0],_760); +},getColumnOption:function(jq,_761){ +return _628(jq[0],_761); +},resize:function(jq,_762){ +return jq.each(function(){ +_5e1(this,_762); +}); +},load:function(jq,_763){ +return jq.each(function(){ +var opts=$(this).datagrid("options"); +if(typeof _763=="string"){ +opts.url=_763; +_763=null; +} +opts.pageNumber=1; +var _764=$(this).datagrid("getPager"); +_764.pagination("refresh",{pageNumber:1}); +_65a(this,_763); +}); +},reload:function(jq,_765){ +return jq.each(function(){ +var opts=$(this).datagrid("options"); +if(typeof _765=="string"){ +opts.url=_765; +_765=null; +} +_65a(this,_765); +}); +},reloadFooter:function(jq,_766){ +return jq.each(function(){ +var opts=$.data(this,"datagrid").options; +var dc=$.data(this,"datagrid").dc; +if(_766){ +$.data(this,"datagrid").footer=_766; +} +if(opts.showFooter){ +opts.view.renderFooter.call(opts.view,this,dc.footer2,false); +opts.view.renderFooter.call(opts.view,this,dc.footer1,true); +if(opts.view.onAfterRender){ +opts.view.onAfterRender.call(opts.view,this); +} +$(this).datagrid("fixRowHeight"); +} +}); +},loading:function(jq){ +return jq.each(function(){ +var opts=$.data(this,"datagrid").options; +$(this).datagrid("getPager").pagination("loading"); +if(opts.loadMsg){ +var _767=$(this).datagrid("getPanel"); +if(!_767.children("div.datagrid-mask").length){ +$("
                                                  ").appendTo(_767); +var msg=$("
                                                  ").html(opts.loadMsg).appendTo(_767); +msg._outerHeight(40); +msg.css({marginLeft:(-msg.outerWidth()/2),lineHeight:(msg.height()+"px")}); +} +} +}); +},loaded:function(jq){ +return jq.each(function(){ +$(this).datagrid("getPager").pagination("loaded"); +var _768=$(this).datagrid("getPanel"); +_768.children("div.datagrid-mask-msg").remove(); +_768.children("div.datagrid-mask").remove(); +}); +},fitColumns:function(jq){ +return jq.each(function(){ +_65c(this); +}); +},fixColumnSize:function(jq,_769){ +return jq.each(function(){ +_67a(this,_769); +}); +},fixRowHeight:function(jq,_76a){ +return jq.each(function(){ +_5f7(this,_76a); +}); +},freezeRow:function(jq,_76b){ +return jq.each(function(){ +_604(this,_76b); +}); +},autoSizeColumn:function(jq,_76c){ +return jq.each(function(){ +_66e(this,_76c); +}); +},loadData:function(jq,data){ +return jq.each(function(){ +_65b(this,data); +_716(this); +}); +},getData:function(jq){ +return $.data(jq[0],"datagrid").data; +},getRows:function(jq){ +return $.data(jq[0],"datagrid").data.rows; +},getFooterRows:function(jq){ +return $.data(jq[0],"datagrid").footer; +},getRowIndex:function(jq,id){ +return _6a3(jq[0],id); +},getChecked:function(jq){ +return _6a9(jq[0]); +},getSelected:function(jq){ +var rows=_6a6(jq[0]); +return rows.length>0?rows[0]:null; +},getSelections:function(jq){ +return _6a6(jq[0]); +},clearSelections:function(jq){ +return jq.each(function(){ +var _76d=$.data(this,"datagrid"); +var _76e=_76d.selectedRows; +var _76f=_76d.checkedRows; +_76e.splice(0,_76e.length); +_6ba(this); +if(_76d.options.checkOnSelect){ +_76f.splice(0,_76f.length); +} +}); +},clearChecked:function(jq){ +return jq.each(function(){ +var _770=$.data(this,"datagrid"); +var _771=_770.selectedRows; +var _772=_770.checkedRows; +_772.splice(0,_772.length); +_6ca(this); +if(_770.options.selectOnCheck){ +_771.splice(0,_771.length); +} +}); +},scrollTo:function(jq,_773){ +return jq.each(function(){ +_6ac(this,_773); +}); +},highlightRow:function(jq,_774){ +return jq.each(function(){ +_63c(this,_774); +_6ac(this,_774); +}); +},selectAll:function(jq){ +return jq.each(function(){ +_6bf(this); +}); +},unselectAll:function(jq){ +return jq.each(function(){ +_6ba(this); +}); +},selectRow:function(jq,_775){ +return jq.each(function(){ +_643(this,_775); +}); +},selectRecord:function(jq,id){ +return jq.each(function(){ +var opts=$.data(this,"datagrid").options; +if(opts.idField){ +var _776=_6a3(this,id); +if(_776>=0){ +$(this).datagrid("selectRow",_776); +} +} +}); +},unselectRow:function(jq,_777){ +return jq.each(function(){ +_644(this,_777); +}); +},checkRow:function(jq,_778){ +return jq.each(function(){ +_640(this,_778); +}); +},uncheckRow:function(jq,_779){ +return jq.each(function(){ +_641(this,_779); +}); +},checkAll:function(jq){ +return jq.each(function(){ +_6c4(this); +}); +},uncheckAll:function(jq){ +return jq.each(function(){ +_6ca(this); +}); +},beginEdit:function(jq,_77a){ +return jq.each(function(){ +_6db(this,_77a); +}); +},endEdit:function(jq,_77b){ +return jq.each(function(){ +_6e1(this,_77b,false); +}); +},cancelEdit:function(jq,_77c){ +return jq.each(function(){ +_6e1(this,_77c,true); +}); +},getEditors:function(jq,_77d){ +return _6ee(jq[0],_77d); +},getEditor:function(jq,_77e){ +return _6f2(jq[0],_77e); +},refreshRow:function(jq,_77f){ +return jq.each(function(){ +var opts=$.data(this,"datagrid").options; +opts.view.refreshRow.call(opts.view,this,_77f); +}); +},validateRow:function(jq,_780){ +return _6e0(jq[0],_780); +},updateRow:function(jq,_781){ +return jq.each(function(){ +var opts=$.data(this,"datagrid").options; +opts.view.updateRow.call(opts.view,this,_781.index,_781.row); +}); +},appendRow:function(jq,row){ +return jq.each(function(){ +_713(this,row); +}); +},insertRow:function(jq,_782){ +return jq.each(function(){ +_70f(this,_782); +}); +},deleteRow:function(jq,_783){ +return jq.each(function(){ +_709(this,_783); +}); +},getChanges:function(jq,_784){ +return _703(jq[0],_784); +},acceptChanges:function(jq){ +return jq.each(function(){ +_71a(this); +}); +},rejectChanges:function(jq){ +return jq.each(function(){ +_71c(this); +}); +},mergeCells:function(jq,_785){ +return jq.each(function(){ +_72e(this,_785); +}); +},showColumn:function(jq,_786){ +return jq.each(function(){ +var _787=$(this).datagrid("getPanel"); +_787.find("td[field=\""+_786+"\"]").show(); +$(this).datagrid("getColumnOption",_786).hidden=false; +$(this).datagrid("fitColumns"); +}); +},hideColumn:function(jq,_788){ +return jq.each(function(){ +var _789=$(this).datagrid("getPanel"); +_789.find("td[field=\""+_788+"\"]").hide(); +$(this).datagrid("getColumnOption",_788).hidden=true; +$(this).datagrid("fitColumns"); +}); +},sort:function(jq,_78a){ +return jq.each(function(){ +_64f(this,_78a); +}); +},gotoPage:function(jq,_78b){ +return jq.each(function(){ +var _78c=this; +var page,cb; +if(typeof _78b=="object"){ +page=_78b.page; +cb=_78b.callback; +}else{ +page=_78b; +} +$(_78c).datagrid("options").pageNumber=page; +$(_78c).datagrid("getPager").pagination("refresh",{pageNumber:page}); +_65a(_78c,null,function(){ +if(cb){ +cb.call(_78c,page); +} +}); +}); +}}; +$.fn.datagrid.parseOptions=function(_78d){ +var t=$(_78d); +return $.extend({},$.fn.panel.parseOptions(_78d),$.parser.parseOptions(_78d,["url","toolbar","idField","sortName","sortOrder","pagePosition","resizeHandle",{sharedStyleSheet:"boolean",fitColumns:"boolean",autoRowHeight:"boolean",striped:"boolean",nowrap:"boolean"},{rownumbers:"boolean",singleSelect:"boolean",ctrlSelect:"boolean",checkOnSelect:"boolean",selectOnCheck:"boolean"},{pagination:"boolean",pageSize:"number",pageNumber:"number"},{multiSort:"boolean",remoteSort:"boolean",showHeader:"boolean",showFooter:"boolean"},{scrollbarSize:"number"}]),{pageList:(t.attr("pageList")?eval(t.attr("pageList")):undefined),loadMsg:(t.attr("loadMsg")!=undefined?t.attr("loadMsg"):undefined),rowStyler:(t.attr("rowStyler")?eval(t.attr("rowStyler")):undefined)}); +}; +$.fn.datagrid.parseData=function(_78e){ +var t=$(_78e); +var data={total:0,rows:[]}; +var _78f=t.datagrid("getColumnFields",true).concat(t.datagrid("getColumnFields",false)); +t.find("tbody tr").each(function(){ +data.total++; +var row={}; +$.extend(row,$.parser.parseOptions(this,["iconCls","state"])); +for(var i=0;i<_78f.length;i++){ +row[_78f[i]]=$(this).find("td:eq("+i+")").html(); +} +data.rows.push(row); +}); +return data; +}; +var _790={render:function(_791,_792,_793){ +var rows=$(_791).datagrid("getRows"); +$(_792).html(this.renderTable(_791,0,rows,_793)); +},renderFooter:function(_794,_795,_796){ +var opts=$.data(_794,"datagrid").options; +var rows=$.data(_794,"datagrid").footer||[]; +var _797=$(_794).datagrid("getColumnFields",_796); +var _798=[""]; +for(var i=0;i"); +_798.push(this.renderRow.call(this,_794,_797,_796,i,rows[i])); +_798.push(""); +} +_798.push("
                                                  "); +$(_795).html(_798.join("")); +},renderTable:function(_799,_79a,rows,_79b){ +var _79c=$.data(_799,"datagrid"); +var opts=_79c.options; +if(_79b){ +if(!(opts.rownumbers||(opts.frozenColumns&&opts.frozenColumns.length))){ +return ""; +} +} +var _79d=$(_799).datagrid("getColumnFields",_79b); +var _79e=[""]; +for(var i=0;i"); +_79e.push(this.renderRow.call(this,_799,_79d,_79b,_79a,row)); +_79e.push(""); +_79a++; +} +_79e.push("
                                                  "); +return _79e.join(""); +},renderRow:function(_7a3,_7a4,_7a5,_7a6,_7a7){ +var opts=$.data(_7a3,"datagrid").options; +var cc=[]; +if(_7a5&&opts.rownumbers){ +var _7a8=_7a6+1; +if(opts.pagination){ +_7a8+=(opts.pageNumber-1)*opts.pageSize; +} +cc.push("
                                                  "+_7a8+"
                                                  "); +} +for(var i=0;i<_7a4.length;i++){ +var _7a9=_7a4[i]; +var col=$(_7a3).datagrid("getColumnOption",_7a9); +if(col){ +var _7aa=_7a7[_7a9]; +var css=col.styler?(col.styler(_7aa,_7a7,_7a6)||""):""; +var _7ab=""; +var _7ac=""; +if(typeof css=="string"){ +_7ac=css; +}else{ +if(css){ +_7ab=css["class"]||""; +_7ac=css["style"]||""; +} +} +var cls=_7ab?"class=\""+_7ab+"\"":""; +var _7ad=col.hidden?"style=\"display:none;"+_7ac+"\"":(_7ac?"style=\""+_7ac+"\"":""); +cc.push(""); +var _7ad=""; +if(!col.checkbox){ +if(col.align){ +_7ad+="text-align:"+col.align+";"; +} +if(!opts.nowrap){ +_7ad+="white-space:normal;height:auto;"; +}else{ +if(opts.autoRowHeight){ +_7ad+="height:auto;"; +} +} +} +cc.push("
                                                  "); +if(col.checkbox){ +cc.push(""); +}else{ +if(col.formatter){ +cc.push(col.formatter(_7aa,_7a7,_7a6)); +}else{ +cc.push(_7aa); +} +} +cc.push("
                                                  "); +cc.push(""); +} +} +return cc.join(""); +},refreshRow:function(_7ae,_7af){ +this.updateRow.call(this,_7ae,_7af,{}); +},updateRow:function(_7b0,_7b1,row){ +var opts=$.data(_7b0,"datagrid").options; +var rows=$(_7b0).datagrid("getRows"); +var _7b2=_7b3(_7b1); +$.extend(rows[_7b1],row); +var _7b4=_7b3(_7b1); +var _7b5=_7b2.c; +var _7b6=_7b4.s; +var _7b7="datagrid-row "+(_7b1%2&&opts.striped?"datagrid-row-alt ":" ")+_7b4.c; +function _7b3(_7b8){ +var css=opts.rowStyler?opts.rowStyler.call(_7b0,_7b8,rows[_7b8]):""; +var _7b9=""; +var _7ba=""; +if(typeof css=="string"){ +_7ba=css; +}else{ +if(css){ +_7b9=css["class"]||""; +_7ba=css["style"]||""; +} +} +return {c:_7b9,s:_7ba}; +}; +function _7bb(_7bc){ +var _7bd=$(_7b0).datagrid("getColumnFields",_7bc); +var tr=opts.finder.getTr(_7b0,_7b1,"body",(_7bc?1:2)); +var _7be=tr.find("div.datagrid-cell-check input[type=checkbox]").is(":checked"); +tr.html(this.renderRow.call(this,_7b0,_7bd,_7bc,_7b1,rows[_7b1])); +tr.attr("style",_7b6).removeClass(_7b5).addClass(_7b7); +if(_7be){ +tr.find("div.datagrid-cell-check input[type=checkbox]")._propAttr("checked",true); +} +}; +_7bb.call(this,true); +_7bb.call(this,false); +$(_7b0).datagrid("fixRowHeight",_7b1); +},insertRow:function(_7bf,_7c0,row){ +var _7c1=$.data(_7bf,"datagrid"); +var opts=_7c1.options; +var dc=_7c1.dc; +var data=_7c1.data; +if(_7c0==undefined||_7c0==null){ +_7c0=data.rows.length; +} +if(_7c0>data.rows.length){ +_7c0=data.rows.length; +} +function _7c2(_7c3){ +var _7c4=_7c3?1:2; +for(var i=data.rows.length-1;i>=_7c0;i--){ +var tr=opts.finder.getTr(_7bf,i,"body",_7c4); +tr.attr("datagrid-row-index",i+1); +tr.attr("id",_7c1.rowIdPrefix+"-"+_7c4+"-"+(i+1)); +if(_7c3&&opts.rownumbers){ +var _7c5=i+2; +if(opts.pagination){ +_7c5+=(opts.pageNumber-1)*opts.pageSize; +} +tr.find("div.datagrid-cell-rownumber").html(_7c5); +} +if(opts.striped){ +tr.removeClass("datagrid-row-alt").addClass((i+1)%2?"datagrid-row-alt":""); +} +} +}; +function _7c6(_7c7){ +var _7c8=_7c7?1:2; +var _7c9=$(_7bf).datagrid("getColumnFields",_7c7); +var _7ca=_7c1.rowIdPrefix+"-"+_7c8+"-"+_7c0; +var tr=""; +if(_7c0>=data.rows.length){ +if(data.rows.length){ +opts.finder.getTr(_7bf,"","last",_7c8).after(tr); +}else{ +var cc=_7c7?dc.body1:dc.body2; +cc.html(""+tr+"
                                                  "); +} +}else{ +opts.finder.getTr(_7bf,_7c0+1,"body",_7c8).before(tr); +} +}; +_7c2.call(this,true); +_7c2.call(this,false); +_7c6.call(this,true); +_7c6.call(this,false); +data.total+=1; +data.rows.splice(_7c0,0,row); +this.refreshRow.call(this,_7bf,_7c0); +},deleteRow:function(_7cb,_7cc){ +var _7cd=$.data(_7cb,"datagrid"); +var opts=_7cd.options; +var data=_7cd.data; +function _7ce(_7cf){ +var _7d0=_7cf?1:2; +for(var i=_7cc+1;itable>tbody>tr[datagrid-row-index="+_7df+"]"); +} +return tr; +}else{ +if(type=="footer"){ +return (_7e0==1?dc.footer1:dc.footer2).find(">table>tbody>tr[datagrid-row-index="+_7df+"]"); +}else{ +if(type=="selected"){ +return (_7e0==1?dc.body1:dc.body2).find(">table>tbody>tr.datagrid-row-selected"); +}else{ +if(type=="highlight"){ +return (_7e0==1?dc.body1:dc.body2).find(">table>tbody>tr.datagrid-row-over"); +}else{ +if(type=="checked"){ +return (_7e0==1?dc.body1:dc.body2).find(">table>tbody>tr.datagrid-row-checked"); +}else{ +if(type=="editing"){ +return (_7e0==1?dc.body1:dc.body2).find(">table>tbody>tr.datagrid-row-editing"); +}else{ +if(type=="last"){ +return (_7e0==1?dc.body1:dc.body2).find(">table>tbody>tr[datagrid-row-index]:last"); +}else{ +if(type=="allbody"){ +return (_7e0==1?dc.body1:dc.body2).find(">table>tbody>tr[datagrid-row-index]"); +}else{ +if(type=="allfooter"){ +return (_7e0==1?dc.footer1:dc.footer2).find(">table>tbody>tr[datagrid-row-index]"); +} +} +} +} +} +} +} +} +} +} +},getRow:function(_7e2,p){ +var _7e3=(typeof p=="object")?p.attr("datagrid-row-index"):p; +return $.data(_7e2,"datagrid").data.rows[parseInt(_7e3)]; +},getRows:function(_7e4){ +return $(_7e4).datagrid("getRows"); +}},view:_790,onBeforeLoad:function(_7e5){ +},onLoadSuccess:function(){ +},onLoadError:function(){ +},onClickRow:function(_7e6,_7e7){ +},onDblClickRow:function(_7e8,_7e9){ +},onClickCell:function(_7ea,_7eb,_7ec){ +},onDblClickCell:function(_7ed,_7ee,_7ef){ +},onBeforeSortColumn:function(sort,_7f0){ +},onSortColumn:function(sort,_7f1){ +},onResizeColumn:function(_7f2,_7f3){ +},onBeforeSelect:function(_7f4,_7f5){ +},onSelect:function(_7f6,_7f7){ +},onBeforeUnselect:function(_7f8,_7f9){ +},onUnselect:function(_7fa,_7fb){ +},onSelectAll:function(rows){ +},onUnselectAll:function(rows){ +},onBeforeCheck:function(_7fc,_7fd){ +},onCheck:function(_7fe,_7ff){ +},onBeforeUncheck:function(_800,_801){ +},onUncheck:function(_802,_803){ +},onCheckAll:function(rows){ +},onUncheckAll:function(rows){ +},onBeforeEdit:function(_804,_805){ +},onBeginEdit:function(_806,_807){ +},onEndEdit:function(_808,_809,_80a){ +},onAfterEdit:function(_80b,_80c,_80d){ +},onCancelEdit:function(_80e,_80f){ +},onHeaderContextMenu:function(e,_810){ +},onRowContextMenu:function(e,_811,_812){ +}}); +})(jQuery); +(function($){ +var _813; +$(document).unbind(".propertygrid").bind("mousedown.propertygrid",function(e){ +var p=$(e.target).closest("div.datagrid-view,div.combo-panel"); +if(p.length){ +return; +} +_814(_813); +_813=undefined; +}); +function _815(_816){ +var _817=$.data(_816,"propertygrid"); +var opts=$.data(_816,"propertygrid").options; +$(_816).datagrid($.extend({},opts,{cls:"propertygrid",view:(opts.showGroup?opts.groupView:opts.view),onBeforeEdit:function(_818,row){ +if(opts.onBeforeEdit.call(_816,_818,row)==false){ +return false; +} +var dg=$(this); +var row=dg.datagrid("getRows")[_818]; +var col=dg.datagrid("getColumnOption","value"); +col.editor=row.editor; +},onClickCell:function(_819,_81a,_81b){ +if(_813!=this){ +_814(_813); +_813=this; +} +if(opts.editIndex!=_819){ +_814(_813); +$(this).datagrid("beginEdit",_819); +var ed=$(this).datagrid("getEditor",{index:_819,field:_81a}); +if(!ed){ +ed=$(this).datagrid("getEditor",{index:_819,field:"value"}); +} +if(ed){ +var t=$(ed.target); +var _81c=t.data("textbox")?t.textbox("textbox"):t; +_81c.focus(); +opts.editIndex=_819; +} +} +opts.onClickCell.call(_816,_819,_81a,_81b); +},loadFilter:function(data){ +_814(this); +return opts.loadFilter.call(this,data); +}})); +}; +function _814(_81d){ +var t=$(_81d); +if(!t.length){ +return; +} +var opts=$.data(_81d,"propertygrid").options; +opts.finder.getTr(_81d,null,"editing").each(function(){ +var _81e=parseInt($(this).attr("datagrid-row-index")); +if(t.datagrid("validateRow",_81e)){ +t.datagrid("endEdit",_81e); +}else{ +t.datagrid("cancelEdit",_81e); +} +}); +opts.editIndex=undefined; +}; +$.fn.propertygrid=function(_81f,_820){ +if(typeof _81f=="string"){ +var _821=$.fn.propertygrid.methods[_81f]; +if(_821){ +return _821(this,_820); +}else{ +return this.datagrid(_81f,_820); +} +} +_81f=_81f||{}; +return this.each(function(){ +var _822=$.data(this,"propertygrid"); +if(_822){ +$.extend(_822.options,_81f); +}else{ +var opts=$.extend({},$.fn.propertygrid.defaults,$.fn.propertygrid.parseOptions(this),_81f); +opts.frozenColumns=$.extend(true,[],opts.frozenColumns); +opts.columns=$.extend(true,[],opts.columns); +$.data(this,"propertygrid",{options:opts}); +} +_815(this); +}); +}; +$.fn.propertygrid.methods={options:function(jq){ +return $.data(jq[0],"propertygrid").options; +}}; +$.fn.propertygrid.parseOptions=function(_823){ +return $.extend({},$.fn.datagrid.parseOptions(_823),$.parser.parseOptions(_823,[{showGroup:"boolean"}])); +}; +var _824=$.extend({},$.fn.datagrid.defaults.view,{render:function(_825,_826,_827){ +var _828=[]; +var _829=this.groups; +for(var i=0;i<_829.length;i++){ +_828.push(this.renderGroup.call(this,_825,i,_829[i],_827)); +} +$(_826).html(_828.join("")); +},renderGroup:function(_82a,_82b,_82c,_82d){ +var _82e=$.data(_82a,"datagrid"); +var opts=_82e.options; +var _82f=$(_82a).datagrid("getColumnFields",_82d); +var _830=[]; +_830.push("
                                                  "); +if((_82d&&(opts.rownumbers||opts.frozenColumns.length))||(!_82d&&!(opts.rownumbers||opts.frozenColumns.length))){ +_830.push(""); +_830.push(" "); +_830.push(""); +} +if(!_82d){ +_830.push(""); +_830.push(opts.groupFormatter.call(_82a,_82c.value,_82c.rows)); +_830.push(""); +} +_830.push("
                                                  "); +_830.push(""); +var _831=_82c.startIndex; +for(var j=0;j<_82c.rows.length;j++){ +var css=opts.rowStyler?opts.rowStyler.call(_82a,_831,_82c.rows[j]):""; +var _832=""; +var _833=""; +if(typeof css=="string"){ +_833=css; +}else{ +if(css){ +_832=css["class"]||""; +_833=css["style"]||""; +} +} +var cls="class=\"datagrid-row "+(_831%2&&opts.striped?"datagrid-row-alt ":" ")+_832+"\""; +var _834=_833?"style=\""+_833+"\"":""; +var _835=_82e.rowIdPrefix+"-"+(_82d?1:2)+"-"+_831; +_830.push(""); +_830.push(this.renderRow.call(this,_82a,_82f,_82d,_831,_82c.rows[j])); +_830.push(""); +_831++; +} +_830.push("
                                                  "); +return _830.join(""); +},bindEvents:function(_836){ +var _837=$.data(_836,"datagrid"); +var dc=_837.dc; +var body=dc.body1.add(dc.body2); +var _838=($.data(body[0],"events")||$._data(body[0],"events")).click[0].handler; +body.unbind("click").bind("click",function(e){ +var tt=$(e.target); +var _839=tt.closest("span.datagrid-row-expander"); +if(_839.length){ +var _83a=_839.closest("div.datagrid-group").attr("group-index"); +if(_839.hasClass("datagrid-row-collapse")){ +$(_836).datagrid("collapseGroup",_83a); +}else{ +$(_836).datagrid("expandGroup",_83a); +} +}else{ +_838(e); +} +e.stopPropagation(); +}); +},onBeforeRender:function(_83b,rows){ +var _83c=$.data(_83b,"datagrid"); +var opts=_83c.options; +_83d(); +var _83e=[]; +for(var i=0;i"+".datagrid-group{height:"+opts.groupHeight+"px;overflow:hidden;font-weight:bold;border-bottom:1px solid #ccc;}"+".datagrid-group-title,.datagrid-group-expander{display:inline-block;vertical-align:bottom;height:100%;line-height:"+opts.groupHeight+"px;padding:0 4px;}"+".datagrid-group-expander{width:"+opts.expanderWidth+"px;text-align:center;padding:0}"+".datagrid-row-expander{margin:"+Math.floor((opts.groupHeight-16)/2)+"px 0;display:inline-block;width:16px;height:16px;cursor:pointer}"+""); +} +}; +}}); +$.extend($.fn.datagrid.methods,{groups:function(jq){ +return jq.datagrid("options").view.groups; +},expandGroup:function(jq,_845){ +return jq.each(function(){ +var view=$.data(this,"datagrid").dc.view; +var _846=view.find(_845!=undefined?"div.datagrid-group[group-index=\""+_845+"\"]":"div.datagrid-group"); +var _847=_846.find("span.datagrid-row-expander"); +if(_847.hasClass("datagrid-row-expand")){ +_847.removeClass("datagrid-row-expand").addClass("datagrid-row-collapse"); +_846.next("table").show(); +} +$(this).datagrid("fixRowHeight"); +}); +},collapseGroup:function(jq,_848){ +return jq.each(function(){ +var view=$.data(this,"datagrid").dc.view; +var _849=view.find(_848!=undefined?"div.datagrid-group[group-index=\""+_848+"\"]":"div.datagrid-group"); +var _84a=_849.find("span.datagrid-row-expander"); +if(_84a.hasClass("datagrid-row-collapse")){ +_84a.removeClass("datagrid-row-collapse").addClass("datagrid-row-expand"); +_849.next("table").hide(); +} +$(this).datagrid("fixRowHeight"); +}); +}}); +$.extend(_824,{refreshGroupTitle:function(_84b,_84c){ +var _84d=$.data(_84b,"datagrid"); +var opts=_84d.options; +var dc=_84d.dc; +var _84e=this.groups[_84c]; +var span=dc.body2.children("div.datagrid-group[group-index="+_84c+"]").find("span.datagrid-group-title"); +span.html(opts.groupFormatter.call(_84b,_84e.value,_84e.rows)); +},insertRow:function(_84f,_850,row){ +var _851=$.data(_84f,"datagrid"); +var opts=_851.options; +var dc=_851.dc; +var _852=null; +var _853; +if(!_851.data.rows.length){ +$(_84f).datagrid("loadData",[row]); +return; +} +for(var i=0;i_852.startIndex+_852.rows.length){ +_850=_852.startIndex+_852.rows.length; +} +} +$.fn.datagrid.defaults.view.insertRow.call(this,_84f,_850,row); +if(_850>=_852.startIndex+_852.rows.length){ +_854(_850,true); +_854(_850,false); +} +_852.rows.splice(_850-_852.startIndex,0,row); +}else{ +_852={value:row[opts.groupField],rows:[row],startIndex:_851.data.rows.length}; +_853=this.groups.length; +dc.body1.append(this.renderGroup.call(this,_84f,_853,_852,true)); +dc.body2.append(this.renderGroup.call(this,_84f,_853,_852,false)); +this.groups.push(_852); +_851.data.rows.push(row); +} +this.refreshGroupTitle(_84f,_853); +function _854(_855,_856){ +var _857=_856?1:2; +var _858=opts.finder.getTr(_84f,_855-1,"body",_857); +var tr=opts.finder.getTr(_84f,_855,"body",_857); +tr.insertAfter(_858); +}; +},updateRow:function(_859,_85a,row){ +var opts=$.data(_859,"datagrid").options; +$.fn.datagrid.defaults.view.updateRow.call(this,_859,_85a,row); +var tb=opts.finder.getTr(_859,_85a,"body",2).closest("table.datagrid-btable"); +var _85b=parseInt(tb.prev().attr("group-index")); +this.refreshGroupTitle(_859,_85b); +},deleteRow:function(_85c,_85d){ +var _85e=$.data(_85c,"datagrid"); +var opts=_85e.options; +var dc=_85e.dc; +var body=dc.body1.add(dc.body2); +var tb=opts.finder.getTr(_85c,_85d,"body",2).closest("table.datagrid-btable"); +var _85f=parseInt(tb.prev().attr("group-index")); +$.fn.datagrid.defaults.view.deleteRow.call(this,_85c,_85d); +var _860=this.groups[_85f]; +if(_860.rows.length>1){ +_860.rows.splice(_85d-_860.startIndex,1); +this.refreshGroupTitle(_85c,_85f); +}else{ +body.children("div.datagrid-group[group-index="+_85f+"]").remove(); +for(var i=_85f+1;i"+""+"
                                                  "+""+"").insertAfter(tr); +}; +}; +function _889(_88a,_88b,data,_88c){ +var _88d=$.data(_88a,"treegrid"); +var opts=_88d.options; +var dc=_88d.dc; +data=opts.loadFilter.call(_88a,data,_88b); +var node=find(_88a,_88b); +if(node){ +var _88e=opts.finder.getTr(_88a,_88b,"body",1); +var _88f=opts.finder.getTr(_88a,_88b,"body",2); +var cc1=_88e.next("tr.treegrid-tr-tree").children("td").children("div"); +var cc2=_88f.next("tr.treegrid-tr-tree").children("td").children("div"); +if(!_88c){ +node.children=[]; +} +}else{ +var cc1=dc.body1; +var cc2=dc.body2; +if(!_88c){ +_88d.data=[]; +} +} +if(!_88c){ +cc1.empty(); +cc2.empty(); +} +if(opts.view.onBeforeRender){ +opts.view.onBeforeRender.call(opts.view,_88a,_88b,data); +} +opts.view.render.call(opts.view,_88a,cc1,true); +opts.view.render.call(opts.view,_88a,cc2,false); +if(opts.showFooter){ +opts.view.renderFooter.call(opts.view,_88a,dc.footer1,true); +opts.view.renderFooter.call(opts.view,_88a,dc.footer2,false); +} +if(opts.view.onAfterRender){ +opts.view.onAfterRender.call(opts.view,_88a); +} +if(!_88b&&opts.pagination){ +var _890=$.data(_88a,"treegrid").total; +var _891=$(_88a).datagrid("getPager"); +if(_891.pagination("options").total!=_890){ +_891.pagination({total:_890}); +} +} +_873(_88a); +_87b(_88a); +$(_88a).treegrid("showLines"); +$(_88a).treegrid("setSelectionState"); +$(_88a).treegrid("autoSizeColumn"); +opts.onLoadSuccess.call(_88a,node,data); +}; +function _872(_892,_893,_894,_895,_896){ +var opts=$.data(_892,"treegrid").options; +var body=$(_892).datagrid("getPanel").find("div.datagrid-body"); +if(_894){ +opts.queryParams=_894; +} +var _897=$.extend({},opts.queryParams); +if(opts.pagination){ +$.extend(_897,{page:opts.pageNumber,rows:opts.pageSize}); +} +if(opts.sortName){ +$.extend(_897,{sort:opts.sortName,order:opts.sortOrder}); +} +var row=find(_892,_893); +if(opts.onBeforeLoad.call(_892,row,_897)==false){ +return; +} +var _898=body.find("tr[node-id=\""+_893+"\"] span.tree-folder"); +_898.addClass("tree-loading"); +$(_892).treegrid("loading"); +var _899=opts.loader.call(_892,_897,function(data){ +_898.removeClass("tree-loading"); +$(_892).treegrid("loaded"); +_889(_892,_893,data,_895); +if(_896){ +_896(); +} +},function(){ +_898.removeClass("tree-loading"); +$(_892).treegrid("loaded"); +opts.onLoadError.apply(_892,arguments); +if(_896){ +_896(); +} +}); +if(_899==false){ +_898.removeClass("tree-loading"); +$(_892).treegrid("loaded"); +} +}; +function _89a(_89b){ +var rows=_89c(_89b); +if(rows.length){ +return rows[0]; +}else{ +return null; +} +}; +function _89c(_89d){ +return $.data(_89d,"treegrid").data; +}; +function _89e(_89f,_8a0){ +var row=find(_89f,_8a0); +if(row._parentId){ +return find(_89f,row._parentId); +}else{ +return null; +} +}; +function _877(_8a1,_8a2){ +var opts=$.data(_8a1,"treegrid").options; +var body=$(_8a1).datagrid("getPanel").find("div.datagrid-view2 div.datagrid-body"); +var _8a3=[]; +if(_8a2){ +_8a4(_8a2); +}else{ +var _8a5=_89c(_8a1); +for(var i=0;i<_8a5.length;i++){ +_8a3.push(_8a5[i]); +_8a4(_8a5[i][opts.idField]); +} +} +function _8a4(_8a6){ +var _8a7=find(_8a1,_8a6); +if(_8a7&&_8a7.children){ +for(var i=0,len=_8a7.children.length;i").insertBefore(_8c7); +if(hit.prev().length){ +hit.prev().remove(); +} +} +} +_889(_8c5,_8c6.parent,_8c6.data,true); +}; +function _8c8(_8c9,_8ca){ +var ref=_8ca.before||_8ca.after; +var opts=$.data(_8c9,"treegrid").options; +var _8cb=_89e(_8c9,ref); +_8c4(_8c9,{parent:(_8cb?_8cb[opts.idField]:null),data:[_8ca.data]}); +var _8cc=_8cb?_8cb.children:$(_8c9).treegrid("getRoots"); +for(var i=0;i<_8cc.length;i++){ +if(_8cc[i][opts.idField]==ref){ +var _8cd=_8cc[_8cc.length-1]; +_8cc.splice(_8ca.before?i:(i+1),0,_8cd); +_8cc.splice(_8cc.length-1,1); +break; +} +} +_8ce(true); +_8ce(false); +_87b(_8c9); +$(_8c9).treegrid("showLines"); +function _8ce(_8cf){ +var _8d0=_8cf?1:2; +var tr=opts.finder.getTr(_8c9,_8ca.data[opts.idField],"body",_8d0); +var _8d1=tr.closest("table.datagrid-btable"); +tr=tr.parent().children(); +var dest=opts.finder.getTr(_8c9,ref,"body",_8d0); +if(_8ca.before){ +tr.insertBefore(dest); +}else{ +var sub=dest.next("tr.treegrid-tr-tree"); +tr.insertAfter(sub.length?sub:dest); +} +_8d1.remove(); +}; +}; +function _8d2(_8d3,_8d4){ +var _8d5=$.data(_8d3,"treegrid"); +$(_8d3).datagrid("deleteRow",_8d4); +_87b(_8d3); +_8d5.total-=1; +$(_8d3).datagrid("getPager").pagination("refresh",{total:_8d5.total}); +$(_8d3).treegrid("showLines"); +}; +function _8d6(_8d7){ +var t=$(_8d7); +var opts=t.treegrid("options"); +if(opts.lines){ +t.treegrid("getPanel").addClass("tree-lines"); +}else{ +t.treegrid("getPanel").removeClass("tree-lines"); +return; +} +t.treegrid("getPanel").find("span.tree-indent").removeClass("tree-line tree-join tree-joinbottom"); +t.treegrid("getPanel").find("div.datagrid-cell").removeClass("tree-node-last tree-root-first tree-root-one"); +var _8d8=t.treegrid("getRoots"); +if(_8d8.length>1){ +_8d9(_8d8[0]).addClass("tree-root-first"); +}else{ +if(_8d8.length==1){ +_8d9(_8d8[0]).addClass("tree-root-one"); +} +} +_8da(_8d8); +_8db(_8d8); +function _8da(_8dc){ +$.map(_8dc,function(node){ +if(node.children&&node.children.length){ +_8da(node.children); +}else{ +var cell=_8d9(node); +cell.find(".tree-icon").prev().addClass("tree-join"); +} +}); +if(_8dc.length){ +var cell=_8d9(_8dc[_8dc.length-1]); +cell.addClass("tree-node-last"); +cell.find(".tree-join").removeClass("tree-join").addClass("tree-joinbottom"); +} +}; +function _8db(_8dd){ +$.map(_8dd,function(node){ +if(node.children&&node.children.length){ +_8db(node.children); +} +}); +for(var i=0;i<_8dd.length-1;i++){ +var node=_8dd[i]; +var _8de=t.treegrid("getLevel",node[opts.idField]); +var tr=opts.finder.getTr(_8d7,node[opts.idField]); +var cc=tr.next().find("tr.datagrid-row td[field=\""+opts.treeField+"\"] div.datagrid-cell"); +cc.find("span:eq("+(_8de-1)+")").addClass("tree-line"); +} +}; +function _8d9(node){ +var tr=opts.finder.getTr(_8d7,node[opts.idField]); +var cell=tr.find("td[field=\""+opts.treeField+"\"] div.datagrid-cell"); +return cell; +}; +}; +$.fn.treegrid=function(_8df,_8e0){ +if(typeof _8df=="string"){ +var _8e1=$.fn.treegrid.methods[_8df]; +if(_8e1){ +return _8e1(this,_8e0); +}else{ +return this.datagrid(_8df,_8e0); +} +} +_8df=_8df||{}; +return this.each(function(){ +var _8e2=$.data(this,"treegrid"); +if(_8e2){ +$.extend(_8e2.options,_8df); +}else{ +_8e2=$.data(this,"treegrid",{options:$.extend({},$.fn.treegrid.defaults,$.fn.treegrid.parseOptions(this),_8df),data:[]}); +} +_862(this); +if(_8e2.options.data){ +$(this).treegrid("loadData",_8e2.options.data); +} +_872(this); +}); +}; +$.fn.treegrid.methods={options:function(jq){ +return $.data(jq[0],"treegrid").options; +},resize:function(jq,_8e3){ +return jq.each(function(){ +$(this).datagrid("resize",_8e3); +}); +},fixRowHeight:function(jq,_8e4){ +return jq.each(function(){ +_873(this,_8e4); +}); +},loadData:function(jq,data){ +return jq.each(function(){ +_889(this,data.parent,data); +}); +},load:function(jq,_8e5){ +return jq.each(function(){ +$(this).treegrid("options").pageNumber=1; +$(this).treegrid("getPager").pagination({pageNumber:1}); +$(this).treegrid("reload",_8e5); +}); +},reload:function(jq,id){ +return jq.each(function(){ +var opts=$(this).treegrid("options"); +var _8e6={}; +if(typeof id=="object"){ +_8e6=id; +}else{ +_8e6=$.extend({},opts.queryParams); +_8e6.id=id; +} +if(_8e6.id){ +var node=$(this).treegrid("find",_8e6.id); +if(node.children){ +node.children.splice(0,node.children.length); +} +opts.queryParams=_8e6; +var tr=opts.finder.getTr(this,_8e6.id); +tr.next("tr.treegrid-tr-tree").remove(); +tr.find("span.tree-hit").removeClass("tree-expanded tree-expanded-hover").addClass("tree-collapsed"); +_8b1(this,_8e6.id); +}else{ +_872(this,null,_8e6); +} +}); +},reloadFooter:function(jq,_8e7){ +return jq.each(function(){ +var opts=$.data(this,"treegrid").options; +var dc=$.data(this,"datagrid").dc; +if(_8e7){ +$.data(this,"treegrid").footer=_8e7; +} +if(opts.showFooter){ +opts.view.renderFooter.call(opts.view,this,dc.footer1,true); +opts.view.renderFooter.call(opts.view,this,dc.footer2,false); +if(opts.view.onAfterRender){ +opts.view.onAfterRender.call(opts.view,this); +} +$(this).treegrid("fixRowHeight"); +} +}); +},getData:function(jq){ +return $.data(jq[0],"treegrid").data; +},getFooterRows:function(jq){ +return $.data(jq[0],"treegrid").footer; +},getRoot:function(jq){ +return _89a(jq[0]); +},getRoots:function(jq){ +return _89c(jq[0]); +},getParent:function(jq,id){ +return _89e(jq[0],id); +},getChildren:function(jq,id){ +return _877(jq[0],id); +},getLevel:function(jq,id){ +return _8a9(jq[0],id); +},find:function(jq,id){ +return find(jq[0],id); +},isLeaf:function(jq,id){ +var opts=$.data(jq[0],"treegrid").options; +var tr=opts.finder.getTr(jq[0],id); +var hit=tr.find("span.tree-hit"); +return hit.length==0; +},select:function(jq,id){ +return jq.each(function(){ +$(this).datagrid("selectRow",id); +}); +},unselect:function(jq,id){ +return jq.each(function(){ +$(this).datagrid("unselectRow",id); +}); +},collapse:function(jq,id){ +return jq.each(function(){ +_8ae(this,id); +}); +},expand:function(jq,id){ +return jq.each(function(){ +_8b1(this,id); +}); +},toggle:function(jq,id){ +return jq.each(function(){ +_881(this,id); +}); +},collapseAll:function(jq,id){ +return jq.each(function(){ +_8b9(this,id); +}); +},expandAll:function(jq,id){ +return jq.each(function(){ +_8bd(this,id); +}); +},expandTo:function(jq,id){ +return jq.each(function(){ +_8c1(this,id); +}); +},append:function(jq,_8e8){ +return jq.each(function(){ +_8c4(this,_8e8); +}); +},insert:function(jq,_8e9){ +return jq.each(function(){ +_8c8(this,_8e9); +}); +},remove:function(jq,id){ +return jq.each(function(){ +_8d2(this,id); +}); +},pop:function(jq,id){ +var row=jq.treegrid("find",id); +jq.treegrid("remove",id); +return row; +},refresh:function(jq,id){ +return jq.each(function(){ +var opts=$.data(this,"treegrid").options; +opts.view.refreshRow.call(opts.view,this,id); +}); +},update:function(jq,_8ea){ +return jq.each(function(){ +var opts=$.data(this,"treegrid").options; +opts.view.updateRow.call(opts.view,this,_8ea.id,_8ea.row); +}); +},beginEdit:function(jq,id){ +return jq.each(function(){ +$(this).datagrid("beginEdit",id); +$(this).treegrid("fixRowHeight",id); +}); +},endEdit:function(jq,id){ +return jq.each(function(){ +$(this).datagrid("endEdit",id); +}); +},cancelEdit:function(jq,id){ +return jq.each(function(){ +$(this).datagrid("cancelEdit",id); +}); +},showLines:function(jq){ +return jq.each(function(){ +_8d6(this); +}); +}}; +$.fn.treegrid.parseOptions=function(_8eb){ +return $.extend({},$.fn.datagrid.parseOptions(_8eb),$.parser.parseOptions(_8eb,["treeField",{animate:"boolean"}])); +}; +var _8ec=$.extend({},$.fn.datagrid.defaults.view,{render:function(_8ed,_8ee,_8ef){ +var opts=$.data(_8ed,"treegrid").options; +var _8f0=$(_8ed).datagrid("getColumnFields",_8ef); +var _8f1=$.data(_8ed,"datagrid").rowIdPrefix; +if(_8ef){ +if(!(opts.rownumbers||(opts.frozenColumns&&opts.frozenColumns.length))){ +return; +} +} +var view=this; +if(this.treeNodes&&this.treeNodes.length){ +var _8f2=_8f3(_8ef,this.treeLevel,this.treeNodes); +$(_8ee).append(_8f2.join("")); +} +function _8f3(_8f4,_8f5,_8f6){ +var _8f7=$(_8ed).treegrid("getParent",_8f6[0][opts.idField]); +var _8f8=(_8f7?_8f7.children.length:$(_8ed).treegrid("getRoots").length)-_8f6.length; +var _8f9=[""]; +for(var i=0;i<_8f6.length;i++){ +var row=_8f6[i]; +if(row.state!="open"&&row.state!="closed"){ +row.state="open"; +} +var css=opts.rowStyler?opts.rowStyler.call(_8ed,row):""; +var _8fa=""; +var _8fb=""; +if(typeof css=="string"){ +_8fb=css; +}else{ +if(css){ +_8fa=css["class"]||""; +_8fb=css["style"]||""; +} +} +var cls="class=\"datagrid-row "+(_8f8++%2&&opts.striped?"datagrid-row-alt ":" ")+_8fa+"\""; +var _8fc=_8fb?"style=\""+_8fb+"\"":""; +var _8fd=_8f1+"-"+(_8f4?1:2)+"-"+row[opts.idField]; +_8f9.push(""); +_8f9=_8f9.concat(view.renderRow.call(view,_8ed,_8f0,_8f4,_8f5,row)); +_8f9.push(""); +if(row.children&&row.children.length){ +var tt=_8f3(_8f4,_8f5+1,row.children); +var v=row.state=="closed"?"none":"block"; +_8f9.push(""); +} +} +_8f9.push("
                                                  "); +_8f9=_8f9.concat(tt); +_8f9.push("
                                                  "); +return _8f9; +}; +},renderFooter:function(_8fe,_8ff,_900){ +var opts=$.data(_8fe,"treegrid").options; +var rows=$.data(_8fe,"treegrid").footer||[]; +var _901=$(_8fe).datagrid("getColumnFields",_900); +var _902=[""]; +for(var i=0;i"); +_902.push(this.renderRow.call(this,_8fe,_901,_900,0,row)); +_902.push(""); +} +_902.push("
                                                  "); +$(_8ff).html(_902.join("")); +},renderRow:function(_903,_904,_905,_906,row){ +var opts=$.data(_903,"treegrid").options; +var cc=[]; +if(_905&&opts.rownumbers){ +cc.push("
                                                  0
                                                  "); +} +for(var i=0;i<_904.length;i++){ +var _907=_904[i]; +var col=$(_903).datagrid("getColumnOption",_907); +if(col){ +var css=col.styler?(col.styler(row[_907],row)||""):""; +var _908=""; +var _909=""; +if(typeof css=="string"){ +_909=css; +}else{ +if(cc){ +_908=css["class"]||""; +_909=css["style"]||""; +} +} +var cls=_908?"class=\""+_908+"\"":""; +var _90a=col.hidden?"style=\"display:none;"+_909+"\"":(_909?"style=\""+_909+"\"":""); +cc.push(""); +var _90a=""; +if(!col.checkbox){ +if(col.align){ +_90a+="text-align:"+col.align+";"; +} +if(!opts.nowrap){ +_90a+="white-space:normal;height:auto;"; +}else{ +if(opts.autoRowHeight){ +_90a+="height:auto;"; +} +} +} +cc.push("
                                                  "); +if(col.checkbox){ +if(row.checked){ +cc.push(""); +}else{ +var val=null; +if(col.formatter){ +val=col.formatter(row[_907],row); +}else{ +val=row[_907]; +} +if(_907==opts.treeField){ +for(var j=0;j<_906;j++){ +cc.push(""); +} +if(row.state=="closed"){ +cc.push(""); +cc.push(""); +}else{ +if(row.children&&row.children.length){ +cc.push(""); +cc.push(""); +}else{ +cc.push(""); +cc.push(""); +} +} +cc.push(""+val+""); +}else{ +cc.push(val); +} +} +cc.push("
                                                  "); +cc.push(""); +} +} +return cc.join(""); +},refreshRow:function(_90b,id){ +this.updateRow.call(this,_90b,id,{}); +},updateRow:function(_90c,id,row){ +var opts=$.data(_90c,"treegrid").options; +var _90d=$(_90c).treegrid("find",id); +$.extend(_90d,row); +var _90e=$(_90c).treegrid("getLevel",id)-1; +var _90f=opts.rowStyler?opts.rowStyler.call(_90c,_90d):""; +var _910=$.data(_90c,"datagrid").rowIdPrefix; +var _911=_90d[opts.idField]; +function _912(_913){ +var _914=$(_90c).treegrid("getColumnFields",_913); +var tr=opts.finder.getTr(_90c,id,"body",(_913?1:2)); +var _915=tr.find("div.datagrid-cell-rownumber").html(); +var _916=tr.find("div.datagrid-cell-check input[type=checkbox]").is(":checked"); +tr.html(this.renderRow(_90c,_914,_913,_90e,_90d)); +tr.attr("style",_90f||""); +tr.find("div.datagrid-cell-rownumber").html(_915); +if(_916){ +tr.find("div.datagrid-cell-check input[type=checkbox]")._propAttr("checked",true); +} +if(_911!=id){ +tr.attr("id",_910+"-"+(_913?1:2)+"-"+_911); +tr.attr("node-id",_911); +} +}; +_912.call(this,true); +_912.call(this,false); +$(_90c).treegrid("fixRowHeight",id); +},deleteRow:function(_917,id){ +var opts=$.data(_917,"treegrid").options; +var tr=opts.finder.getTr(_917,id); +tr.next("tr.treegrid-tr-tree").remove(); +tr.remove(); +var _918=del(id); +if(_918){ +if(_918.children.length==0){ +tr=opts.finder.getTr(_917,_918[opts.idField]); +tr.next("tr.treegrid-tr-tree").remove(); +var cell=tr.children("td[field=\""+opts.treeField+"\"]").children("div.datagrid-cell"); +cell.find(".tree-icon").removeClass("tree-folder").addClass("tree-file"); +cell.find(".tree-hit").remove(); +$("").prependTo(cell); +} +} +function del(id){ +var cc; +var _919=$(_917).treegrid("getParent",id); +if(_919){ +cc=_919.children; +}else{ +cc=$(_917).treegrid("getData"); +} +for(var i=0;ib?1:-1); +}; +r=_924(r1[sn],r2[sn])*(so=="asc"?1:-1); +if(r!=0){ +return r; +} +} +return r; +}); +for(var i=0;i"); +if(!_942){ +_945.push(""); +_945.push(opts.groupFormatter.call(_93f,_941.value,_941.rows)); +_945.push(""); +} +_945.push("
                                                  "); +_945.push(this.renderTable(_93f,_941.startIndex,_941.rows,_942)); +return _945.join(""); +},groupRows:function(_946,rows){ +var _947=$.data(_946,"datagrid"); +var opts=_947.options; +var _948=[]; +for(var i=0;idiv.combo-p>div.combo-panel:visible").panel("close"); +}); +}); +function _958(_959){ +var _95a=$.data(_959,"combo"); +var opts=_95a.options; +if(!_95a.panel){ +_95a.panel=$("
                                                  ").appendTo("body"); +_95a.panel.panel({minWidth:opts.panelMinWidth,maxWidth:opts.panelMaxWidth,minHeight:opts.panelMinHeight,maxHeight:opts.panelMaxHeight,doSize:false,closed:true,cls:"combo-p",style:{position:"absolute",zIndex:10},onOpen:function(){ +var _95b=$(this).panel("options").comboTarget; +var _95c=$.data(_95b,"combo"); +if(_95c){ +_95c.options.onShowPanel.call(_95b); +} +},onBeforeClose:function(){ +_957(this); +},onClose:function(){ +var _95d=$(this).panel("options").comboTarget; +var _95e=$(_95d).data("combo"); +if(_95e){ +_95e.options.onHidePanel.call(_95d); +} +}}); +} +var _95f=$.extend(true,[],opts.icons); +if(opts.hasDownArrow){ +_95f.push({iconCls:"combo-arrow",handler:function(e){ +_963(e.data.target); +}}); +} +$(_959).addClass("combo-f").textbox($.extend({},opts,{icons:_95f,onChange:function(){ +}})); +$(_959).attr("comboName",$(_959).attr("textboxName")); +_95a.combo=$(_959).next(); +_95a.combo.addClass("combo"); +}; +function _960(_961){ +var _962=$.data(_961,"combo"); +var opts=_962.options; +var p=_962.panel; +if(p.is(":visible")){ +p.panel("close"); +} +if(!opts.cloned){ +p.panel("destroy"); +} +$(_961).textbox("destroy"); +}; +function _963(_964){ +var _965=$.data(_964,"combo").panel; +if(_965.is(":visible")){ +_966(_964); +}else{ +var p=$(_964).closest("div.combo-panel"); +$("div.combo-panel:visible").not(_965).not(p).panel("close"); +$(_964).combo("showPanel"); +} +$(_964).combo("textbox").focus(); +}; +function _957(_967){ +$(_967).find(".combo-f").each(function(){ +var p=$(this).combo("panel"); +if(p.is(":visible")){ +p.panel("close"); +} +}); +}; +function _968(e){ +var _969=e.data.target; +var _96a=$.data(_969,"combo"); +var opts=_96a.options; +var _96b=_96a.panel; +if(!opts.editable){ +_963(_969); +}else{ +var p=$(_969).closest("div.combo-panel"); +$("div.combo-panel:visible").not(_96b).not(p).panel("close"); +} +}; +function _96c(e){ +var _96d=e.data.target; +var t=$(_96d); +var _96e=t.data("combo"); +var opts=t.combo("options"); +switch(e.keyCode){ +case 38: +opts.keyHandler.up.call(_96d,e); +break; +case 40: +opts.keyHandler.down.call(_96d,e); +break; +case 37: +opts.keyHandler.left.call(_96d,e); +break; +case 39: +opts.keyHandler.right.call(_96d,e); +break; +case 13: +e.preventDefault(); +opts.keyHandler.enter.call(_96d,e); +return false; +case 9: +case 27: +_966(_96d); +break; +default: +if(opts.editable){ +if(_96e.timer){ +clearTimeout(_96e.timer); +} +_96e.timer=setTimeout(function(){ +var q=t.combo("getText"); +if(_96e.previousText!=q){ +_96e.previousText=q; +t.combo("showPanel"); +opts.keyHandler.query.call(_96d,q,e); +t.combo("validate"); +} +},opts.delay); +} +} +}; +function _96f(_970){ +var _971=$.data(_970,"combo"); +var _972=_971.combo; +var _973=_971.panel; +var opts=$(_970).combo("options"); +var _974=_973.panel("options"); +_974.comboTarget=_970; +if(_974.closed){ +_973.panel("panel").show().css({zIndex:($.fn.menu?$.fn.menu.defaults.zIndex++:($.fn.window?$.fn.window.defaults.zIndex++:99)),left:-999999}); +_973.panel("resize",{width:(opts.panelWidth?opts.panelWidth:_972._outerWidth()),height:opts.panelHeight}); +_973.panel("panel").hide(); +_973.panel("open"); +} +(function(){ +if(_973.is(":visible")){ +_973.panel("move",{left:_975(),top:_976()}); +setTimeout(arguments.callee,200); +} +})(); +function _975(){ +var left=_972.offset().left; +if(opts.panelAlign=="right"){ +left+=_972._outerWidth()-_973._outerWidth(); +} +if(left+_973._outerWidth()>$(window)._outerWidth()+$(document).scrollLeft()){ +left=$(window)._outerWidth()+$(document).scrollLeft()-_973._outerWidth(); +} +if(left<0){ +left=0; +} +return left; +}; +function _976(){ +var top=_972.offset().top+_972._outerHeight(); +if(top+_973._outerHeight()>$(window)._outerHeight()+$(document).scrollTop()){ +top=_972.offset().top-_973._outerHeight(); +} +if(top<$(document).scrollTop()){ +top=_972.offset().top+_972._outerHeight(); +} +return top; +}; +}; +function _966(_977){ +var _978=$.data(_977,"combo").panel; +_978.panel("close"); +}; +function _979(_97a,text){ +var _97b=$.data(_97a,"combo"); +var _97c=$(_97a).textbox("getText"); +if(_97c!=text){ +$(_97a).textbox("setText",text); +_97b.previousText=text; +} +}; +function _97d(_97e){ +var _97f=[]; +var _980=$.data(_97e,"combo").combo; +_980.find(".textbox-value").each(function(){ +_97f.push($(this).val()); +}); +return _97f; +}; +function _981(_982,_983){ +var _984=$.data(_982,"combo"); +var opts=_984.options; +var _985=_984.combo; +if(!$.isArray(_983)){ +_983=_983.split(opts.separator); +} +var _986=_97d(_982); +_985.find(".textbox-value").remove(); +var name=$(_982).attr("textboxName")||""; +for(var i=0;i<_983.length;i++){ +var _987=$("").appendTo(_985); +_987.attr("name",name); +if(opts.disabled){ +_987.attr("disabled","disabled"); +} +_987.val(_983[i]); +} +var _988=(function(){ +if(_986.length!=_983.length){ +return true; +} +var a1=$.extend(true,[],_986); +var a2=$.extend(true,[],_983); +a1.sort(); +a2.sort(); +for(var i=0;i_9a3.height()){ +var h=_9a3.scrollTop()+item.position().top+item.outerHeight()-_9a3.height(); +_9a3.scrollTop(h); +} +} +} +}; +function nav(_9a4,dir){ +var opts=$.data(_9a4,"combobox").options; +var _9a5=$(_9a4).combobox("panel"); +var item=_9a5.children("div.combobox-item-hover"); +if(!item.length){ +item=_9a5.children("div.combobox-item-selected"); +} +item.removeClass("combobox-item-hover"); +var _9a6="div.combobox-item:visible:not(.combobox-item-disabled):first"; +var _9a7="div.combobox-item:visible:not(.combobox-item-disabled):last"; +if(!item.length){ +item=_9a5.children(dir=="next"?_9a6:_9a7); +}else{ +if(dir=="next"){ +item=item.nextAll(_9a6); +if(!item.length){ +item=_9a5.children(_9a6); +} +}else{ +item=item.prevAll(_9a6); +if(!item.length){ +item=_9a5.children(_9a7); +} +} +} +if(item.length){ +item.addClass("combobox-item-hover"); +var row=opts.finder.getRow(_9a4,item); +if(row){ +_9a0(_9a4,row[opts.valueField]); +if(opts.selectOnNavigation){ +_9a8(_9a4,row[opts.valueField]); +} +} +} +}; +function _9a8(_9a9,_9aa){ +var opts=$.data(_9a9,"combobox").options; +var _9ab=$(_9a9).combo("getValues"); +if($.inArray(_9aa+"",_9ab)==-1){ +if(opts.multiple){ +_9ab.push(_9aa); +}else{ +_9ab=[_9aa]; +} +_9ac(_9a9,_9ab); +opts.onSelect.call(_9a9,opts.finder.getRow(_9a9,_9aa)); +} +}; +function _9ad(_9ae,_9af){ +var opts=$.data(_9ae,"combobox").options; +var _9b0=$(_9ae).combo("getValues"); +var _9b1=$.inArray(_9af+"",_9b0); +if(_9b1>=0){ +_9b0.splice(_9b1,1); +_9ac(_9ae,_9b0); +opts.onUnselect.call(_9ae,opts.finder.getRow(_9ae,_9af)); +} +}; +function _9ac(_9b2,_9b3,_9b4){ +var opts=$.data(_9b2,"combobox").options; +var _9b5=$(_9b2).combo("panel"); +if(!$.isArray(_9b3)){ +_9b3=_9b3.split(opts.separator); +} +_9b5.find("div.combobox-item-selected").removeClass("combobox-item-selected"); +var vv=[],ss=[]; +for(var i=0;i<_9b3.length;i++){ +var v=_9b3[i]; +var s=v; +opts.finder.getEl(_9b2,v).addClass("combobox-item-selected"); +var row=opts.finder.getRow(_9b2,v); +if(row){ +s=row[opts.textField]; +} +vv.push(v); +ss.push(s); +} +if(!_9b4){ +$(_9b2).combo("setText",ss.join(opts.separator)); +} +$(_9b2).combo("setValues",vv); +}; +function _9b6(_9b7,data,_9b8){ +var _9b9=$.data(_9b7,"combobox"); +var opts=_9b9.options; +_9b9.data=opts.loadFilter.call(_9b7,data); +_9b9.groups=[]; +data=_9b9.data; +var _9ba=$(_9b7).combobox("getValues"); +var dd=[]; +var _9bb=undefined; +for(var i=0;i"); +dd.push(opts.groupFormatter?opts.groupFormatter.call(_9b7,g):g); +dd.push("
                                                  "); +} +}else{ +_9bb=undefined; +} +var cls="combobox-item"+(row.disabled?" combobox-item-disabled":"")+(g?" combobox-gitem":""); +dd.push("
                                                  "); +dd.push(opts.formatter?opts.formatter.call(_9b7,row):s); +dd.push("
                                                  "); +if(row["selected"]&&$.inArray(v,_9ba)==-1){ +_9ba.push(v); +} +} +$(_9b7).combo("panel").html(dd.join("")); +if(opts.multiple){ +_9ac(_9b7,_9ba,_9b8); +}else{ +_9ac(_9b7,_9ba.length?[_9ba[_9ba.length-1]]:[],_9b8); +} +opts.onLoadSuccess.call(_9b7,data); +}; +function _9bc(_9bd,url,_9be,_9bf){ +var opts=$.data(_9bd,"combobox").options; +if(url){ +opts.url=url; +} +_9be=$.extend({},opts.queryParams,_9be||{}); +if(opts.onBeforeLoad.call(_9bd,_9be)==false){ +return; +} +opts.loader.call(_9bd,_9be,function(data){ +_9b6(_9bd,data,_9bf); +},function(){ +opts.onLoadError.apply(this,arguments); +}); +}; +function _9c0(_9c1,q){ +var _9c2=$.data(_9c1,"combobox"); +var opts=_9c2.options; +var qq=opts.multiple?q.split(opts.separator):[q]; +if(opts.mode=="remote"){ +_9c3(qq); +_9bc(_9c1,null,{q:q},true); +}else{ +var _9c4=$(_9c1).combo("panel"); +_9c4.find("div.combobox-item-selected,div.combobox-item-hover").removeClass("combobox-item-selected combobox-item-hover"); +_9c4.find("div.combobox-item,div.combobox-group").hide(); +var data=_9c2.data; +var vv=[]; +$.map(qq,function(q){ +q=$.trim(q); +var _9c5=q; +var _9c6=undefined; +for(var i=0;i=0){ +vv.push(v); +} +}); +t.combobox("setValues",vv); +if(!opts.multiple){ +t.combobox("hidePanel"); +} +}; +function _9cb(_9cc){ +var _9cd=$.data(_9cc,"combobox"); +var opts=_9cd.options; +_99b++; +_9cd.itemIdPrefix="_easyui_combobox_i"+_99b; +_9cd.groupIdPrefix="_easyui_combobox_g"+_99b; +$(_9cc).addClass("combobox-f"); +$(_9cc).combo($.extend({},opts,{onShowPanel:function(){ +$(_9cc).combo("panel").find("div.combobox-item:hidden,div.combobox-group:hidden").show(); +_9a0(_9cc,$(_9cc).combobox("getValue")); +opts.onShowPanel.call(_9cc); +}})); +$(_9cc).combo("panel").unbind().bind("mouseover",function(e){ +$(this).children("div.combobox-item-hover").removeClass("combobox-item-hover"); +var item=$(e.target).closest("div.combobox-item"); +if(!item.hasClass("combobox-item-disabled")){ +item.addClass("combobox-item-hover"); +} +e.stopPropagation(); +}).bind("mouseout",function(e){ +$(e.target).closest("div.combobox-item").removeClass("combobox-item-hover"); +e.stopPropagation(); +}).bind("click",function(e){ +var item=$(e.target).closest("div.combobox-item"); +if(!item.length||item.hasClass("combobox-item-disabled")){ +return; +} +var row=opts.finder.getRow(_9cc,item); +if(!row){ +return; +} +var _9ce=row[opts.valueField]; +if(opts.multiple){ +if(item.hasClass("combobox-item-selected")){ +_9ad(_9cc,_9ce); +}else{ +_9a8(_9cc,_9ce); +} +}else{ +_9a8(_9cc,_9ce); +$(_9cc).combo("hidePanel"); +} +e.stopPropagation(); +}); +}; +$.fn.combobox=function(_9cf,_9d0){ +if(typeof _9cf=="string"){ +var _9d1=$.fn.combobox.methods[_9cf]; +if(_9d1){ +return _9d1(this,_9d0); +}else{ +return this.combo(_9cf,_9d0); +} +} +_9cf=_9cf||{}; +return this.each(function(){ +var _9d2=$.data(this,"combobox"); +if(_9d2){ +$.extend(_9d2.options,_9cf); +}else{ +_9d2=$.data(this,"combobox",{options:$.extend({},$.fn.combobox.defaults,$.fn.combobox.parseOptions(this),_9cf),data:[]}); +} +_9cb(this); +if(_9d2.options.data){ +_9b6(this,_9d2.options.data); +}else{ +var data=$.fn.combobox.parseData(this); +if(data.length){ +_9b6(this,data); +} +} +_9bc(this); +}); +}; +$.fn.combobox.methods={options:function(jq){ +var _9d3=jq.combo("options"); +return $.extend($.data(jq[0],"combobox").options,{width:_9d3.width,height:_9d3.height,originalValue:_9d3.originalValue,disabled:_9d3.disabled,readonly:_9d3.readonly}); +},getData:function(jq){ +return $.data(jq[0],"combobox").data; +},setValues:function(jq,_9d4){ +return jq.each(function(){ +_9ac(this,_9d4); +}); +},setValue:function(jq,_9d5){ +return jq.each(function(){ +_9ac(this,[_9d5]); +}); +},clear:function(jq){ +return jq.each(function(){ +$(this).combo("clear"); +var _9d6=$(this).combo("panel"); +_9d6.find("div.combobox-item-selected").removeClass("combobox-item-selected"); +}); +},reset:function(jq){ +return jq.each(function(){ +var opts=$(this).combobox("options"); +if(opts.multiple){ +$(this).combobox("setValues",opts.originalValue); +}else{ +$(this).combobox("setValue",opts.originalValue); +} +}); +},loadData:function(jq,data){ +return jq.each(function(){ +_9b6(this,data); +}); +},reload:function(jq,url){ +return jq.each(function(){ +if(typeof url=="string"){ +_9bc(this,url); +}else{ +if(url){ +var opts=$(this).combobox("options"); +opts.queryParams=url; +} +_9bc(this); +} +}); +},select:function(jq,_9d7){ +return jq.each(function(){ +_9a8(this,_9d7); +}); +},unselect:function(jq,_9d8){ +return jq.each(function(){ +_9ad(this,_9d8); +}); +}}; +$.fn.combobox.parseOptions=function(_9d9){ +var t=$(_9d9); +return $.extend({},$.fn.combo.parseOptions(_9d9),$.parser.parseOptions(_9d9,["valueField","textField","groupField","mode","method","url"])); +}; +$.fn.combobox.parseData=function(_9da){ +var data=[]; +var opts=$(_9da).combobox("options"); +$(_9da).children().each(function(){ +if(this.tagName.toLowerCase()=="optgroup"){ +var _9db=$(this).attr("label"); +$(this).children().each(function(){ +_9dc(this,_9db); +}); +}else{ +_9dc(this); +} +}); +return data; +function _9dc(el,_9dd){ +var t=$(el); +var row={}; +row[opts.valueField]=t.attr("value")!=undefined?t.attr("value"):t.text(); +row[opts.textField]=t.text(); +row["selected"]=t.is(":selected"); +row["disabled"]=t.is(":disabled"); +if(_9dd){ +opts.groupField=opts.groupField||"group"; +row[opts.groupField]=_9dd; +} +data.push(row); +}; +}; +$.fn.combobox.defaults=$.extend({},$.fn.combo.defaults,{valueField:"value",textField:"text",groupField:null,groupFormatter:function(_9de){ +return _9de; +},mode:"local",method:"post",url:null,data:null,queryParams:{},keyHandler:{up:function(e){ +nav(this,"prev"); +e.preventDefault(); +},down:function(e){ +nav(this,"next"); +e.preventDefault(); +},left:function(e){ +},right:function(e){ +},enter:function(e){ +_9c7(this); +},query:function(q,e){ +_9c0(this,q); +}},filter:function(q,row){ +var opts=$(this).combobox("options"); +return row[opts.textField].toLowerCase().indexOf(q.toLowerCase())==0; +},formatter:function(row){ +var opts=$(this).combobox("options"); +return row[opts.textField]; +},loader:function(_9df,_9e0,_9e1){ +var opts=$(this).combobox("options"); +if(!opts.url){ +return false; +} +$.ajax({type:opts.method,url:opts.url,data:_9df,dataType:"json",success:function(data){ +_9e0(data); +},error:function(){ +_9e1.apply(this,arguments); +}}); +},loadFilter:function(data){ +return data; +},finder:{getEl:function(_9e2,_9e3){ +var _9e4=_99c(_9e2,_9e3); +var id=$.data(_9e2,"combobox").itemIdPrefix+"_"+_9e4; +return $("#"+id); +},getRow:function(_9e5,p){ +var _9e6=$.data(_9e5,"combobox"); +var _9e7=(p instanceof jQuery)?p.attr("id").substr(_9e6.itemIdPrefix.length+1):_99c(_9e5,p); +return _9e6.data[parseInt(_9e7)]; +}},onBeforeLoad:function(_9e8){ +},onLoadSuccess:function(){ +},onLoadError:function(){ +},onSelect:function(_9e9){ +},onUnselect:function(_9ea){ +}}); +})(jQuery); +(function($){ +function _9eb(_9ec){ +var _9ed=$.data(_9ec,"combotree"); +var opts=_9ed.options; +var tree=_9ed.tree; +$(_9ec).addClass("combotree-f"); +$(_9ec).combo(opts); +var _9ee=$(_9ec).combo("panel"); +if(!tree){ +tree=$("
                                                    ").appendTo(_9ee); +$.data(_9ec,"combotree").tree=tree; +} +tree.tree($.extend({},opts,{checkbox:opts.multiple,onLoadSuccess:function(node,data){ +var _9ef=$(_9ec).combotree("getValues"); +if(opts.multiple){ +var _9f0=tree.tree("getChecked"); +for(var i=0;i<_9f0.length;i++){ +var id=_9f0[i].id; +(function(){ +for(var i=0;i<_9ef.length;i++){ +if(id==_9ef[i]){ +return; +} +} +_9ef.push(id); +})(); +} +} +$(_9ec).combotree("setValues",_9ef); +opts.onLoadSuccess.call(this,node,data); +},onClick:function(node){ +if(opts.multiple){ +$(this).tree(node.checked?"uncheck":"check",node.target); +}else{ +$(_9ec).combo("hidePanel"); +} +_9f2(_9ec); +opts.onClick.call(this,node); +},onCheck:function(node,_9f1){ +_9f2(_9ec); +opts.onCheck.call(this,node,_9f1); +}})); +}; +function _9f2(_9f3){ +var _9f4=$.data(_9f3,"combotree"); +var opts=_9f4.options; +var tree=_9f4.tree; +var vv=[],ss=[]; +if(opts.multiple){ +var _9f5=tree.tree("getChecked"); +for(var i=0;i<_9f5.length;i++){ +vv.push(_9f5[i].id); +ss.push(_9f5[i].text); +} +}else{ +var node=tree.tree("getSelected"); +if(node){ +vv.push(node.id); +ss.push(node.text); +} +} +$(_9f3).combo("setText",ss.join(opts.separator)).combo("setValues",opts.multiple?vv:(vv.length?vv:[""])); +}; +function _9f6(_9f7,_9f8){ +var _9f9=$.data(_9f7,"combotree"); +var opts=_9f9.options; +var tree=_9f9.tree; +var _9fa=tree.tree("options"); +var _9fb=_9fa.onCheck; +var _9fc=_9fa.onSelect; +_9fa.onCheck=_9fa.onSelect=function(){ +}; +tree.find("span.tree-checkbox").addClass("tree-checkbox0").removeClass("tree-checkbox1 tree-checkbox2"); +if(!$.isArray(_9f8)){ +_9f8=_9f8.split(opts.separator); +} +var vv=$.map(_9f8,function(_9fd){ +return String(_9fd); +}); +var ss=[]; +$.map(vv,function(v){ +var node=tree.tree("find",v); +if(node){ +tree.tree("check",node.target).tree("select",node.target); +ss.push(node.text); +}else{ +ss.push(v); +} +}); +if(opts.multiple){ +var _9fe=tree.tree("getChecked"); +$.map(_9fe,function(node){ +var id=String(node.id); +if($.inArray(id,vv)==-1){ +vv.push(id); +ss.push(node.text); +} +}); +} +_9fa.onCheck=_9fb; +_9fa.onSelect=_9fc; +$(_9f7).combo("setText",ss.join(opts.separator)).combo("setValues",opts.multiple?vv:(vv.length?vv:[""])); +}; +$.fn.combotree=function(_9ff,_a00){ +if(typeof _9ff=="string"){ +var _a01=$.fn.combotree.methods[_9ff]; +if(_a01){ +return _a01(this,_a00); +}else{ +return this.combo(_9ff,_a00); +} +} +_9ff=_9ff||{}; +return this.each(function(){ +var _a02=$.data(this,"combotree"); +if(_a02){ +$.extend(_a02.options,_9ff); +}else{ +$.data(this,"combotree",{options:$.extend({},$.fn.combotree.defaults,$.fn.combotree.parseOptions(this),_9ff)}); +} +_9eb(this); +}); +}; +$.fn.combotree.methods={options:function(jq){ +var _a03=jq.combo("options"); +return $.extend($.data(jq[0],"combotree").options,{width:_a03.width,height:_a03.height,originalValue:_a03.originalValue,disabled:_a03.disabled,readonly:_a03.readonly}); +},clone:function(jq,_a04){ +var t=jq.combo("clone",_a04); +t.data("combotree",{options:$.extend(true,{},jq.combotree("options")),tree:jq.combotree("tree")}); +return t; +},tree:function(jq){ +return $.data(jq[0],"combotree").tree; +},loadData:function(jq,data){ +return jq.each(function(){ +var opts=$.data(this,"combotree").options; +opts.data=data; +var tree=$.data(this,"combotree").tree; +tree.tree("loadData",data); +}); +},reload:function(jq,url){ +return jq.each(function(){ +var opts=$.data(this,"combotree").options; +var tree=$.data(this,"combotree").tree; +if(url){ +opts.url=url; +} +tree.tree({url:opts.url}); +}); +},setValues:function(jq,_a05){ +return jq.each(function(){ +_9f6(this,_a05); +}); +},setValue:function(jq,_a06){ +return jq.each(function(){ +_9f6(this,[_a06]); +}); +},clear:function(jq){ +return jq.each(function(){ +var tree=$.data(this,"combotree").tree; +tree.find("div.tree-node-selected").removeClass("tree-node-selected"); +var cc=tree.tree("getChecked"); +for(var i=0;i").appendTo(_a0e); +_a0a.grid=grid; +} +grid.datagrid($.extend({},opts,{border:false,singleSelect:(!opts.multiple),onLoadSuccess:function(data){ +var _a0f=$(_a09).combo("getValues"); +var _a10=opts.onSelect; +opts.onSelect=function(){ +}; +_a16(_a09,_a0f,_a0a.remainText); +opts.onSelect=_a10; +opts.onLoadSuccess.apply(_a09,arguments); +},onClickRow:_a11,onSelect:function(_a12,row){ +_a13(); +opts.onSelect.call(this,_a12,row); +},onUnselect:function(_a14,row){ +_a13(); +opts.onUnselect.call(this,_a14,row); +},onSelectAll:function(rows){ +_a13(); +opts.onSelectAll.call(this,rows); +},onUnselectAll:function(rows){ +if(opts.multiple){ +_a13(); +} +opts.onUnselectAll.call(this,rows); +}})); +function _a11(_a15,row){ +_a0a.remainText=false; +_a13(); +if(!opts.multiple){ +$(_a09).combo("hidePanel"); +} +opts.onClickRow.call(this,_a15,row); +}; +function _a13(){ +var vv=$.map(grid.datagrid("getSelections"),function(row){ +return row[opts.idField]; +}); +vv=vv.concat(opts.unselectedValues); +if(!opts.multiple){ +vv=vv.length?[vv[0]]:[""]; +} +_a16(_a09,vv,_a0a.remainText); +}; +}; +function nav(_a17,dir){ +var _a18=$.data(_a17,"combogrid"); +var opts=_a18.options; +var grid=_a18.grid; +var _a19=grid.datagrid("getRows").length; +if(!_a19){ +return; +} +var tr=opts.finder.getTr(grid[0],null,"highlight"); +if(!tr.length){ +tr=opts.finder.getTr(grid[0],null,"selected"); +} +var _a1a; +if(!tr.length){ +_a1a=(dir=="next"?0:_a19-1); +}else{ +var _a1a=parseInt(tr.attr("datagrid-row-index")); +_a1a+=(dir=="next"?1:-1); +if(_a1a<0){ +_a1a=_a19-1; +} +if(_a1a>=_a19){ +_a1a=0; +} +} +grid.datagrid("highlightRow",_a1a); +if(opts.selectOnNavigation){ +_a18.remainText=false; +grid.datagrid("selectRow",_a1a); +} +}; +function _a16(_a1b,_a1c,_a1d){ +var _a1e=$.data(_a1b,"combogrid"); +var opts=_a1e.options; +var grid=_a1e.grid; +var _a1f=$(_a1b).combo("getValues"); +var _a20=$(_a1b).combo("options"); +var _a21=_a20.onChange; +_a20.onChange=function(){ +}; +var _a22=grid.datagrid("options"); +var _a23=_a22.onSelect; +var _a24=_a22.onUnselectAll; +_a22.onSelect=_a22.onUnselectAll=function(){ +}; +if(!$.isArray(_a1c)){ +_a1c=_a1c.split(opts.separator); +} +var _a25=[]; +$.map(grid.datagrid("getSelections"),function(row){ +if($.inArray(row[opts.idField],_a1c)>=0){ +_a25.push(row); +} +}); +grid.datagrid("clearSelections"); +grid.data("datagrid").selectedRows=_a25; +var ss=[]; +for(var i=0;i<_a1c.length;i++){ +var _a26=_a1c[i]; +var _a27=grid.datagrid("getRowIndex",_a26); +if(_a27>=0){ +grid.datagrid("selectRow",_a27); +} +ss.push(_a28(_a26,grid.datagrid("getRows"))||_a28(_a26,grid.datagrid("getSelections"))||_a28(_a26,opts.mappingRows)||_a26); +} +opts.unselectedValues=[]; +var _a29=$.map(_a25,function(row){ +return row[opts.idField]; +}); +$.map(_a1c,function(_a2a){ +if($.inArray(_a2a,_a29)==-1){ +opts.unselectedValues.push(_a2a); +} +}); +$(_a1b).combo("setValues",_a1f); +_a20.onChange=_a21; +_a22.onSelect=_a23; +_a22.onUnselectAll=_a24; +if(!_a1d){ +var s=ss.join(opts.separator); +if($(_a1b).combo("getText")!=s){ +$(_a1b).combo("setText",s); +} +} +$(_a1b).combo("setValues",_a1c); +function _a28(_a2b,a){ +for(var i=0;i
                                                    ").prependTo(_a42); +if(opts.sharedCalendar){ +var c=$(opts.sharedCalendar); +if(!c[0].pholder){ +c[0].pholder=$("
                                                    ").insertAfter(c); +} +c.addClass("calendar-shared").appendTo(cc); +if(!c.hasClass("calendar")){ +c.calendar(); +} +_a3e.calendar=c; +}else{ +_a3e.calendar=$("
                                                    ").appendTo(cc).calendar(); +} +$.extend(_a3e.calendar.calendar("options"),{fit:true,border:false,onSelect:function(date){ +var _a43=this.target; +var opts=$(_a43).datebox("options"); +_a4f(_a43,opts.formatter.call(_a43,date)); +$(_a43).combo("hidePanel"); +opts.onSelect.call(_a43,date); +}}); +} +$(_a3d).combo("textbox").parent().addClass("datebox"); +$(_a3d).datebox("initValue",opts.value); +function _a3f(_a44){ +var opts=$(_a44).datebox("options"); +var _a45=$(_a44).combo("panel"); +_a45.unbind(".datebox").bind("click.datebox",function(e){ +if($(e.target).hasClass("datebox-button-a")){ +var _a46=parseInt($(e.target).attr("datebox-button-index")); +opts.buttons[_a46].handler.call(e.target,_a44); +} +}); +}; +function _a40(_a47){ +var _a48=$(_a47).combo("panel"); +if(_a48.children("div.datebox-button").length){ +return; +} +var _a49=$("
                                                    ").appendTo(_a48); +var tr=_a49.find("tr"); +for(var i=0;i").appendTo(tr); +var btn=opts.buttons[i]; +var t=$("").html($.isFunction(btn.text)?btn.text(_a47):btn.text).appendTo(td); +t.attr("datebox-button-index",i); +} +tr.find("td").css("width",(100/opts.buttons.length)+"%"); +}; +function _a41(_a4a){ +var _a4b=$(_a4a).combo("panel"); +var cc=_a4b.children("div.datebox-calendar-inner"); +_a4b.children()._outerWidth(_a4b.width()); +_a3e.calendar.appendTo(cc); +_a3e.calendar[0].target=_a4a; +if(opts.panelHeight!="auto"){ +var _a4c=_a4b.height(); +_a4b.children().not(cc).each(function(){ +_a4c-=$(this).outerHeight(); +}); +cc._outerHeight(_a4c); +} +_a3e.calendar.calendar("resize"); +}; +}; +function _a4d(_a4e,q){ +_a4f(_a4e,q,true); +}; +function _a50(_a51){ +var _a52=$.data(_a51,"datebox"); +var opts=_a52.options; +var _a53=_a52.calendar.calendar("options").current; +if(_a53){ +_a4f(_a51,opts.formatter.call(_a51,_a53)); +$(_a51).combo("hidePanel"); +} +}; +function _a4f(_a54,_a55,_a56){ +var _a57=$.data(_a54,"datebox"); +var opts=_a57.options; +var _a58=_a57.calendar; +_a58.calendar("moveTo",opts.parser.call(_a54,_a55)); +if(_a56){ +$(_a54).combo("setValue",_a55); +}else{ +if(_a55){ +_a55=opts.formatter.call(_a54,_a58.calendar("options").current); +} +$(_a54).combo("setText",_a55).combo("setValue",_a55); +} +}; +$.fn.datebox=function(_a59,_a5a){ +if(typeof _a59=="string"){ +var _a5b=$.fn.datebox.methods[_a59]; +if(_a5b){ +return _a5b(this,_a5a); +}else{ +return this.combo(_a59,_a5a); +} +} +_a59=_a59||{}; +return this.each(function(){ +var _a5c=$.data(this,"datebox"); +if(_a5c){ +$.extend(_a5c.options,_a59); +}else{ +$.data(this,"datebox",{options:$.extend({},$.fn.datebox.defaults,$.fn.datebox.parseOptions(this),_a59)}); +} +_a3c(this); +}); +}; +$.fn.datebox.methods={options:function(jq){ +var _a5d=jq.combo("options"); +return $.extend($.data(jq[0],"datebox").options,{width:_a5d.width,height:_a5d.height,originalValue:_a5d.originalValue,disabled:_a5d.disabled,readonly:_a5d.readonly}); +},cloneFrom:function(jq,from){ +return jq.each(function(){ +$(this).combo("cloneFrom",from); +$.data(this,"datebox",{options:$.extend(true,{},$(from).datebox("options")),calendar:$(from).datebox("calendar")}); +$(this).addClass("datebox-f"); +}); +},calendar:function(jq){ +return $.data(jq[0],"datebox").calendar; +},initValue:function(jq,_a5e){ +return jq.each(function(){ +var opts=$(this).datebox("options"); +var _a5f=opts.value; +if(_a5f){ +_a5f=opts.formatter.call(this,opts.parser.call(this,_a5f)); +} +$(this).combo("initValue",_a5f).combo("setText",_a5f); +}); +},setValue:function(jq,_a60){ +return jq.each(function(){ +_a4f(this,_a60); +}); +},reset:function(jq){ +return jq.each(function(){ +var opts=$(this).datebox("options"); +$(this).datebox("setValue",opts.originalValue); +}); +}}; +$.fn.datebox.parseOptions=function(_a61){ +return $.extend({},$.fn.combo.parseOptions(_a61),$.parser.parseOptions(_a61,["sharedCalendar"])); +}; +$.fn.datebox.defaults=$.extend({},$.fn.combo.defaults,{panelWidth:180,panelHeight:"auto",sharedCalendar:null,keyHandler:{up:function(e){ +},down:function(e){ +},left:function(e){ +},right:function(e){ +},enter:function(e){ +_a50(this); +},query:function(q,e){ +_a4d(this,q); +}},currentText:"Today",closeText:"Close",okText:"Ok",buttons:[{text:function(_a62){ +return $(_a62).datebox("options").currentText; +},handler:function(_a63){ +var now=new Date(); +$(_a63).datebox("calendar").calendar({year:now.getFullYear(),month:now.getMonth()+1,current:new Date(now.getFullYear(),now.getMonth(),now.getDate())}); +_a50(_a63); +}},{text:function(_a64){ +return $(_a64).datebox("options").closeText; +},handler:function(_a65){ +$(this).closest("div.combo-panel").panel("close"); +}}],formatter:function(date){ +var y=date.getFullYear(); +var m=date.getMonth()+1; +var d=date.getDate(); +return (m<10?("0"+m):m)+"/"+(d<10?("0"+d):d)+"/"+y; +},parser:function(s){ +if(!s){ +return new Date(); +} +var ss=s.split("/"); +var m=parseInt(ss[0],10); +var d=parseInt(ss[1],10); +var y=parseInt(ss[2],10); +if(!isNaN(y)&&!isNaN(m)&&!isNaN(d)){ +return new Date(y,m-1,d); +}else{ +return new Date(); +} +},onSelect:function(date){ +}}); +})(jQuery); +(function($){ +function _a66(_a67){ +var _a68=$.data(_a67,"datetimebox"); +var opts=_a68.options; +$(_a67).datebox($.extend({},opts,{onShowPanel:function(){ +var _a69=$(this).datetimebox("getValue"); +_a6f(this,_a69,true); +opts.onShowPanel.call(this); +},formatter:$.fn.datebox.defaults.formatter,parser:$.fn.datebox.defaults.parser})); +$(_a67).removeClass("datebox-f").addClass("datetimebox-f"); +$(_a67).datebox("calendar").calendar({onSelect:function(date){ +opts.onSelect.call(this.target,date); +}}); +if(!_a68.spinner){ +var _a6a=$(_a67).datebox("panel"); +var p=$("
                                                    ").insertAfter(_a6a.children("div.datebox-calendar-inner")); +_a68.spinner=p.children("input"); +} +_a68.spinner.timespinner({width:opts.spinnerWidth,showSeconds:opts.showSeconds,separator:opts.timeSeparator}); +$(_a67).datetimebox("initValue",opts.value); +}; +function _a6b(_a6c){ +var c=$(_a6c).datetimebox("calendar"); +var t=$(_a6c).datetimebox("spinner"); +var date=c.calendar("options").current; +return new Date(date.getFullYear(),date.getMonth(),date.getDate(),t.timespinner("getHours"),t.timespinner("getMinutes"),t.timespinner("getSeconds")); +}; +function _a6d(_a6e,q){ +_a6f(_a6e,q,true); +}; +function _a70(_a71){ +var opts=$.data(_a71,"datetimebox").options; +var date=_a6b(_a71); +_a6f(_a71,opts.formatter.call(_a71,date)); +$(_a71).combo("hidePanel"); +}; +function _a6f(_a72,_a73,_a74){ +var opts=$.data(_a72,"datetimebox").options; +$(_a72).combo("setValue",_a73); +if(!_a74){ +if(_a73){ +var date=opts.parser.call(_a72,_a73); +$(_a72).combo("setText",opts.formatter.call(_a72,date)); +$(_a72).combo("setValue",opts.formatter.call(_a72,date)); +}else{ +$(_a72).combo("setText",_a73); +} +} +var date=opts.parser.call(_a72,_a73); +$(_a72).datetimebox("calendar").calendar("moveTo",date); +$(_a72).datetimebox("spinner").timespinner("setValue",_a75(date)); +function _a75(date){ +function _a76(_a77){ +return (_a77<10?"0":"")+_a77; +}; +var tt=[_a76(date.getHours()),_a76(date.getMinutes())]; +if(opts.showSeconds){ +tt.push(_a76(date.getSeconds())); +} +return tt.join($(_a72).datetimebox("spinner").timespinner("options").separator); +}; +}; +$.fn.datetimebox=function(_a78,_a79){ +if(typeof _a78=="string"){ +var _a7a=$.fn.datetimebox.methods[_a78]; +if(_a7a){ +return _a7a(this,_a79); +}else{ +return this.datebox(_a78,_a79); +} +} +_a78=_a78||{}; +return this.each(function(){ +var _a7b=$.data(this,"datetimebox"); +if(_a7b){ +$.extend(_a7b.options,_a78); +}else{ +$.data(this,"datetimebox",{options:$.extend({},$.fn.datetimebox.defaults,$.fn.datetimebox.parseOptions(this),_a78)}); +} +_a66(this); +}); +}; +$.fn.datetimebox.methods={options:function(jq){ +var _a7c=jq.datebox("options"); +return $.extend($.data(jq[0],"datetimebox").options,{originalValue:_a7c.originalValue,disabled:_a7c.disabled,readonly:_a7c.readonly}); +},cloneFrom:function(jq,from){ +return jq.each(function(){ +$(this).datebox("cloneFrom",from); +$.data(this,"datetimebox",{options:$.extend(true,{},$(from).datetimebox("options")),spinner:$(from).datetimebox("spinner")}); +$(this).removeClass("datebox-f").addClass("datetimebox-f"); +}); +},spinner:function(jq){ +return $.data(jq[0],"datetimebox").spinner; +},initValue:function(jq,_a7d){ +return jq.each(function(){ +var opts=$(this).datetimebox("options"); +var _a7e=opts.value; +if(_a7e){ +_a7e=opts.formatter.call(this,opts.parser.call(this,_a7e)); +} +$(this).combo("initValue",_a7e).combo("setText",_a7e); +}); +},setValue:function(jq,_a7f){ +return jq.each(function(){ +_a6f(this,_a7f); +}); +},reset:function(jq){ +return jq.each(function(){ +var opts=$(this).datetimebox("options"); +$(this).datetimebox("setValue",opts.originalValue); +}); +}}; +$.fn.datetimebox.parseOptions=function(_a80){ +var t=$(_a80); +return $.extend({},$.fn.datebox.parseOptions(_a80),$.parser.parseOptions(_a80,["timeSeparator","spinnerWidth",{showSeconds:"boolean"}])); +}; +$.fn.datetimebox.defaults=$.extend({},$.fn.datebox.defaults,{spinnerWidth:"100%",showSeconds:true,timeSeparator:":",keyHandler:{up:function(e){ +},down:function(e){ +},left:function(e){ +},right:function(e){ +},enter:function(e){ +_a70(this); +},query:function(q,e){ +_a6d(this,q); +}},buttons:[{text:function(_a81){ +return $(_a81).datetimebox("options").currentText; +},handler:function(_a82){ +var opts=$(_a82).datetimebox("options"); +_a6f(_a82,opts.formatter.call(_a82,new Date())); +$(_a82).datetimebox("hidePanel"); +}},{text:function(_a83){ +return $(_a83).datetimebox("options").okText; +},handler:function(_a84){ +_a70(_a84); +}},{text:function(_a85){ +return $(_a85).datetimebox("options").closeText; +},handler:function(_a86){ +$(_a86).datetimebox("hidePanel"); +}}],formatter:function(date){ +var h=date.getHours(); +var M=date.getMinutes(); +var s=date.getSeconds(); +function _a87(_a88){ +return (_a88<10?"0":"")+_a88; +}; +var _a89=$(this).datetimebox("spinner").timespinner("options").separator; +var r=$.fn.datebox.defaults.formatter(date)+" "+_a87(h)+_a89+_a87(M); +if($(this).datetimebox("options").showSeconds){ +r+=_a89+_a87(s); +} +return r; +},parser:function(s){ +if($.trim(s)==""){ +return new Date(); +} +var dt=s.split(" "); +var d=$.fn.datebox.defaults.parser(dt[0]); +if(dt.length<2){ +return d; +} +var _a8a=$(this).datetimebox("spinner").timespinner("options").separator; +var tt=dt[1].split(_a8a); +var hour=parseInt(tt[0],10)||0; +var _a8b=parseInt(tt[1],10)||0; +var _a8c=parseInt(tt[2],10)||0; +return new Date(d.getFullYear(),d.getMonth(),d.getDate(),hour,_a8b,_a8c); +}}); +})(jQuery); +(function($){ +function init(_a8d){ +var _a8e=$("
                                                    "+"
                                                    "+""+""+"
                                                    "+"
                                                    "+"
                                                    "+"
                                                    "+""+"
                                                    ").insertAfter(_a8d); +var t=$(_a8d); +t.addClass("slider-f").hide(); +var name=t.attr("name"); +if(name){ +_a8e.find("input.slider-value").attr("name",name); +t.removeAttr("name").attr("sliderName",name); +} +_a8e.bind("_resize",function(e,_a8f){ +if($(this).hasClass("easyui-fluid")||_a8f){ +_a90(_a8d); +} +return false; +}); +return _a8e; +}; +function _a90(_a91,_a92){ +var _a93=$.data(_a91,"slider"); +var opts=_a93.options; +var _a94=_a93.slider; +if(_a92){ +if(_a92.width){ +opts.width=_a92.width; +} +if(_a92.height){ +opts.height=_a92.height; +} +} +_a94._size(opts); +if(opts.mode=="h"){ +_a94.css("height",""); +_a94.children("div").css("height",""); +}else{ +_a94.css("width",""); +_a94.children("div").css("width",""); +_a94.children("div.slider-rule,div.slider-rulelabel,div.slider-inner")._outerHeight(_a94._outerHeight()); +} +_a95(_a91); +}; +function _a96(_a97){ +var _a98=$.data(_a97,"slider"); +var opts=_a98.options; +var _a99=_a98.slider; +var aa=opts.mode=="h"?opts.rule:opts.rule.slice(0).reverse(); +if(opts.reversed){ +aa=aa.slice(0).reverse(); +} +_a9a(aa); +function _a9a(aa){ +var rule=_a99.find("div.slider-rule"); +var _a9b=_a99.find("div.slider-rulelabel"); +rule.empty(); +_a9b.empty(); +for(var i=0;i
                                                    ").appendTo(rule); +span.css((opts.mode=="h"?"left":"top"),_a9c); +if(aa[i]!="|"){ +span=$("").appendTo(_a9b); +span.html(aa[i]); +if(opts.mode=="h"){ +span.css({left:_a9c,marginLeft:-Math.round(span.outerWidth()/2)}); +}else{ +span.css({top:_a9c,marginTop:-Math.round(span.outerHeight()/2)}); +} +} +} +}; +}; +function _a9d(_a9e){ +var _a9f=$.data(_a9e,"slider"); +var opts=_a9f.options; +var _aa0=_a9f.slider; +_aa0.removeClass("slider-h slider-v slider-disabled"); +_aa0.addClass(opts.mode=="h"?"slider-h":"slider-v"); +_aa0.addClass(opts.disabled?"slider-disabled":""); +var _aa1=_aa0.find(".slider-inner"); +_aa1.html(""+""); +if(opts.range){ +_aa1.append(""+""); +} +_aa0.find("a.slider-handle").draggable({axis:opts.mode,cursor:"pointer",disabled:opts.disabled,onDrag:function(e){ +var left=e.data.left; +var _aa2=_aa0.width(); +if(opts.mode!="h"){ +left=e.data.top; +_aa2=_aa0.height(); +} +if(left<0||left>_aa2){ +return false; +}else{ +_aa3(left,this); +return false; +} +},onStartDrag:function(){ +_a9f.isDragging=true; +opts.onSlideStart.call(_a9e,opts.value); +},onStopDrag:function(e){ +_aa3(opts.mode=="h"?e.data.left:e.data.top,this); +opts.onSlideEnd.call(_a9e,opts.value); +opts.onComplete.call(_a9e,opts.value); +_a9f.isDragging=false; +}}); +_aa0.find("div.slider-inner").unbind(".slider").bind("mousedown.slider",function(e){ +if(_a9f.isDragging||opts.disabled){ +return; +} +var pos=$(this).offset(); +_aa3(opts.mode=="h"?(e.pageX-pos.left):(e.pageY-pos.top)); +opts.onComplete.call(_a9e,opts.value); +}); +function _aa3(pos,_aa4){ +var _aa5=_aa6(_a9e,pos); +var s=Math.abs(_aa5%opts.step); +if(s0; +if(_aa5<=v2&&_aa7){ +v1=_aa5; +}else{ +if(_aa5>=v1&&(!_aa7)){ +v2=_aa5; +} +} +}else{ +if(_aa5v2){ +v2=_aa5; +}else{ +_aa5opts.max){ +_aaf=opts.max; +} +var _ab0=$("").appendTo(_aac); +_ab0.attr("name",name); +_ab0.val(_aaf); +_aae.push(_aaf); +var _ab1=_aac.find(".slider-handle:eq("+i+")"); +var tip=_ab1.next(); +var pos=_ab2(_aa9,_aaf); +if(opts.showTip){ +tip.show(); +tip.html(opts.tipFormatter.call(_aa9,_aaf)); +}else{ +tip.hide(); +} +if(opts.mode=="h"){ +var _ab3="left:"+pos+"px;"; +_ab1.attr("style",_ab3); +tip.attr("style",_ab3+"margin-left:"+(-Math.round(tip.outerWidth()/2))+"px"); +}else{ +var _ab3="top:"+pos+"px;"; +_ab1.attr("style",_ab3); +tip.attr("style",_ab3+"margin-left:"+(-Math.round(tip.outerWidth()))+"px"); +} +} +opts.value=opts.range?_aae:_aae[0]; +$(_aa9).val(opts.range?_aae.join(opts.separator):_aae[0]); +if(_aad.join(",")!=_aae.join(",")){ +opts.onChange.call(_aa9,opts.value,(opts.range?_aad:_aad[0])); +} +}; +function _a95(_ab4){ +var opts=$.data(_ab4,"slider").options; +var fn=opts.onChange; +opts.onChange=function(){ +}; +_aa8(_ab4,opts.value); +opts.onChange=fn; +}; +function _ab2(_ab5,_ab6){ +var _ab7=$.data(_ab5,"slider"); +var opts=_ab7.options; +var _ab8=_ab7.slider; +var size=opts.mode=="h"?_ab8.width():_ab8.height(); +var pos=opts.converter.toPosition.call(_ab5,_ab6,size); +if(opts.mode=="v"){ +pos=_ab8.height()-pos; +} +if(opts.reversed){ +pos=size-pos; +} +return pos.toFixed(0); +}; +function _aa6(_ab9,pos){ +var _aba=$.data(_ab9,"slider"); +var opts=_aba.options; +var _abb=_aba.slider; +var size=opts.mode=="h"?_abb.width():_abb.height(); +var pos=opts.mode=="h"?(opts.reversed?(size-pos):pos):(opts.reversed?pos:(size-pos)); +var _abc=opts.converter.toValue.call(_ab9,pos,size); +return _abc.toFixed(0); +}; +$.fn.slider=function(_abd,_abe){ +if(typeof _abd=="string"){ +return $.fn.slider.methods[_abd](this,_abe); +} +_abd=_abd||{}; +return this.each(function(){ +var _abf=$.data(this,"slider"); +if(_abf){ +$.extend(_abf.options,_abd); +}else{ +_abf=$.data(this,"slider",{options:$.extend({},$.fn.slider.defaults,$.fn.slider.parseOptions(this),_abd),slider:init(this)}); +$(this).removeAttr("disabled"); +} +var opts=_abf.options; +opts.min=parseFloat(opts.min); +opts.max=parseFloat(opts.max); +if(opts.range){ +if(!$.isArray(opts.value)){ +opts.value=$.map(String(opts.value).split(opts.separator),function(v){ +return parseFloat(v); +}); +} +if(opts.value.length<2){ +opts.value.push(opts.max); +} +}else{ +opts.value=parseFloat(opts.value); +} +opts.step=parseFloat(opts.step); +opts.originalValue=opts.value; +_a9d(this); +_a96(this); +_a90(this); +}); +}; +$.fn.slider.methods={options:function(jq){ +return $.data(jq[0],"slider").options; +},destroy:function(jq){ +return jq.each(function(){ +$.data(this,"slider").slider.remove(); +$(this).remove(); +}); +},resize:function(jq,_ac0){ +return jq.each(function(){ +_a90(this,_ac0); +}); +},getValue:function(jq){ +return jq.slider("options").value; +},getValues:function(jq){ +return jq.slider("options").value; +},setValue:function(jq,_ac1){ +return jq.each(function(){ +_aa8(this,[_ac1]); +}); +},setValues:function(jq,_ac2){ +return jq.each(function(){ +_aa8(this,_ac2); +}); +},clear:function(jq){ +return jq.each(function(){ +var opts=$(this).slider("options"); +_aa8(this,opts.range?[opts.min,opts.max]:[opts.min]); +}); +},reset:function(jq){ +return jq.each(function(){ +var opts=$(this).slider("options"); +$(this).slider(opts.range?"setValues":"setValue",opts.originalValue); +}); +},enable:function(jq){ +return jq.each(function(){ +$.data(this,"slider").options.disabled=false; +_a9d(this); +}); +},disable:function(jq){ +return jq.each(function(){ +$.data(this,"slider").options.disabled=true; +_a9d(this); +}); +}}; +$.fn.slider.parseOptions=function(_ac3){ +var t=$(_ac3); +return $.extend({},$.parser.parseOptions(_ac3,["width","height","mode",{reversed:"boolean",showTip:"boolean",range:"boolean",min:"number",max:"number",step:"number"}]),{value:(t.val()||undefined),disabled:(t.attr("disabled")?true:undefined),rule:(t.attr("rule")?eval(t.attr("rule")):undefined)}); +}; +$.fn.slider.defaults={width:"auto",height:"auto",mode:"h",reversed:false,showTip:false,disabled:false,range:false,value:0,separator:",",min:0,max:100,step:1,rule:[],tipFormatter:function(_ac4){ +return _ac4; +},converter:{toPosition:function(_ac5,size){ +var opts=$(this).slider("options"); +return (_ac5-opts.min)/(opts.max-opts.min)*size; +},toValue:function(pos,size){ +var opts=$(this).slider("options"); +return opts.min+(opts.max-opts.min)*(pos/size); +}},onChange:function(_ac6,_ac7){ +},onSlideStart:function(_ac8){ +},onSlideEnd:function(_ac9){ +},onComplete:function(_aca){ +}}; +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/jquery.easyui.mobile.js b/src/main/webapp/jquery-easyui-1.4.4/jquery.easyui.mobile.js new file mode 100644 index 0000000..2f6eacf --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/jquery.easyui.mobile.js @@ -0,0 +1,137 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +$.fn.navpanel=function(_1,_2){ +if(typeof _1=="string"){ +var _3=$.fn.navpanel.methods[_1]; +return _3?_3(this,_2):this.panel(_1,_2); +}else{ +_1=_1||{}; +return this.each(function(){ +var _4=$.data(this,"navpanel"); +if(_4){ +$.extend(_4.options,_1); +}else{ +_4=$.data(this,"navpanel",{options:$.extend({},$.fn.navpanel.defaults,$.fn.navpanel.parseOptions(this,_1))}); +} +$(this).panel(_4.options); +}); +} +}; +$.fn.navpanel.methods={options:function(jq){ +return $.data(jq[0],"navpanel").options; +}}; +$.fn.navpanel.parseOptions=function(_5){ +return $.extend({},$.fn.panel.parseOptions(_5),$.parser.parseOptions(_5,[])); +}; +$.fn.navpanel.defaults=$.extend({},$.fn.panel.defaults,{fit:true,border:false,cls:"navpanel"}); +$.parser.plugins.push("navpanel"); +})(jQuery); +(function($){ +$(function(){ +$.mobile.init(); +}); +$.mobile={defaults:{animation:"slide",direction:"left",reverseDirections:{up:"down",down:"up",left:"right",right:"left"}},panels:[],init:function(_6){ +$.mobile.panels=[]; +var _7=$(_6||"body").children(".navpanel:visible"); +if(_7.length){ +_7.not(":first").children(".panel-body").navpanel("close"); +var p=_7.eq(0).children(".panel-body"); +$.mobile.panels.push({panel:p,animation:$.mobile.defaults.animation,direction:$.mobile.defaults.direction}); +} +$(document).unbind(".mobile").bind("click.mobile",function(e){ +var a=$(e.target).closest("a"); +if(a.length){ +var _8=$.parser.parseOptions(a[0],["animation","direction",{back:"boolean"}]); +if(_8.back){ +$.mobile.back(); +e.preventDefault(); +}else{ +var _9=$.trim(a.attr("href")); +if(/^#/.test(_9)){ +var to=$(_9); +if(to.length&&to.hasClass("panel-body")){ +$.mobile.go(to,_8.animation,_8.direction); +e.preventDefault(); +} +} +} +} +}); +$(window).unbind(".mobile").bind("hashchange.mobile",function(){ +var _a=$.mobile.panels.length; +if(_a>1){ +var _b=location.hash; +var p=$.mobile.panels[_a-2]; +if(!_b||_b=="#&"+p.panel.attr("id")){ +$.mobile._back(); +} +} +}); +},nav:function(_c,to,_d,_e){ +if(window.WebKitAnimationEvent){ +_d=_d!=undefined?_d:$.mobile.defaults.animation; +_e=_e!=undefined?_e:$.mobile.defaults.direction; +var _f="m-"+_d+(_e?"-"+_e:""); +var p1=$(_c).panel("open").panel("resize").panel("panel"); +var p2=$(to).panel("open").panel("resize").panel("panel"); +p1.add(p2).bind("webkitAnimationEnd",function(){ +$(this).unbind("webkitAnimationEnd"); +var p=$(this).children(".panel-body"); +if($(this).hasClass("m-in")){ +p.panel("open").panel("resize"); +}else{ +p.panel("close"); +} +$(this).removeClass(_f+" m-in m-out"); +}); +p2.addClass(_f+" m-in"); +p1.addClass(_f+" m-out"); +}else{ +$(to).panel("open").panel("resize"); +$(_c).panel("close"); +} +},_go:function(_10,_11,_12){ +_11=_11!=undefined?_11:$.mobile.defaults.animation; +_12=_12!=undefined?_12:$.mobile.defaults.direction; +var _13=$.mobile.panels[$.mobile.panels.length-1].panel; +var to=$(_10); +if(_13[0]!=to[0]){ +$.mobile.nav(_13,to,_11,_12); +$.mobile.panels.push({panel:to,animation:_11,direction:_12}); +} +},_back:function(){ +if($.mobile.panels.length<2){ +return; +} +var p1=$.mobile.panels.pop(); +var p2=$.mobile.panels[$.mobile.panels.length-1]; +var _14=p1.animation; +var _15=$.mobile.defaults.reverseDirections[p1.direction]||""; +$.mobile.nav(p1.panel,p2.panel,_14,_15); +},go:function(_16,_17,_18){ +_17=_17!=undefined?_17:$.mobile.defaults.animation; +_18=_18!=undefined?_18:$.mobile.defaults.direction; +location.hash="#&"+$(_16).attr("id"); +$.mobile._go(_16,_17,_18); +},back:function(){ +history.go(-1); +}}; +$.map(["validatebox","textbox","filebox","searchbox","combo","combobox","combogrid","combotree","datebox","datetimebox","numberbox","spinner","numberspinner","timespinner","datetimespinner"],function(_19){ +if($.fn[_19]){ +$.extend($.fn[_19].defaults,{height:32,iconWidth:28,tipPosition:"bottom"}); +} +}); +$.map(["spinner","numberspinner","timespinner","datetimespinner"],function(_1a){ +$.extend($.fn[_1a].defaults,{height:32,iconWidth:56}); +}); +$.extend($.fn.menu.defaults,{itemHeight:30,noline:true}); +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/jquery.min.js b/src/main/webapp/jquery-easyui-1.4.4/jquery.min.js new file mode 100644 index 0000000..0f60b7b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/jquery.min.js @@ -0,0 +1,5 @@ +/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; + +return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&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 m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
                                                    a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/\s*$/g,ra={option:[1,""],legend:[1,"
                                                    ","
                                                    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
                                                    "],tr:[2,"","
                                                    "],col:[2,"","
                                                    "],td:[3,"","
                                                    "],_default:k.htmlSerialize?[0,"",""]:[1,"X
                                                    ","
                                                    "]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?""!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("").appendTo("body"); +_7.attr("src",window.ActiveXObject?"javascript:false":"about:blank"); +_7.css({position:"absolute",top:-1000,left:-1000}); +_7.bind("load",cb); +_8(_5); +function _8(_9){ +var _a=$(_2); +if(_4.url){ +_a.attr("action",_4.url); +} +var t=_a.attr("target"),a=_a.attr("action"); +_a.attr("target",_6); +var _b=$(); +try{ +for(var n in _9){ +var _c=$("").val(_9[n]).appendTo(_a); +_b=_b.add(_c); +} +_d(); +_a[0].submit(); +} +finally{ +_a.attr("action",a); +t?_a.attr("target",t):_a.removeAttr("target"); +_b.remove(); +} +}; +function _d(){ +var f=$("#"+_6); +if(!f.length){ +return; +} +try{ +var s=f.contents()[0].readyState; +if(s&&s.toLowerCase()=="uninitialized"){ +setTimeout(_d,100); +} +} +catch(e){ +cb(); +} +}; +var _e=10; +function cb(){ +var f=$("#"+_6); +if(!f.length){ +return; +} +f.unbind(); +var _f=""; +try{ +var _10=f.contents().find("body"); +_f=_10.html(); +if(_f==""){ +if(--_e){ +setTimeout(cb,100); +return; +} +} +var ta=_10.find(">textarea"); +if(ta.length){ +_f=ta.val(); +}else{ +var pre=_10.find(">pre"); +if(pre.length){ +_f=pre.html(); +} +} +} +catch(e){ +} +_4.success(_f); +setTimeout(function(){ +f.unbind(); +f.remove(); +},100); +}; +}; +function _11(_12,_13){ +var _14=$.data(_12,"form").options; +if(typeof _13=="string"){ +var _15={}; +if(_14.onBeforeLoad.call(_12,_15)==false){ +return; +} +$.ajax({url:_13,data:_15,dataType:"json",success:function(_16){ +_17(_16); +},error:function(){ +_14.onLoadError.apply(_12,arguments); +}}); +}else{ +_17(_13); +} +function _17(_18){ +var _19=$(_12); +for(var _1a in _18){ +var val=_18[_1a]; +if(!_1b(_1a,val)){ +if(!_1c(_1a,val)){ +_19.find("input[name=\""+_1a+"\"]").val(val); +_19.find("textarea[name=\""+_1a+"\"]").val(val); +_19.find("select[name=\""+_1a+"\"]").val(val); +} +} +} +_14.onLoadSuccess.call(_12,_18); +_19.form("validate"); +}; +function _1b(_1d,val){ +var cc=$(_12).find("[switchbuttonName=\""+_1d+"\"]"); +if(cc.length){ +cc.switchbutton("uncheck"); +cc.each(function(){ +if(_1e($(this).switchbutton("options").value,val)){ +$(this).switchbutton("check"); +} +}); +return true; +} +cc=$(_12).find("input[name=\""+_1d+"\"][type=radio], input[name=\""+_1d+"\"][type=checkbox]"); +if(cc.length){ +cc._propAttr("checked",false); +cc.each(function(){ +if(_1e($(this).val(),val)){ +$(this)._propAttr("checked",true); +} +}); +return true; +} +return false; +}; +function _1e(v,val){ +if(v==String(val)||$.inArray(v,$.isArray(val)?val:[val])>=0){ +return true; +}else{ +return false; +} +}; +function _1c(_1f,val){ +var _20=$(_12).find("[textboxName=\""+_1f+"\"],[sliderName=\""+_1f+"\"]"); +if(_20.length){ +for(var i=0;i<_14.fieldTypes.length;i++){ +var _21=_14.fieldTypes[i]; +var _22=_20.data(_21); +if(_22){ +if(_22.options.multiple||_22.options.range){ +_20[_21]("setValues",val); +}else{ +_20[_21]("setValue",val); +} +return true; +} +} +} +return false; +}; +}; +function _23(_24){ +$("input,select,textarea",_24).each(function(){ +var t=this.type,tag=this.tagName.toLowerCase(); +if(t=="text"||t=="hidden"||t=="password"||tag=="textarea"){ +this.value=""; +}else{ +if(t=="file"){ +var _25=$(this); +if(!_25.hasClass("textbox-value")){ +var _26=_25.clone().val(""); +_26.insertAfter(_25); +if(_25.data("validatebox")){ +_25.validatebox("destroy"); +_26.validatebox(); +}else{ +_25.remove(); +} +} +}else{ +if(t=="checkbox"||t=="radio"){ +this.checked=false; +}else{ +if(tag=="select"){ +this.selectedIndex=-1; +} +} +} +} +}); +var _27=$(_24); +var _28=$.data(_24,"form").options; +for(var i=_28.fieldTypes.length-1;i>=0;i--){ +var _29=_28.fieldTypes[i]; +var _2a=_27.find("."+_29+"-f"); +if(_2a.length&&_2a[_29]){ +_2a[_29]("clear"); +} +} +_27.form("validate"); +}; +function _2b(_2c){ +_2c.reset(); +var _2d=$(_2c); +var _2e=$.data(_2c,"form").options; +for(var i=_2e.fieldTypes.length-1;i>=0;i--){ +var _2f=_2e.fieldTypes[i]; +var _30=_2d.find("."+_2f+"-f"); +if(_30.length&&_30[_2f]){ +_30[_2f]("reset"); +} +} +_2d.form("validate"); +}; +function _31(_32){ +var _33=$.data(_32,"form").options; +$(_32).unbind(".form"); +if(_33.ajax){ +$(_32).bind("submit.form",function(){ +setTimeout(function(){ +_1(_32,_33); +},0); +return false; +}); +} +$(_32).bind("_change.form",function(e,t){ +_33.onChange.call(this,t); +}).bind("change.form",function(e){ +var t=e.target; +if(!$(t).hasClass("textbox-text")){ +_33.onChange.call(this,t); +} +}); +_34(_32,_33.novalidate); +}; +function _35(_36,_37){ +_37=_37||{}; +var _38=$.data(_36,"form"); +if(_38){ +$.extend(_38.options,_37); +}else{ +$.data(_36,"form",{options:$.extend({},$.fn.form.defaults,$.fn.form.parseOptions(_36),_37)}); +} +}; +function _39(_3a){ +if($.fn.validatebox){ +var t=$(_3a); +t.find(".validatebox-text:not(:disabled)").validatebox("validate"); +var _3b=t.find(".validatebox-invalid"); +_3b.filter(":not(:disabled):first").focus(); +return _3b.length==0; +} +return true; +}; +function _34(_3c,_3d){ +var _3e=$.data(_3c,"form").options; +_3e.novalidate=_3d; +$(_3c).find(".validatebox-text:not(:disabled)").validatebox(_3d?"disableValidation":"enableValidation"); +}; +$.fn.form=function(_3f,_40){ +if(typeof _3f=="string"){ +this.each(function(){ +_35(this); +}); +return $.fn.form.methods[_3f](this,_40); +} +return this.each(function(){ +_35(this,_3f); +_31(this); +}); +}; +$.fn.form.methods={options:function(jq){ +return $.data(jq[0],"form").options; +},submit:function(jq,_41){ +return jq.each(function(){ +_1(this,_41); +}); +},load:function(jq,_42){ +return jq.each(function(){ +_11(this,_42); +}); +},clear:function(jq){ +return jq.each(function(){ +_23(this); +}); +},reset:function(jq){ +return jq.each(function(){ +_2b(this); +}); +},validate:function(jq){ +return _39(jq[0]); +},disableValidation:function(jq){ +return jq.each(function(){ +_34(this,true); +}); +},enableValidation:function(jq){ +return jq.each(function(){ +_34(this,false); +}); +}}; +$.fn.form.parseOptions=function(_43){ +var t=$(_43); +return $.extend({},$.parser.parseOptions(_43,[{ajax:"boolean"}]),{url:(t.attr("action")?t.attr("action"):undefined)}); +}; +$.fn.form.defaults={fieldTypes:["combobox","combotree","combogrid","datetimebox","datebox","combo","datetimespinner","timespinner","numberspinner","spinner","slider","searchbox","numberbox","textbox","switchbutton"],novalidate:false,ajax:true,url:null,queryParams:{},onSubmit:function(_44){ +return $(this).form("validate"); +},success:function(_45){ +},onBeforeLoad:function(_46){ +},onLoadSuccess:function(_47){ +},onLoadError:function(){ +},onChange:function(_48){ +}}; +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.layout.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.layout.js new file mode 100644 index 0000000..5cb4b6a --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.layout.js @@ -0,0 +1,483 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +var _1=false; +function _2(_3,_4){ +var _5=$.data(_3,"layout"); +var _6=_5.options; +var _7=_5.panels; +var cc=$(_3); +if(_4){ +$.extend(_6,{width:_4.width,height:_4.height}); +} +if(_3.tagName.toLowerCase()=="body"){ +cc._size("fit"); +}else{ +cc._size(_6); +} +var _8={top:0,left:0,width:cc.width(),height:cc.height()}; +_9(_a(_7.expandNorth)?_7.expandNorth:_7.north,"n"); +_9(_a(_7.expandSouth)?_7.expandSouth:_7.south,"s"); +_b(_a(_7.expandEast)?_7.expandEast:_7.east,"e"); +_b(_a(_7.expandWest)?_7.expandWest:_7.west,"w"); +_7.center.panel("resize",_8); +function _9(pp,_c){ +if(!pp.length||!_a(pp)){ +return; +} +var _d=pp.panel("options"); +pp.panel("resize",{width:cc.width(),height:_d.height}); +var _e=pp.panel("panel").outerHeight(); +pp.panel("move",{left:0,top:(_c=="n"?0:cc.height()-_e)}); +_8.height-=_e; +if(_c=="n"){ +_8.top+=_e; +if(!_d.split&&_d.border){ +_8.top--; +} +} +if(!_d.split&&_d.border){ +_8.height++; +} +}; +function _b(pp,_f){ +if(!pp.length||!_a(pp)){ +return; +} +var _10=pp.panel("options"); +pp.panel("resize",{width:_10.width,height:_8.height}); +var _11=pp.panel("panel").outerWidth(); +pp.panel("move",{left:(_f=="e"?cc.width()-_11:0),top:_8.top}); +_8.width-=_11; +if(_f=="w"){ +_8.left+=_11; +if(!_10.split&&_10.border){ +_8.left--; +} +} +if(!_10.split&&_10.border){ +_8.width++; +} +}; +}; +function _12(_13){ +var cc=$(_13); +cc.addClass("layout"); +function _14(cc){ +var _15=cc.layout("options"); +var _16=_15.onAdd; +_15.onAdd=function(){ +}; +cc.children("div").each(function(){ +var _17=$.fn.layout.parsePanelOptions(this); +if("north,south,east,west,center".indexOf(_17.region)>=0){ +_19(_13,_17,this); +} +}); +_15.onAdd=_16; +}; +cc.children("form").length?_14(cc.children("form")):_14(cc); +cc.append("
                                                    "); +cc.bind("_resize",function(e,_18){ +if($(this).hasClass("easyui-fluid")||_18){ +_2(_13); +} +return false; +}); +}; +function _19(_1a,_1b,el){ +_1b.region=_1b.region||"center"; +var _1c=$.data(_1a,"layout").panels; +var cc=$(_1a); +var dir=_1b.region; +if(_1c[dir].length){ +return; +} +var pp=$(el); +if(!pp.length){ +pp=$("
                                                    ").appendTo(cc); +} +var _1d=$.extend({},$.fn.layout.paneldefaults,{width:(pp.length?parseInt(pp[0].style.width)||pp.outerWidth():"auto"),height:(pp.length?parseInt(pp[0].style.height)||pp.outerHeight():"auto"),doSize:false,collapsible:true,onOpen:function(){ +var _1e=$(this).panel("header").children("div.panel-tool"); +_1e.children("a.panel-tool-collapse").hide(); +var _1f={north:"up",south:"down",east:"right",west:"left"}; +if(!_1f[dir]){ +return; +} +var _20="layout-button-"+_1f[dir]; +var t=_1e.children("a."+_20); +if(!t.length){ +t=$("").addClass(_20).appendTo(_1e); +t.bind("click",{dir:dir},function(e){ +_2d(_1a,e.data.dir); +return false; +}); +} +$(this).panel("options").collapsible?t.show():t.hide(); +}},_1b,{cls:((_1b.cls||"")+" layout-panel layout-panel-"+dir),bodyCls:((_1b.bodyCls||"")+" layout-body")}); +pp.panel(_1d); +_1c[dir]=pp; +var _21={north:"s",south:"n",east:"w",west:"e"}; +var _22=pp.panel("panel"); +if(pp.panel("options").split){ +_22.addClass("layout-split-"+dir); +} +_22.resizable($.extend({},{handles:(_21[dir]||""),disabled:(!pp.panel("options").split),onStartResize:function(e){ +_1=true; +if(dir=="north"||dir=="south"){ +var _23=$(">div.layout-split-proxy-v",_1a); +}else{ +var _23=$(">div.layout-split-proxy-h",_1a); +} +var top=0,_24=0,_25=0,_26=0; +var pos={display:"block"}; +if(dir=="north"){ +pos.top=parseInt(_22.css("top"))+_22.outerHeight()-_23.height(); +pos.left=parseInt(_22.css("left")); +pos.width=_22.outerWidth(); +pos.height=_23.height(); +}else{ +if(dir=="south"){ +pos.top=parseInt(_22.css("top")); +pos.left=parseInt(_22.css("left")); +pos.width=_22.outerWidth(); +pos.height=_23.height(); +}else{ +if(dir=="east"){ +pos.top=parseInt(_22.css("top"))||0; +pos.left=parseInt(_22.css("left"))||0; +pos.width=_23.width(); +pos.height=_22.outerHeight(); +}else{ +if(dir=="west"){ +pos.top=parseInt(_22.css("top"))||0; +pos.left=_22.outerWidth()-_23.width(); +pos.width=_23.width(); +pos.height=_22.outerHeight(); +} +} +} +} +_23.css(pos); +$("
                                                    ").css({left:0,top:0,width:cc.width(),height:cc.height()}).appendTo(cc); +},onResize:function(e){ +if(dir=="north"||dir=="south"){ +var _27=$(">div.layout-split-proxy-v",_1a); +_27.css("top",e.pageY-$(_1a).offset().top-_27.height()/2); +}else{ +var _27=$(">div.layout-split-proxy-h",_1a); +_27.css("left",e.pageX-$(_1a).offset().left-_27.width()/2); +} +return false; +},onStopResize:function(e){ +cc.children("div.layout-split-proxy-v,div.layout-split-proxy-h").hide(); +pp.panel("resize",e.data); +_2(_1a); +_1=false; +cc.find(">div.layout-mask").remove(); +}},_1b)); +cc.layout("options").onAdd.call(_1a,dir); +}; +function _28(_29,_2a){ +var _2b=$.data(_29,"layout").panels; +if(_2b[_2a].length){ +_2b[_2a].panel("destroy"); +_2b[_2a]=$(); +var _2c="expand"+_2a.substring(0,1).toUpperCase()+_2a.substring(1); +if(_2b[_2c]){ +_2b[_2c].panel("destroy"); +_2b[_2c]=undefined; +} +$(_29).layout("options").onRemove.call(_29,_2a); +} +}; +function _2d(_2e,_2f,_30){ +if(_30==undefined){ +_30="normal"; +} +var _31=$.data(_2e,"layout").panels; +var p=_31[_2f]; +var _32=p.panel("options"); +if(_32.onBeforeCollapse.call(p)==false){ +return; +} +var _33="expand"+_2f.substring(0,1).toUpperCase()+_2f.substring(1); +if(!_31[_33]){ +_31[_33]=_34(_2f); +var ep=_31[_33].panel("panel"); +if(!_32.expandMode){ +ep.css("cursor","default"); +}else{ +ep.bind("click",function(){ +if(_32.expandMode=="dock"){ +_41(_2e,_2f); +}else{ +p.panel("expand",false).panel("open"); +var _35=_36(); +p.panel("resize",_35.collapse); +p.panel("panel").animate(_35.expand,function(){ +$(this).unbind(".layout").bind("mouseleave.layout",{region:_2f},function(e){ +if(_1==true){ +return; +} +if($("body>div.combo-p>div.combo-panel:visible").length){ +return; +} +_2d(_2e,e.data.region); +}); +$(_2e).layout("options").onExpand.call(_2e,_2f); +}); +} +return false; +}); +} +} +var _37=_36(); +if(!_a(_31[_33])){ +_31.center.panel("resize",_37.resizeC); +} +p.panel("panel").animate(_37.collapse,_30,function(){ +p.panel("collapse",false).panel("close"); +_31[_33].panel("open").panel("resize",_37.expandP); +$(this).unbind(".layout"); +$(_2e).layout("options").onCollapse.call(_2e,_2f); +}); +function _34(dir){ +var _38={"east":"left","west":"right","north":"down","south":"up"}; +var _39=(_32.region=="north"||_32.region=="south"); +var _3a="layout-button-"+_38[dir]; +var p=$("
                                                    ").appendTo(_2e); +p.panel($.extend({},$.fn.layout.paneldefaults,{cls:("layout-expand layout-expand-"+dir),title:" ",iconCls:(_32.hideCollapsedContent?null:_32.iconCls),closed:true,minWidth:0,minHeight:0,doSize:false,region:_32.region,collapsedSize:_32.collapsedSize,noheader:(!_39&&_32.hideExpandTool),tools:((_39&&_32.hideExpandTool)?null:[{iconCls:_3a,handler:function(){ +_41(_2e,_2f); +return false; +}}])})); +if(!_32.hideCollapsedContent){ +var _3b=typeof _32.collapsedContent=="function"?_32.collapsedContent.call(p[0],_32.title):_32.collapsedContent; +_39?p.panel("setTitle",_3b):p.html(_3b); +} +p.panel("panel").hover(function(){ +$(this).addClass("layout-expand-over"); +},function(){ +$(this).removeClass("layout-expand-over"); +}); +return p; +}; +function _36(){ +var cc=$(_2e); +var _3c=_31.center.panel("options"); +var _3d=_32.collapsedSize; +if(_2f=="east"){ +var _3e=p.panel("panel")._outerWidth(); +var _3f=_3c.width+_3e-_3d; +if(_32.split||!_32.border){ +_3f++; +} +return {resizeC:{width:_3f},expand:{left:cc.width()-_3e},expandP:{top:_3c.top,left:cc.width()-_3d,width:_3d,height:_3c.height},collapse:{left:cc.width(),top:_3c.top,height:_3c.height}}; +}else{ +if(_2f=="west"){ +var _3e=p.panel("panel")._outerWidth(); +var _3f=_3c.width+_3e-_3d; +if(_32.split||!_32.border){ +_3f++; +} +return {resizeC:{width:_3f,left:_3d-1},expand:{left:0},expandP:{left:0,top:_3c.top,width:_3d,height:_3c.height},collapse:{left:-_3e,top:_3c.top,height:_3c.height}}; +}else{ +if(_2f=="north"){ +var _40=p.panel("panel")._outerHeight(); +var hh=_3c.height; +if(!_a(_31.expandNorth)){ +hh+=_40-_3d+((_32.split||!_32.border)?1:0); +} +_31.east.add(_31.west).add(_31.expandEast).add(_31.expandWest).panel("resize",{top:_3d-1,height:hh}); +return {resizeC:{top:_3d-1,height:hh},expand:{top:0},expandP:{top:0,left:0,width:cc.width(),height:_3d},collapse:{top:-_40,width:cc.width()}}; +}else{ +if(_2f=="south"){ +var _40=p.panel("panel")._outerHeight(); +var hh=_3c.height; +if(!_a(_31.expandSouth)){ +hh+=_40-_3d+((_32.split||!_32.border)?1:0); +} +_31.east.add(_31.west).add(_31.expandEast).add(_31.expandWest).panel("resize",{height:hh}); +return {resizeC:{height:hh},expand:{top:cc.height()-_40},expandP:{top:cc.height()-_3d,left:0,width:cc.width(),height:_3d},collapse:{top:cc.height(),width:cc.width()}}; +} +} +} +} +}; +}; +function _41(_42,_43){ +var _44=$.data(_42,"layout").panels; +var p=_44[_43]; +var _45=p.panel("options"); +if(_45.onBeforeExpand.call(p)==false){ +return; +} +var _46="expand"+_43.substring(0,1).toUpperCase()+_43.substring(1); +if(_44[_46]){ +_44[_46].panel("close"); +p.panel("panel").stop(true,true); +p.panel("expand",false).panel("open"); +var _47=_48(); +p.panel("resize",_47.collapse); +p.panel("panel").animate(_47.expand,function(){ +_2(_42); +$(_42).layout("options").onExpand.call(_42,_43); +}); +} +function _48(){ +var cc=$(_42); +var _49=_44.center.panel("options"); +if(_43=="east"&&_44.expandEast){ +return {collapse:{left:cc.width(),top:_49.top,height:_49.height},expand:{left:cc.width()-p.panel("panel")._outerWidth()}}; +}else{ +if(_43=="west"&&_44.expandWest){ +return {collapse:{left:-p.panel("panel")._outerWidth(),top:_49.top,height:_49.height},expand:{left:0}}; +}else{ +if(_43=="north"&&_44.expandNorth){ +return {collapse:{top:-p.panel("panel")._outerHeight(),width:cc.width()},expand:{top:0}}; +}else{ +if(_43=="south"&&_44.expandSouth){ +return {collapse:{top:cc.height(),width:cc.width()},expand:{top:cc.height()-p.panel("panel")._outerHeight()}}; +} +} +} +} +}; +}; +function _a(pp){ +if(!pp){ +return false; +} +if(pp.length){ +return pp.panel("panel").is(":visible"); +}else{ +return false; +} +}; +function _4a(_4b){ +var _4c=$.data(_4b,"layout"); +var _4d=_4c.options; +var _4e=_4c.panels; +var _4f=_4d.onCollapse; +_4d.onCollapse=function(){ +}; +_50("east"); +_50("west"); +_50("north"); +_50("south"); +_4d.onCollapse=_4f; +function _50(_51){ +var p=_4e[_51]; +if(p.length&&p.panel("options").collapsed){ +_2d(_4b,_51,0); +} +}; +}; +function _52(_53,_54,_55){ +var p=$(_53).layout("panel",_54); +p.panel("options").split=_55; +var cls="layout-split-"+_54; +var _56=p.panel("panel").removeClass(cls); +if(_55){ +_56.addClass(cls); +} +_56.resizable({disabled:(!_55)}); +_2(_53); +}; +$.fn.layout=function(_57,_58){ +if(typeof _57=="string"){ +return $.fn.layout.methods[_57](this,_58); +} +_57=_57||{}; +return this.each(function(){ +var _59=$.data(this,"layout"); +if(_59){ +$.extend(_59.options,_57); +}else{ +var _5a=$.extend({},$.fn.layout.defaults,$.fn.layout.parseOptions(this),_57); +$.data(this,"layout",{options:_5a,panels:{center:$(),north:$(),south:$(),east:$(),west:$()}}); +_12(this); +} +_2(this); +_4a(this); +}); +}; +$.fn.layout.methods={options:function(jq){ +return $.data(jq[0],"layout").options; +},resize:function(jq,_5b){ +return jq.each(function(){ +_2(this,_5b); +}); +},panel:function(jq,_5c){ +return $.data(jq[0],"layout").panels[_5c]; +},collapse:function(jq,_5d){ +return jq.each(function(){ +_2d(this,_5d); +}); +},expand:function(jq,_5e){ +return jq.each(function(){ +_41(this,_5e); +}); +},add:function(jq,_5f){ +return jq.each(function(){ +_19(this,_5f); +_2(this); +if($(this).layout("panel",_5f.region).panel("options").collapsed){ +_2d(this,_5f.region,0); +} +}); +},remove:function(jq,_60){ +return jq.each(function(){ +_28(this,_60); +_2(this); +}); +},split:function(jq,_61){ +return jq.each(function(){ +_52(this,_61,true); +}); +},unsplit:function(jq,_62){ +return jq.each(function(){ +_52(this,_62,false); +}); +}}; +$.fn.layout.parseOptions=function(_63){ +return $.extend({},$.parser.parseOptions(_63,[{fit:"boolean"}])); +}; +$.fn.layout.defaults={fit:false,onExpand:function(_64){ +},onCollapse:function(_65){ +},onAdd:function(_66){ +},onRemove:function(_67){ +}}; +$.fn.layout.parsePanelOptions=function(_68){ +var t=$(_68); +return $.extend({},$.fn.panel.parseOptions(_68),$.parser.parseOptions(_68,["region",{split:"boolean",collpasedSize:"number",minWidth:"number",minHeight:"number",maxWidth:"number",maxHeight:"number"}])); +}; +$.fn.layout.paneldefaults=$.extend({},$.fn.panel.defaults,{region:null,split:false,collapsedSize:28,expandMode:"float",hideExpandTool:false,hideCollapsedContent:true,collapsedContent:function(_69){ +var p=$(this); +var _6a=p.panel("options"); +if(_6a.region=="north"||_6a.region=="south"){ +return _69; +} +var _6b=_6a.collapsedSize-2; +var _6c=(_6b-16)/2; +_6c=_6b-_6c; +var cc=[]; +if(_6a.iconCls){ +cc.push("
                                                    "); +} +cc.push("
                                                    "); +cc.push(_69); +cc.push("
                                                    "); +return cc.join(""); +},minWidth:10,minHeight:10,maxWidth:10000,maxHeight:10000}); +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.linkbutton.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.linkbutton.js new file mode 100644 index 0000000..421a115 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.linkbutton.js @@ -0,0 +1,184 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2,_3){ +var _4=$.data(_2,"linkbutton").options; +if(_3){ +$.extend(_4,_3); +} +if(_4.width||_4.height||_4.fit){ +var _5=$(_2); +var _6=_5.parent(); +var _7=_5.is(":visible"); +if(!_7){ +var _8=$("
                                                    ").insertBefore(_2); +var _9={position:_5.css("position"),display:_5.css("display"),left:_5.css("left")}; +_5.appendTo("body"); +_5.css({position:"absolute",display:"inline-block",left:-20000}); +} +_5._size(_4,_6); +var _a=_5.find(".l-btn-left"); +_a.css("margin-top",0); +_a.css("margin-top",parseInt((_5.height()-_a.height())/2)+"px"); +if(!_7){ +_5.insertAfter(_8); +_5.css(_9); +_8.remove(); +} +} +}; +function _b(_c){ +var _d=$.data(_c,"linkbutton").options; +var t=$(_c).empty(); +t.addClass("l-btn").removeClass("l-btn-plain l-btn-selected l-btn-plain-selected l-btn-outline"); +t.removeClass("l-btn-small l-btn-medium l-btn-large").addClass("l-btn-"+_d.size); +if(_d.plain){ +t.addClass("l-btn-plain"); +} +if(_d.outline){ +t.addClass("l-btn-outline"); +} +if(_d.selected){ +t.addClass(_d.plain?"l-btn-selected l-btn-plain-selected":"l-btn-selected"); +} +t.attr("group",_d.group||""); +t.attr("id",_d.id||""); +var _e=$("").appendTo(t); +if(_d.text){ +$("").html(_d.text).appendTo(_e); +}else{ +$(" ").appendTo(_e); +} +if(_d.iconCls){ +$(" ").addClass(_d.iconCls).appendTo(_e); +_e.addClass("l-btn-icon-"+_d.iconAlign); +} +t.unbind(".linkbutton").bind("focus.linkbutton",function(){ +if(!_d.disabled){ +$(this).addClass("l-btn-focus"); +} +}).bind("blur.linkbutton",function(){ +$(this).removeClass("l-btn-focus"); +}).bind("click.linkbutton",function(){ +if(!_d.disabled){ +if(_d.toggle){ +if(_d.selected){ +$(this).linkbutton("unselect"); +}else{ +$(this).linkbutton("select"); +} +} +_d.onClick.call(this); +} +}); +_f(_c,_d.selected); +_10(_c,_d.disabled); +}; +function _f(_11,_12){ +var _13=$.data(_11,"linkbutton").options; +if(_12){ +if(_13.group){ +$("a.l-btn[group=\""+_13.group+"\"]").each(function(){ +var o=$(this).linkbutton("options"); +if(o.toggle){ +$(this).removeClass("l-btn-selected l-btn-plain-selected"); +o.selected=false; +} +}); +} +$(_11).addClass(_13.plain?"l-btn-selected l-btn-plain-selected":"l-btn-selected"); +_13.selected=true; +}else{ +if(!_13.group){ +$(_11).removeClass("l-btn-selected l-btn-plain-selected"); +_13.selected=false; +} +} +}; +function _10(_14,_15){ +var _16=$.data(_14,"linkbutton"); +var _17=_16.options; +$(_14).removeClass("l-btn-disabled l-btn-plain-disabled"); +if(_15){ +_17.disabled=true; +var _18=$(_14).attr("href"); +if(_18){ +_16.href=_18; +$(_14).attr("href","javascript:void(0)"); +} +if(_14.onclick){ +_16.onclick=_14.onclick; +_14.onclick=null; +} +_17.plain?$(_14).addClass("l-btn-disabled l-btn-plain-disabled"):$(_14).addClass("l-btn-disabled"); +}else{ +_17.disabled=false; +if(_16.href){ +$(_14).attr("href",_16.href); +} +if(_16.onclick){ +_14.onclick=_16.onclick; +} +} +}; +$.fn.linkbutton=function(_19,_1a){ +if(typeof _19=="string"){ +return $.fn.linkbutton.methods[_19](this,_1a); +} +_19=_19||{}; +return this.each(function(){ +var _1b=$.data(this,"linkbutton"); +if(_1b){ +$.extend(_1b.options,_19); +}else{ +$.data(this,"linkbutton",{options:$.extend({},$.fn.linkbutton.defaults,$.fn.linkbutton.parseOptions(this),_19)}); +$(this).removeAttr("disabled"); +$(this).bind("_resize",function(e,_1c){ +if($(this).hasClass("easyui-fluid")||_1c){ +_1(this); +} +return false; +}); +} +_b(this); +_1(this); +}); +}; +$.fn.linkbutton.methods={options:function(jq){ +return $.data(jq[0],"linkbutton").options; +},resize:function(jq,_1d){ +return jq.each(function(){ +_1(this,_1d); +}); +},enable:function(jq){ +return jq.each(function(){ +_10(this,false); +}); +},disable:function(jq){ +return jq.each(function(){ +_10(this,true); +}); +},select:function(jq){ +return jq.each(function(){ +_f(this,true); +}); +},unselect:function(jq){ +return jq.each(function(){ +_f(this,false); +}); +}}; +$.fn.linkbutton.parseOptions=function(_1e){ +var t=$(_1e); +return $.extend({},$.parser.parseOptions(_1e,["id","iconCls","iconAlign","group","size","text",{plain:"boolean",toggle:"boolean",selected:"boolean",outline:"boolean"}]),{disabled:(t.attr("disabled")?true:undefined),text:($.trim(t.html())||undefined),iconCls:(t.attr("icon")||t.attr("iconCls"))}); +}; +$.fn.linkbutton.defaults={id:null,disabled:false,toggle:false,selected:false,outline:false,group:null,plain:false,text:"",iconCls:null,iconAlign:"left",size:"small",onClick:function(){ +}}; +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.menu.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.menu.js new file mode 100644 index 0000000..74e9425 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.menu.js @@ -0,0 +1,504 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +$(function(){ +$(document).unbind(".menu").bind("mousedown.menu",function(e){ +var m=$(e.target).closest("div.menu,div.combo-p"); +if(m.length){ +return; +} +$("body>div.menu-top:visible").not(".menu-inline").menu("hide"); +_1($("body>div.menu:visible").not(".menu-inline")); +}); +}); +function _2(_3){ +var _4=$.data(_3,"menu").options; +$(_3).addClass("menu-top"); +_4.inline?$(_3).addClass("menu-inline"):$(_3).appendTo("body"); +$(_3).bind("_resize",function(e,_5){ +if($(this).hasClass("easyui-fluid")||_5){ +$(_3).menu("resize",_3); +} +return false; +}); +var _6=_7($(_3)); +for(var i=0;i<_6.length;i++){ +_8(_6[i]); +} +function _7(_9){ +var _a=[]; +_9.addClass("menu"); +_a.push(_9); +if(!_9.hasClass("menu-content")){ +_9.children("div").each(function(){ +var _b=$(this).children("div"); +if(_b.length){ +_b.appendTo("body"); +this.submenu=_b; +var mm=_7(_b); +_a=_a.concat(mm); +} +}); +} +return _a; +}; +function _8(_c){ +var wh=$.parser.parseOptions(_c[0],["width","height"]); +_c[0].originalHeight=wh.height||0; +if(_c.hasClass("menu-content")){ +_c[0].originalWidth=wh.width||_c._outerWidth(); +}else{ +_c[0].originalWidth=wh.width||0; +_c.children("div").each(function(){ +var _d=$(this); +var _e=$.extend({},$.parser.parseOptions(this,["name","iconCls","href",{separator:"boolean"}]),{disabled:(_d.attr("disabled")?true:undefined)}); +if(_e.separator){ +_d.addClass("menu-sep"); +} +if(!_d.hasClass("menu-sep")){ +_d[0].itemName=_e.name||""; +_d[0].itemHref=_e.href||""; +var _f=_d.addClass("menu-item").html(); +_d.empty().append($("
                                                    ").html(_f)); +if(_e.iconCls){ +$("
                                                    ").addClass(_e.iconCls).appendTo(_d); +} +if(_e.disabled){ +_10(_3,_d[0],true); +} +if(_d[0].submenu){ +$("
                                                    ").appendTo(_d); +} +_11(_3,_d); +} +}); +$("
                                                    ").prependTo(_c); +} +_12(_3,_c); +if(!_c.hasClass("menu-inline")){ +_c.hide(); +} +_13(_3,_c); +}; +}; +function _12(_14,_15){ +var _16=$.data(_14,"menu").options; +var _17=_15.attr("style")||""; +_15.css({display:"block",left:-10000,height:"auto",overflow:"hidden"}); +_15.find(".menu-item").each(function(){ +$(this)._outerHeight(_16.itemHeight); +$(this).find(".menu-text").css({height:(_16.itemHeight-2)+"px",lineHeight:(_16.itemHeight-2)+"px"}); +}); +_15.removeClass("menu-noline").addClass(_16.noline?"menu-noline":""); +var _18=_15[0].originalWidth||"auto"; +if(isNaN(parseInt(_18))){ +_18=0; +_15.find("div.menu-text").each(function(){ +if(_18<$(this)._outerWidth()){ +_18=$(this)._outerWidth(); +} +}); +_18+=40; +} +var _19=_15.outerHeight(); +var _1a=_15[0].originalHeight||"auto"; +if(isNaN(parseInt(_1a))){ +_1a=_19; +if(_15.hasClass("menu-top")&&_16.alignTo){ +var at=$(_16.alignTo); +var h1=at.offset().top-$(document).scrollTop(); +var h2=$(window)._outerHeight()+$(document).scrollTop()-at.offset().top-at._outerHeight(); +_1a=Math.min(_1a,Math.max(h1,h2)); +}else{ +if(_1a>$(window)._outerHeight()){ +_1a=$(window).height(); +} +} +} +_15.attr("style",_17); +_15._size({fit:(_15[0]==_14?_16.fit:false),width:_18,minWidth:_16.minWidth,height:_1a}); +_15.css("overflow",_15.outerHeight()<_19?"auto":"hidden"); +_15.children("div.menu-line")._outerHeight(_19-2); +}; +function _13(_1b,_1c){ +if(_1c.hasClass("menu-inline")){ +return; +} +var _1d=$.data(_1b,"menu"); +_1c.unbind(".menu").bind("mouseenter.menu",function(){ +if(_1d.timer){ +clearTimeout(_1d.timer); +_1d.timer=null; +} +}).bind("mouseleave.menu",function(){ +if(_1d.options.hideOnUnhover){ +_1d.timer=setTimeout(function(){ +_1e(_1b,$(_1b).hasClass("menu-inline")); +},_1d.options.duration); +} +}); +}; +function _11(_1f,_20){ +if(!_20.hasClass("menu-item")){ +return; +} +_20.unbind(".menu"); +_20.bind("click.menu",function(){ +if($(this).hasClass("menu-item-disabled")){ +return; +} +if(!this.submenu){ +_1e(_1f,$(_1f).hasClass("menu-inline")); +var _21=this.itemHref; +if(_21){ +location.href=_21; +} +} +$(this).trigger("mouseenter"); +var _22=$(_1f).menu("getItem",this); +$.data(_1f,"menu").options.onClick.call(_1f,_22); +}).bind("mouseenter.menu",function(e){ +_20.siblings().each(function(){ +if(this.submenu){ +_1(this.submenu); +} +$(this).removeClass("menu-active"); +}); +_20.addClass("menu-active"); +if($(this).hasClass("menu-item-disabled")){ +_20.addClass("menu-active-disabled"); +return; +} +var _23=_20[0].submenu; +if(_23){ +$(_1f).menu("show",{menu:_23,parent:_20}); +} +}).bind("mouseleave.menu",function(e){ +_20.removeClass("menu-active menu-active-disabled"); +var _24=_20[0].submenu; +if(_24){ +if(e.pageX>=parseInt(_24.css("left"))){ +_20.addClass("menu-active"); +}else{ +_1(_24); +} +}else{ +_20.removeClass("menu-active"); +} +}); +}; +function _1e(_25,_26){ +var _27=$.data(_25,"menu"); +if(_27){ +if($(_25).is(":visible")){ +_1($(_25)); +if(_26){ +$(_25).show(); +}else{ +_27.options.onHide.call(_25); +} +} +} +return false; +}; +function _28(_29,_2a){ +var _2b,top; +_2a=_2a||{}; +var _2c=$(_2a.menu||_29); +$(_29).menu("resize",_2c[0]); +if(_2c.hasClass("menu-top")){ +var _2d=$.data(_29,"menu").options; +$.extend(_2d,_2a); +_2b=_2d.left; +top=_2d.top; +if(_2d.alignTo){ +var at=$(_2d.alignTo); +_2b=at.offset().left; +top=at.offset().top+at._outerHeight(); +if(_2d.align=="right"){ +_2b+=at.outerWidth()-_2c.outerWidth(); +} +} +if(_2b+_2c.outerWidth()>$(window)._outerWidth()+$(document)._scrollLeft()){ +_2b=$(window)._outerWidth()+$(document).scrollLeft()-_2c.outerWidth()-5; +} +if(_2b<0){ +_2b=0; +} +top=_2e(top,_2d.alignTo); +}else{ +var _2f=_2a.parent; +_2b=_2f.offset().left+_2f.outerWidth()-2; +if(_2b+_2c.outerWidth()+5>$(window)._outerWidth()+$(document).scrollLeft()){ +_2b=_2f.offset().left-_2c.outerWidth()+2; +} +top=_2e(_2f.offset().top-3); +} +function _2e(top,_30){ +if(top+_2c.outerHeight()>$(window)._outerHeight()+$(document).scrollTop()){ +if(_30){ +top=$(_30).offset().top-_2c._outerHeight(); +}else{ +top=$(window)._outerHeight()+$(document).scrollTop()-_2c.outerHeight(); +} +} +if(top<0){ +top=0; +} +return top; +}; +_2c.css({left:_2b,top:top}); +_2c.show(0,function(){ +if(!_2c[0].shadow){ +_2c[0].shadow=$("
                                                    ").insertAfter(_2c); +} +_2c[0].shadow.css({display:(_2c.hasClass("menu-inline")?"none":"block"),zIndex:$.fn.menu.defaults.zIndex++,left:_2c.css("left"),top:_2c.css("top"),width:_2c.outerWidth(),height:_2c.outerHeight()}); +_2c.css("z-index",$.fn.menu.defaults.zIndex++); +if(_2c.hasClass("menu-top")){ +$.data(_2c[0],"menu").options.onShow.call(_2c[0]); +} +}); +}; +function _1(_31){ +if(_31&&_31.length){ +_32(_31); +_31.find("div.menu-item").each(function(){ +if(this.submenu){ +_1(this.submenu); +} +$(this).removeClass("menu-active"); +}); +} +function _32(m){ +m.stop(true,true); +if(m[0].shadow){ +m[0].shadow.hide(); +} +m.hide(); +}; +}; +function _33(_34,_35){ +var _36=null; +var tmp=$("
                                                    "); +function _37(_38){ +_38.children("div.menu-item").each(function(){ +var _39=$(_34).menu("getItem",this); +var s=tmp.empty().html(_39.text).text(); +if(_35==$.trim(s)){ +_36=_39; +}else{ +if(this.submenu&&!_36){ +_37(this.submenu); +} +} +}); +}; +_37($(_34)); +tmp.remove(); +return _36; +}; +function _10(_3a,_3b,_3c){ +var t=$(_3b); +if(!t.hasClass("menu-item")){ +return; +} +if(_3c){ +t.addClass("menu-item-disabled"); +if(_3b.onclick){ +_3b.onclick1=_3b.onclick; +_3b.onclick=null; +} +}else{ +t.removeClass("menu-item-disabled"); +if(_3b.onclick1){ +_3b.onclick=_3b.onclick1; +_3b.onclick1=null; +} +} +}; +function _3d(_3e,_3f){ +var _40=$.data(_3e,"menu").options; +var _41=$(_3e); +if(_3f.parent){ +if(!_3f.parent.submenu){ +var _42=$("
                                                    ").appendTo("body"); +_42.hide(); +_3f.parent.submenu=_42; +$("
                                                    ").appendTo(_3f.parent); +} +_41=_3f.parent.submenu; +} +if(_3f.separator){ +var _43=$("
                                                    ").appendTo(_41); +}else{ +var _43=$("
                                                    ").appendTo(_41); +$("
                                                    ").html(_3f.text).appendTo(_43); +} +if(_3f.iconCls){ +$("
                                                    ").addClass(_3f.iconCls).appendTo(_43); +} +if(_3f.id){ +_43.attr("id",_3f.id); +} +if(_3f.name){ +_43[0].itemName=_3f.name; +} +if(_3f.href){ +_43[0].itemHref=_3f.href; +} +if(_3f.onclick){ +if(typeof _3f.onclick=="string"){ +_43.attr("onclick",_3f.onclick); +}else{ +_43[0].onclick=eval(_3f.onclick); +} +} +if(_3f.handler){ +_43[0].onclick=eval(_3f.handler); +} +if(_3f.disabled){ +_10(_3e,_43[0],true); +} +_11(_3e,_43); +_13(_3e,_41); +_12(_3e,_41); +}; +function _44(_45,_46){ +function _47(el){ +if(el.submenu){ +el.submenu.children("div.menu-item").each(function(){ +_47(this); +}); +var _48=el.submenu[0].shadow; +if(_48){ +_48.remove(); +} +el.submenu.remove(); +} +$(el).remove(); +}; +var _49=$(_46).parent(); +_47(_46); +_12(_45,_49); +}; +function _4a(_4b,_4c,_4d){ +var _4e=$(_4c).parent(); +if(_4d){ +$(_4c).show(); +}else{ +$(_4c).hide(); +} +_12(_4b,_4e); +}; +function _4f(_50){ +$(_50).children("div.menu-item").each(function(){ +_44(_50,this); +}); +if(_50.shadow){ +_50.shadow.remove(); +} +$(_50).remove(); +}; +$.fn.menu=function(_51,_52){ +if(typeof _51=="string"){ +return $.fn.menu.methods[_51](this,_52); +} +_51=_51||{}; +return this.each(function(){ +var _53=$.data(this,"menu"); +if(_53){ +$.extend(_53.options,_51); +}else{ +_53=$.data(this,"menu",{options:$.extend({},$.fn.menu.defaults,$.fn.menu.parseOptions(this),_51)}); +_2(this); +} +$(this).css({left:_53.options.left,top:_53.options.top}); +}); +}; +$.fn.menu.methods={options:function(jq){ +return $.data(jq[0],"menu").options; +},show:function(jq,pos){ +return jq.each(function(){ +_28(this,pos); +}); +},hide:function(jq){ +return jq.each(function(){ +_1e(this); +}); +},destroy:function(jq){ +return jq.each(function(){ +_4f(this); +}); +},setText:function(jq,_54){ +return jq.each(function(){ +$(_54.target).children("div.menu-text").html(_54.text); +}); +},setIcon:function(jq,_55){ +return jq.each(function(){ +$(_55.target).children("div.menu-icon").remove(); +if(_55.iconCls){ +$("
                                                    ").addClass(_55.iconCls).appendTo(_55.target); +} +}); +},getItem:function(jq,_56){ +var t=$(_56); +var _57={target:_56,id:t.attr("id"),text:$.trim(t.children("div.menu-text").html()),disabled:t.hasClass("menu-item-disabled"),name:_56.itemName,href:_56.itemHref,onclick:_56.onclick}; +var _58=t.children("div.menu-icon"); +if(_58.length){ +var cc=[]; +var aa=_58.attr("class").split(" "); +for(var i=0;i").addClass(_3.cls.arrow).appendTo(_5); +$("").addClass("m-btn-line").appendTo(_5); +} +$(_2).menubutton("resize"); +if(_3.menu){ +$(_3.menu).menu({duration:_3.duration}); +var _6=$(_3.menu).menu("options"); +var _7=_6.onShow; +var _8=_6.onHide; +$.extend(_6,{onShow:function(){ +var _9=$(this).menu("options"); +var _a=$(_9.alignTo); +var _b=_a.menubutton("options"); +_a.addClass((_b.plain==true)?_b.cls.btn2:_b.cls.btn1); +_7.call(this); +},onHide:function(){ +var _c=$(this).menu("options"); +var _d=$(_c.alignTo); +var _e=_d.menubutton("options"); +_d.removeClass((_e.plain==true)?_e.cls.btn2:_e.cls.btn1); +_8.call(this); +}}); +} +}; +function _f(_10){ +var _11=$.data(_10,"menubutton").options; +var btn=$(_10); +var t=btn.find("."+_11.cls.trigger); +if(!t.length){ +t=btn; +} +t.unbind(".menubutton"); +var _12=null; +t.bind("click.menubutton",function(){ +if(!_13()){ +_14(_10); +return false; +} +}).bind("mouseenter.menubutton",function(){ +if(!_13()){ +_12=setTimeout(function(){ +_14(_10); +},_11.duration); +return false; +} +}).bind("mouseleave.menubutton",function(){ +if(_12){ +clearTimeout(_12); +} +$(_11.menu).triggerHandler("mouseleave"); +}); +function _13(){ +return $(_10).linkbutton("options").disabled; +}; +}; +function _14(_15){ +var _16=$(_15).menubutton("options"); +if(_16.disabled||!_16.menu){ +return; +} +$("body>div.menu-top").menu("hide"); +var btn=$(_15); +var mm=$(_16.menu); +if(mm.length){ +mm.menu("options").alignTo=btn; +mm.menu("show",{alignTo:btn,align:_16.menuAlign}); +} +btn.blur(); +}; +$.fn.menubutton=function(_17,_18){ +if(typeof _17=="string"){ +var _19=$.fn.menubutton.methods[_17]; +if(_19){ +return _19(this,_18); +}else{ +return this.linkbutton(_17,_18); +} +} +_17=_17||{}; +return this.each(function(){ +var _1a=$.data(this,"menubutton"); +if(_1a){ +$.extend(_1a.options,_17); +}else{ +$.data(this,"menubutton",{options:$.extend({},$.fn.menubutton.defaults,$.fn.menubutton.parseOptions(this),_17)}); +$(this).removeAttr("disabled"); +} +_1(this); +_f(this); +}); +}; +$.fn.menubutton.methods={options:function(jq){ +var _1b=jq.linkbutton("options"); +return $.extend($.data(jq[0],"menubutton").options,{toggle:_1b.toggle,selected:_1b.selected,disabled:_1b.disabled}); +},destroy:function(jq){ +return jq.each(function(){ +var _1c=$(this).menubutton("options"); +if(_1c.menu){ +$(_1c.menu).menu("destroy"); +} +$(this).remove(); +}); +}}; +$.fn.menubutton.parseOptions=function(_1d){ +var t=$(_1d); +return $.extend({},$.fn.linkbutton.parseOptions(_1d),$.parser.parseOptions(_1d,["menu",{plain:"boolean",hasDownArrow:"boolean",duration:"number"}])); +}; +$.fn.menubutton.defaults=$.extend({},$.fn.linkbutton.defaults,{plain:true,hasDownArrow:true,menu:null,menuAlign:"left",duration:100,cls:{btn1:"m-btn-active",btn2:"m-btn-plain-active",arrow:"m-btn-downarrow",trigger:"m-btn"}}); +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.messager.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.messager.js new file mode 100644 index 0000000..2f6db9d --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.messager.js @@ -0,0 +1,179 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(){ +$(document).unbind(".messager").bind("keydown.messager",function(e){ +if(e.keyCode==27){ +$("body").children("div.messager-window").children("div.messager-body").each(function(){ +$(this).dialog("close"); +}); +}else{ +if(e.keyCode==9){ +var _2=$("body").children("div.messager-window"); +if(!_2.length){ +return; +} +var _3=_2.find(".messager-input,.messager-button .l-btn"); +for(var i=0;i<_3.length;i++){ +if($(_3[i]).is(":focus")){ +$(_3[i>=_3.length-1?0:i+1]).focus(); +return false; +} +} +} +} +}); +}; +function _4(){ +$(document).unbind(".messager"); +}; +function _5(_6){ +var _7=$.extend({},$.messager.defaults,{modal:false,shadow:false,draggable:false,resizable:false,closed:true,style:{left:"",top:"",right:0,zIndex:$.fn.window.defaults.zIndex++,bottom:-document.body.scrollTop-document.documentElement.scrollTop},title:"",width:250,height:100,minHeight:0,showType:"slide",showSpeed:600,content:_6.msg,timeout:4000},_6); +var _8=$("
                                                    ").appendTo("body"); +_8.dialog($.extend({},_7,{noheader:(_7.title?false:true),openAnimation:(_7.showType),closeAnimation:(_7.showType=="show"?"hide":_7.showType),openDuration:_7.showSpeed,closeDuration:_7.showSpeed,onOpen:function(){ +_8.dialog("dialog").hover(function(){ +if(_7.timer){ +clearTimeout(_7.timer); +} +},function(){ +_9(); +}); +_9(); +function _9(){ +if(_7.timeout>0){ +_7.timer=setTimeout(function(){ +if(_8.length&&_8.data("dialog")){ +_8.dialog("close"); +} +},_7.timeout); +} +}; +if(_6.onOpen){ +_6.onOpen.call(this); +}else{ +_7.onOpen.call(this); +} +},onClose:function(){ +if(_7.timer){ +clearTimeout(_7.timer); +} +if(_6.onClose){ +_6.onClose.call(this); +}else{ +_7.onClose.call(this); +} +_8.dialog("destroy"); +}})); +_8.dialog("dialog").css(_7.style); +_8.dialog("open"); +return _8; +}; +function _a(_b){ +_1(); +var _c=$("
                                                    ").appendTo("body"); +_c.dialog($.extend({},_b,{noheader:(_b.title?false:true),onClose:function(){ +_4(); +if(_b.onClose){ +_b.onClose.call(this); +} +setTimeout(function(){ +_c.dialog("destroy"); +},100); +}})); +var _d=_c.dialog("dialog").addClass("messager-window"); +_d.find(".dialog-button").addClass("messager-button").find("a:first").focus(); +return _c; +}; +function _e(_f,_10){ +_f.dialog("close"); +_f.dialog("options").fn(_10); +}; +$.messager={show:function(_11){ +return _5(_11); +},alert:function(_12,msg,_13,fn){ +var _14=typeof _12=="object"?_12:{title:_12,msg:msg,icon:_13,fn:fn}; +var cls=_14.icon?"messager-icon messager-"+_14.icon:""; +_14=$.extend({},$.messager.defaults,{content:"
                                                    "+"
                                                    "+_14.msg+"
                                                    "+"
                                                    "},_14); +if(!_14.buttons){ +_14.buttons=[{text:_14.ok,onClick:function(){ +_e(dlg); +}}]; +} +var dlg=_a(_14); +return dlg; +},confirm:function(_15,msg,fn){ +var _16=typeof _15=="object"?_15:{title:_15,msg:msg,fn:fn}; +_16=$.extend({},$.messager.defaults,{content:"
                                                    "+"
                                                    "+_16.msg+"
                                                    "+"
                                                    "},_16); +if(!_16.buttons){ +_16.buttons=[{text:_16.ok,onClick:function(){ +_e(dlg,true); +}},{text:_16.cancel,onClick:function(){ +_e(dlg,false); +}}]; +} +var dlg=_a(_16); +return dlg; +},prompt:function(_17,msg,fn){ +var _18=typeof _17=="object"?_17:{title:_17,msg:msg,fn:fn}; +_18=$.extend({},$.messager.defaults,{content:"
                                                    "+"
                                                    "+_18.msg+"
                                                    "+"
                                                    "+"
                                                    "+"
                                                    "},_18); +if(!_18.buttons){ +_18.buttons=[{text:_18.ok,onClick:function(){ +_e(dlg,dlg.find(".messager-input").val()); +}},{text:_18.cancel,onClick:function(){ +_e(dlg); +}}]; +} +var dlg=_a(_18); +dlg.find("input.messager-input").focus(); +return dlg; +},progress:function(_19){ +var _1a={bar:function(){ +return $("body>div.messager-window").find("div.messager-p-bar"); +},close:function(){ +var dlg=$("body>div.messager-window>div.messager-body:has(div.messager-progress)"); +if(dlg.length){ +dlg.dialog("close"); +} +}}; +if(typeof _19=="string"){ +var _1b=_1a[_19]; +return _1b(); +} +_19=_19||{}; +var _1c=$.extend({},{title:"",minHeight:0,content:undefined,msg:"",text:undefined,interval:300},_19); +var dlg=_a($.extend({},$.messager.defaults,{content:"
                                                    "+_1c.msg+"
                                                    ",closable:false,doSize:false},_1c,{onClose:function(){ +if(this.timer){ +clearInterval(this.timer); +} +if(_19.onClose){ +_19.onClose.call(this); +}else{ +$.messager.defaults.onClose.call(this); +} +}})); +var bar=dlg.find("div.messager-p-bar"); +bar.progressbar({text:_1c.text}); +dlg.dialog("resize"); +if(_1c.interval){ +dlg[0].timer=setInterval(function(){ +var v=bar.progressbar("getValue"); +v+=10; +if(v>100){ +v=0; +} +bar.progressbar("setValue",v); +},_1c.interval); +} +return dlg; +}}; +$.messager.defaults=$.extend({},$.fn.dialog.defaults,{ok:"Ok",cancel:"Cancel",width:300,height:"auto",minHeight:150,modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,fn:function(){ +}}); +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.mobile.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.mobile.js new file mode 100644 index 0000000..2f6eacf --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.mobile.js @@ -0,0 +1,137 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +$.fn.navpanel=function(_1,_2){ +if(typeof _1=="string"){ +var _3=$.fn.navpanel.methods[_1]; +return _3?_3(this,_2):this.panel(_1,_2); +}else{ +_1=_1||{}; +return this.each(function(){ +var _4=$.data(this,"navpanel"); +if(_4){ +$.extend(_4.options,_1); +}else{ +_4=$.data(this,"navpanel",{options:$.extend({},$.fn.navpanel.defaults,$.fn.navpanel.parseOptions(this,_1))}); +} +$(this).panel(_4.options); +}); +} +}; +$.fn.navpanel.methods={options:function(jq){ +return $.data(jq[0],"navpanel").options; +}}; +$.fn.navpanel.parseOptions=function(_5){ +return $.extend({},$.fn.panel.parseOptions(_5),$.parser.parseOptions(_5,[])); +}; +$.fn.navpanel.defaults=$.extend({},$.fn.panel.defaults,{fit:true,border:false,cls:"navpanel"}); +$.parser.plugins.push("navpanel"); +})(jQuery); +(function($){ +$(function(){ +$.mobile.init(); +}); +$.mobile={defaults:{animation:"slide",direction:"left",reverseDirections:{up:"down",down:"up",left:"right",right:"left"}},panels:[],init:function(_6){ +$.mobile.panels=[]; +var _7=$(_6||"body").children(".navpanel:visible"); +if(_7.length){ +_7.not(":first").children(".panel-body").navpanel("close"); +var p=_7.eq(0).children(".panel-body"); +$.mobile.panels.push({panel:p,animation:$.mobile.defaults.animation,direction:$.mobile.defaults.direction}); +} +$(document).unbind(".mobile").bind("click.mobile",function(e){ +var a=$(e.target).closest("a"); +if(a.length){ +var _8=$.parser.parseOptions(a[0],["animation","direction",{back:"boolean"}]); +if(_8.back){ +$.mobile.back(); +e.preventDefault(); +}else{ +var _9=$.trim(a.attr("href")); +if(/^#/.test(_9)){ +var to=$(_9); +if(to.length&&to.hasClass("panel-body")){ +$.mobile.go(to,_8.animation,_8.direction); +e.preventDefault(); +} +} +} +} +}); +$(window).unbind(".mobile").bind("hashchange.mobile",function(){ +var _a=$.mobile.panels.length; +if(_a>1){ +var _b=location.hash; +var p=$.mobile.panels[_a-2]; +if(!_b||_b=="#&"+p.panel.attr("id")){ +$.mobile._back(); +} +} +}); +},nav:function(_c,to,_d,_e){ +if(window.WebKitAnimationEvent){ +_d=_d!=undefined?_d:$.mobile.defaults.animation; +_e=_e!=undefined?_e:$.mobile.defaults.direction; +var _f="m-"+_d+(_e?"-"+_e:""); +var p1=$(_c).panel("open").panel("resize").panel("panel"); +var p2=$(to).panel("open").panel("resize").panel("panel"); +p1.add(p2).bind("webkitAnimationEnd",function(){ +$(this).unbind("webkitAnimationEnd"); +var p=$(this).children(".panel-body"); +if($(this).hasClass("m-in")){ +p.panel("open").panel("resize"); +}else{ +p.panel("close"); +} +$(this).removeClass(_f+" m-in m-out"); +}); +p2.addClass(_f+" m-in"); +p1.addClass(_f+" m-out"); +}else{ +$(to).panel("open").panel("resize"); +$(_c).panel("close"); +} +},_go:function(_10,_11,_12){ +_11=_11!=undefined?_11:$.mobile.defaults.animation; +_12=_12!=undefined?_12:$.mobile.defaults.direction; +var _13=$.mobile.panels[$.mobile.panels.length-1].panel; +var to=$(_10); +if(_13[0]!=to[0]){ +$.mobile.nav(_13,to,_11,_12); +$.mobile.panels.push({panel:to,animation:_11,direction:_12}); +} +},_back:function(){ +if($.mobile.panels.length<2){ +return; +} +var p1=$.mobile.panels.pop(); +var p2=$.mobile.panels[$.mobile.panels.length-1]; +var _14=p1.animation; +var _15=$.mobile.defaults.reverseDirections[p1.direction]||""; +$.mobile.nav(p1.panel,p2.panel,_14,_15); +},go:function(_16,_17,_18){ +_17=_17!=undefined?_17:$.mobile.defaults.animation; +_18=_18!=undefined?_18:$.mobile.defaults.direction; +location.hash="#&"+$(_16).attr("id"); +$.mobile._go(_16,_17,_18); +},back:function(){ +history.go(-1); +}}; +$.map(["validatebox","textbox","filebox","searchbox","combo","combobox","combogrid","combotree","datebox","datetimebox","numberbox","spinner","numberspinner","timespinner","datetimespinner"],function(_19){ +if($.fn[_19]){ +$.extend($.fn[_19].defaults,{height:32,iconWidth:28,tipPosition:"bottom"}); +} +}); +$.map(["spinner","numberspinner","timespinner","datetimespinner"],function(_1a){ +$.extend($.fn[_1a].defaults,{height:32,iconWidth:56}); +}); +$.extend($.fn.menu.defaults,{itemHeight:30,noline:true}); +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.numberbox.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.numberbox.js new file mode 100644 index 0000000..719d60c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.numberbox.js @@ -0,0 +1,174 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2){ +var _3=$.data(_2,"numberbox"); +var _4=_3.options; +$(_2).addClass("numberbox-f").textbox(_4); +$(_2).textbox("textbox").css({imeMode:"disabled"}); +$(_2).attr("numberboxName",$(_2).attr("textboxName")); +_3.numberbox=$(_2).next(); +_3.numberbox.addClass("numberbox"); +var _5=_4.parser.call(_2,_4.value); +var _6=_4.formatter.call(_2,_5); +$(_2).numberbox("initValue",_5).numberbox("setText",_6); +}; +function _7(_8,_9){ +var _a=$.data(_8,"numberbox"); +var _b=_a.options; +var _9=_b.parser.call(_8,_9); +var _c=_b.formatter.call(_8,_9); +_b.value=_9; +$(_8).textbox("setText",_c).textbox("setValue",_9); +_c=_b.formatter.call(_8,$(_8).textbox("getValue")); +$(_8).textbox("setText",_c); +}; +$.fn.numberbox=function(_d,_e){ +if(typeof _d=="string"){ +var _f=$.fn.numberbox.methods[_d]; +if(_f){ +return _f(this,_e); +}else{ +return this.textbox(_d,_e); +} +} +_d=_d||{}; +return this.each(function(){ +var _10=$.data(this,"numberbox"); +if(_10){ +$.extend(_10.options,_d); +}else{ +_10=$.data(this,"numberbox",{options:$.extend({},$.fn.numberbox.defaults,$.fn.numberbox.parseOptions(this),_d)}); +} +_1(this); +}); +}; +$.fn.numberbox.methods={options:function(jq){ +var _11=jq.data("textbox")?jq.textbox("options"):{}; +return $.extend($.data(jq[0],"numberbox").options,{width:_11.width,originalValue:_11.originalValue,disabled:_11.disabled,readonly:_11.readonly}); +},fix:function(jq){ +return jq.each(function(){ +$(this).numberbox("setValue",$(this).numberbox("getText")); +}); +},setValue:function(jq,_12){ +return jq.each(function(){ +_7(this,_12); +}); +},clear:function(jq){ +return jq.each(function(){ +$(this).textbox("clear"); +$(this).numberbox("options").value=""; +}); +},reset:function(jq){ +return jq.each(function(){ +$(this).textbox("reset"); +$(this).numberbox("setValue",$(this).numberbox("getValue")); +}); +}}; +$.fn.numberbox.parseOptions=function(_13){ +var t=$(_13); +return $.extend({},$.fn.textbox.parseOptions(_13),$.parser.parseOptions(_13,["decimalSeparator","groupSeparator","suffix",{min:"number",max:"number",precision:"number"}]),{prefix:(t.attr("prefix")?t.attr("prefix"):undefined)}); +}; +$.fn.numberbox.defaults=$.extend({},$.fn.textbox.defaults,{inputEvents:{keypress:function(e){ +var _14=e.data.target; +var _15=$(_14).numberbox("options"); +return _15.filter.call(_14,e); +},blur:function(e){ +var _16=e.data.target; +$(_16).numberbox("setValue",$(_16).numberbox("getText")); +},keydown:function(e){ +if(e.keyCode==13){ +var _17=e.data.target; +$(_17).numberbox("setValue",$(_17).numberbox("getText")); +} +}},min:null,max:null,precision:0,decimalSeparator:".",groupSeparator:"",prefix:"",suffix:"",filter:function(e){ +var _18=$(this).numberbox("options"); +var s=$(this).numberbox("getText"); +if(e.which==13){ +return true; +} +if(e.which==45){ +return (s.indexOf("-")==-1?true:false); +} +var c=String.fromCharCode(e.which); +if(c==_18.decimalSeparator){ +return (s.indexOf(c)==-1?true:false); +}else{ +if(c==_18.groupSeparator){ +return true; +}else{ +if((e.which>=48&&e.which<=57&&e.ctrlKey==false&&e.shiftKey==false)||e.which==0||e.which==8){ +return true; +}else{ +if(e.ctrlKey==true&&(e.which==99||e.which==118)){ +return true; +}else{ +return false; +} +} +} +} +},formatter:function(_19){ +if(!_19){ +return _19; +} +_19=_19+""; +var _1a=$(this).numberbox("options"); +var s1=_19,s2=""; +var _1b=_19.indexOf("."); +if(_1b>=0){ +s1=_19.substring(0,_1b); +s2=_19.substring(_1b+1,_19.length); +} +if(_1a.groupSeparator){ +var p=/(\d+)(\d{3})/; +while(p.test(s1)){ +s1=s1.replace(p,"$1"+_1a.groupSeparator+"$2"); +} +} +if(s2){ +return _1a.prefix+s1+_1a.decimalSeparator+s2+_1a.suffix; +}else{ +return _1a.prefix+s1+_1a.suffix; +} +},parser:function(s){ +s=s+""; +var _1c=$(this).numberbox("options"); +if(parseFloat(s)!=s){ +if(_1c.prefix){ +s=$.trim(s.replace(new RegExp("\\"+$.trim(_1c.prefix),"g"),"")); +} +if(_1c.suffix){ +s=$.trim(s.replace(new RegExp("\\"+$.trim(_1c.suffix),"g"),"")); +} +if(_1c.groupSeparator){ +s=$.trim(s.replace(new RegExp("\\"+_1c.groupSeparator,"g"),"")); +} +if(_1c.decimalSeparator){ +s=$.trim(s.replace(new RegExp("\\"+_1c.decimalSeparator,"g"),".")); +} +s=s.replace(/\s/g,""); +} +var val=parseFloat(s).toFixed(_1c.precision); +if(isNaN(val)){ +val=""; +}else{ +if(typeof (_1c.min)=="number"&&val<_1c.min){ +val=_1c.min.toFixed(_1c.precision); +}else{ +if(typeof (_1c.max)=="number"&&val>_1c.max){ +val=_1c.max.toFixed(_1c.precision); +} +} +} +return val; +}}); +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.numberspinner.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.numberspinner.js new file mode 100644 index 0000000..b16d048 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.numberspinner.js @@ -0,0 +1,58 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2){ +$(_2).addClass("numberspinner-f"); +var _3=$.data(_2,"numberspinner").options; +$(_2).numberbox(_3).spinner(_3); +$(_2).numberbox("setValue",_3.value); +}; +function _4(_5,_6){ +var _7=$.data(_5,"numberspinner").options; +var v=parseFloat($(_5).numberbox("getValue")||_7.value)||0; +if(_6){ +v-=_7.increment; +}else{ +v+=_7.increment; +} +$(_5).numberbox("setValue",v); +}; +$.fn.numberspinner=function(_8,_9){ +if(typeof _8=="string"){ +var _a=$.fn.numberspinner.methods[_8]; +if(_a){ +return _a(this,_9); +}else{ +return this.numberbox(_8,_9); +} +} +_8=_8||{}; +return this.each(function(){ +var _b=$.data(this,"numberspinner"); +if(_b){ +$.extend(_b.options,_8); +}else{ +$.data(this,"numberspinner",{options:$.extend({},$.fn.numberspinner.defaults,$.fn.numberspinner.parseOptions(this),_8)}); +} +_1(this); +}); +}; +$.fn.numberspinner.methods={options:function(jq){ +var _c=jq.numberbox("options"); +return $.extend($.data(jq[0],"numberspinner").options,{width:_c.width,value:_c.value,originalValue:_c.originalValue,disabled:_c.disabled,readonly:_c.readonly}); +}}; +$.fn.numberspinner.parseOptions=function(_d){ +return $.extend({},$.fn.spinner.parseOptions(_d),$.fn.numberbox.parseOptions(_d),{}); +}; +$.fn.numberspinner.defaults=$.extend({},$.fn.spinner.defaults,$.fn.numberbox.defaults,{spin:function(_e){ +_4(this,_e); +}}); +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.pagination.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.pagination.js new file mode 100644 index 0000000..836d353 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.pagination.js @@ -0,0 +1,286 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2){ +var _3=$.data(_2,"pagination"); +var _4=_3.options; +var bb=_3.bb={}; +var _5=$(_2).addClass("pagination").html("
                                                    "); +var tr=_5.find("tr"); +var aa=$.extend([],_4.layout); +if(!_4.showPageList){ +_6(aa,"list"); +} +if(!_4.showRefresh){ +_6(aa,"refresh"); +} +if(aa[0]=="sep"){ +aa.shift(); +} +if(aa[aa.length-1]=="sep"){ +aa.pop(); +} +for(var _7=0;_7"); +ps.bind("change",function(){ +_4.pageSize=parseInt($(this).val()); +_4.onChangePageSize.call(_2,_4.pageSize); +_10(_2,_4.pageNumber); +}); +for(var i=0;i<_4.pageList.length;i++){ +$("").text(_4.pageList[i]).appendTo(ps); +} +$("").append(ps).appendTo(tr); +}else{ +if(_8=="sep"){ +$("
                                                    ").appendTo(tr); +}else{ +if(_8=="first"){ +bb.first=_9("first"); +}else{ +if(_8=="prev"){ +bb.prev=_9("prev"); +}else{ +if(_8=="next"){ +bb.next=_9("next"); +}else{ +if(_8=="last"){ +bb.last=_9("last"); +}else{ +if(_8=="manual"){ +$("").html(_4.beforePageText).appendTo(tr).wrap(""); +bb.num=$("").appendTo(tr).wrap(""); +bb.num.unbind(".pagination").bind("keydown.pagination",function(e){ +if(e.keyCode==13){ +var _a=parseInt($(this).val())||1; +_10(_2,_a); +return false; +} +}); +bb.after=$("").appendTo(tr).wrap(""); +}else{ +if(_8=="refresh"){ +bb.refresh=_9("refresh"); +}else{ +if(_8=="links"){ +$("").appendTo(tr); +} +} +} +} +} +} +} +} +} +} +if(_4.buttons){ +$("
                                                    ").appendTo(tr); +if($.isArray(_4.buttons)){ +for(var i=0;i<_4.buttons.length;i++){ +var _b=_4.buttons[i]; +if(_b=="-"){ +$("
                                                    ").appendTo(tr); +}else{ +var td=$("").appendTo(tr); +var a=$("").appendTo(td); +a[0].onclick=eval(_b.handler||function(){ +}); +a.linkbutton($.extend({},_b,{plain:true})); +} +} +}else{ +var td=$("").appendTo(tr); +$(_4.buttons).appendTo(td).show(); +} +} +$("
                                                    ").appendTo(_5); +$("
                                                    ").appendTo(_5); +function _9(_c){ +var _d=_4.nav[_c]; +var a=$("").appendTo(tr); +a.wrap(""); +a.linkbutton({iconCls:_d.iconCls,plain:true}).unbind(".pagination").bind("click.pagination",function(){ +_d.handler.call(_2); +}); +return a; +}; +function _6(aa,_e){ +var _f=$.inArray(_e,aa); +if(_f>=0){ +aa.splice(_f,1); +} +return aa; +}; +}; +function _10(_11,_12){ +var _13=$.data(_11,"pagination").options; +_14(_11,{pageNumber:_12}); +_13.onSelectPage.call(_11,_13.pageNumber,_13.pageSize); +}; +function _14(_15,_16){ +var _17=$.data(_15,"pagination"); +var _18=_17.options; +var bb=_17.bb; +$.extend(_18,_16||{}); +var ps=$(_15).find("select.pagination-page-list"); +if(ps.length){ +ps.val(_18.pageSize+""); +_18.pageSize=parseInt(ps.val()); +} +var _19=Math.ceil(_18.total/_18.pageSize)||1; +if(_18.pageNumber<1){ +_18.pageNumber=1; +} +if(_18.pageNumber>_19){ +_18.pageNumber=_19; +} +if(_18.total==0){ +_18.pageNumber=0; +_19=0; +} +if(bb.num){ +bb.num.val(_18.pageNumber); +} +if(bb.after){ +bb.after.html(_18.afterPageText.replace(/{pages}/,_19)); +} +var td=$(_15).find("td.pagination-links"); +if(td.length){ +td.empty(); +var _1a=_18.pageNumber-Math.floor(_18.links/2); +if(_1a<1){ +_1a=1; +} +var _1b=_1a+_18.links-1; +if(_1b>_19){ +_1b=_19; +} +_1a=_1b-_18.links+1; +if(_1a<1){ +_1a=1; +} +for(var i=_1a;i<=_1b;i++){ +var a=$("").appendTo(td); +a.linkbutton({plain:true,text:i}); +if(i==_18.pageNumber){ +a.linkbutton("select"); +}else{ +a.unbind(".pagination").bind("click.pagination",{pageNumber:i},function(e){ +_10(_15,e.data.pageNumber); +}); +} +} +} +var _1c=_18.displayMsg; +_1c=_1c.replace(/{from}/,_18.total==0?0:_18.pageSize*(_18.pageNumber-1)+1); +_1c=_1c.replace(/{to}/,Math.min(_18.pageSize*(_18.pageNumber),_18.total)); +_1c=_1c.replace(/{total}/,_18.total); +$(_15).find("div.pagination-info").html(_1c); +if(bb.first){ +bb.first.linkbutton({disabled:((!_18.total)||_18.pageNumber==1)}); +} +if(bb.prev){ +bb.prev.linkbutton({disabled:((!_18.total)||_18.pageNumber==1)}); +} +if(bb.next){ +bb.next.linkbutton({disabled:(_18.pageNumber==_19)}); +} +if(bb.last){ +bb.last.linkbutton({disabled:(_18.pageNumber==_19)}); +} +_1d(_15,_18.loading); +}; +function _1d(_1e,_1f){ +var _20=$.data(_1e,"pagination"); +var _21=_20.options; +_21.loading=_1f; +if(_21.showRefresh&&_20.bb.refresh){ +_20.bb.refresh.linkbutton({iconCls:(_21.loading?"pagination-loading":"pagination-load")}); +} +}; +$.fn.pagination=function(_22,_23){ +if(typeof _22=="string"){ +return $.fn.pagination.methods[_22](this,_23); +} +_22=_22||{}; +return this.each(function(){ +var _24; +var _25=$.data(this,"pagination"); +if(_25){ +_24=$.extend(_25.options,_22); +}else{ +_24=$.extend({},$.fn.pagination.defaults,$.fn.pagination.parseOptions(this),_22); +$.data(this,"pagination",{options:_24}); +} +_1(this); +_14(this); +}); +}; +$.fn.pagination.methods={options:function(jq){ +return $.data(jq[0],"pagination").options; +},loading:function(jq){ +return jq.each(function(){ +_1d(this,true); +}); +},loaded:function(jq){ +return jq.each(function(){ +_1d(this,false); +}); +},refresh:function(jq,_26){ +return jq.each(function(){ +_14(this,_26); +}); +},select:function(jq,_27){ +return jq.each(function(){ +_10(this,_27); +}); +}}; +$.fn.pagination.parseOptions=function(_28){ +var t=$(_28); +return $.extend({},$.parser.parseOptions(_28,[{total:"number",pageSize:"number",pageNumber:"number",links:"number"},{loading:"boolean",showPageList:"boolean",showRefresh:"boolean"}]),{pageList:(t.attr("pageList")?eval(t.attr("pageList")):undefined)}); +}; +$.fn.pagination.defaults={total:1,pageSize:10,pageNumber:1,pageList:[10,20,30,50],loading:false,buttons:null,showPageList:true,showRefresh:true,links:10,layout:["list","sep","first","prev","sep","manual","sep","next","last","sep","refresh"],onSelectPage:function(_29,_2a){ +},onBeforeRefresh:function(_2b,_2c){ +},onRefresh:function(_2d,_2e){ +},onChangePageSize:function(_2f){ +},beforePageText:"Page",afterPageText:"of {pages}",displayMsg:"Displaying {from} to {to} of {total} items",nav:{first:{iconCls:"pagination-first",handler:function(){ +var _30=$(this).pagination("options"); +if(_30.pageNumber>1){ +$(this).pagination("select",1); +} +}},prev:{iconCls:"pagination-prev",handler:function(){ +var _31=$(this).pagination("options"); +if(_31.pageNumber>1){ +$(this).pagination("select",_31.pageNumber-1); +} +}},next:{iconCls:"pagination-next",handler:function(){ +var _32=$(this).pagination("options"); +var _33=Math.ceil(_32.total/_32.pageSize); +if(_32.pageNumber<_33){ +$(this).pagination("select",_32.pageNumber+1); +} +}},last:{iconCls:"pagination-last",handler:function(){ +var _34=$(this).pagination("options"); +var _35=Math.ceil(_34.total/_34.pageSize); +if(_34.pageNumber<_35){ +$(this).pagination("select",_35); +} +}},refresh:{iconCls:"pagination-refresh",handler:function(){ +var _36=$(this).pagination("options"); +if(_36.onBeforeRefresh.call(this,_36.pageNumber,_36.pageSize)!=false){ +$(this).pagination("select",_36.pageNumber); +_36.onRefresh.call(this,_36.pageNumber,_36.pageSize); +} +}}}}; +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.panel.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.panel.js new file mode 100644 index 0000000..6da38a6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.panel.js @@ -0,0 +1,613 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +$.fn._remove=function(){ +return this.each(function(){ +$(this).remove(); +try{ +this.outerHTML=""; +} +catch(err){ +} +}); +}; +function _1(_2){ +_2._remove(); +}; +function _3(_4,_5){ +var _6=$.data(_4,"panel"); +var _7=_6.options; +var _8=_6.panel; +var _9=_8.children(".panel-header"); +var _a=_8.children(".panel-body"); +var _b=_8.children(".panel-footer"); +if(_5){ +$.extend(_7,{width:_5.width,height:_5.height,minWidth:_5.minWidth,maxWidth:_5.maxWidth,minHeight:_5.minHeight,maxHeight:_5.maxHeight,left:_5.left,top:_5.top}); +} +_8._size(_7); +_9.add(_a)._outerWidth(_8.width()); +if(!isNaN(parseInt(_7.height))){ +_a._outerHeight(_8.height()-_9._outerHeight()-_b._outerHeight()); +}else{ +_a.css("height",""); +var _c=$.parser.parseValue("minHeight",_7.minHeight,_8.parent()); +var _d=$.parser.parseValue("maxHeight",_7.maxHeight,_8.parent()); +var _e=_9._outerHeight()+_b._outerHeight()+_8._outerHeight()-_8.height(); +_a._size("minHeight",_c?(_c-_e):""); +_a._size("maxHeight",_d?(_d-_e):""); +} +_8.css({height:"",minHeight:"",maxHeight:"",left:_7.left,top:_7.top}); +_7.onResize.apply(_4,[_7.width,_7.height]); +$(_4).panel("doLayout"); +}; +function _f(_10,_11){ +var _12=$.data(_10,"panel").options; +var _13=$.data(_10,"panel").panel; +if(_11){ +if(_11.left!=null){ +_12.left=_11.left; +} +if(_11.top!=null){ +_12.top=_11.top; +} +} +_13.css({left:_12.left,top:_12.top}); +_12.onMove.apply(_10,[_12.left,_12.top]); +}; +function _14(_15){ +$(_15).addClass("panel-body")._size("clear"); +var _16=$("
                                                    ").insertBefore(_15); +_16[0].appendChild(_15); +_16.bind("_resize",function(e,_17){ +if($(this).hasClass("easyui-fluid")||_17){ +_3(_15); +} +return false; +}); +return _16; +}; +function _18(_19){ +var _1a=$.data(_19,"panel"); +var _1b=_1a.options; +var _1c=_1a.panel; +_1c.css(_1b.style); +_1c.addClass(_1b.cls); +_1d(); +_1e(); +var _1f=$(_19).panel("header"); +var _20=$(_19).panel("body"); +var _21=$(_19).siblings(".panel-footer"); +if(_1b.border){ +_1f.removeClass("panel-header-noborder"); +_20.removeClass("panel-body-noborder"); +_21.removeClass("panel-footer-noborder"); +}else{ +_1f.addClass("panel-header-noborder"); +_20.addClass("panel-body-noborder"); +_21.addClass("panel-footer-noborder"); +} +_1f.addClass(_1b.headerCls); +_20.addClass(_1b.bodyCls); +$(_19).attr("id",_1b.id||""); +if(_1b.content){ +$(_19).panel("clear"); +$(_19).html(_1b.content); +$.parser.parse($(_19)); +} +function _1d(){ +if(_1b.noheader||(!_1b.title&&!_1b.header)){ +_1(_1c.children(".panel-header")); +_1c.children(".panel-body").addClass("panel-body-noheader"); +}else{ +if(_1b.header){ +$(_1b.header).addClass("panel-header").prependTo(_1c); +}else{ +var _22=_1c.children(".panel-header"); +if(!_22.length){ +_22=$("
                                                    ").prependTo(_1c); +} +if(!$.isArray(_1b.tools)){ +_22.find("div.panel-tool .panel-tool-a").appendTo(_1b.tools); +} +_22.empty(); +var _23=$("
                                                    ").html(_1b.title).appendTo(_22); +if(_1b.iconCls){ +_23.addClass("panel-with-icon"); +$("
                                                    ").addClass(_1b.iconCls).appendTo(_22); +} +var _24=$("
                                                    ").appendTo(_22); +_24.bind("click",function(e){ +e.stopPropagation(); +}); +if(_1b.tools){ +if($.isArray(_1b.tools)){ +$.map(_1b.tools,function(t){ +_25(_24,t.iconCls,eval(t.handler)); +}); +}else{ +$(_1b.tools).children().each(function(){ +$(this).addClass($(this).attr("iconCls")).addClass("panel-tool-a").appendTo(_24); +}); +} +} +if(_1b.collapsible){ +_25(_24,"panel-tool-collapse",function(){ +if(_1b.collapsed==true){ +_4d(_19,true); +}else{ +_3b(_19,true); +} +}); +} +if(_1b.minimizable){ +_25(_24,"panel-tool-min",function(){ +_58(_19); +}); +} +if(_1b.maximizable){ +_25(_24,"panel-tool-max",function(){ +if(_1b.maximized==true){ +_5c(_19); +}else{ +_3a(_19); +} +}); +} +if(_1b.closable){ +_25(_24,"panel-tool-close",function(){ +_3c(_19); +}); +} +} +_1c.children("div.panel-body").removeClass("panel-body-noheader"); +} +}; +function _25(c,_26,_27){ +var a=$("").addClass(_26).appendTo(c); +a.bind("click",_27); +}; +function _1e(){ +if(_1b.footer){ +$(_1b.footer).addClass("panel-footer").appendTo(_1c); +$(_19).addClass("panel-body-nobottom"); +}else{ +_1c.children(".panel-footer").remove(); +$(_19).removeClass("panel-body-nobottom"); +} +}; +}; +function _28(_29,_2a){ +var _2b=$.data(_29,"panel"); +var _2c=_2b.options; +if(_2d){ +_2c.queryParams=_2a; +} +if(!_2c.href){ +return; +} +if(!_2b.isLoaded||!_2c.cache){ +var _2d=$.extend({},_2c.queryParams); +if(_2c.onBeforeLoad.call(_29,_2d)==false){ +return; +} +_2b.isLoaded=false; +$(_29).panel("clear"); +if(_2c.loadingMessage){ +$(_29).html($("
                                                    ").html(_2c.loadingMessage)); +} +_2c.loader.call(_29,_2d,function(_2e){ +var _2f=_2c.extractor.call(_29,_2e); +$(_29).html(_2f); +$.parser.parse($(_29)); +_2c.onLoad.apply(_29,arguments); +_2b.isLoaded=true; +},function(){ +_2c.onLoadError.apply(_29,arguments); +}); +} +}; +function _30(_31){ +var t=$(_31); +t.find(".combo-f").each(function(){ +$(this).combo("destroy"); +}); +t.find(".m-btn").each(function(){ +$(this).menubutton("destroy"); +}); +t.find(".s-btn").each(function(){ +$(this).splitbutton("destroy"); +}); +t.find(".tooltip-f").each(function(){ +$(this).tooltip("destroy"); +}); +t.children("div").each(function(){ +$(this)._size("unfit"); +}); +t.empty(); +}; +function _32(_33){ +$(_33).panel("doLayout",true); +}; +function _34(_35,_36){ +var _37=$.data(_35,"panel").options; +var _38=$.data(_35,"panel").panel; +if(_36!=true){ +if(_37.onBeforeOpen.call(_35)==false){ +return; +} +} +_38.stop(true,true); +if($.isFunction(_37.openAnimation)){ +_37.openAnimation.call(_35,cb); +}else{ +switch(_37.openAnimation){ +case "slide": +_38.slideDown(_37.openDuration,cb); +break; +case "fade": +_38.fadeIn(_37.openDuration,cb); +break; +case "show": +_38.show(_37.openDuration,cb); +break; +default: +_38.show(); +cb(); +} +} +function cb(){ +_37.closed=false; +_37.minimized=false; +var _39=_38.children(".panel-header").find("a.panel-tool-restore"); +if(_39.length){ +_37.maximized=true; +} +_37.onOpen.call(_35); +if(_37.maximized==true){ +_37.maximized=false; +_3a(_35); +} +if(_37.collapsed==true){ +_37.collapsed=false; +_3b(_35); +} +if(!_37.collapsed){ +_28(_35); +_32(_35); +} +}; +}; +function _3c(_3d,_3e){ +var _3f=$.data(_3d,"panel").options; +var _40=$.data(_3d,"panel").panel; +if(_3e!=true){ +if(_3f.onBeforeClose.call(_3d)==false){ +return; +} +} +_40.stop(true,true); +_40._size("unfit"); +if($.isFunction(_3f.closeAnimation)){ +_3f.closeAnimation.call(_3d,cb); +}else{ +switch(_3f.closeAnimation){ +case "slide": +_40.slideUp(_3f.closeDuration,cb); +break; +case "fade": +_40.fadeOut(_3f.closeDuration,cb); +break; +case "hide": +_40.hide(_3f.closeDuration,cb); +break; +default: +_40.hide(); +cb(); +} +} +function cb(){ +_3f.closed=true; +_3f.onClose.call(_3d); +}; +}; +function _41(_42,_43){ +var _44=$.data(_42,"panel"); +var _45=_44.options; +var _46=_44.panel; +if(_43!=true){ +if(_45.onBeforeDestroy.call(_42)==false){ +return; +} +} +$(_42).panel("clear").panel("clear","footer"); +_1(_46); +_45.onDestroy.call(_42); +}; +function _3b(_47,_48){ +var _49=$.data(_47,"panel").options; +var _4a=$.data(_47,"panel").panel; +var _4b=_4a.children(".panel-body"); +var _4c=_4a.children(".panel-header").find("a.panel-tool-collapse"); +if(_49.collapsed==true){ +return; +} +_4b.stop(true,true); +if(_49.onBeforeCollapse.call(_47)==false){ +return; +} +_4c.addClass("panel-tool-expand"); +if(_48==true){ +_4b.slideUp("normal",function(){ +_49.collapsed=true; +_49.onCollapse.call(_47); +}); +}else{ +_4b.hide(); +_49.collapsed=true; +_49.onCollapse.call(_47); +} +}; +function _4d(_4e,_4f){ +var _50=$.data(_4e,"panel").options; +var _51=$.data(_4e,"panel").panel; +var _52=_51.children(".panel-body"); +var _53=_51.children(".panel-header").find("a.panel-tool-collapse"); +if(_50.collapsed==false){ +return; +} +_52.stop(true,true); +if(_50.onBeforeExpand.call(_4e)==false){ +return; +} +_53.removeClass("panel-tool-expand"); +if(_4f==true){ +_52.slideDown("normal",function(){ +_50.collapsed=false; +_50.onExpand.call(_4e); +_28(_4e); +_32(_4e); +}); +}else{ +_52.show(); +_50.collapsed=false; +_50.onExpand.call(_4e); +_28(_4e); +_32(_4e); +} +}; +function _3a(_54){ +var _55=$.data(_54,"panel").options; +var _56=$.data(_54,"panel").panel; +var _57=_56.children(".panel-header").find("a.panel-tool-max"); +if(_55.maximized==true){ +return; +} +_57.addClass("panel-tool-restore"); +if(!$.data(_54,"panel").original){ +$.data(_54,"panel").original={width:_55.width,height:_55.height,left:_55.left,top:_55.top,fit:_55.fit}; +} +_55.left=0; +_55.top=0; +_55.fit=true; +_3(_54); +_55.minimized=false; +_55.maximized=true; +_55.onMaximize.call(_54); +}; +function _58(_59){ +var _5a=$.data(_59,"panel").options; +var _5b=$.data(_59,"panel").panel; +_5b._size("unfit"); +_5b.hide(); +_5a.minimized=true; +_5a.maximized=false; +_5a.onMinimize.call(_59); +}; +function _5c(_5d){ +var _5e=$.data(_5d,"panel").options; +var _5f=$.data(_5d,"panel").panel; +var _60=_5f.children(".panel-header").find("a.panel-tool-max"); +if(_5e.maximized==false){ +return; +} +_5f.show(); +_60.removeClass("panel-tool-restore"); +$.extend(_5e,$.data(_5d,"panel").original); +_3(_5d); +_5e.minimized=false; +_5e.maximized=false; +$.data(_5d,"panel").original=null; +_5e.onRestore.call(_5d); +}; +function _61(_62,_63){ +$.data(_62,"panel").options.title=_63; +$(_62).panel("header").find("div.panel-title").html(_63); +}; +var _64=null; +$(window).unbind(".panel").bind("resize.panel",function(){ +if(_64){ +clearTimeout(_64); +} +_64=setTimeout(function(){ +var _65=$("body.layout"); +if(_65.length){ +_65.layout("resize"); +$("body").children(".easyui-fluid:visible").each(function(){ +$(this).triggerHandler("_resize"); +}); +}else{ +$("body").panel("doLayout"); +} +_64=null; +},100); +}); +$.fn.panel=function(_66,_67){ +if(typeof _66=="string"){ +return $.fn.panel.methods[_66](this,_67); +} +_66=_66||{}; +return this.each(function(){ +var _68=$.data(this,"panel"); +var _69; +if(_68){ +_69=$.extend(_68.options,_66); +_68.isLoaded=false; +}else{ +_69=$.extend({},$.fn.panel.defaults,$.fn.panel.parseOptions(this),_66); +$(this).attr("title",""); +_68=$.data(this,"panel",{options:_69,panel:_14(this),isLoaded:false}); +} +_18(this); +if(_69.doSize==true){ +_68.panel.css("display","block"); +_3(this); +} +if(_69.closed==true||_69.minimized==true){ +_68.panel.hide(); +}else{ +_34(this); +} +}); +}; +$.fn.panel.methods={options:function(jq){ +return $.data(jq[0],"panel").options; +},panel:function(jq){ +return $.data(jq[0],"panel").panel; +},header:function(jq){ +return $.data(jq[0],"panel").panel.children(".panel-header"); +},footer:function(jq){ +return jq.panel("panel").children(".panel-footer"); +},body:function(jq){ +return $.data(jq[0],"panel").panel.children(".panel-body"); +},setTitle:function(jq,_6a){ +return jq.each(function(){ +_61(this,_6a); +}); +},open:function(jq,_6b){ +return jq.each(function(){ +_34(this,_6b); +}); +},close:function(jq,_6c){ +return jq.each(function(){ +_3c(this,_6c); +}); +},destroy:function(jq,_6d){ +return jq.each(function(){ +_41(this,_6d); +}); +},clear:function(jq,_6e){ +return jq.each(function(){ +_30(_6e=="footer"?$(this).panel("footer"):this); +}); +},refresh:function(jq,_6f){ +return jq.each(function(){ +var _70=$.data(this,"panel"); +_70.isLoaded=false; +if(_6f){ +if(typeof _6f=="string"){ +_70.options.href=_6f; +}else{ +_70.options.queryParams=_6f; +} +} +_28(this); +}); +},resize:function(jq,_71){ +return jq.each(function(){ +_3(this,_71); +}); +},doLayout:function(jq,all){ +return jq.each(function(){ +_72(this,"body"); +_72($(this).siblings(".panel-footer")[0],"footer"); +function _72(_73,_74){ +if(!_73){ +return; +} +var _75=_73==$("body")[0]; +var s=$(_73).find("div.panel:visible,div.accordion:visible,div.tabs-container:visible,div.layout:visible,.easyui-fluid:visible").filter(function(_76,el){ +var p=$(el).parents(".panel-"+_74+":first"); +return _75?p.length==0:p[0]==_73; +}); +s.each(function(){ +$(this).triggerHandler("_resize",[all||false]); +}); +}; +}); +},move:function(jq,_77){ +return jq.each(function(){ +_f(this,_77); +}); +},maximize:function(jq){ +return jq.each(function(){ +_3a(this); +}); +},minimize:function(jq){ +return jq.each(function(){ +_58(this); +}); +},restore:function(jq){ +return jq.each(function(){ +_5c(this); +}); +},collapse:function(jq,_78){ +return jq.each(function(){ +_3b(this,_78); +}); +},expand:function(jq,_79){ +return jq.each(function(){ +_4d(this,_79); +}); +}}; +$.fn.panel.parseOptions=function(_7a){ +var t=$(_7a); +var hh=t.children(".panel-header,header"); +var ff=t.children(".panel-footer,footer"); +return $.extend({},$.parser.parseOptions(_7a,["id","width","height","left","top","title","iconCls","cls","headerCls","bodyCls","tools","href","method","header","footer",{cache:"boolean",fit:"boolean",border:"boolean",noheader:"boolean"},{collapsible:"boolean",minimizable:"boolean",maximizable:"boolean"},{closable:"boolean",collapsed:"boolean",minimized:"boolean",maximized:"boolean",closed:"boolean"},"openAnimation","closeAnimation",{openDuration:"number",closeDuration:"number"},]),{loadingMessage:(t.attr("loadingMessage")!=undefined?t.attr("loadingMessage"):undefined),header:(hh.length?hh.removeClass("panel-header"):undefined),footer:(ff.length?ff.removeClass("panel-footer"):undefined)}); +}; +$.fn.panel.defaults={id:null,title:null,iconCls:null,width:"auto",height:"auto",left:null,top:null,cls:null,headerCls:null,bodyCls:null,style:{},href:null,cache:true,fit:false,border:true,doSize:true,noheader:false,content:null,collapsible:false,minimizable:false,maximizable:false,closable:false,collapsed:false,minimized:false,maximized:false,closed:false,openAnimation:false,openDuration:400,closeAnimation:false,closeDuration:400,tools:null,footer:null,header:null,queryParams:{},method:"get",href:null,loadingMessage:"Loading...",loader:function(_7b,_7c,_7d){ +var _7e=$(this).panel("options"); +if(!_7e.href){ +return false; +} +$.ajax({type:_7e.method,url:_7e.href,cache:false,data:_7b,dataType:"html",success:function(_7f){ +_7c(_7f); +},error:function(){ +_7d.apply(this,arguments); +}}); +},extractor:function(_80){ +var _81=/]*>((.|[\n\r])*)<\/body>/im; +var _82=_81.exec(_80); +if(_82){ +return _82[1]; +}else{ +return _80; +} +},onBeforeLoad:function(_83){ +},onLoad:function(){ +},onLoadError:function(){ +},onBeforeOpen:function(){ +},onOpen:function(){ +},onBeforeClose:function(){ +},onClose:function(){ +},onBeforeDestroy:function(){ +},onDestroy:function(){ +},onResize:function(_84,_85){ +},onMove:function(_86,top){ +},onMaximize:function(){ +},onRestore:function(){ +},onMinimize:function(){ +},onBeforeCollapse:function(){ +},onBeforeExpand:function(){ +},onCollapse:function(){ +},onExpand:function(){ +}}; +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.parser.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.parser.js new file mode 100644 index 0000000..b30a0db --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.parser.js @@ -0,0 +1,325 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +$.parser={auto:true,onComplete:function(_1){ +},plugins:["draggable","droppable","resizable","pagination","tooltip","linkbutton","menu","menubutton","splitbutton","switchbutton","progressbar","tree","textbox","filebox","combo","combobox","combotree","combogrid","numberbox","validatebox","searchbox","spinner","numberspinner","timespinner","datetimespinner","calendar","datebox","datetimebox","slider","layout","panel","datagrid","propertygrid","treegrid","datalist","tabs","accordion","window","dialog","form"],parse:function(_2){ +var aa=[]; +for(var i=0;i<$.parser.plugins.length;i++){ +var _3=$.parser.plugins[i]; +var r=$(".easyui-"+_3,_2); +if(r.length){ +if(r[_3]){ +r[_3](); +}else{ +aa.push({name:_3,jq:r}); +} +} +} +if(aa.length&&window.easyloader){ +var _4=[]; +for(var i=0;i=0){ +v=Math.floor((_8.width()-_9)*v/100); +}else{ +v=Math.floor((_8.height()-_9)*v/100); +} +}else{ +v=parseInt(v)||undefined; +} +return v; +},parseOptions:function(_b,_c){ +var t=$(_b); +var _d={}; +var s=$.trim(t.attr("data-options")); +if(s){ +if(s.substring(0,1)!="{"){ +s="{"+s+"}"; +} +_d=(new Function("return "+s))(); +} +$.map(["width","height","left","top","minWidth","maxWidth","minHeight","maxHeight"],function(p){ +var pv=$.trim(_b.style[p]||""); +if(pv){ +if(pv.indexOf("%")==-1){ +pv=parseInt(pv)||undefined; +} +_d[p]=pv; +} +}); +if(_c){ +var _e={}; +for(var i=0;i<_c.length;i++){ +var pp=_c[i]; +if(typeof pp=="string"){ +_e[pp]=t.attr(pp); +}else{ +for(var _f in pp){ +var _10=pp[_f]; +if(_10=="boolean"){ +_e[_f]=t.attr(_f)?(t.attr(_f)=="true"):undefined; +}else{ +if(_10=="number"){ +_e[_f]=t.attr(_f)=="0"?0:parseFloat(t.attr(_f))||undefined; +} +} +} +} +} +$.extend(_d,_e); +} +return _d; +}}; +$(function(){ +var d=$("
                                                    ").appendTo("body"); +$._boxModel=d.outerWidth()!=100; +d.remove(); +d=$("
                                                    ").appendTo("body"); +$._positionFixed=(d.css("position")=="fixed"); +d.remove(); +if(!window.easyloader&&$.parser.auto){ +$.parser.parse(); +} +}); +$.fn._outerWidth=function(_11){ +if(_11==undefined){ +if(this[0]==window){ +return this.width()||document.body.clientWidth; +} +return this.outerWidth()||0; +} +return this._size("width",_11); +}; +$.fn._outerHeight=function(_12){ +if(_12==undefined){ +if(this[0]==window){ +return this.height()||document.body.clientHeight; +} +return this.outerHeight()||0; +} +return this._size("height",_12); +}; +$.fn._scrollLeft=function(_13){ +if(_13==undefined){ +return this.scrollLeft(); +}else{ +return this.each(function(){ +$(this).scrollLeft(_13); +}); +} +}; +$.fn._propAttr=$.fn.prop||$.fn.attr; +$.fn._size=function(_14,_15){ +if(typeof _14=="string"){ +if(_14=="clear"){ +return this.each(function(){ +$(this).css({width:"",minWidth:"",maxWidth:"",height:"",minHeight:"",maxHeight:""}); +}); +}else{ +if(_14=="fit"){ +return this.each(function(){ +_16(this,this.tagName=="BODY"?$("body"):$(this).parent(),true); +}); +}else{ +if(_14=="unfit"){ +return this.each(function(){ +_16(this,$(this).parent(),false); +}); +}else{ +if(_15==undefined){ +return _17(this[0],_14); +}else{ +return this.each(function(){ +_17(this,_14,_15); +}); +} +} +} +} +}else{ +return this.each(function(){ +_15=_15||$(this).parent(); +$.extend(_14,_16(this,_15,_14.fit)||{}); +var r1=_18(this,"width",_15,_14); +var r2=_18(this,"height",_15,_14); +if(r1||r2){ +$(this).addClass("easyui-fluid"); +}else{ +$(this).removeClass("easyui-fluid"); +} +}); +} +function _16(_19,_1a,fit){ +if(!_1a.length){ +return false; +} +var t=$(_19)[0]; +var p=_1a[0]; +var _1b=p.fcount||0; +if(fit){ +if(!t.fitted){ +t.fitted=true; +p.fcount=_1b+1; +$(p).addClass("panel-noscroll"); +if(p.tagName=="BODY"){ +$("html").addClass("panel-fit"); +} +} +return {width:($(p).width()||1),height:($(p).height()||1)}; +}else{ +if(t.fitted){ +t.fitted=false; +p.fcount=_1b-1; +if(p.fcount==0){ +$(p).removeClass("panel-noscroll"); +if(p.tagName=="BODY"){ +$("html").removeClass("panel-fit"); +} +} +} +return false; +} +}; +function _18(_1c,_1d,_1e,_1f){ +var t=$(_1c); +var p=_1d; +var p1=p.substr(0,1).toUpperCase()+p.substr(1); +var min=$.parser.parseValue("min"+p1,_1f["min"+p1],_1e); +var max=$.parser.parseValue("max"+p1,_1f["max"+p1],_1e); +var val=$.parser.parseValue(p,_1f[p],_1e); +var _20=(String(_1f[p]||"").indexOf("%")>=0?true:false); +if(!isNaN(val)){ +var v=Math.min(Math.max(val,min||0),max||99999); +if(!_20){ +_1f[p]=v; +} +t._size("min"+p1,""); +t._size("max"+p1,""); +t._size(p,v); +}else{ +t._size(p,""); +t._size("min"+p1,min); +t._size("max"+p1,max); +} +return _20||_1f.fit; +}; +function _17(_21,_22,_23){ +var t=$(_21); +if(_23==undefined){ +_23=parseInt(_21.style[_22]); +if(isNaN(_23)){ +return undefined; +} +if($._boxModel){ +_23+=_24(); +} +return _23; +}else{ +if(_23===""){ +t.css(_22,""); +}else{ +if($._boxModel){ +_23-=_24(); +if(_23<0){ +_23=0; +} +} +t.css(_22,_23+"px"); +} +} +function _24(){ +if(_22.toLowerCase().indexOf("width")>=0){ +return t.outerWidth()-t.width(); +}else{ +return t.outerHeight()-t.height(); +} +}; +}; +}; +})(jQuery); +(function($){ +var _25=null; +var _26=null; +var _27=false; +function _28(e){ +if(e.touches.length!=1){ +return; +} +if(!_27){ +_27=true; +dblClickTimer=setTimeout(function(){ +_27=false; +},500); +}else{ +clearTimeout(dblClickTimer); +_27=false; +_29(e,"dblclick"); +} +_25=setTimeout(function(){ +_29(e,"contextmenu",3); +},1000); +_29(e,"mousedown"); +if($.fn.draggable.isDragging||$.fn.resizable.isResizing){ +e.preventDefault(); +} +}; +function _2a(e){ +if(e.touches.length!=1){ +return; +} +if(_25){ +clearTimeout(_25); +} +_29(e,"mousemove"); +if($.fn.draggable.isDragging||$.fn.resizable.isResizing){ +e.preventDefault(); +} +}; +function _2b(e){ +if(_25){ +clearTimeout(_25); +} +_29(e,"mouseup"); +if($.fn.draggable.isDragging||$.fn.resizable.isResizing){ +e.preventDefault(); +} +}; +function _29(e,_2c,_2d){ +var _2e=new $.Event(_2c); +_2e.pageX=e.changedTouches[0].pageX; +_2e.pageY=e.changedTouches[0].pageY; +_2e.which=_2d||1; +$(e.target).trigger(_2e); +}; +if(document.addEventListener){ +document.addEventListener("touchstart",_28,true); +document.addEventListener("touchmove",_2a,true); +document.addEventListener("touchend",_2b,true); +} +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.progressbar.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.progressbar.js new file mode 100644 index 0000000..859410e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.progressbar.js @@ -0,0 +1,84 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2){ +$(_2).addClass("progressbar"); +$(_2).html("
                                                    "); +$(_2).bind("_resize",function(e,_3){ +if($(this).hasClass("easyui-fluid")||_3){ +_4(_2); +} +return false; +}); +return $(_2); +}; +function _4(_5,_6){ +var _7=$.data(_5,"progressbar").options; +var _8=$.data(_5,"progressbar").bar; +if(_6){ +_7.width=_6; +} +_8._size(_7); +_8.find("div.progressbar-text").css("width",_8.width()); +_8.find("div.progressbar-text,div.progressbar-value").css({height:_8.height()+"px",lineHeight:_8.height()+"px"}); +}; +$.fn.progressbar=function(_9,_a){ +if(typeof _9=="string"){ +var _b=$.fn.progressbar.methods[_9]; +if(_b){ +return _b(this,_a); +} +} +_9=_9||{}; +return this.each(function(){ +var _c=$.data(this,"progressbar"); +if(_c){ +$.extend(_c.options,_9); +}else{ +_c=$.data(this,"progressbar",{options:$.extend({},$.fn.progressbar.defaults,$.fn.progressbar.parseOptions(this),_9),bar:_1(this)}); +} +$(this).progressbar("setValue",_c.options.value); +_4(this); +}); +}; +$.fn.progressbar.methods={options:function(jq){ +return $.data(jq[0],"progressbar").options; +},resize:function(jq,_d){ +return jq.each(function(){ +_4(this,_d); +}); +},getValue:function(jq){ +return $.data(jq[0],"progressbar").options.value; +},setValue:function(jq,_e){ +if(_e<0){ +_e=0; +} +if(_e>100){ +_e=100; +} +return jq.each(function(){ +var _f=$.data(this,"progressbar").options; +var _10=_f.text.replace(/{value}/,_e); +var _11=_f.value; +_f.value=_e; +$(this).find("div.progressbar-value").width(_e+"%"); +$(this).find("div.progressbar-text").html(_10); +if(_11!=_e){ +_f.onChange.call(this,_e,_11); +} +}); +}}; +$.fn.progressbar.parseOptions=function(_12){ +return $.extend({},$.parser.parseOptions(_12,["width","height","text",{value:"number"}])); +}; +$.fn.progressbar.defaults={width:"auto",height:22,value:0,text:"{value}%",onChange:function(_13,_14){ +}}; +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.propertygrid.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.propertygrid.js new file mode 100644 index 0000000..11abee3 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.propertygrid.js @@ -0,0 +1,330 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +var _1; +$(document).unbind(".propertygrid").bind("mousedown.propertygrid",function(e){ +var p=$(e.target).closest("div.datagrid-view,div.combo-panel"); +if(p.length){ +return; +} +_2(_1); +_1=undefined; +}); +function _3(_4){ +var _5=$.data(_4,"propertygrid"); +var _6=$.data(_4,"propertygrid").options; +$(_4).datagrid($.extend({},_6,{cls:"propertygrid",view:(_6.showGroup?_6.groupView:_6.view),onBeforeEdit:function(_7,_8){ +if(_6.onBeforeEdit.call(_4,_7,_8)==false){ +return false; +} +var dg=$(this); +var _8=dg.datagrid("getRows")[_7]; +var _9=dg.datagrid("getColumnOption","value"); +_9.editor=_8.editor; +},onClickCell:function(_a,_b,_c){ +if(_1!=this){ +_2(_1); +_1=this; +} +if(_6.editIndex!=_a){ +_2(_1); +$(this).datagrid("beginEdit",_a); +var ed=$(this).datagrid("getEditor",{index:_a,field:_b}); +if(!ed){ +ed=$(this).datagrid("getEditor",{index:_a,field:"value"}); +} +if(ed){ +var t=$(ed.target); +var _d=t.data("textbox")?t.textbox("textbox"):t; +_d.focus(); +_6.editIndex=_a; +} +} +_6.onClickCell.call(_4,_a,_b,_c); +},loadFilter:function(_e){ +_2(this); +return _6.loadFilter.call(this,_e); +}})); +}; +function _2(_f){ +var t=$(_f); +if(!t.length){ +return; +} +var _10=$.data(_f,"propertygrid").options; +_10.finder.getTr(_f,null,"editing").each(function(){ +var _11=parseInt($(this).attr("datagrid-row-index")); +if(t.datagrid("validateRow",_11)){ +t.datagrid("endEdit",_11); +}else{ +t.datagrid("cancelEdit",_11); +} +}); +_10.editIndex=undefined; +}; +$.fn.propertygrid=function(_12,_13){ +if(typeof _12=="string"){ +var _14=$.fn.propertygrid.methods[_12]; +if(_14){ +return _14(this,_13); +}else{ +return this.datagrid(_12,_13); +} +} +_12=_12||{}; +return this.each(function(){ +var _15=$.data(this,"propertygrid"); +if(_15){ +$.extend(_15.options,_12); +}else{ +var _16=$.extend({},$.fn.propertygrid.defaults,$.fn.propertygrid.parseOptions(this),_12); +_16.frozenColumns=$.extend(true,[],_16.frozenColumns); +_16.columns=$.extend(true,[],_16.columns); +$.data(this,"propertygrid",{options:_16}); +} +_3(this); +}); +}; +$.fn.propertygrid.methods={options:function(jq){ +return $.data(jq[0],"propertygrid").options; +}}; +$.fn.propertygrid.parseOptions=function(_17){ +return $.extend({},$.fn.datagrid.parseOptions(_17),$.parser.parseOptions(_17,[{showGroup:"boolean"}])); +}; +var _18=$.extend({},$.fn.datagrid.defaults.view,{render:function(_19,_1a,_1b){ +var _1c=[]; +var _1d=this.groups; +for(var i=0;i<_1d.length;i++){ +_1c.push(this.renderGroup.call(this,_19,i,_1d[i],_1b)); +} +$(_1a).html(_1c.join("")); +},renderGroup:function(_1e,_1f,_20,_21){ +var _22=$.data(_1e,"datagrid"); +var _23=_22.options; +var _24=$(_1e).datagrid("getColumnFields",_21); +var _25=[]; +_25.push("
                                                    "); +if((_21&&(_23.rownumbers||_23.frozenColumns.length))||(!_21&&!(_23.rownumbers||_23.frozenColumns.length))){ +_25.push(""); +_25.push(" "); +_25.push(""); +} +if(!_21){ +_25.push(""); +_25.push(_23.groupFormatter.call(_1e,_20.value,_20.rows)); +_25.push(""); +} +_25.push("
                                                    "); +_25.push(""); +var _26=_20.startIndex; +for(var j=0;j<_20.rows.length;j++){ +var css=_23.rowStyler?_23.rowStyler.call(_1e,_26,_20.rows[j]):""; +var _27=""; +var _28=""; +if(typeof css=="string"){ +_28=css; +}else{ +if(css){ +_27=css["class"]||""; +_28=css["style"]||""; +} +} +var cls="class=\"datagrid-row "+(_26%2&&_23.striped?"datagrid-row-alt ":" ")+_27+"\""; +var _29=_28?"style=\""+_28+"\"":""; +var _2a=_22.rowIdPrefix+"-"+(_21?1:2)+"-"+_26; +_25.push(""); +_25.push(this.renderRow.call(this,_1e,_24,_21,_26,_20.rows[j])); +_25.push(""); +_26++; +} +_25.push("
                                                    "); +return _25.join(""); +},bindEvents:function(_2b){ +var _2c=$.data(_2b,"datagrid"); +var dc=_2c.dc; +var _2d=dc.body1.add(dc.body2); +var _2e=($.data(_2d[0],"events")||$._data(_2d[0],"events")).click[0].handler; +_2d.unbind("click").bind("click",function(e){ +var tt=$(e.target); +var _2f=tt.closest("span.datagrid-row-expander"); +if(_2f.length){ +var _30=_2f.closest("div.datagrid-group").attr("group-index"); +if(_2f.hasClass("datagrid-row-collapse")){ +$(_2b).datagrid("collapseGroup",_30); +}else{ +$(_2b).datagrid("expandGroup",_30); +} +}else{ +_2e(e); +} +e.stopPropagation(); +}); +},onBeforeRender:function(_31,_32){ +var _33=$.data(_31,"datagrid"); +var _34=_33.options; +_35(); +var _36=[]; +for(var i=0;i<_32.length;i++){ +var row=_32[i]; +var _37=_38(row[_34.groupField]); +if(!_37){ +_37={value:row[_34.groupField],rows:[row]}; +_36.push(_37); +}else{ +_37.rows.push(row); +} +} +var _39=0; +var _3a=[]; +for(var i=0;i<_36.length;i++){ +var _37=_36[i]; +_37.startIndex=_39; +_39+=_37.rows.length; +_3a=_3a.concat(_37.rows); +} +_33.data.rows=_3a; +this.groups=_36; +var _3b=this; +setTimeout(function(){ +_3b.bindEvents(_31); +},0); +function _38(_3c){ +for(var i=0;i<_36.length;i++){ +var _3d=_36[i]; +if(_3d.value==_3c){ +return _3d; +} +} +return null; +}; +function _35(){ +if(!$("#datagrid-group-style").length){ +$("head").append(""); +} +}; +}}); +$.extend($.fn.datagrid.methods,{groups:function(jq){ +return jq.datagrid("options").view.groups; +},expandGroup:function(jq,_3e){ +return jq.each(function(){ +var _3f=$.data(this,"datagrid").dc.view; +var _40=_3f.find(_3e!=undefined?"div.datagrid-group[group-index=\""+_3e+"\"]":"div.datagrid-group"); +var _41=_40.find("span.datagrid-row-expander"); +if(_41.hasClass("datagrid-row-expand")){ +_41.removeClass("datagrid-row-expand").addClass("datagrid-row-collapse"); +_40.next("table").show(); +} +$(this).datagrid("fixRowHeight"); +}); +},collapseGroup:function(jq,_42){ +return jq.each(function(){ +var _43=$.data(this,"datagrid").dc.view; +var _44=_43.find(_42!=undefined?"div.datagrid-group[group-index=\""+_42+"\"]":"div.datagrid-group"); +var _45=_44.find("span.datagrid-row-expander"); +if(_45.hasClass("datagrid-row-collapse")){ +_45.removeClass("datagrid-row-collapse").addClass("datagrid-row-expand"); +_44.next("table").hide(); +} +$(this).datagrid("fixRowHeight"); +}); +}}); +$.extend(_18,{refreshGroupTitle:function(_46,_47){ +var _48=$.data(_46,"datagrid"); +var _49=_48.options; +var dc=_48.dc; +var _4a=this.groups[_47]; +var _4b=dc.body2.children("div.datagrid-group[group-index="+_47+"]").find("span.datagrid-group-title"); +_4b.html(_49.groupFormatter.call(_46,_4a.value,_4a.rows)); +},insertRow:function(_4c,_4d,row){ +var _4e=$.data(_4c,"datagrid"); +var _4f=_4e.options; +var dc=_4e.dc; +var _50=null; +var _51; +if(!_4e.data.rows.length){ +$(_4c).datagrid("loadData",[row]); +return; +} +for(var i=0;i_50.startIndex+_50.rows.length){ +_4d=_50.startIndex+_50.rows.length; +} +} +$.fn.datagrid.defaults.view.insertRow.call(this,_4c,_4d,row); +if(_4d>=_50.startIndex+_50.rows.length){ +_52(_4d,true); +_52(_4d,false); +} +_50.rows.splice(_4d-_50.startIndex,0,row); +}else{ +_50={value:row[_4f.groupField],rows:[row],startIndex:_4e.data.rows.length}; +_51=this.groups.length; +dc.body1.append(this.renderGroup.call(this,_4c,_51,_50,true)); +dc.body2.append(this.renderGroup.call(this,_4c,_51,_50,false)); +this.groups.push(_50); +_4e.data.rows.push(row); +} +this.refreshGroupTitle(_4c,_51); +function _52(_53,_54){ +var _55=_54?1:2; +var _56=_4f.finder.getTr(_4c,_53-1,"body",_55); +var tr=_4f.finder.getTr(_4c,_53,"body",_55); +tr.insertAfter(_56); +}; +},updateRow:function(_57,_58,row){ +var _59=$.data(_57,"datagrid").options; +$.fn.datagrid.defaults.view.updateRow.call(this,_57,_58,row); +var tb=_59.finder.getTr(_57,_58,"body",2).closest("table.datagrid-btable"); +var _5a=parseInt(tb.prev().attr("group-index")); +this.refreshGroupTitle(_57,_5a); +},deleteRow:function(_5b,_5c){ +var _5d=$.data(_5b,"datagrid"); +var _5e=_5d.options; +var dc=_5d.dc; +var _5f=dc.body1.add(dc.body2); +var tb=_5e.finder.getTr(_5b,_5c,"body",2).closest("table.datagrid-btable"); +var _60=parseInt(tb.prev().attr("group-index")); +$.fn.datagrid.defaults.view.deleteRow.call(this,_5b,_5c); +var _61=this.groups[_60]; +if(_61.rows.length>1){ +_61.rows.splice(_5c-_61.startIndex,1); +this.refreshGroupTitle(_5b,_60); +}else{ +_5f.children("div.datagrid-group[group-index="+_60+"]").remove(); +for(var i=_60+1;i_13.top&&e.pageY<_13.top+_16){ +dir+="n"; +}else{ +if(e.pageY<_13.top+_15&&e.pageY>_13.top+_15-_16){ +dir+="s"; +} +} +if(e.pageX>_13.left&&e.pageX<_13.left+_16){ +dir+="w"; +}else{ +if(e.pageX<_13.left+_14&&e.pageX>_13.left+_14-_16){ +dir+="e"; +} +} +var _17=_d.handles.split(","); +for(var i=0;i<_17.length;i++){ +var _18=_17[i].replace(/(^\s*)|(\s*$)/g,""); +if(_18=="all"||_18==dir){ +return dir; +} +} +return ""; +}; +}); +}; +$.fn.resizable.methods={options:function(jq){ +return $.data(jq[0],"resizable").options; +},enable:function(jq){ +return jq.each(function(){ +$(this).resizable({disabled:false}); +}); +},disable:function(jq){ +return jq.each(function(){ +$(this).resizable({disabled:true}); +}); +}}; +$.fn.resizable.parseOptions=function(_19){ +var t=$(_19); +return $.extend({},$.parser.parseOptions(_19,["handles",{minWidth:"number",minHeight:"number",maxWidth:"number",maxHeight:"number",edge:"number"}]),{disabled:(t.attr("disabled")?true:undefined)}); +}; +$.fn.resizable.defaults={disabled:false,handles:"n, e, s, w, ne, se, sw, nw, all",minWidth:10,minHeight:10,maxWidth:10000,maxHeight:10000,edge:5,onStartResize:function(e){ +},onResize:function(e){ +},onStopResize:function(e){ +}}; +$.fn.resizable.isResizing=false; +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.searchbox.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.searchbox.js new file mode 100644 index 0000000..5a877b7 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.searchbox.js @@ -0,0 +1,132 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2){ +var _3=$.data(_2,"searchbox"); +var _4=_3.options; +var _5=$.extend(true,[],_4.icons); +_5.push({iconCls:"searchbox-button",handler:function(e){ +var t=$(e.data.target); +var _6=t.searchbox("options"); +_6.searcher.call(e.data.target,t.searchbox("getValue"),t.searchbox("getName")); +}}); +_7(); +var _8=_9(); +$(_2).addClass("searchbox-f").textbox($.extend({},_4,{icons:_5,buttonText:(_8?_8.text:"")})); +$(_2).attr("searchboxName",$(_2).attr("textboxName")); +_3.searchbox=$(_2).next(); +_3.searchbox.addClass("searchbox"); +_a(_8); +function _7(){ +if(_4.menu){ +_3.menu=$(_4.menu).menu(); +var _b=_3.menu.menu("options"); +var _c=_b.onClick; +_b.onClick=function(_d){ +_a(_d); +_c.call(this,_d); +}; +}else{ +if(_3.menu){ +_3.menu.menu("destroy"); +} +_3.menu=null; +} +}; +function _9(){ +if(_3.menu){ +var _e=_3.menu.children("div.menu-item:first"); +_3.menu.children("div.menu-item").each(function(){ +var _f=$.extend({},$.parser.parseOptions(this),{selected:($(this).attr("selected")?true:undefined)}); +if(_f.selected){ +_e=$(this); +return false; +} +}); +return _3.menu.menu("getItem",_e[0]); +}else{ +return null; +} +}; +function _a(_10){ +if(!_10){ +return; +} +$(_2).textbox("button").menubutton({text:_10.text,iconCls:(_10.iconCls||null),menu:_3.menu,menuAlign:_4.buttonAlign,plain:false}); +_3.searchbox.find("input.textbox-value").attr("name",_10.name||_10.text); +$(_2).searchbox("resize"); +}; +}; +$.fn.searchbox=function(_11,_12){ +if(typeof _11=="string"){ +var _13=$.fn.searchbox.methods[_11]; +if(_13){ +return _13(this,_12); +}else{ +return this.textbox(_11,_12); +} +} +_11=_11||{}; +return this.each(function(){ +var _14=$.data(this,"searchbox"); +if(_14){ +$.extend(_14.options,_11); +}else{ +$.data(this,"searchbox",{options:$.extend({},$.fn.searchbox.defaults,$.fn.searchbox.parseOptions(this),_11)}); +} +_1(this); +}); +}; +$.fn.searchbox.methods={options:function(jq){ +var _15=jq.textbox("options"); +return $.extend($.data(jq[0],"searchbox").options,{width:_15.width,value:_15.value,originalValue:_15.originalValue,disabled:_15.disabled,readonly:_15.readonly}); +},menu:function(jq){ +return $.data(jq[0],"searchbox").menu; +},getName:function(jq){ +return $.data(jq[0],"searchbox").searchbox.find("input.textbox-value").attr("name"); +},selectName:function(jq,_16){ +return jq.each(function(){ +var _17=$.data(this,"searchbox").menu; +if(_17){ +_17.children("div.menu-item").each(function(){ +var _18=_17.menu("getItem",this); +if(_18.name==_16){ +$(this).triggerHandler("click"); +return false; +} +}); +} +}); +},destroy:function(jq){ +return jq.each(function(){ +var _19=$(this).searchbox("menu"); +if(_19){ +_19.menu("destroy"); +} +$(this).textbox("destroy"); +}); +}}; +$.fn.searchbox.parseOptions=function(_1a){ +var t=$(_1a); +return $.extend({},$.fn.textbox.parseOptions(_1a),$.parser.parseOptions(_1a,["menu"]),{searcher:(t.attr("searcher")?eval(t.attr("searcher")):undefined)}); +}; +$.fn.searchbox.defaults=$.extend({},$.fn.textbox.defaults,{inputEvents:$.extend({},$.fn.textbox.defaults.inputEvents,{keydown:function(e){ +if(e.keyCode==13){ +e.preventDefault(); +var t=$(e.data.target); +var _1b=t.searchbox("options"); +t.searchbox("setValue",$(this).val()); +_1b.searcher.call(e.data.target,t.searchbox("getValue"),t.searchbox("getName")); +return false; +} +}}),buttonAlign:"left",menu:null,searcher:function(_1c,_1d){ +}}); +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.slider.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.slider.js new file mode 100644 index 0000000..708bc42 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.slider.js @@ -0,0 +1,339 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2){ +var _3=$("
                                                    "+"
                                                    "+""+""+"
                                                    "+"
                                                    "+"
                                                    "+"
                                                    "+""+"
                                                    ").insertAfter(_2); +var t=$(_2); +t.addClass("slider-f").hide(); +var _4=t.attr("name"); +if(_4){ +_3.find("input.slider-value").attr("name",_4); +t.removeAttr("name").attr("sliderName",_4); +} +_3.bind("_resize",function(e,_5){ +if($(this).hasClass("easyui-fluid")||_5){ +_6(_2); +} +return false; +}); +return _3; +}; +function _6(_7,_8){ +var _9=$.data(_7,"slider"); +var _a=_9.options; +var _b=_9.slider; +if(_8){ +if(_8.width){ +_a.width=_8.width; +} +if(_8.height){ +_a.height=_8.height; +} +} +_b._size(_a); +if(_a.mode=="h"){ +_b.css("height",""); +_b.children("div").css("height",""); +}else{ +_b.css("width",""); +_b.children("div").css("width",""); +_b.children("div.slider-rule,div.slider-rulelabel,div.slider-inner")._outerHeight(_b._outerHeight()); +} +_c(_7); +}; +function _d(_e){ +var _f=$.data(_e,"slider"); +var _10=_f.options; +var _11=_f.slider; +var aa=_10.mode=="h"?_10.rule:_10.rule.slice(0).reverse(); +if(_10.reversed){ +aa=aa.slice(0).reverse(); +} +_12(aa); +function _12(aa){ +var _13=_11.find("div.slider-rule"); +var _14=_11.find("div.slider-rulelabel"); +_13.empty(); +_14.empty(); +for(var i=0;i").appendTo(_13); +_16.css((_10.mode=="h"?"left":"top"),_15); +if(aa[i]!="|"){ +_16=$("").appendTo(_14); +_16.html(aa[i]); +if(_10.mode=="h"){ +_16.css({left:_15,marginLeft:-Math.round(_16.outerWidth()/2)}); +}else{ +_16.css({top:_15,marginTop:-Math.round(_16.outerHeight()/2)}); +} +} +} +}; +}; +function _17(_18){ +var _19=$.data(_18,"slider"); +var _1a=_19.options; +var _1b=_19.slider; +_1b.removeClass("slider-h slider-v slider-disabled"); +_1b.addClass(_1a.mode=="h"?"slider-h":"slider-v"); +_1b.addClass(_1a.disabled?"slider-disabled":""); +var _1c=_1b.find(".slider-inner"); +_1c.html(""+""); +if(_1a.range){ +_1c.append(""+""); +} +_1b.find("a.slider-handle").draggable({axis:_1a.mode,cursor:"pointer",disabled:_1a.disabled,onDrag:function(e){ +var _1d=e.data.left; +var _1e=_1b.width(); +if(_1a.mode!="h"){ +_1d=e.data.top; +_1e=_1b.height(); +} +if(_1d<0||_1d>_1e){ +return false; +}else{ +_1f(_1d,this); +return false; +} +},onStartDrag:function(){ +_19.isDragging=true; +_1a.onSlideStart.call(_18,_1a.value); +},onStopDrag:function(e){ +_1f(_1a.mode=="h"?e.data.left:e.data.top,this); +_1a.onSlideEnd.call(_18,_1a.value); +_1a.onComplete.call(_18,_1a.value); +_19.isDragging=false; +}}); +_1b.find("div.slider-inner").unbind(".slider").bind("mousedown.slider",function(e){ +if(_19.isDragging||_1a.disabled){ +return; +} +var pos=$(this).offset(); +_1f(_1a.mode=="h"?(e.pageX-pos.left):(e.pageY-pos.top)); +_1a.onComplete.call(_18,_1a.value); +}); +function _1f(pos,_20){ +var _21=_22(_18,pos); +var s=Math.abs(_21%_1a.step); +if(s<_1a.step/2){ +_21-=s; +}else{ +_21=_21-s+_1a.step; +} +if(_1a.range){ +var v1=_1a.value[0]; +var v2=_1a.value[1]; +var m=parseFloat((v1+v2)/2); +if(_20){ +var _23=$(_20).nextAll(".slider-handle").length>0; +if(_21<=v2&&_23){ +v1=_21; +}else{ +if(_21>=v1&&(!_23)){ +v2=_21; +} +} +}else{ +if(_21v2){ +v2=_21; +}else{ +_21_28.max){ +_2d=_28.max; +} +var _2e=$("").appendTo(_29); +_2e.attr("name",_2c); +_2e.val(_2d); +_2b.push(_2d); +var _2f=_29.find(".slider-handle:eq("+i+")"); +var tip=_2f.next(); +var pos=_30(_25,_2d); +if(_28.showTip){ +tip.show(); +tip.html(_28.tipFormatter.call(_25,_2d)); +}else{ +tip.hide(); +} +if(_28.mode=="h"){ +var _31="left:"+pos+"px;"; +_2f.attr("style",_31); +tip.attr("style",_31+"margin-left:"+(-Math.round(tip.outerWidth()/2))+"px"); +}else{ +var _31="top:"+pos+"px;"; +_2f.attr("style",_31); +tip.attr("style",_31+"margin-left:"+(-Math.round(tip.outerWidth()))+"px"); +} +} +_28.value=_28.range?_2b:_2b[0]; +$(_25).val(_28.range?_2b.join(_28.separator):_2b[0]); +if(_2a.join(",")!=_2b.join(",")){ +_28.onChange.call(_25,_28.value,(_28.range?_2a:_2a[0])); +} +}; +function _c(_32){ +var _33=$.data(_32,"slider").options; +var fn=_33.onChange; +_33.onChange=function(){ +}; +_24(_32,_33.value); +_33.onChange=fn; +}; +function _30(_34,_35){ +var _36=$.data(_34,"slider"); +var _37=_36.options; +var _38=_36.slider; +var _39=_37.mode=="h"?_38.width():_38.height(); +var pos=_37.converter.toPosition.call(_34,_35,_39); +if(_37.mode=="v"){ +pos=_38.height()-pos; +} +if(_37.reversed){ +pos=_39-pos; +} +return pos.toFixed(0); +}; +function _22(_3a,pos){ +var _3b=$.data(_3a,"slider"); +var _3c=_3b.options; +var _3d=_3b.slider; +var _3e=_3c.mode=="h"?_3d.width():_3d.height(); +var pos=_3c.mode=="h"?(_3c.reversed?(_3e-pos):pos):(_3c.reversed?pos:(_3e-pos)); +var _3f=_3c.converter.toValue.call(_3a,pos,_3e); +return _3f.toFixed(0); +}; +$.fn.slider=function(_40,_41){ +if(typeof _40=="string"){ +return $.fn.slider.methods[_40](this,_41); +} +_40=_40||{}; +return this.each(function(){ +var _42=$.data(this,"slider"); +if(_42){ +$.extend(_42.options,_40); +}else{ +_42=$.data(this,"slider",{options:$.extend({},$.fn.slider.defaults,$.fn.slider.parseOptions(this),_40),slider:_1(this)}); +$(this).removeAttr("disabled"); +} +var _43=_42.options; +_43.min=parseFloat(_43.min); +_43.max=parseFloat(_43.max); +if(_43.range){ +if(!$.isArray(_43.value)){ +_43.value=$.map(String(_43.value).split(_43.separator),function(v){ +return parseFloat(v); +}); +} +if(_43.value.length<2){ +_43.value.push(_43.max); +} +}else{ +_43.value=parseFloat(_43.value); +} +_43.step=parseFloat(_43.step); +_43.originalValue=_43.value; +_17(this); +_d(this); +_6(this); +}); +}; +$.fn.slider.methods={options:function(jq){ +return $.data(jq[0],"slider").options; +},destroy:function(jq){ +return jq.each(function(){ +$.data(this,"slider").slider.remove(); +$(this).remove(); +}); +},resize:function(jq,_44){ +return jq.each(function(){ +_6(this,_44); +}); +},getValue:function(jq){ +return jq.slider("options").value; +},getValues:function(jq){ +return jq.slider("options").value; +},setValue:function(jq,_45){ +return jq.each(function(){ +_24(this,[_45]); +}); +},setValues:function(jq,_46){ +return jq.each(function(){ +_24(this,_46); +}); +},clear:function(jq){ +return jq.each(function(){ +var _47=$(this).slider("options"); +_24(this,_47.range?[_47.min,_47.max]:[_47.min]); +}); +},reset:function(jq){ +return jq.each(function(){ +var _48=$(this).slider("options"); +$(this).slider(_48.range?"setValues":"setValue",_48.originalValue); +}); +},enable:function(jq){ +return jq.each(function(){ +$.data(this,"slider").options.disabled=false; +_17(this); +}); +},disable:function(jq){ +return jq.each(function(){ +$.data(this,"slider").options.disabled=true; +_17(this); +}); +}}; +$.fn.slider.parseOptions=function(_49){ +var t=$(_49); +return $.extend({},$.parser.parseOptions(_49,["width","height","mode",{reversed:"boolean",showTip:"boolean",range:"boolean",min:"number",max:"number",step:"number"}]),{value:(t.val()||undefined),disabled:(t.attr("disabled")?true:undefined),rule:(t.attr("rule")?eval(t.attr("rule")):undefined)}); +}; +$.fn.slider.defaults={width:"auto",height:"auto",mode:"h",reversed:false,showTip:false,disabled:false,range:false,value:0,separator:",",min:0,max:100,step:1,rule:[],tipFormatter:function(_4a){ +return _4a; +},converter:{toPosition:function(_4b,_4c){ +var _4d=$(this).slider("options"); +return (_4b-_4d.min)/(_4d.max-_4d.min)*_4c; +},toValue:function(pos,_4e){ +var _4f=$(this).slider("options"); +return _4f.min+(_4f.max-_4f.min)*(pos/_4e); +}},onChange:function(_50,_51){ +},onSlideStart:function(_52){ +},onSlideEnd:function(_53){ +},onComplete:function(_54){ +}}; +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.spinner.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.spinner.js new file mode 100644 index 0000000..c715271 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.spinner.js @@ -0,0 +1,74 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2){ +var _3=$.data(_2,"spinner"); +var _4=_3.options; +var _5=$.extend(true,[],_4.icons); +_5.push({iconCls:"spinner-arrow",handler:function(e){ +_6(e); +}}); +$(_2).addClass("spinner-f").textbox($.extend({},_4,{icons:_5})); +var _7=$(_2).textbox("getIcon",_5.length-1); +_7.append(""); +_7.append(""); +$(_2).attr("spinnerName",$(_2).attr("textboxName")); +_3.spinner=$(_2).next(); +_3.spinner.addClass("spinner"); +}; +function _6(e){ +var _8=e.data.target; +var _9=$(_8).spinner("options"); +var up=$(e.target).closest("a.spinner-arrow-up"); +if(up.length){ +_9.spin.call(_8,false); +_9.onSpinUp.call(_8); +$(_8).spinner("validate"); +} +var _a=$(e.target).closest("a.spinner-arrow-down"); +if(_a.length){ +_9.spin.call(_8,true); +_9.onSpinDown.call(_8); +$(_8).spinner("validate"); +} +}; +$.fn.spinner=function(_b,_c){ +if(typeof _b=="string"){ +var _d=$.fn.spinner.methods[_b]; +if(_d){ +return _d(this,_c); +}else{ +return this.textbox(_b,_c); +} +} +_b=_b||{}; +return this.each(function(){ +var _e=$.data(this,"spinner"); +if(_e){ +$.extend(_e.options,_b); +}else{ +_e=$.data(this,"spinner",{options:$.extend({},$.fn.spinner.defaults,$.fn.spinner.parseOptions(this),_b)}); +} +_1(this); +}); +}; +$.fn.spinner.methods={options:function(jq){ +var _f=jq.textbox("options"); +return $.extend($.data(jq[0],"spinner").options,{width:_f.width,value:_f.value,originalValue:_f.originalValue,disabled:_f.disabled,readonly:_f.readonly}); +}}; +$.fn.spinner.parseOptions=function(_10){ +return $.extend({},$.fn.textbox.parseOptions(_10),$.parser.parseOptions(_10,["min","max",{increment:"number"}])); +}; +$.fn.spinner.defaults=$.extend({},$.fn.textbox.defaults,{min:null,max:null,increment:1,spin:function(_11){ +},onSpinUp:function(){ +},onSpinDown:function(){ +}}); +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.splitbutton.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.splitbutton.js new file mode 100644 index 0000000..d8038a2 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.splitbutton.js @@ -0,0 +1,49 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2){ +var _3=$.data(_2,"splitbutton").options; +$(_2).menubutton(_3); +$(_2).addClass("s-btn"); +}; +$.fn.splitbutton=function(_4,_5){ +if(typeof _4=="string"){ +var _6=$.fn.splitbutton.methods[_4]; +if(_6){ +return _6(this,_5); +}else{ +return this.menubutton(_4,_5); +} +} +_4=_4||{}; +return this.each(function(){ +var _7=$.data(this,"splitbutton"); +if(_7){ +$.extend(_7.options,_4); +}else{ +$.data(this,"splitbutton",{options:$.extend({},$.fn.splitbutton.defaults,$.fn.splitbutton.parseOptions(this),_4)}); +$(this).removeAttr("disabled"); +} +_1(this); +}); +}; +$.fn.splitbutton.methods={options:function(jq){ +var _8=jq.menubutton("options"); +var _9=$.data(jq[0],"splitbutton").options; +$.extend(_9,{disabled:_8.disabled,toggle:_8.toggle,selected:_8.selected}); +return _9; +}}; +$.fn.splitbutton.parseOptions=function(_a){ +var t=$(_a); +return $.extend({},$.fn.linkbutton.parseOptions(_a),$.parser.parseOptions(_a,["menu",{plain:"boolean",duration:"number"}])); +}; +$.fn.splitbutton.defaults=$.extend({},$.fn.linkbutton.defaults,{plain:true,menu:null,duration:100,cls:{btn1:"m-btn-active s-btn-active",btn2:"m-btn-plain-active s-btn-plain-active",arrow:"m-btn-downarrow",trigger:"m-btn-line"}}); +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.switchbutton.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.switchbutton.js new file mode 100644 index 0000000..5bc697f --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.switchbutton.js @@ -0,0 +1,193 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2){ +var _3=$(""+""+""+""+""+""+""+"").insertAfter(_2); +var t=$(_2); +t.addClass("switchbutton-f").hide(); +var _4=t.attr("name"); +if(_4){ +t.removeAttr("name").attr("switchbuttonName",_4); +_3.find(".switchbutton-value").attr("name",_4); +} +_3.bind("_resize",function(e,_5){ +if($(this).hasClass("easyui-fluid")||_5){ +_6(_2); +} +return false; +}); +return _3; +}; +function _6(_7,_8){ +var _9=$.data(_7,"switchbutton"); +var _a=_9.options; +var _b=_9.switchbutton; +if(_8){ +$.extend(_a,_8); +} +var _c=_b.is(":visible"); +if(!_c){ +_b.appendTo("body"); +} +_b._size(_a); +var w=_b.width(); +var h=_b.height(); +var w=_b.outerWidth(); +var h=_b.outerHeight(); +var _d=parseInt(_a.handleWidth)||_b.height(); +var _e=w*2-_d; +_b.find(".switchbutton-inner").css({width:_e+"px",height:h+"px",lineHeight:h+"px"}); +_b.find(".switchbutton-handle")._outerWidth(_d)._outerHeight(h).css({marginLeft:-_d/2+"px"}); +_b.find(".switchbutton-on").css({width:(w-_d/2)+"px",textIndent:(_a.reversed?"":"-")+_d/2+"px"}); +_b.find(".switchbutton-off").css({width:(w-_d/2)+"px",textIndent:(_a.reversed?"-":"")+_d/2+"px"}); +_a.marginWidth=w-_d; +_f(_7,_a.checked,false); +if(!_c){ +_b.insertAfter(_7); +} +}; +function _10(_11){ +var _12=$.data(_11,"switchbutton"); +var _13=_12.options; +var _14=_12.switchbutton; +var _15=_14.find(".switchbutton-inner"); +var on=_15.find(".switchbutton-on").html(_13.onText); +var off=_15.find(".switchbutton-off").html(_13.offText); +var _16=_15.find(".switchbutton-handle").html(_13.handleText); +if(_13.reversed){ +off.prependTo(_15); +on.insertAfter(_16); +}else{ +on.prependTo(_15); +off.insertAfter(_16); +} +_14.find(".switchbutton-value")._propAttr("checked",_13.checked); +_14.removeClass("switchbutton-disabled").addClass(_13.disabled?"switchbutton-disabled":""); +_14.removeClass("switchbutton-reversed").addClass(_13.reversed?"switchbutton-reversed":""); +_f(_11,_13.checked); +_17(_11,_13.readonly); +$(_11).switchbutton("setValue",_13.value); +}; +function _f(_18,_19,_1a){ +var _1b=$.data(_18,"switchbutton"); +var _1c=_1b.options; +_1c.checked=_19; +var _1d=_1b.switchbutton.find(".switchbutton-inner"); +var _1e=_1d.find(".switchbutton-on"); +var _1f=_1c.reversed?(_1c.checked?_1c.marginWidth:0):(_1c.checked?0:_1c.marginWidth); +var dir=_1e.css("float").toLowerCase(); +var css={}; +css["margin-"+dir]=-_1f+"px"; +_1a?_1d.animate(css,200):_1d.css(css); +var _20=_1d.find(".switchbutton-value"); +var ck=_20.is(":checked"); +$(_18).add(_20)._propAttr("checked",_1c.checked); +if(ck!=_1c.checked){ +_1c.onChange.call(_18,_1c.checked); +} +}; +function _21(_22,_23){ +var _24=$.data(_22,"switchbutton"); +var _25=_24.options; +var _26=_24.switchbutton; +var _27=_26.find(".switchbutton-value"); +if(_23){ +_25.disabled=true; +$(_22).add(_27).attr("disabled","disabled"); +_26.addClass("switchbutton-disabled"); +}else{ +_25.disabled=false; +$(_22).add(_27).removeAttr("disabled"); +_26.removeClass("switchbutton-disabled"); +} +}; +function _17(_28,_29){ +var _2a=$.data(_28,"switchbutton"); +var _2b=_2a.options; +_2b.readonly=_29==undefined?true:_29; +_2a.switchbutton.removeClass("switchbutton-readonly").addClass(_2b.readonly?"switchbutton-readonly":""); +}; +function _2c(_2d){ +var _2e=$.data(_2d,"switchbutton"); +var _2f=_2e.options; +_2e.switchbutton.unbind(".switchbutton").bind("click.switchbutton",function(){ +if(!_2f.disabled&&!_2f.readonly){ +_f(_2d,_2f.checked?false:true,true); +} +}); +}; +$.fn.switchbutton=function(_30,_31){ +if(typeof _30=="string"){ +return $.fn.switchbutton.methods[_30](this,_31); +} +_30=_30||{}; +return this.each(function(){ +var _32=$.data(this,"switchbutton"); +if(_32){ +$.extend(_32.options,_30); +}else{ +_32=$.data(this,"switchbutton",{options:$.extend({},$.fn.switchbutton.defaults,$.fn.switchbutton.parseOptions(this),_30),switchbutton:_1(this)}); +} +_32.options.originalChecked=_32.options.checked; +_10(this); +_6(this); +_2c(this); +}); +}; +$.fn.switchbutton.methods={options:function(jq){ +var _33=jq.data("switchbutton"); +return $.extend(_33.options,{value:_33.switchbutton.find(".switchbutton-value").val()}); +},resize:function(jq,_34){ +return jq.each(function(){ +_6(this,_34); +}); +},enable:function(jq){ +return jq.each(function(){ +_21(this,false); +}); +},disable:function(jq){ +return jq.each(function(){ +_21(this,true); +}); +},readonly:function(jq,_35){ +return jq.each(function(){ +_17(this,_35); +}); +},check:function(jq){ +return jq.each(function(){ +_f(this,true); +}); +},uncheck:function(jq){ +return jq.each(function(){ +_f(this,false); +}); +},clear:function(jq){ +return jq.each(function(){ +_f(this,false); +}); +},reset:function(jq){ +return jq.each(function(){ +var _36=$(this).switchbutton("options"); +_f(this,_36.originalChecked); +}); +},setValue:function(jq,_37){ +return jq.each(function(){ +$(this).val(_37); +$.data(this,"switchbutton").switchbutton.find(".switchbutton-value").val(_37); +}); +}}; +$.fn.switchbutton.parseOptions=function(_38){ +var t=$(_38); +return $.extend({},$.parser.parseOptions(_38,["onText","offText","handleText",{handleWidth:"number",reversed:"boolean"}]),{value:(t.val()||undefined),checked:(t.attr("checked")?true:undefined),disabled:(t.attr("disabled")?true:undefined),readonly:(t.attr("readonly")?true:undefined)}); +}; +$.fn.switchbutton.defaults={handleWidth:"auto",width:60,height:26,checked:false,disabled:false,readonly:false,reversed:false,onText:"ON",offText:"OFF",handleText:"",value:"on",onChange:function(_39){ +}}; +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.tabs.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.tabs.js new file mode 100644 index 0000000..dec075f --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.tabs.js @@ -0,0 +1,704 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(c){ +var w=0; +$(c).children().each(function(){ +w+=$(this).outerWidth(true); +}); +return w; +}; +function _2(_3){ +var _4=$.data(_3,"tabs").options; +if(_4.tabPosition=="left"||_4.tabPosition=="right"||!_4.showHeader){ +return; +} +var _5=$(_3).children("div.tabs-header"); +var _6=_5.children("div.tabs-tool:not(.tabs-tool-hidden)"); +var _7=_5.children("div.tabs-scroller-left"); +var _8=_5.children("div.tabs-scroller-right"); +var _9=_5.children("div.tabs-wrap"); +var _a=_5.outerHeight(); +if(_4.plain){ +_a-=_a-_5.height(); +} +_6._outerHeight(_a); +var _b=_1(_5.find("ul.tabs")); +var _c=_5.width()-_6._outerWidth(); +if(_b>_c){ +_7.add(_8).show()._outerHeight(_a); +if(_4.toolPosition=="left"){ +_6.css({left:_7.outerWidth(),right:""}); +_9.css({marginLeft:_7.outerWidth()+_6._outerWidth(),marginRight:_8._outerWidth(),width:_c-_7.outerWidth()-_8.outerWidth()}); +}else{ +_6.css({left:"",right:_8.outerWidth()}); +_9.css({marginLeft:_7.outerWidth(),marginRight:_8.outerWidth()+_6._outerWidth(),width:_c-_7.outerWidth()-_8.outerWidth()}); +} +}else{ +_7.add(_8).hide(); +if(_4.toolPosition=="left"){ +_6.css({left:0,right:""}); +_9.css({marginLeft:_6._outerWidth(),marginRight:0,width:_c}); +}else{ +_6.css({left:"",right:0}); +_9.css({marginLeft:0,marginRight:_6._outerWidth(),width:_c}); +} +} +}; +function _d(_e){ +var _f=$.data(_e,"tabs").options; +var _10=$(_e).children("div.tabs-header"); +if(_f.tools){ +if(typeof _f.tools=="string"){ +$(_f.tools).addClass("tabs-tool").appendTo(_10); +$(_f.tools).show(); +}else{ +_10.children("div.tabs-tool").remove(); +var _11=$("
                                                    ").appendTo(_10); +var tr=_11.find("tr"); +for(var i=0;i<_f.tools.length;i++){ +var td=$("").appendTo(tr); +var _12=$("").appendTo(td); +_12[0].onclick=eval(_f.tools[i].handler||function(){ +}); +_12.linkbutton($.extend({},_f.tools[i],{plain:true})); +} +} +}else{ +_10.children("div.tabs-tool").remove(); +} +}; +function _13(_14,_15){ +var _16=$.data(_14,"tabs"); +var _17=_16.options; +var cc=$(_14); +if(!_17.doSize){ +return; +} +if(_15){ +$.extend(_17,{width:_15.width,height:_15.height}); +} +cc._size(_17); +var _18=cc.children("div.tabs-header"); +var _19=cc.children("div.tabs-panels"); +var _1a=_18.find("div.tabs-wrap"); +var ul=_1a.find(".tabs"); +ul.children("li").removeClass("tabs-first tabs-last"); +ul.children("li:first").addClass("tabs-first"); +ul.children("li:last").addClass("tabs-last"); +if(_17.tabPosition=="left"||_17.tabPosition=="right"){ +_18._outerWidth(_17.showHeader?_17.headerWidth:0); +_19._outerWidth(cc.width()-_18.outerWidth()); +_18.add(_19)._size("height",isNaN(parseInt(_17.height))?"":cc.height()); +_1a._outerWidth(_18.width()); +ul._outerWidth(_1a.width()).css("height",""); +}else{ +_18.children("div.tabs-scroller-left,div.tabs-scroller-right,div.tabs-tool:not(.tabs-tool-hidden)").css("display",_17.showHeader?"block":"none"); +_18._outerWidth(cc.width()).css("height",""); +if(_17.showHeader){ +_18.css("background-color",""); +_1a.css("height",""); +}else{ +_18.css("background-color","transparent"); +_18._outerHeight(0); +_1a._outerHeight(0); +} +ul._outerHeight(_17.tabHeight).css("width",""); +ul._outerHeight(ul.outerHeight()-ul.height()-1+_17.tabHeight).css("width",""); +_19._size("height",isNaN(parseInt(_17.height))?"":(cc.height()-_18.outerHeight())); +_19._size("width",cc.width()); +} +if(_16.tabs.length){ +var d1=ul.outerWidth(true)-ul.width(); +var li=ul.children("li:first"); +var d2=li.outerWidth(true)-li.width(); +var _1b=_18.width()-_18.children(".tabs-tool:not(.tabs-tool-hidden)")._outerWidth(); +var _1c=Math.floor((_1b-d1-d2*_16.tabs.length)/_16.tabs.length); +$.map(_16.tabs,function(p){ +_1d(p,(_17.justified&&$.inArray(_17.tabPosition,["top","bottom"])>=0)?_1c:undefined); +}); +if(_17.justified&&$.inArray(_17.tabPosition,["top","bottom"])>=0){ +var _1e=_1b-d1-_1(ul); +_1d(_16.tabs[_16.tabs.length-1],_1c+_1e); +} +} +_2(_14); +function _1d(p,_1f){ +var _20=p.panel("options"); +var p_t=_20.tab.find("a.tabs-inner"); +var _1f=_1f?_1f:(parseInt(_20.tabWidth||_17.tabWidth||undefined)); +if(_1f){ +p_t._outerWidth(_1f); +}else{ +p_t.css("width",""); +} +p_t._outerHeight(_17.tabHeight); +p_t.css("lineHeight",p_t.height()+"px"); +p_t.find(".easyui-fluid:visible").triggerHandler("_resize"); +}; +}; +function _21(_22){ +var _23=$.data(_22,"tabs").options; +var tab=_24(_22); +if(tab){ +var _25=$(_22).children("div.tabs-panels"); +var _26=_23.width=="auto"?"auto":_25.width(); +var _27=_23.height=="auto"?"auto":_25.height(); +tab.panel("resize",{width:_26,height:_27}); +} +}; +function _28(_29){ +var _2a=$.data(_29,"tabs").tabs; +var cc=$(_29).addClass("tabs-container"); +var _2b=$("
                                                    ").insertBefore(cc); +cc.children("div").each(function(){ +_2b[0].appendChild(this); +}); +cc[0].appendChild(_2b[0]); +$("
                                                    "+"
                                                    "+"
                                                    "+"
                                                    "+"
                                                      "+"
                                                      "+"
                                                      ").prependTo(_29); +cc.children("div.tabs-panels").children("div").each(function(i){ +var _2c=$.extend({},$.parser.parseOptions(this),{disabled:($(this).attr("disabled")?true:undefined),selected:($(this).attr("selected")?true:undefined)}); +_3c(_29,_2c,$(this)); +}); +cc.children("div.tabs-header").find(".tabs-scroller-left, .tabs-scroller-right").hover(function(){ +$(this).addClass("tabs-scroller-over"); +},function(){ +$(this).removeClass("tabs-scroller-over"); +}); +cc.bind("_resize",function(e,_2d){ +if($(this).hasClass("easyui-fluid")||_2d){ +_13(_29); +_21(_29); +} +return false; +}); +}; +function _2e(_2f){ +var _30=$.data(_2f,"tabs"); +var _31=_30.options; +$(_2f).children("div.tabs-header").unbind().bind("click",function(e){ +if($(e.target).hasClass("tabs-scroller-left")){ +$(_2f).tabs("scrollBy",-_31.scrollIncrement); +}else{ +if($(e.target).hasClass("tabs-scroller-right")){ +$(_2f).tabs("scrollBy",_31.scrollIncrement); +}else{ +var li=$(e.target).closest("li"); +if(li.hasClass("tabs-disabled")){ +return false; +} +var a=$(e.target).closest("a.tabs-close"); +if(a.length){ +_5a(_2f,_32(li)); +}else{ +if(li.length){ +var _33=_32(li); +var _34=_30.tabs[_33].panel("options"); +if(_34.collapsible){ +_34.closed?_50(_2f,_33):_75(_2f,_33); +}else{ +_50(_2f,_33); +} +} +} +return false; +} +} +}).bind("contextmenu",function(e){ +var li=$(e.target).closest("li"); +if(li.hasClass("tabs-disabled")){ +return; +} +if(li.length){ +_31.onContextMenu.call(_2f,e,li.find("span.tabs-title").html(),_32(li)); +} +}); +function _32(li){ +var _35=0; +li.parent().children("li").each(function(i){ +if(li[0]==this){ +_35=i; +return false; +} +}); +return _35; +}; +}; +function _36(_37){ +var _38=$.data(_37,"tabs").options; +var _39=$(_37).children("div.tabs-header"); +var _3a=$(_37).children("div.tabs-panels"); +_39.removeClass("tabs-header-top tabs-header-bottom tabs-header-left tabs-header-right"); +_3a.removeClass("tabs-panels-top tabs-panels-bottom tabs-panels-left tabs-panels-right"); +if(_38.tabPosition=="top"){ +_39.insertBefore(_3a); +}else{ +if(_38.tabPosition=="bottom"){ +_39.insertAfter(_3a); +_39.addClass("tabs-header-bottom"); +_3a.addClass("tabs-panels-top"); +}else{ +if(_38.tabPosition=="left"){ +_39.addClass("tabs-header-left"); +_3a.addClass("tabs-panels-right"); +}else{ +if(_38.tabPosition=="right"){ +_39.addClass("tabs-header-right"); +_3a.addClass("tabs-panels-left"); +} +} +} +} +if(_38.plain==true){ +_39.addClass("tabs-header-plain"); +}else{ +_39.removeClass("tabs-header-plain"); +} +_39.removeClass("tabs-header-narrow").addClass(_38.narrow?"tabs-header-narrow":""); +var _3b=_39.find(".tabs"); +_3b.removeClass("tabs-pill").addClass(_38.pill?"tabs-pill":""); +_3b.removeClass("tabs-narrow").addClass(_38.narrow?"tabs-narrow":""); +_3b.removeClass("tabs-justified").addClass(_38.justified?"tabs-justified":""); +if(_38.border==true){ +_39.removeClass("tabs-header-noborder"); +_3a.removeClass("tabs-panels-noborder"); +}else{ +_39.addClass("tabs-header-noborder"); +_3a.addClass("tabs-panels-noborder"); +} +_38.doSize=true; +}; +function _3c(_3d,_3e,pp){ +_3e=_3e||{}; +var _3f=$.data(_3d,"tabs"); +var _40=_3f.tabs; +if(_3e.index==undefined||_3e.index>_40.length){ +_3e.index=_40.length; +} +if(_3e.index<0){ +_3e.index=0; +} +var ul=$(_3d).children("div.tabs-header").find("ul.tabs"); +var _41=$(_3d).children("div.tabs-panels"); +var tab=$("
                                                    • "+""+""+""+""+"
                                                    • "); +if(!pp){ +pp=$("
                                                      "); +} +if(_3e.index>=_40.length){ +tab.appendTo(ul); +pp.appendTo(_41); +_40.push(pp); +}else{ +tab.insertBefore(ul.children("li:eq("+_3e.index+")")); +pp.insertBefore(_41.children("div.panel:eq("+_3e.index+")")); +_40.splice(_3e.index,0,pp); +} +pp.panel($.extend({},_3e,{tab:tab,border:false,noheader:true,closed:true,doSize:false,iconCls:(_3e.icon?_3e.icon:undefined),onLoad:function(){ +if(_3e.onLoad){ +_3e.onLoad.call(this,arguments); +} +_3f.options.onLoad.call(_3d,$(this)); +},onBeforeOpen:function(){ +if(_3e.onBeforeOpen){ +if(_3e.onBeforeOpen.call(this)==false){ +return false; +} +} +var p=$(_3d).tabs("getSelected"); +if(p){ +if(p[0]!=this){ +$(_3d).tabs("unselect",_4a(_3d,p)); +p=$(_3d).tabs("getSelected"); +if(p){ +return false; +} +}else{ +_21(_3d); +return false; +} +} +var _42=$(this).panel("options"); +_42.tab.addClass("tabs-selected"); +var _43=$(_3d).find(">div.tabs-header>div.tabs-wrap"); +var _44=_42.tab.position().left; +var _45=_44+_42.tab.outerWidth(); +if(_44<0||_45>_43.width()){ +var _46=_44-(_43.width()-_42.tab.width())/2; +$(_3d).tabs("scrollBy",_46); +}else{ +$(_3d).tabs("scrollBy",0); +} +var _47=$(this).panel("panel"); +_47.css("display","block"); +_21(_3d); +_47.css("display","none"); +},onOpen:function(){ +if(_3e.onOpen){ +_3e.onOpen.call(this); +} +var _48=$(this).panel("options"); +_3f.selectHis.push(_48.title); +_3f.options.onSelect.call(_3d,_48.title,_4a(_3d,this)); +},onBeforeClose:function(){ +if(_3e.onBeforeClose){ +if(_3e.onBeforeClose.call(this)==false){ +return false; +} +} +$(this).panel("options").tab.removeClass("tabs-selected"); +},onClose:function(){ +if(_3e.onClose){ +_3e.onClose.call(this); +} +var _49=$(this).panel("options"); +_3f.options.onUnselect.call(_3d,_49.title,_4a(_3d,this)); +}})); +$(_3d).tabs("update",{tab:pp,options:pp.panel("options"),type:"header"}); +}; +function _4b(_4c,_4d){ +var _4e=$.data(_4c,"tabs"); +var _4f=_4e.options; +if(_4d.selected==undefined){ +_4d.selected=true; +} +_3c(_4c,_4d); +_4f.onAdd.call(_4c,_4d.title,_4d.index); +if(_4d.selected){ +_50(_4c,_4d.index); +} +}; +function _51(_52,_53){ +_53.type=_53.type||"all"; +var _54=$.data(_52,"tabs").selectHis; +var pp=_53.tab; +var _55=pp.panel("options"); +var _56=_55.title; +$.extend(_55,_53.options,{iconCls:(_53.options.icon?_53.options.icon:undefined)}); +if(_53.type=="all"||_53.type=="body"){ +pp.panel(); +} +if(_53.type=="all"||_53.type=="header"){ +var tab=_55.tab; +if(_55.header){ +tab.find(".tabs-inner").html($(_55.header)); +}else{ +var _57=tab.find("span.tabs-title"); +var _58=tab.find("span.tabs-icon"); +_57.html(_55.title); +_58.attr("class","tabs-icon"); +tab.find("a.tabs-close").remove(); +if(_55.closable){ +_57.addClass("tabs-closable"); +$("").appendTo(tab); +}else{ +_57.removeClass("tabs-closable"); +} +if(_55.iconCls){ +_57.addClass("tabs-with-icon"); +_58.addClass(_55.iconCls); +}else{ +_57.removeClass("tabs-with-icon"); +} +if(_55.tools){ +var _59=tab.find("span.tabs-p-tool"); +if(!_59.length){ +var _59=$("").insertAfter(tab.find("a.tabs-inner")); +} +if($.isArray(_55.tools)){ +_59.empty(); +for(var i=0;i<_55.tools.length;i++){ +var t=$("").appendTo(_59); +t.addClass(_55.tools[i].iconCls); +if(_55.tools[i].handler){ +t.bind("click",{handler:_55.tools[i].handler},function(e){ +if($(this).parents("li").hasClass("tabs-disabled")){ +return; +} +e.data.handler.call(this); +}); +} +} +}else{ +$(_55.tools).children().appendTo(_59); +} +var pr=_59.children().length*12; +if(_55.closable){ +pr+=8; +}else{ +pr-=3; +_59.css("right","5px"); +} +_57.css("padding-right",pr+"px"); +}else{ +tab.find("span.tabs-p-tool").remove(); +_57.css("padding-right",""); +} +} +if(_56!=_55.title){ +for(var i=0;i<_54.length;i++){ +if(_54[i]==_56){ +_54[i]=_55.title; +} +} +} +} +if(_55.disabled){ +_55.tab.addClass("tabs-disabled"); +}else{ +_55.tab.removeClass("tabs-disabled"); +} +_13(_52); +$.data(_52,"tabs").options.onUpdate.call(_52,_55.title,_4a(_52,pp)); +}; +function _5a(_5b,_5c){ +var _5d=$.data(_5b,"tabs").options; +var _5e=$.data(_5b,"tabs").tabs; +var _5f=$.data(_5b,"tabs").selectHis; +if(!_60(_5b,_5c)){ +return; +} +var tab=_61(_5b,_5c); +var _62=tab.panel("options").title; +var _63=_4a(_5b,tab); +if(_5d.onBeforeClose.call(_5b,_62,_63)==false){ +return; +} +var tab=_61(_5b,_5c,true); +tab.panel("options").tab.remove(); +tab.panel("destroy"); +_5d.onClose.call(_5b,_62,_63); +_13(_5b); +for(var i=0;i<_5f.length;i++){ +if(_5f[i]==_62){ +_5f.splice(i,1); +i--; +} +} +var _64=_5f.pop(); +if(_64){ +_50(_5b,_64); +}else{ +if(_5e.length){ +_50(_5b,0); +} +} +}; +function _61(_65,_66,_67){ +var _68=$.data(_65,"tabs").tabs; +if(typeof _66=="number"){ +if(_66<0||_66>=_68.length){ +return null; +}else{ +var tab=_68[_66]; +if(_67){ +_68.splice(_66,1); +} +return tab; +} +} +for(var i=0;i<_68.length;i++){ +var tab=_68[i]; +if(tab.panel("options").title==_66){ +if(_67){ +_68.splice(i,1); +} +return tab; +} +} +return null; +}; +function _4a(_69,tab){ +var _6a=$.data(_69,"tabs").tabs; +for(var i=0;i<_6a.length;i++){ +if(_6a[i][0]==$(tab)[0]){ +return i; +} +} +return -1; +}; +function _24(_6b){ +var _6c=$.data(_6b,"tabs").tabs; +for(var i=0;i<_6c.length;i++){ +var tab=_6c[i]; +if(tab.panel("options").tab.hasClass("tabs-selected")){ +return tab; +} +} +return null; +}; +function _6d(_6e){ +var _6f=$.data(_6e,"tabs"); +var _70=_6f.tabs; +for(var i=0;i<_70.length;i++){ +var _71=_70[i].panel("options"); +if(_71.selected&&!_71.disabled){ +_50(_6e,i); +return; +} +} +_50(_6e,_6f.options.selected); +}; +function _50(_72,_73){ +var p=_61(_72,_73); +if(p&&!p.is(":visible")){ +_74(_72); +if(!p.panel("options").disabled){ +p.panel("open"); +} +} +}; +function _75(_76,_77){ +var p=_61(_76,_77); +if(p&&p.is(":visible")){ +_74(_76); +p.panel("close"); +} +}; +function _74(_78){ +$(_78).children("div.tabs-panels").each(function(){ +$(this).stop(true,true); +}); +}; +function _60(_79,_7a){ +return _61(_79,_7a)!=null; +}; +function _7b(_7c,_7d){ +var _7e=$.data(_7c,"tabs").options; +_7e.showHeader=_7d; +$(_7c).tabs("resize"); +}; +function _7f(_80,_81){ +var _82=$(_80).find(">.tabs-header>.tabs-tool"); +if(_81){ +_82.removeClass("tabs-tool-hidden").show(); +}else{ +_82.addClass("tabs-tool-hidden").hide(); +} +$(_80).tabs("resize").tabs("scrollBy",0); +}; +$.fn.tabs=function(_83,_84){ +if(typeof _83=="string"){ +return $.fn.tabs.methods[_83](this,_84); +} +_83=_83||{}; +return this.each(function(){ +var _85=$.data(this,"tabs"); +if(_85){ +$.extend(_85.options,_83); +}else{ +$.data(this,"tabs",{options:$.extend({},$.fn.tabs.defaults,$.fn.tabs.parseOptions(this),_83),tabs:[],selectHis:[]}); +_28(this); +} +_d(this); +_36(this); +_13(this); +_2e(this); +_6d(this); +}); +}; +$.fn.tabs.methods={options:function(jq){ +var cc=jq[0]; +var _86=$.data(cc,"tabs").options; +var s=_24(cc); +_86.selected=s?_4a(cc,s):-1; +return _86; +},tabs:function(jq){ +return $.data(jq[0],"tabs").tabs; +},resize:function(jq,_87){ +return jq.each(function(){ +_13(this,_87); +_21(this); +}); +},add:function(jq,_88){ +return jq.each(function(){ +_4b(this,_88); +}); +},close:function(jq,_89){ +return jq.each(function(){ +_5a(this,_89); +}); +},getTab:function(jq,_8a){ +return _61(jq[0],_8a); +},getTabIndex:function(jq,tab){ +return _4a(jq[0],tab); +},getSelected:function(jq){ +return _24(jq[0]); +},select:function(jq,_8b){ +return jq.each(function(){ +_50(this,_8b); +}); +},unselect:function(jq,_8c){ +return jq.each(function(){ +_75(this,_8c); +}); +},exists:function(jq,_8d){ +return _60(jq[0],_8d); +},update:function(jq,_8e){ +return jq.each(function(){ +_51(this,_8e); +}); +},enableTab:function(jq,_8f){ +return jq.each(function(){ +var _90=$(this).tabs("getTab",_8f).panel("options"); +_90.tab.removeClass("tabs-disabled"); +_90.disabled=false; +}); +},disableTab:function(jq,_91){ +return jq.each(function(){ +var _92=$(this).tabs("getTab",_91).panel("options"); +_92.tab.addClass("tabs-disabled"); +_92.disabled=true; +}); +},showHeader:function(jq){ +return jq.each(function(){ +_7b(this,true); +}); +},hideHeader:function(jq){ +return jq.each(function(){ +_7b(this,false); +}); +},showTool:function(jq){ +return jq.each(function(){ +_7f(this,true); +}); +},hideTool:function(jq){ +return jq.each(function(){ +_7f(this,false); +}); +},scrollBy:function(jq,_93){ +return jq.each(function(){ +var _94=$(this).tabs("options"); +var _95=$(this).find(">div.tabs-header>div.tabs-wrap"); +var pos=Math.min(_95._scrollLeft()+_93,_96()); +_95.animate({scrollLeft:pos},_94.scrollDuration); +function _96(){ +var w=0; +var ul=_95.children("ul"); +ul.children("li").each(function(){ +w+=$(this).outerWidth(true); +}); +return w-_95.width()+(ul.outerWidth()-ul.width()); +}; +}); +}}; +$.fn.tabs.parseOptions=function(_97){ +return $.extend({},$.parser.parseOptions(_97,["tools","toolPosition","tabPosition",{fit:"boolean",border:"boolean",plain:"boolean"},{headerWidth:"number",tabWidth:"number",tabHeight:"number",selected:"number"},{showHeader:"boolean",justified:"boolean",narrow:"boolean",pill:"boolean"}])); +}; +$.fn.tabs.defaults={width:"auto",height:"auto",headerWidth:150,tabWidth:"auto",tabHeight:27,selected:0,showHeader:true,plain:false,fit:false,border:true,justified:false,narrow:false,pill:false,tools:null,toolPosition:"right",tabPosition:"top",scrollIncrement:100,scrollDuration:400,onLoad:function(_98){ +},onSelect:function(_99,_9a){ +},onUnselect:function(_9b,_9c){ +},onBeforeClose:function(_9d,_9e){ +},onClose:function(_9f,_a0){ +},onAdd:function(_a1,_a2){ +},onUpdate:function(_a3,_a4){ +},onContextMenu:function(e,_a5,_a6){ +}}; +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.textbox.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.textbox.js new file mode 100644 index 0000000..d253a69 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.textbox.js @@ -0,0 +1,396 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2){ +$(_2).addClass("textbox-f").hide(); +var _3=$(""+""+""+"").insertAfter(_2); +var _4=$(_2).attr("name"); +if(_4){ +_3.find("input.textbox-value").attr("name",_4); +$(_2).removeAttr("name").attr("textboxName",_4); +} +return _3; +}; +function _5(_6){ +var _7=$.data(_6,"textbox"); +var _8=_7.options; +var tb=_7.textbox; +tb.find(".textbox-text").remove(); +if(_8.multiline){ +$("").prependTo(tb); +}else{ +$("").prependTo(tb); +} +tb.find(".textbox-addon").remove(); +var bb=_8.icons?$.extend(true,[],_8.icons):[]; +if(_8.iconCls){ +bb.push({iconCls:_8.iconCls,disabled:true}); +} +if(bb.length){ +var bc=$("").prependTo(tb); +bc.addClass("textbox-addon-"+_8.iconAlign); +for(var i=0;i"); +} +} +tb.find(".textbox-button").remove(); +if(_8.buttonText||_8.buttonIcon){ +var _9=$("").prependTo(tb); +_9.addClass("textbox-button-"+_8.buttonAlign).linkbutton({text:_8.buttonText,iconCls:_8.buttonIcon}); +} +_a(_6,_8.disabled); +_b(_6,_8.readonly); +}; +function _c(_d){ +var tb=$.data(_d,"textbox").textbox; +tb.find(".textbox-text").validatebox("destroy"); +tb.remove(); +$(_d).remove(); +}; +function _e(_f,_10){ +var _11=$.data(_f,"textbox"); +var _12=_11.options; +var tb=_11.textbox; +var _13=tb.parent(); +if(_10){ +_12.width=_10; +} +if(isNaN(parseInt(_12.width))){ +var c=$(_f).clone(); +c.css("visibility","hidden"); +c.insertAfter(_f); +_12.width=c.outerWidth(); +c.remove(); +} +var _14=tb.is(":visible"); +if(!_14){ +tb.appendTo("body"); +} +var _15=tb.find(".textbox-text"); +var btn=tb.find(".textbox-button"); +var _16=tb.find(".textbox-addon"); +var _17=_16.find(".textbox-icon"); +tb._size(_12,_13); +btn.linkbutton("resize",{height:tb.height()}); +btn.css({left:(_12.buttonAlign=="left"?0:""),right:(_12.buttonAlign=="right"?0:"")}); +_16.css({left:(_12.iconAlign=="left"?(_12.buttonAlign=="left"?btn._outerWidth():0):""),right:(_12.iconAlign=="right"?(_12.buttonAlign=="right"?btn._outerWidth():0):"")}); +_17.css({width:_12.iconWidth+"px",height:tb.height()+"px"}); +_15.css({paddingLeft:(_f.style.paddingLeft||""),paddingRight:(_f.style.paddingRight||""),marginLeft:_18("left"),marginRight:_18("right")}); +if(_12.multiline){ +_15.css({paddingTop:(_f.style.paddingTop||""),paddingBottom:(_f.style.paddingBottom||"")}); +_15._outerHeight(tb.height()); +}else{ +var _19=Math.floor((tb.height()-_15.height())/2); +_15.css({paddingTop:_19+"px",paddingBottom:_19+"px"}); +} +_15._outerWidth(tb.width()-_17.length*_12.iconWidth-btn._outerWidth()); +if(!_14){ +tb.insertAfter(_f); +} +_12.onResize.call(_f,_12.width,_12.height); +function _18(_1a){ +return (_12.iconAlign==_1a?_16._outerWidth():0)+(_12.buttonAlign==_1a?btn._outerWidth():0); +}; +}; +function _1b(_1c){ +var _1d=$(_1c).textbox("options"); +var _1e=$(_1c).textbox("textbox"); +_1e.validatebox($.extend({},_1d,{deltaX:$(_1c).textbox("getTipX"),onBeforeValidate:function(){ +var box=$(this); +if(!box.is(":focus")){ +_1d.oldInputValue=box.val(); +box.val(_1d.value); +} +},onValidate:function(_1f){ +var box=$(this); +if(_1d.oldInputValue!=undefined){ +box.val(_1d.oldInputValue); +_1d.oldInputValue=undefined; +} +var tb=box.parent(); +if(_1f){ +tb.removeClass("textbox-invalid"); +}else{ +tb.addClass("textbox-invalid"); +} +}})); +}; +function _20(_21){ +var _22=$.data(_21,"textbox"); +var _23=_22.options; +var tb=_22.textbox; +var _24=tb.find(".textbox-text"); +_24.attr("placeholder",_23.prompt); +_24.unbind(".textbox"); +if(!_23.disabled&&!_23.readonly){ +_24.bind("blur.textbox",function(e){ +if(!tb.hasClass("textbox-focused")){ +return; +} +_23.value=$(this).val(); +if(_23.value==""){ +$(this).val(_23.prompt).addClass("textbox-prompt"); +}else{ +$(this).removeClass("textbox-prompt"); +} +tb.removeClass("textbox-focused"); +}).bind("focus.textbox",function(e){ +if(tb.hasClass("textbox-focused")){ +return; +} +if($(this).val()!=_23.value){ +$(this).val(_23.value); +} +$(this).removeClass("textbox-prompt"); +tb.addClass("textbox-focused"); +}); +for(var _25 in _23.inputEvents){ +_24.bind(_25+".textbox",{target:_21},_23.inputEvents[_25]); +} +} +var _26=tb.find(".textbox-addon"); +_26.unbind().bind("click",{target:_21},function(e){ +var _27=$(e.target).closest("a.textbox-icon:not(.textbox-icon-disabled)"); +if(_27.length){ +var _28=parseInt(_27.attr("icon-index")); +var _29=_23.icons[_28]; +if(_29&&_29.handler){ +_29.handler.call(_27[0],e); +_23.onClickIcon.call(_21,_28); +} +} +}); +_26.find(".textbox-icon").each(function(_2a){ +var _2b=_23.icons[_2a]; +var _2c=$(this); +if(!_2b||_2b.disabled||_23.disabled||_23.readonly){ +_2c.addClass("textbox-icon-disabled"); +}else{ +_2c.removeClass("textbox-icon-disabled"); +} +}); +var btn=tb.find(".textbox-button"); +btn.unbind(".textbox").bind("click.textbox",function(){ +if(!btn.linkbutton("options").disabled){ +_23.onClickButton.call(_21); +} +}); +btn.linkbutton((_23.disabled||_23.readonly)?"disable":"enable"); +tb.unbind(".textbox").bind("_resize.textbox",function(e,_2d){ +if($(this).hasClass("easyui-fluid")||_2d){ +_e(_21); +} +return false; +}); +}; +function _a(_2e,_2f){ +var _30=$.data(_2e,"textbox"); +var _31=_30.options; +var tb=_30.textbox; +if(_2f){ +_31.disabled=true; +$(_2e).attr("disabled","disabled"); +tb.addClass("textbox-disabled"); +tb.find(".textbox-text,.textbox-value").attr("disabled","disabled"); +}else{ +_31.disabled=false; +tb.removeClass("textbox-disabled"); +$(_2e).removeAttr("disabled"); +tb.find(".textbox-text,.textbox-value").removeAttr("disabled"); +} +}; +function _b(_32,_33){ +var _34=$.data(_32,"textbox"); +var _35=_34.options; +_35.readonly=_33==undefined?true:_33; +_34.textbox.removeClass("textbox-readonly").addClass(_35.readonly?"textbox-readonly":""); +var _36=_34.textbox.find(".textbox-text"); +_36.removeAttr("readonly"); +if(_35.readonly||!_35.editable){ +_36.attr("readonly","readonly"); +} +}; +$.fn.textbox=function(_37,_38){ +if(typeof _37=="string"){ +var _39=$.fn.textbox.methods[_37]; +if(_39){ +return _39(this,_38); +}else{ +return this.each(function(){ +var _3a=$(this).textbox("textbox"); +_3a.validatebox(_37,_38); +}); +} +} +_37=_37||{}; +return this.each(function(){ +var _3b=$.data(this,"textbox"); +if(_3b){ +$.extend(_3b.options,_37); +if(_37.value!=undefined){ +_3b.options.originalValue=_37.value; +} +}else{ +_3b=$.data(this,"textbox",{options:$.extend({},$.fn.textbox.defaults,$.fn.textbox.parseOptions(this),_37),textbox:_1(this)}); +_3b.options.originalValue=_3b.options.value; +} +_5(this); +_20(this); +_e(this); +_1b(this); +$(this).textbox("initValue",_3b.options.value); +}); +}; +$.fn.textbox.methods={options:function(jq){ +return $.data(jq[0],"textbox").options; +},cloneFrom:function(jq,_3c){ +return jq.each(function(){ +var t=$(this); +if(t.data("textbox")){ +return; +} +if(!$(_3c).data("textbox")){ +$(_3c).textbox(); +} +var _3d=t.attr("name")||""; +t.addClass("textbox-f").hide(); +t.removeAttr("name").attr("textboxName",_3d); +var _3e=$(_3c).next().clone().insertAfter(t); +_3e.find("input.textbox-value").attr("name",_3d); +$.data(this,"textbox",{options:$.extend(true,{},$(_3c).textbox("options")),textbox:_3e}); +var _3f=$(_3c).textbox("button"); +if(_3f.length){ +t.textbox("button").linkbutton($.extend(true,{},_3f.linkbutton("options"))); +} +_20(this); +_1b(this); +}); +},textbox:function(jq){ +return $.data(jq[0],"textbox").textbox.find(".textbox-text"); +},button:function(jq){ +return $.data(jq[0],"textbox").textbox.find(".textbox-button"); +},destroy:function(jq){ +return jq.each(function(){ +_c(this); +}); +},resize:function(jq,_40){ +return jq.each(function(){ +_e(this,_40); +}); +},disable:function(jq){ +return jq.each(function(){ +_a(this,true); +_20(this); +}); +},enable:function(jq){ +return jq.each(function(){ +_a(this,false); +_20(this); +}); +},readonly:function(jq,_41){ +return jq.each(function(){ +_b(this,_41); +_20(this); +}); +},isValid:function(jq){ +return jq.textbox("textbox").validatebox("isValid"); +},clear:function(jq){ +return jq.each(function(){ +$(this).textbox("setValue",""); +}); +},setText:function(jq,_42){ +return jq.each(function(){ +var _43=$(this).textbox("options"); +var _44=$(this).textbox("textbox"); +_42=_42==undefined?"":String(_42); +if($(this).textbox("getText")!=_42){ +_44.val(_42); +} +_43.value=_42; +if(!_44.is(":focus")){ +if(_42){ +_44.removeClass("textbox-prompt"); +}else{ +_44.val(_43.prompt).addClass("textbox-prompt"); +} +} +$(this).textbox("validate"); +}); +},initValue:function(jq,_45){ +return jq.each(function(){ +var _46=$.data(this,"textbox"); +_46.options.value=""; +$(this).textbox("setText",_45); +_46.textbox.find(".textbox-value").val(_45); +$(this).val(_45); +}); +},setValue:function(jq,_47){ +return jq.each(function(){ +var _48=$.data(this,"textbox").options; +var _49=$(this).textbox("getValue"); +$(this).textbox("initValue",_47); +if(_49!=_47){ +_48.onChange.call(this,_47,_49); +$(this).closest("form").trigger("_change",[this]); +} +}); +},getText:function(jq){ +var _4a=jq.textbox("textbox"); +if(_4a.is(":focus")){ +return _4a.val(); +}else{ +return jq.textbox("options").value; +} +},getValue:function(jq){ +return jq.data("textbox").textbox.find(".textbox-value").val(); +},reset:function(jq){ +return jq.each(function(){ +var _4b=$(this).textbox("options"); +$(this).textbox("setValue",_4b.originalValue); +}); +},getIcon:function(jq,_4c){ +return jq.data("textbox").textbox.find(".textbox-icon:eq("+_4c+")"); +},getTipX:function(jq){ +var _4d=jq.data("textbox"); +var _4e=_4d.options; +var tb=_4d.textbox; +var _4f=tb.find(".textbox-text"); +var _50=tb.find(".textbox-addon")._outerWidth(); +var _51=tb.find(".textbox-button")._outerWidth(); +if(_4e.tipPosition=="right"){ +return (_4e.iconAlign=="right"?_50:0)+(_4e.buttonAlign=="right"?_51:0)+1; +}else{ +if(_4e.tipPosition=="left"){ +return (_4e.iconAlign=="left"?-_50:0)+(_4e.buttonAlign=="left"?-_51:0)-1; +}else{ +return _50/2*(_4e.iconAlign=="right"?1:-1); +} +} +}}; +$.fn.textbox.parseOptions=function(_52){ +var t=$(_52); +return $.extend({},$.fn.validatebox.parseOptions(_52),$.parser.parseOptions(_52,["prompt","iconCls","iconAlign","buttonText","buttonIcon","buttonAlign",{multiline:"boolean",editable:"boolean",iconWidth:"number"}]),{value:(t.val()||undefined),type:(t.attr("type")?t.attr("type"):undefined),disabled:(t.attr("disabled")?true:undefined),readonly:(t.attr("readonly")?true:undefined)}); +}; +$.fn.textbox.defaults=$.extend({},$.fn.validatebox.defaults,{width:"auto",height:22,prompt:"",value:"",type:"text",multiline:false,editable:true,disabled:false,readonly:false,icons:[],iconCls:null,iconAlign:"right",iconWidth:18,buttonText:"",buttonIcon:null,buttonAlign:"right",inputEvents:{blur:function(e){ +var t=$(e.data.target); +var _53=t.textbox("options"); +t.textbox("setValue",_53.value); +},keydown:function(e){ +if(e.keyCode==13){ +var t=$(e.data.target); +t.textbox("setValue",t.textbox("getText")); +} +}},onChange:function(_54,_55){ +},onResize:function(_56,_57){ +},onClickButton:function(){ +},onClickIcon:function(_58){ +}}); +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.timespinner.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.timespinner.js new file mode 100644 index 0000000..58b8115 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.timespinner.js @@ -0,0 +1,176 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2){ +var _3=0; +if(typeof _2.selectionStart=="number"){ +_3=_2.selectionStart; +}else{ +if(_2.createTextRange){ +var _4=_2.createTextRange(); +var s=document.selection.createRange(); +s.setEndPoint("StartToStart",_4); +_3=s.text.length; +} +} +return _3; +}; +function _5(_6,_7,_8){ +if(_6.setSelectionRange){ +_6.setSelectionRange(_7,_8); +}else{ +if(_6.createTextRange){ +var _9=_6.createTextRange(); +_9.collapse(); +_9.moveEnd("character",_8); +_9.moveStart("character",_7); +_9.select(); +} +} +}; +function _a(_b){ +var _c=$.data(_b,"timespinner").options; +$(_b).addClass("timespinner-f").spinner(_c); +var _d=_c.formatter.call(_b,_c.parser.call(_b,_c.value)); +$(_b).timespinner("initValue",_d); +}; +function _e(e){ +var _f=e.data.target; +var _10=$.data(_f,"timespinner").options; +var _11=_1(this); +for(var i=0;i<_10.selections.length;i++){ +var _12=_10.selections[i]; +if(_11>=_12[0]&&_11<=_12[1]){ +_13(_f,i); +return; +} +} +}; +function _13(_14,_15){ +var _16=$.data(_14,"timespinner").options; +if(_15!=undefined){ +_16.highlight=_15; +} +var _17=_16.selections[_16.highlight]; +if(_17){ +var tb=$(_14).timespinner("textbox"); +_5(tb[0],_17[0],_17[1]); +tb.focus(); +} +}; +function _18(_19,_1a){ +var _1b=$.data(_19,"timespinner").options; +var _1a=_1b.parser.call(_19,_1a); +var _1c=_1b.formatter.call(_19,_1a); +$(_19).spinner("setValue",_1c); +}; +function _1d(_1e,_1f){ +var _20=$.data(_1e,"timespinner").options; +var s=$(_1e).timespinner("getValue"); +var _21=_20.selections[_20.highlight]; +var s1=s.substring(0,_21[0]); +var s2=s.substring(_21[0],_21[1]); +var s3=s.substring(_21[1]); +var v=s1+((parseInt(s2,10)||0)+_20.increment*(_1f?-1:1))+s3; +$(_1e).timespinner("setValue",v); +_13(_1e); +}; +$.fn.timespinner=function(_22,_23){ +if(typeof _22=="string"){ +var _24=$.fn.timespinner.methods[_22]; +if(_24){ +return _24(this,_23); +}else{ +return this.spinner(_22,_23); +} +} +_22=_22||{}; +return this.each(function(){ +var _25=$.data(this,"timespinner"); +if(_25){ +$.extend(_25.options,_22); +}else{ +$.data(this,"timespinner",{options:$.extend({},$.fn.timespinner.defaults,$.fn.timespinner.parseOptions(this),_22)}); +} +_a(this); +}); +}; +$.fn.timespinner.methods={options:function(jq){ +var _26=jq.data("spinner")?jq.spinner("options"):{}; +return $.extend($.data(jq[0],"timespinner").options,{width:_26.width,value:_26.value,originalValue:_26.originalValue,disabled:_26.disabled,readonly:_26.readonly}); +},setValue:function(jq,_27){ +return jq.each(function(){ +_18(this,_27); +}); +},getHours:function(jq){ +var _28=$.data(jq[0],"timespinner").options; +var vv=jq.timespinner("getValue").split(_28.separator); +return parseInt(vv[0],10); +},getMinutes:function(jq){ +var _29=$.data(jq[0],"timespinner").options; +var vv=jq.timespinner("getValue").split(_29.separator); +return parseInt(vv[1],10); +},getSeconds:function(jq){ +var _2a=$.data(jq[0],"timespinner").options; +var vv=jq.timespinner("getValue").split(_2a.separator); +return parseInt(vv[2],10)||0; +}}; +$.fn.timespinner.parseOptions=function(_2b){ +return $.extend({},$.fn.spinner.parseOptions(_2b),$.parser.parseOptions(_2b,["separator",{showSeconds:"boolean",highlight:"number"}])); +}; +$.fn.timespinner.defaults=$.extend({},$.fn.spinner.defaults,{inputEvents:$.extend({},$.fn.spinner.defaults.inputEvents,{click:function(e){ +_e.call(this,e); +},blur:function(e){ +var t=$(e.data.target); +t.timespinner("setValue",t.timespinner("getText")); +},keydown:function(e){ +if(e.keyCode==13){ +var t=$(e.data.target); +t.timespinner("setValue",t.timespinner("getText")); +} +}}),formatter:function(_2c){ +if(!_2c){ +return ""; +} +var _2d=$(this).timespinner("options"); +var tt=[_2e(_2c.getHours()),_2e(_2c.getMinutes())]; +if(_2d.showSeconds){ +tt.push(_2e(_2c.getSeconds())); +} +return tt.join(_2d.separator); +function _2e(_2f){ +return (_2f<10?"0":"")+_2f; +}; +},parser:function(s){ +var _30=$(this).timespinner("options"); +var _31=_32(s); +if(_31){ +var min=_32(_30.min); +var max=_32(_30.max); +if(min&&min>_31){ +_31=min; +} +if(max&&max<_31){ +_31=max; +} +} +return _31; +function _32(s){ +if(!s){ +return null; +} +var tt=s.split(_30.separator); +return new Date(1900,0,0,parseInt(tt[0],10)||0,parseInt(tt[1],10)||0,parseInt(tt[2],10)||0); +}; +},selections:[[0,2],[3,5],[6,8]],separator:":",showSeconds:false,highlight:0,spin:function(_33){ +_1d(this,_33); +}}); +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.tooltip.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.tooltip.js new file mode 100644 index 0000000..4a59932 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.tooltip.js @@ -0,0 +1,232 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2){ +$(_2).addClass("tooltip-f"); +}; +function _3(_4){ +var _5=$.data(_4,"tooltip").options; +$(_4).unbind(".tooltip").bind(_5.showEvent+".tooltip",function(e){ +$(_4).tooltip("show",e); +}).bind(_5.hideEvent+".tooltip",function(e){ +$(_4).tooltip("hide",e); +}).bind("mousemove.tooltip",function(e){ +if(_5.trackMouse){ +_5.trackMouseX=e.pageX; +_5.trackMouseY=e.pageY; +$(_4).tooltip("reposition"); +} +}); +}; +function _6(_7){ +var _8=$.data(_7,"tooltip"); +if(_8.showTimer){ +clearTimeout(_8.showTimer); +_8.showTimer=null; +} +if(_8.hideTimer){ +clearTimeout(_8.hideTimer); +_8.hideTimer=null; +} +}; +function _9(_a){ +var _b=$.data(_a,"tooltip"); +if(!_b||!_b.tip){ +return; +} +var _c=_b.options; +var _d=_b.tip; +var _e={left:-100000,top:-100000}; +if($(_a).is(":visible")){ +_e=_f(_c.position); +if(_c.position=="top"&&_e.top<0){ +_e=_f("bottom"); +}else{ +if((_c.position=="bottom")&&(_e.top+_d._outerHeight()>$(window)._outerHeight()+$(document).scrollTop())){ +_e=_f("top"); +} +} +if(_e.left<0){ +if(_c.position=="left"){ +_e=_f("right"); +}else{ +$(_a).tooltip("arrow").css("left",_d._outerWidth()/2+_e.left); +_e.left=0; +} +}else{ +if(_e.left+_d._outerWidth()>$(window)._outerWidth()+$(document)._scrollLeft()){ +if(_c.position=="right"){ +_e=_f("left"); +}else{ +var _10=_e.left; +_e.left=$(window)._outerWidth()+$(document)._scrollLeft()-_d._outerWidth(); +$(_a).tooltip("arrow").css("left",_d._outerWidth()/2-(_e.left-_10)); +} +} +} +} +_d.css({left:_e.left,top:_e.top,zIndex:(_c.zIndex!=undefined?_c.zIndex:($.fn.window?$.fn.window.defaults.zIndex++:""))}); +_c.onPosition.call(_a,_e.left,_e.top); +function _f(_11){ +_c.position=_11||"bottom"; +_d.removeClass("tooltip-top tooltip-bottom tooltip-left tooltip-right").addClass("tooltip-"+_c.position); +var _12,top; +if(_c.trackMouse){ +t=$(); +_12=_c.trackMouseX+_c.deltaX; +top=_c.trackMouseY+_c.deltaY; +}else{ +var t=$(_a); +_12=t.offset().left+_c.deltaX; +top=t.offset().top+_c.deltaY; +} +switch(_c.position){ +case "right": +_12+=t._outerWidth()+12+(_c.trackMouse?12:0); +top-=(_d._outerHeight()-t._outerHeight())/2; +break; +case "left": +_12-=_d._outerWidth()+12+(_c.trackMouse?12:0); +top-=(_d._outerHeight()-t._outerHeight())/2; +break; +case "top": +_12-=(_d._outerWidth()-t._outerWidth())/2; +top-=_d._outerHeight()+12+(_c.trackMouse?12:0); +break; +case "bottom": +_12-=(_d._outerWidth()-t._outerWidth())/2; +top+=t._outerHeight()+12+(_c.trackMouse?12:0); +break; +} +return {left:_12,top:top}; +}; +}; +function _13(_14,e){ +var _15=$.data(_14,"tooltip"); +var _16=_15.options; +var tip=_15.tip; +if(!tip){ +tip=$("
                                                      "+"
                                                      "+"
                                                      "+"
                                                      "+"
                                                      ").appendTo("body"); +_15.tip=tip; +_17(_14); +} +_6(_14); +_15.showTimer=setTimeout(function(){ +$(_14).tooltip("reposition"); +tip.show(); +_16.onShow.call(_14,e); +var _18=tip.children(".tooltip-arrow-outer"); +var _19=tip.children(".tooltip-arrow"); +var bc="border-"+_16.position+"-color"; +_18.add(_19).css({borderTopColor:"",borderBottomColor:"",borderLeftColor:"",borderRightColor:""}); +_18.css(bc,tip.css(bc)); +_19.css(bc,tip.css("backgroundColor")); +},_16.showDelay); +}; +function _1a(_1b,e){ +var _1c=$.data(_1b,"tooltip"); +if(_1c&&_1c.tip){ +_6(_1b); +_1c.hideTimer=setTimeout(function(){ +_1c.tip.hide(); +_1c.options.onHide.call(_1b,e); +},_1c.options.hideDelay); +} +}; +function _17(_1d,_1e){ +var _1f=$.data(_1d,"tooltip"); +var _20=_1f.options; +if(_1e){ +_20.content=_1e; +} +if(!_1f.tip){ +return; +} +var cc=typeof _20.content=="function"?_20.content.call(_1d):_20.content; +_1f.tip.children(".tooltip-content").html(cc); +_20.onUpdate.call(_1d,cc); +}; +function _21(_22){ +var _23=$.data(_22,"tooltip"); +if(_23){ +_6(_22); +var _24=_23.options; +if(_23.tip){ +_23.tip.remove(); +} +if(_24._title){ +$(_22).attr("title",_24._title); +} +$.removeData(_22,"tooltip"); +$(_22).unbind(".tooltip").removeClass("tooltip-f"); +_24.onDestroy.call(_22); +} +}; +$.fn.tooltip=function(_25,_26){ +if(typeof _25=="string"){ +return $.fn.tooltip.methods[_25](this,_26); +} +_25=_25||{}; +return this.each(function(){ +var _27=$.data(this,"tooltip"); +if(_27){ +$.extend(_27.options,_25); +}else{ +$.data(this,"tooltip",{options:$.extend({},$.fn.tooltip.defaults,$.fn.tooltip.parseOptions(this),_25)}); +_1(this); +} +_3(this); +_17(this); +}); +}; +$.fn.tooltip.methods={options:function(jq){ +return $.data(jq[0],"tooltip").options; +},tip:function(jq){ +return $.data(jq[0],"tooltip").tip; +},arrow:function(jq){ +return jq.tooltip("tip").children(".tooltip-arrow-outer,.tooltip-arrow"); +},show:function(jq,e){ +return jq.each(function(){ +_13(this,e); +}); +},hide:function(jq,e){ +return jq.each(function(){ +_1a(this,e); +}); +},update:function(jq,_28){ +return jq.each(function(){ +_17(this,_28); +}); +},reposition:function(jq){ +return jq.each(function(){ +_9(this); +}); +},destroy:function(jq){ +return jq.each(function(){ +_21(this); +}); +}}; +$.fn.tooltip.parseOptions=function(_29){ +var t=$(_29); +var _2a=$.extend({},$.parser.parseOptions(_29,["position","showEvent","hideEvent","content",{trackMouse:"boolean",deltaX:"number",deltaY:"number",showDelay:"number",hideDelay:"number"}]),{_title:t.attr("title")}); +t.attr("title",""); +if(!_2a.content){ +_2a.content=_2a._title; +} +return _2a; +}; +$.fn.tooltip.defaults={position:"bottom",content:null,trackMouse:false,deltaX:0,deltaY:0,showEvent:"mouseenter",hideEvent:"mouseleave",showDelay:200,hideDelay:100,onShow:function(e){ +},onHide:function(e){ +},onUpdate:function(_2b){ +},onPosition:function(_2c,top){ +},onDestroy:function(){ +}}; +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.tree.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.tree.js new file mode 100644 index 0000000..c1d71a1 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.tree.js @@ -0,0 +1,1249 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2){ +var _3=$(_2); +_3.addClass("tree"); +return _3; +}; +function _4(_5){ +var _6=$.data(_5,"tree").options; +$(_5).unbind().bind("mouseover",function(e){ +var tt=$(e.target); +var _7=tt.closest("div.tree-node"); +if(!_7.length){ +return; +} +_7.addClass("tree-node-hover"); +if(tt.hasClass("tree-hit")){ +if(tt.hasClass("tree-expanded")){ +tt.addClass("tree-expanded-hover"); +}else{ +tt.addClass("tree-collapsed-hover"); +} +} +e.stopPropagation(); +}).bind("mouseout",function(e){ +var tt=$(e.target); +var _8=tt.closest("div.tree-node"); +if(!_8.length){ +return; +} +_8.removeClass("tree-node-hover"); +if(tt.hasClass("tree-hit")){ +if(tt.hasClass("tree-expanded")){ +tt.removeClass("tree-expanded-hover"); +}else{ +tt.removeClass("tree-collapsed-hover"); +} +} +e.stopPropagation(); +}).bind("click",function(e){ +var tt=$(e.target); +var _9=tt.closest("div.tree-node"); +if(!_9.length){ +return; +} +if(tt.hasClass("tree-hit")){ +_8f(_5,_9[0]); +return false; +}else{ +if(tt.hasClass("tree-checkbox")){ +_34(_5,_9[0]); +return false; +}else{ +_e9(_5,_9[0]); +_6.onClick.call(_5,_c(_5,_9[0])); +} +} +e.stopPropagation(); +}).bind("dblclick",function(e){ +var _a=$(e.target).closest("div.tree-node"); +if(!_a.length){ +return; +} +_e9(_5,_a[0]); +_6.onDblClick.call(_5,_c(_5,_a[0])); +e.stopPropagation(); +}).bind("contextmenu",function(e){ +var _b=$(e.target).closest("div.tree-node"); +if(!_b.length){ +return; +} +_6.onContextMenu.call(_5,e,_c(_5,_b[0])); +e.stopPropagation(); +}); +}; +function _d(_e){ +var _f=$.data(_e,"tree").options; +_f.dnd=false; +var _10=$(_e).find("div.tree-node"); +_10.draggable("disable"); +_10.css("cursor","pointer"); +}; +function _11(_12){ +var _13=$.data(_12,"tree"); +var _14=_13.options; +var _15=_13.tree; +_13.disabledNodes=[]; +_14.dnd=true; +_15.find("div.tree-node").draggable({disabled:false,revert:true,cursor:"pointer",proxy:function(_16){ +var p=$("
                                                      ").appendTo("body"); +p.html(" "+$(_16).find(".tree-title").html()); +p.hide(); +return p; +},deltaX:15,deltaY:15,onBeforeDrag:function(e){ +if(_14.onBeforeDrag.call(_12,_c(_12,this))==false){ +return false; +} +if($(e.target).hasClass("tree-hit")||$(e.target).hasClass("tree-checkbox")){ +return false; +} +if(e.which!=1){ +return false; +} +var _17=$(this).find("span.tree-indent"); +if(_17.length){ +e.data.offsetWidth-=_17.length*_17.width(); +} +},onStartDrag:function(e){ +$(this).next("ul").find("div.tree-node").each(function(){ +$(this).droppable("disable"); +_13.disabledNodes.push(this); +}); +$(this).draggable("proxy").css({left:-10000,top:-10000}); +_14.onStartDrag.call(_12,_c(_12,this)); +var _18=_c(_12,this); +if(_18.id==undefined){ +_18.id="easyui_tree_node_id_temp"; +_64(_12,_18); +} +_13.draggingNodeId=_18.id; +},onDrag:function(e){ +var x1=e.pageX,y1=e.pageY,x2=e.data.startX,y2=e.data.startY; +var d=Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)); +if(d>3){ +$(this).draggable("proxy").show(); +} +this.pageY=e.pageY; +},onStopDrag:function(){ +for(var i=0;i<_13.disabledNodes.length;i++){ +$(_13.disabledNodes[i]).droppable("enable"); +} +_13.disabledNodes=[]; +var _19=_dc(_12,_13.draggingNodeId); +if(_19&&_19.id=="easyui_tree_node_id_temp"){ +_19.id=""; +_64(_12,_19); +} +_14.onStopDrag.call(_12,_19); +}}).droppable({accept:"div.tree-node",onDragEnter:function(e,_1a){ +if(_14.onDragEnter.call(_12,this,_1b(_1a))==false){ +_1c(_1a,false); +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +$(this).droppable("disable"); +_13.disabledNodes.push(this); +} +},onDragOver:function(e,_1d){ +if($(this).droppable("options").disabled){ +return; +} +var _1e=_1d.pageY; +var top=$(this).offset().top; +var _1f=top+$(this).outerHeight(); +_1c(_1d,true); +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +if(_1e>top+(_1f-top)/2){ +if(_1f-_1e<5){ +$(this).addClass("tree-node-bottom"); +}else{ +$(this).addClass("tree-node-append"); +} +}else{ +if(_1e-top<5){ +$(this).addClass("tree-node-top"); +}else{ +$(this).addClass("tree-node-append"); +} +} +if(_14.onDragOver.call(_12,this,_1b(_1d))==false){ +_1c(_1d,false); +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +$(this).droppable("disable"); +_13.disabledNodes.push(this); +} +},onDragLeave:function(e,_20){ +_1c(_20,false); +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +_14.onDragLeave.call(_12,this,_1b(_20)); +},onDrop:function(e,_21){ +var _22=this; +var _23,_24; +if($(this).hasClass("tree-node-append")){ +_23=_25; +_24="append"; +}else{ +_23=_26; +_24=$(this).hasClass("tree-node-top")?"top":"bottom"; +} +if(_14.onBeforeDrop.call(_12,_22,_1b(_21),_24)==false){ +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +return; +} +_23(_21,_22,_24); +$(this).removeClass("tree-node-append tree-node-top tree-node-bottom"); +}}); +function _1b(_27,pop){ +return $(_27).closest("ul.tree").tree(pop?"pop":"getData",_27); +}; +function _1c(_28,_29){ +var _2a=$(_28).draggable("proxy").find("span.tree-dnd-icon"); +_2a.removeClass("tree-dnd-yes tree-dnd-no").addClass(_29?"tree-dnd-yes":"tree-dnd-no"); +}; +function _25(_2b,_2c){ +if(_c(_12,_2c).state=="closed"){ +_83(_12,_2c,function(){ +_2d(); +}); +}else{ +_2d(); +} +function _2d(){ +var _2e=_1b(_2b,true); +$(_12).tree("append",{parent:_2c,data:[_2e]}); +_14.onDrop.call(_12,_2c,_2e,"append"); +}; +}; +function _26(_2f,_30,_31){ +var _32={}; +if(_31=="top"){ +_32.before=_30; +}else{ +_32.after=_30; +} +var _33=_1b(_2f,true); +_32.data=_33; +$(_12).tree("insert",_32); +_14.onDrop.call(_12,_30,_33,_31); +}; +}; +function _34(_35,_36,_37){ +var _38=$.data(_35,"tree"); +var _39=_38.options; +if(!_39.checkbox){ +return; +} +var _3a=_c(_35,_36); +if(_37==undefined){ +var ck=$(_36).find(".tree-checkbox"); +if(ck.hasClass("tree-checkbox1")){ +_37=false; +}else{ +if(ck.hasClass("tree-checkbox0")){ +_37=true; +}else{ +if(_3a._checked==undefined){ +_3a._checked=$(_36).find(".tree-checkbox").hasClass("tree-checkbox1"); +} +_37=!_3a._checked; +} +} +} +_3a._checked=_37; +if(_39.onBeforeCheck.call(_35,_3a,_37)==false){ +return; +} +if(_39.cascadeCheck){ +_3b(_3a,_37); +_3c(_3a,_37); +}else{ +_3d($(_3a.target),_37?"1":"0"); +} +_39.onCheck.call(_35,_3a,_37); +function _3d(_3e,_3f){ +var ck=_3e.find(".tree-checkbox"); +ck.removeClass("tree-checkbox0 tree-checkbox1 tree-checkbox2"); +ck.addClass("tree-checkbox"+_3f); +}; +function _3b(_40,_41){ +if(_39.deepCheck){ +var _42=$("#"+_40.domId); +var _43=_41?"1":"0"; +_3d(_42,_43); +_3d(_42.next(),_43); +}else{ +_44(_40,_41); +_68(_40.children||[],function(n){ +_44(n,_41); +}); +} +}; +function _44(_45,_46){ +if(_45.hidden){ +return; +} +var cls="tree-checkbox"+(_46?"1":"0"); +var _47=$("#"+_45.domId); +_3d(_47,_46?"1":"0"); +if(_45.children){ +for(var i=0;i<_45.children.length;i++){ +if(_45.children[i].hidden){ +if(!$("#"+_45.children[i].domId).find("."+cls).length){ +_3d(_47,"2"); +var _48=_9a(_35,_47[0]); +while(_48){ +_3d($(_48.target),"2"); +_48=_9a(_35,_48[0]); +} +return; +} +} +} +} +}; +function _3c(_49,_4a){ +var _4b=$("#"+_49.domId); +var _4c=_9a(_35,_4b[0]); +if(_4c){ +var _4d=""; +if(_4e(_4b,true)){ +_4d="1"; +}else{ +if(_4e(_4b,false)){ +_4d="0"; +}else{ +_4d="2"; +} +} +_3d($(_4c.target),_4d); +_3c(_4c,_4a); +} +}; +function _4e(_4f,_50){ +var cls="tree-checkbox"+(_50?"1":"0"); +var ck=_4f.find(".tree-checkbox"); +if(!ck.hasClass(cls)){ +return false; +} +var b=true; +_4f.parent().siblings().each(function(){ +var ck=$(this).children("div.tree-node").children(".tree-checkbox"); +if(ck.length&&!ck.hasClass(cls)){ +b=false; +return false; +} +}); +return b; +}; +}; +function _51(_52,_53){ +var _54=$.data(_52,"tree").options; +if(!_54.checkbox){ +return; +} +var _55=$(_53); +if(_56(_52,_53)){ +var ck=_55.find(".tree-checkbox"); +if(ck.length){ +if(ck.hasClass("tree-checkbox1")){ +_34(_52,_53,true); +}else{ +_34(_52,_53,false); +} +}else{ +if(_54.onlyLeafCheck){ +$("").insertBefore(_55.find(".tree-title")); +} +} +}else{ +var ck=_55.find(".tree-checkbox"); +if(_54.onlyLeafCheck){ +ck.remove(); +}else{ +if(ck.hasClass("tree-checkbox1")){ +_34(_52,_53,true); +}else{ +if(ck.hasClass("tree-checkbox2")){ +var _57=true; +var _58=true; +var _59=_5a(_52,_53); +for(var i=0;i<_59.length;i++){ +if(_59[i].checked){ +_58=false; +}else{ +_57=false; +} +} +if(_57){ +_34(_52,_53,true); +} +if(_58){ +_34(_52,_53,false); +} +} +} +} +} +}; +function _5b(_5c,ul,_5d,_5e){ +var _5f=$.data(_5c,"tree"); +var _60=_5f.options; +var _61=$(ul).prevAll("div.tree-node:first"); +_5d=_60.loadFilter.call(_5c,_5d,_61[0]); +var _62=_63(_5c,"domId",_61.attr("id")); +if(!_5e){ +_62?_62.children=_5d:_5f.data=_5d; +$(ul).empty(); +}else{ +if(_62){ +_62.children?_62.children=_62.children.concat(_5d):_62.children=_5d; +}else{ +_5f.data=_5f.data.concat(_5d); +} +} +_60.view.render.call(_60.view,_5c,ul,_5d); +if(_60.dnd){ +_11(_5c); +} +if(_62){ +_64(_5c,_62); +} +var _65=[]; +var _66=[]; +for(var i=0;i<_5d.length;i++){ +var _67=_5d[i]; +if(!_67.checked){ +_65.push(_67); +} +} +_68(_5d,function(_69){ +if(_69.checked){ +_66.push(_69); +} +}); +var _6a=_60.onCheck; +_60.onCheck=function(){ +}; +if(_65.length){ +_34(_5c,$("#"+_65[0].domId)[0],false); +} +for(var i=0;i<_66.length;i++){ +_34(_5c,$("#"+_66[i].domId)[0],true); +} +_60.onCheck=_6a; +setTimeout(function(){ +_6b(_5c,_5c); +},0); +_60.onLoadSuccess.call(_5c,_62,_5d); +}; +function _6b(_6c,ul,_6d){ +var _6e=$.data(_6c,"tree").options; +if(_6e.lines){ +$(_6c).addClass("tree-lines"); +}else{ +$(_6c).removeClass("tree-lines"); +return; +} +if(!_6d){ +_6d=true; +$(_6c).find("span.tree-indent").removeClass("tree-line tree-join tree-joinbottom"); +$(_6c).find("div.tree-node").removeClass("tree-node-last tree-root-first tree-root-one"); +var _6f=$(_6c).tree("getRoots"); +if(_6f.length>1){ +$(_6f[0].target).addClass("tree-root-first"); +}else{ +if(_6f.length==1){ +$(_6f[0].target).addClass("tree-root-one"); +} +} +} +$(ul).children("li").each(function(){ +var _70=$(this).children("div.tree-node"); +var ul=_70.next("ul"); +if(ul.length){ +if($(this).next().length){ +_71(_70); +} +_6b(_6c,ul,_6d); +}else{ +_72(_70); +} +}); +var _73=$(ul).children("li:last").children("div.tree-node").addClass("tree-node-last"); +_73.children("span.tree-join").removeClass("tree-join").addClass("tree-joinbottom"); +function _72(_74,_75){ +var _76=_74.find("span.tree-icon"); +_76.prev("span.tree-indent").addClass("tree-join"); +}; +function _71(_77){ +var _78=_77.find("span.tree-indent, span.tree-hit").length; +_77.next().find("div.tree-node").each(function(){ +$(this).children("span:eq("+(_78-1)+")").addClass("tree-line"); +}); +}; +}; +function _79(_7a,ul,_7b,_7c){ +var _7d=$.data(_7a,"tree").options; +_7b=$.extend({},_7d.queryParams,_7b||{}); +var _7e=null; +if(_7a!=ul){ +var _7f=$(ul).prev(); +_7e=_c(_7a,_7f[0]); +} +if(_7d.onBeforeLoad.call(_7a,_7e,_7b)==false){ +return; +} +var _80=$(ul).prev().children("span.tree-folder"); +_80.addClass("tree-loading"); +var _81=_7d.loader.call(_7a,_7b,function(_82){ +_80.removeClass("tree-loading"); +_5b(_7a,ul,_82); +if(_7c){ +_7c(); +} +},function(){ +_80.removeClass("tree-loading"); +_7d.onLoadError.apply(_7a,arguments); +if(_7c){ +_7c(); +} +}); +if(_81==false){ +_80.removeClass("tree-loading"); +} +}; +function _83(_84,_85,_86){ +var _87=$.data(_84,"tree").options; +var hit=$(_85).children("span.tree-hit"); +if(hit.length==0){ +return; +} +if(hit.hasClass("tree-expanded")){ +return; +} +var _88=_c(_84,_85); +if(_87.onBeforeExpand.call(_84,_88)==false){ +return; +} +hit.removeClass("tree-collapsed tree-collapsed-hover").addClass("tree-expanded"); +hit.next().addClass("tree-folder-open"); +var ul=$(_85).next(); +if(ul.length){ +if(_87.animate){ +ul.slideDown("normal",function(){ +_88.state="open"; +_87.onExpand.call(_84,_88); +if(_86){ +_86(); +} +}); +}else{ +ul.css("display","block"); +_88.state="open"; +_87.onExpand.call(_84,_88); +if(_86){ +_86(); +} +} +}else{ +var _89=$("
                                                        ").insertAfter(_85); +_79(_84,_89[0],{id:_88.id},function(){ +if(_89.is(":empty")){ +_89.remove(); +} +if(_87.animate){ +_89.slideDown("normal",function(){ +_88.state="open"; +_87.onExpand.call(_84,_88); +if(_86){ +_86(); +} +}); +}else{ +_89.css("display","block"); +_88.state="open"; +_87.onExpand.call(_84,_88); +if(_86){ +_86(); +} +} +}); +} +}; +function _8a(_8b,_8c){ +var _8d=$.data(_8b,"tree").options; +var hit=$(_8c).children("span.tree-hit"); +if(hit.length==0){ +return; +} +if(hit.hasClass("tree-collapsed")){ +return; +} +var _8e=_c(_8b,_8c); +if(_8d.onBeforeCollapse.call(_8b,_8e)==false){ +return; +} +hit.removeClass("tree-expanded tree-expanded-hover").addClass("tree-collapsed"); +hit.next().removeClass("tree-folder-open"); +var ul=$(_8c).next(); +if(_8d.animate){ +ul.slideUp("normal",function(){ +_8e.state="closed"; +_8d.onCollapse.call(_8b,_8e); +}); +}else{ +ul.css("display","none"); +_8e.state="closed"; +_8d.onCollapse.call(_8b,_8e); +} +}; +function _8f(_90,_91){ +var hit=$(_91).children("span.tree-hit"); +if(hit.length==0){ +return; +} +if(hit.hasClass("tree-expanded")){ +_8a(_90,_91); +}else{ +_83(_90,_91); +} +}; +function _92(_93,_94){ +var _95=_5a(_93,_94); +if(_94){ +_95.unshift(_c(_93,_94)); +} +for(var i=0;i<_95.length;i++){ +_83(_93,_95[i].target); +} +}; +function _96(_97,_98){ +var _99=[]; +var p=_9a(_97,_98); +while(p){ +_99.unshift(p); +p=_9a(_97,p.target); +} +for(var i=0;i<_99.length;i++){ +_83(_97,_99[i].target); +} +}; +function _9b(_9c,_9d){ +var c=$(_9c).parent(); +while(c[0].tagName!="BODY"&&c.css("overflow-y")!="auto"){ +c=c.parent(); +} +var n=$(_9d); +var _9e=n.offset().top; +if(c[0].tagName!="BODY"){ +var _9f=c.offset().top; +if(_9e<_9f){ +c.scrollTop(c.scrollTop()+_9e-_9f); +}else{ +if(_9e+n.outerHeight()>_9f+c.outerHeight()-18){ +c.scrollTop(c.scrollTop()+_9e+n.outerHeight()-_9f-c.outerHeight()+18); +} +} +}else{ +c.scrollTop(_9e); +} +}; +function _a0(_a1,_a2){ +var _a3=_5a(_a1,_a2); +if(_a2){ +_a3.unshift(_c(_a1,_a2)); +} +for(var i=0;i<_a3.length;i++){ +_8a(_a1,_a3[i].target); +} +}; +function _a4(_a5,_a6){ +var _a7=$(_a6.parent); +var _a8=_a6.data; +if(!_a8){ +return; +} +_a8=$.isArray(_a8)?_a8:[_a8]; +if(!_a8.length){ +return; +} +var ul; +if(_a7.length==0){ +ul=$(_a5); +}else{ +if(_56(_a5,_a7[0])){ +var _a9=_a7.find("span.tree-icon"); +_a9.removeClass("tree-file").addClass("tree-folder tree-folder-open"); +var hit=$("").insertBefore(_a9); +if(hit.prev().length){ +hit.prev().remove(); +} +} +ul=_a7.next(); +if(!ul.length){ +ul=$("
                                                          ").insertAfter(_a7); +} +} +_5b(_a5,ul[0],_a8,true); +_51(_a5,ul.prev()); +}; +function _aa(_ab,_ac){ +var ref=_ac.before||_ac.after; +var _ad=_9a(_ab,ref); +var _ae=_ac.data; +if(!_ae){ +return; +} +_ae=$.isArray(_ae)?_ae:[_ae]; +if(!_ae.length){ +return; +} +_a4(_ab,{parent:(_ad?_ad.target:null),data:_ae}); +var _af=_ad?_ad.children:$(_ab).tree("getRoots"); +for(var i=0;i<_af.length;i++){ +if(_af[i].domId==$(ref).attr("id")){ +for(var j=_ae.length-1;j>=0;j--){ +_af.splice((_ac.before?i:(i+1)),0,_ae[j]); +} +_af.splice(_af.length-_ae.length,_ae.length); +break; +} +} +var li=$(); +for(var i=0;i<_ae.length;i++){ +li=li.add($("#"+_ae[i].domId).parent()); +} +if(_ac.before){ +li.insertBefore($(ref).parent()); +}else{ +li.insertAfter($(ref).parent()); +} +}; +function _b0(_b1,_b2){ +var _b3=del(_b2); +$(_b2).parent().remove(); +if(_b3){ +if(!_b3.children||!_b3.children.length){ +var _b4=$(_b3.target); +_b4.find(".tree-icon").removeClass("tree-folder").addClass("tree-file"); +_b4.find(".tree-hit").remove(); +$("").prependTo(_b4); +_b4.next().remove(); +} +_64(_b1,_b3); +_51(_b1,_b3.target); +} +_6b(_b1,_b1); +function del(_b5){ +var id=$(_b5).attr("id"); +var _b6=_9a(_b1,_b5); +var cc=_b6?_b6.children:$.data(_b1,"tree").data; +for(var i=0;i=0;i--){ +_e7.unshift(_e8.children[i]); +} +} +} +}; +function _e9(_ea,_eb){ +var _ec=$.data(_ea,"tree").options; +var _ed=_c(_ea,_eb); +if(_ec.onBeforeSelect.call(_ea,_ed)==false){ +return; +} +$(_ea).find("div.tree-node-selected").removeClass("tree-node-selected"); +$(_eb).addClass("tree-node-selected"); +_ec.onSelect.call(_ea,_ed); +}; +function _56(_ee,_ef){ +return $(_ef).children("span.tree-hit").length==0; +}; +function _f0(_f1,_f2){ +var _f3=$.data(_f1,"tree").options; +var _f4=_c(_f1,_f2); +if(_f3.onBeforeEdit.call(_f1,_f4)==false){ +return; +} +$(_f2).css("position","relative"); +var nt=$(_f2).find(".tree-title"); +var _f5=nt.outerWidth(); +nt.empty(); +var _f6=$("").appendTo(nt); +_f6.val(_f4.text).focus(); +_f6.width(_f5+20); +_f6.height(document.compatMode=="CSS1Compat"?(18-(_f6.outerHeight()-_f6.height())):18); +_f6.bind("click",function(e){ +return false; +}).bind("mousedown",function(e){ +e.stopPropagation(); +}).bind("mousemove",function(e){ +e.stopPropagation(); +}).bind("keydown",function(e){ +if(e.keyCode==13){ +_f7(_f1,_f2); +return false; +}else{ +if(e.keyCode==27){ +_fd(_f1,_f2); +return false; +} +} +}).bind("blur",function(e){ +e.stopPropagation(); +_f7(_f1,_f2); +}); +}; +function _f7(_f8,_f9){ +var _fa=$.data(_f8,"tree").options; +$(_f9).css("position",""); +var _fb=$(_f9).find("input.tree-editor"); +var val=_fb.val(); +_fb.remove(); +var _fc=_c(_f8,_f9); +_fc.text=val; +_64(_f8,_fc); +_fa.onAfterEdit.call(_f8,_fc); +}; +function _fd(_fe,_ff){ +var opts=$.data(_fe,"tree").options; +$(_ff).css("position",""); +$(_ff).find("input.tree-editor").remove(); +var node=_c(_fe,_ff); +_64(_fe,node); +opts.onCancelEdit.call(_fe,node); +}; +function _100(_101,q){ +var _102=$.data(_101,"tree"); +var opts=_102.options; +var ids={}; +_68(_102.data,function(node){ +if(opts.filter.call(_101,q,node)){ +$("#"+node.domId).removeClass("tree-node-hidden"); +ids[node.domId]=1; +node.hidden=false; +}else{ +$("#"+node.domId).addClass("tree-node-hidden"); +node.hidden=true; +} +}); +for(var id in ids){ +_103(id); +} +function _103(_104){ +var p=$(_101).tree("getParent",$("#"+_104)[0]); +while(p){ +$(p.target).removeClass("tree-node-hidden"); +p.hidden=false; +p=$(_101).tree("getParent",p.target); +} +}; +}; +$.fn.tree=function(_105,_106){ +if(typeof _105=="string"){ +return $.fn.tree.methods[_105](this,_106); +} +var _105=_105||{}; +return this.each(function(){ +var _107=$.data(this,"tree"); +var opts; +if(_107){ +opts=$.extend(_107.options,_105); +_107.options=opts; +}else{ +opts=$.extend({},$.fn.tree.defaults,$.fn.tree.parseOptions(this),_105); +$.data(this,"tree",{options:opts,tree:_1(this),data:[]}); +var data=$.fn.tree.parseData(this); +if(data.length){ +_5b(this,this,data); +} +} +_4(this); +if(opts.data){ +_5b(this,this,$.extend(true,[],opts.data)); +} +_79(this,this); +}); +}; +$.fn.tree.methods={options:function(jq){ +return $.data(jq[0],"tree").options; +},loadData:function(jq,data){ +return jq.each(function(){ +_5b(this,this,data); +}); +},getNode:function(jq,_108){ +return _c(jq[0],_108); +},getData:function(jq,_109){ +return _d5(jq[0],_109); +},reload:function(jq,_10a){ +return jq.each(function(){ +if(_10a){ +var node=$(_10a); +var hit=node.children("span.tree-hit"); +hit.removeClass("tree-expanded tree-expanded-hover").addClass("tree-collapsed"); +node.next().remove(); +_83(this,_10a); +}else{ +$(this).empty(); +_79(this,this); +} +}); +},getRoot:function(jq,_10b){ +return _bd(jq[0],_10b); +},getRoots:function(jq){ +return _c1(jq[0]); +},getParent:function(jq,_10c){ +return _9a(jq[0],_10c); +},getChildren:function(jq,_10d){ +return _5a(jq[0],_10d); +},getChecked:function(jq,_10e){ +return _cc(jq[0],_10e); +},getSelected:function(jq){ +return _d2(jq[0]); +},isLeaf:function(jq,_10f){ +return _56(jq[0],_10f); +},find:function(jq,id){ +return _dc(jq[0],id); +},select:function(jq,_110){ +return jq.each(function(){ +_e9(this,_110); +}); +},check:function(jq,_111){ +return jq.each(function(){ +_34(this,_111,true); +}); +},uncheck:function(jq,_112){ +return jq.each(function(){ +_34(this,_112,false); +}); +},collapse:function(jq,_113){ +return jq.each(function(){ +_8a(this,_113); +}); +},expand:function(jq,_114){ +return jq.each(function(){ +_83(this,_114); +}); +},collapseAll:function(jq,_115){ +return jq.each(function(){ +_a0(this,_115); +}); +},expandAll:function(jq,_116){ +return jq.each(function(){ +_92(this,_116); +}); +},expandTo:function(jq,_117){ +return jq.each(function(){ +_96(this,_117); +}); +},scrollTo:function(jq,_118){ +return jq.each(function(){ +_9b(this,_118); +}); +},toggle:function(jq,_119){ +return jq.each(function(){ +_8f(this,_119); +}); +},append:function(jq,_11a){ +return jq.each(function(){ +_a4(this,_11a); +}); +},insert:function(jq,_11b){ +return jq.each(function(){ +_aa(this,_11b); +}); +},remove:function(jq,_11c){ +return jq.each(function(){ +_b0(this,_11c); +}); +},pop:function(jq,_11d){ +var node=jq.tree("getData",_11d); +jq.tree("remove",_11d); +return node; +},update:function(jq,_11e){ +return jq.each(function(){ +_64(this,_11e); +}); +},enableDnd:function(jq){ +return jq.each(function(){ +_11(this); +}); +},disableDnd:function(jq){ +return jq.each(function(){ +_d(this); +}); +},beginEdit:function(jq,_11f){ +return jq.each(function(){ +_f0(this,_11f); +}); +},endEdit:function(jq,_120){ +return jq.each(function(){ +_f7(this,_120); +}); +},cancelEdit:function(jq,_121){ +return jq.each(function(){ +_fd(this,_121); +}); +},doFilter:function(jq,q){ +return jq.each(function(){ +_100(this,q); +}); +}}; +$.fn.tree.parseOptions=function(_122){ +var t=$(_122); +return $.extend({},$.parser.parseOptions(_122,["url","method",{checkbox:"boolean",cascadeCheck:"boolean",onlyLeafCheck:"boolean"},{animate:"boolean",lines:"boolean",dnd:"boolean"}])); +}; +$.fn.tree.parseData=function(_123){ +var data=[]; +_124(data,$(_123)); +return data; +function _124(aa,tree){ +tree.children("li").each(function(){ +var node=$(this); +var item=$.extend({},$.parser.parseOptions(this,["id","iconCls","state"]),{checked:(node.attr("checked")?true:undefined)}); +item.text=node.children("span").html(); +if(!item.text){ +item.text=node.html(); +} +var _125=node.children("ul"); +if(_125.length){ +item.children=[]; +_124(item.children,_125); +} +aa.push(item); +}); +}; +}; +var _126=1; +var _127={render:function(_128,ul,data){ +var opts=$.data(_128,"tree").options; +var _129=$(ul).prev("div.tree-node").find("span.tree-indent, span.tree-hit").length; +var cc=_12a(_129,data); +$(ul).append(cc.join("")); +function _12a(_12b,_12c){ +var cc=[]; +for(var i=0;i<_12c.length;i++){ +var item=_12c[i]; +if(item.state!="open"&&item.state!="closed"){ +item.state="open"; +} +item.domId="_easyui_tree_"+_126++; +cc.push("
                                                        • "); +cc.push("
                                                          "); +for(var j=0;j<_12b;j++){ +cc.push(""); +} +var _12d=false; +if(item.state=="closed"){ +cc.push(""); +cc.push(""); +}else{ +if(item.children&&item.children.length){ +cc.push(""); +cc.push(""); +}else{ +cc.push(""); +cc.push(""); +_12d=true; +} +} +if(opts.checkbox){ +if((!opts.onlyLeafCheck)||_12d){ +cc.push(""); +} +} +cc.push(""+opts.formatter.call(_128,item)+""); +cc.push("
                                                          "); +if(item.children&&item.children.length){ +var tmp=_12a(_12b+1,item.children); +cc.push("
                                                            "); +cc=cc.concat(tmp); +cc.push("
                                                          "); +} +cc.push("
                                                        • "); +} +return cc; +}; +}}; +$.fn.tree.defaults={url:null,method:"post",animate:false,checkbox:false,cascadeCheck:true,onlyLeafCheck:false,lines:false,dnd:false,data:null,queryParams:{},formatter:function(node){ +return node.text; +},filter:function(q,node){ +return node.text.toLowerCase().indexOf(q.toLowerCase())>=0; +},loader:function(_12e,_12f,_130){ +var opts=$(this).tree("options"); +if(!opts.url){ +return false; +} +$.ajax({type:opts.method,url:opts.url,data:_12e,dataType:"json",success:function(data){ +_12f(data); +},error:function(){ +_130.apply(this,arguments); +}}); +},loadFilter:function(data,_131){ +return data; +},view:_127,onBeforeLoad:function(node,_132){ +},onLoadSuccess:function(node,data){ +},onLoadError:function(){ +},onClick:function(node){ +},onDblClick:function(node){ +},onBeforeExpand:function(node){ +},onExpand:function(node){ +},onBeforeCollapse:function(node){ +},onCollapse:function(node){ +},onBeforeCheck:function(node,_133){ +},onCheck:function(node,_134){ +},onBeforeSelect:function(node){ +},onSelect:function(node){ +},onContextMenu:function(e,node){ +},onBeforeDrag:function(node){ +},onStartDrag:function(node){ +},onStopDrag:function(node){ +},onDragEnter:function(_135,_136){ +},onDragOver:function(_137,_138){ +},onDragLeave:function(_139,_13a){ +},onBeforeDrop:function(_13b,_13c,_13d){ +},onDrop:function(_13e,_13f,_140){ +},onBeforeEdit:function(node){ +},onAfterEdit:function(node){ +},onCancelEdit:function(node){ +}}; +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.treegrid.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.treegrid.js new file mode 100644 index 0000000..7925003 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.treegrid.js @@ -0,0 +1,1116 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2){ +var _3=$.data(_2,"treegrid"); +var _4=_3.options; +$(_2).datagrid($.extend({},_4,{url:null,data:null,loader:function(){ +return false; +},onBeforeLoad:function(){ +return false; +},onLoadSuccess:function(){ +},onResizeColumn:function(_5,_6){ +_16(_2); +_4.onResizeColumn.call(_2,_5,_6); +},onBeforeSortColumn:function(_7,_8){ +if(_4.onBeforeSortColumn.call(_2,_7,_8)==false){ +return false; +} +},onSortColumn:function(_9,_a){ +_4.sortName=_9; +_4.sortOrder=_a; +if(_4.remoteSort){ +_15(_2); +}else{ +var _b=$(_2).treegrid("getData"); +_2f(_2,0,_b); +} +_4.onSortColumn.call(_2,_9,_a); +},onClickCell:function(_c,_d){ +_4.onClickCell.call(_2,_d,_37(_2,_c)); +},onDblClickCell:function(_e,_f){ +_4.onDblClickCell.call(_2,_f,_37(_2,_e)); +},onRowContextMenu:function(e,_10){ +_4.onContextMenu.call(_2,e,_37(_2,_10)); +}})); +var _11=$.data(_2,"datagrid").options; +_4.columns=_11.columns; +_4.frozenColumns=_11.frozenColumns; +_3.dc=$.data(_2,"datagrid").dc; +if(_4.pagination){ +var _12=$(_2).datagrid("getPager"); +_12.pagination({pageNumber:_4.pageNumber,pageSize:_4.pageSize,pageList:_4.pageList,onSelectPage:function(_13,_14){ +_4.pageNumber=_13; +_4.pageSize=_14; +_15(_2); +}}); +_4.pageSize=_12.pagination("options").pageSize; +} +}; +function _16(_17,_18){ +var _19=$.data(_17,"datagrid").options; +var dc=$.data(_17,"datagrid").dc; +if(!dc.body1.is(":empty")&&(!_19.nowrap||_19.autoRowHeight)){ +if(_18!=undefined){ +var _1a=_1b(_17,_18); +for(var i=0;i<_1a.length;i++){ +_1c(_1a[i][_19.idField]); +} +} +} +$(_17).datagrid("fixRowHeight",_18); +function _1c(_1d){ +var tr1=_19.finder.getTr(_17,_1d,"body",1); +var tr2=_19.finder.getTr(_17,_1d,"body",2); +tr1.css("height",""); +tr2.css("height",""); +var _1e=Math.max(tr1.height(),tr2.height()); +tr1.css("height",_1e); +tr2.css("height",_1e); +}; +}; +function _1f(_20){ +var dc=$.data(_20,"datagrid").dc; +var _21=$.data(_20,"treegrid").options; +if(!_21.rownumbers){ +return; +} +dc.body1.find("div.datagrid-cell-rownumber").each(function(i){ +$(this).html(i+1); +}); +}; +function _22(_23){ +return function(e){ +$.fn.datagrid.defaults.rowEvents[_23?"mouseover":"mouseout"](e); +var tt=$(e.target); +var fn=_23?"addClass":"removeClass"; +if(tt.hasClass("tree-hit")){ +tt.hasClass("tree-expanded")?tt[fn]("tree-expanded-hover"):tt[fn]("tree-collapsed-hover"); +} +}; +}; +function _24(e){ +var tt=$(e.target); +if(tt.hasClass("tree-hit")){ +var tr=tt.closest("tr.datagrid-row"); +var _25=tr.closest("div.datagrid-view").children(".datagrid-f")[0]; +_26(_25,tr.attr("node-id")); +}else{ +$.fn.datagrid.defaults.rowEvents.click(e); +} +}; +function _27(_28,_29){ +var _2a=$.data(_28,"treegrid").options; +var tr1=_2a.finder.getTr(_28,_29,"body",1); +var tr2=_2a.finder.getTr(_28,_29,"body",2); +var _2b=$(_28).datagrid("getColumnFields",true).length+(_2a.rownumbers?1:0); +var _2c=$(_28).datagrid("getColumnFields",false).length; +_2d(tr1,_2b); +_2d(tr2,_2c); +function _2d(tr,_2e){ +$(""+""+"
                                                          "+""+"").insertAfter(tr); +}; +}; +function _2f(_30,_31,_32,_33){ +var _34=$.data(_30,"treegrid"); +var _35=_34.options; +var dc=_34.dc; +_32=_35.loadFilter.call(_30,_32,_31); +var _36=_37(_30,_31); +if(_36){ +var _38=_35.finder.getTr(_30,_31,"body",1); +var _39=_35.finder.getTr(_30,_31,"body",2); +var cc1=_38.next("tr.treegrid-tr-tree").children("td").children("div"); +var cc2=_39.next("tr.treegrid-tr-tree").children("td").children("div"); +if(!_33){ +_36.children=[]; +} +}else{ +var cc1=dc.body1; +var cc2=dc.body2; +if(!_33){ +_34.data=[]; +} +} +if(!_33){ +cc1.empty(); +cc2.empty(); +} +if(_35.view.onBeforeRender){ +_35.view.onBeforeRender.call(_35.view,_30,_31,_32); +} +_35.view.render.call(_35.view,_30,cc1,true); +_35.view.render.call(_35.view,_30,cc2,false); +if(_35.showFooter){ +_35.view.renderFooter.call(_35.view,_30,dc.footer1,true); +_35.view.renderFooter.call(_35.view,_30,dc.footer2,false); +} +if(_35.view.onAfterRender){ +_35.view.onAfterRender.call(_35.view,_30); +} +if(!_31&&_35.pagination){ +var _3a=$.data(_30,"treegrid").total; +var _3b=$(_30).datagrid("getPager"); +if(_3b.pagination("options").total!=_3a){ +_3b.pagination({total:_3a}); +} +} +_16(_30); +_1f(_30); +$(_30).treegrid("showLines"); +$(_30).treegrid("setSelectionState"); +$(_30).treegrid("autoSizeColumn"); +_35.onLoadSuccess.call(_30,_36,_32); +}; +function _15(_3c,_3d,_3e,_3f,_40){ +var _41=$.data(_3c,"treegrid").options; +var _42=$(_3c).datagrid("getPanel").find("div.datagrid-body"); +if(_3e){ +_41.queryParams=_3e; +} +var _43=$.extend({},_41.queryParams); +if(_41.pagination){ +$.extend(_43,{page:_41.pageNumber,rows:_41.pageSize}); +} +if(_41.sortName){ +$.extend(_43,{sort:_41.sortName,order:_41.sortOrder}); +} +var row=_37(_3c,_3d); +if(_41.onBeforeLoad.call(_3c,row,_43)==false){ +return; +} +var _44=_42.find("tr[node-id=\""+_3d+"\"] span.tree-folder"); +_44.addClass("tree-loading"); +$(_3c).treegrid("loading"); +var _45=_41.loader.call(_3c,_43,function(_46){ +_44.removeClass("tree-loading"); +$(_3c).treegrid("loaded"); +_2f(_3c,_3d,_46,_3f); +if(_40){ +_40(); +} +},function(){ +_44.removeClass("tree-loading"); +$(_3c).treegrid("loaded"); +_41.onLoadError.apply(_3c,arguments); +if(_40){ +_40(); +} +}); +if(_45==false){ +_44.removeClass("tree-loading"); +$(_3c).treegrid("loaded"); +} +}; +function _47(_48){ +var _49=_4a(_48); +if(_49.length){ +return _49[0]; +}else{ +return null; +} +}; +function _4a(_4b){ +return $.data(_4b,"treegrid").data; +}; +function _4c(_4d,_4e){ +var row=_37(_4d,_4e); +if(row._parentId){ +return _37(_4d,row._parentId); +}else{ +return null; +} +}; +function _1b(_4f,_50){ +var _51=$.data(_4f,"treegrid").options; +var _52=$(_4f).datagrid("getPanel").find("div.datagrid-view2 div.datagrid-body"); +var _53=[]; +if(_50){ +_54(_50); +}else{ +var _55=_4a(_4f); +for(var i=0;i<_55.length;i++){ +_53.push(_55[i]); +_54(_55[i][_51.idField]); +} +} +function _54(_56){ +var _57=_37(_4f,_56); +if(_57&&_57.children){ +for(var i=0,len=_57.children.length;i").insertBefore(_84); +if(hit.prev().length){ +hit.prev().remove(); +} +} +} +_2f(_80,_81.parent,_81.data,true); +}; +function _85(_86,_87){ +var ref=_87.before||_87.after; +var _88=$.data(_86,"treegrid").options; +var _89=_4c(_86,ref); +_7f(_86,{parent:(_89?_89[_88.idField]:null),data:[_87.data]}); +var _8a=_89?_89.children:$(_86).treegrid("getRoots"); +for(var i=0;i<_8a.length;i++){ +if(_8a[i][_88.idField]==ref){ +var _8b=_8a[_8a.length-1]; +_8a.splice(_87.before?i:(i+1),0,_8b); +_8a.splice(_8a.length-1,1); +break; +} +} +_8c(true); +_8c(false); +_1f(_86); +$(_86).treegrid("showLines"); +function _8c(_8d){ +var _8e=_8d?1:2; +var tr=_88.finder.getTr(_86,_87.data[_88.idField],"body",_8e); +var _8f=tr.closest("table.datagrid-btable"); +tr=tr.parent().children(); +var _90=_88.finder.getTr(_86,ref,"body",_8e); +if(_87.before){ +tr.insertBefore(_90); +}else{ +var sub=_90.next("tr.treegrid-tr-tree"); +tr.insertAfter(sub.length?sub:_90); +} +_8f.remove(); +}; +}; +function _91(_92,_93){ +var _94=$.data(_92,"treegrid"); +$(_92).datagrid("deleteRow",_93); +_1f(_92); +_94.total-=1; +$(_92).datagrid("getPager").pagination("refresh",{total:_94.total}); +$(_92).treegrid("showLines"); +}; +function _95(_96){ +var t=$(_96); +var _97=t.treegrid("options"); +if(_97.lines){ +t.treegrid("getPanel").addClass("tree-lines"); +}else{ +t.treegrid("getPanel").removeClass("tree-lines"); +return; +} +t.treegrid("getPanel").find("span.tree-indent").removeClass("tree-line tree-join tree-joinbottom"); +t.treegrid("getPanel").find("div.datagrid-cell").removeClass("tree-node-last tree-root-first tree-root-one"); +var _98=t.treegrid("getRoots"); +if(_98.length>1){ +_99(_98[0]).addClass("tree-root-first"); +}else{ +if(_98.length==1){ +_99(_98[0]).addClass("tree-root-one"); +} +} +_9a(_98); +_9b(_98); +function _9a(_9c){ +$.map(_9c,function(_9d){ +if(_9d.children&&_9d.children.length){ +_9a(_9d.children); +}else{ +var _9e=_99(_9d); +_9e.find(".tree-icon").prev().addClass("tree-join"); +} +}); +if(_9c.length){ +var _9f=_99(_9c[_9c.length-1]); +_9f.addClass("tree-node-last"); +_9f.find(".tree-join").removeClass("tree-join").addClass("tree-joinbottom"); +} +}; +function _9b(_a0){ +$.map(_a0,function(_a1){ +if(_a1.children&&_a1.children.length){ +_9b(_a1.children); +} +}); +for(var i=0;i<_a0.length-1;i++){ +var _a2=_a0[i]; +var _a3=t.treegrid("getLevel",_a2[_97.idField]); +var tr=_97.finder.getTr(_96,_a2[_97.idField]); +var cc=tr.next().find("tr.datagrid-row td[field=\""+_97.treeField+"\"] div.datagrid-cell"); +cc.find("span:eq("+(_a3-1)+")").addClass("tree-line"); +} +}; +function _99(_a4){ +var tr=_97.finder.getTr(_96,_a4[_97.idField]); +var _a5=tr.find("td[field=\""+_97.treeField+"\"] div.datagrid-cell"); +return _a5; +}; +}; +$.fn.treegrid=function(_a6,_a7){ +if(typeof _a6=="string"){ +var _a8=$.fn.treegrid.methods[_a6]; +if(_a8){ +return _a8(this,_a7); +}else{ +return this.datagrid(_a6,_a7); +} +} +_a6=_a6||{}; +return this.each(function(){ +var _a9=$.data(this,"treegrid"); +if(_a9){ +$.extend(_a9.options,_a6); +}else{ +_a9=$.data(this,"treegrid",{options:$.extend({},$.fn.treegrid.defaults,$.fn.treegrid.parseOptions(this),_a6),data:[]}); +} +_1(this); +if(_a9.options.data){ +$(this).treegrid("loadData",_a9.options.data); +} +_15(this); +}); +}; +$.fn.treegrid.methods={options:function(jq){ +return $.data(jq[0],"treegrid").options; +},resize:function(jq,_aa){ +return jq.each(function(){ +$(this).datagrid("resize",_aa); +}); +},fixRowHeight:function(jq,_ab){ +return jq.each(function(){ +_16(this,_ab); +}); +},loadData:function(jq,_ac){ +return jq.each(function(){ +_2f(this,_ac.parent,_ac); +}); +},load:function(jq,_ad){ +return jq.each(function(){ +$(this).treegrid("options").pageNumber=1; +$(this).treegrid("getPager").pagination({pageNumber:1}); +$(this).treegrid("reload",_ad); +}); +},reload:function(jq,id){ +return jq.each(function(){ +var _ae=$(this).treegrid("options"); +var _af={}; +if(typeof id=="object"){ +_af=id; +}else{ +_af=$.extend({},_ae.queryParams); +_af.id=id; +} +if(_af.id){ +var _b0=$(this).treegrid("find",_af.id); +if(_b0.children){ +_b0.children.splice(0,_b0.children.length); +} +_ae.queryParams=_af; +var tr=_ae.finder.getTr(this,_af.id); +tr.next("tr.treegrid-tr-tree").remove(); +tr.find("span.tree-hit").removeClass("tree-expanded tree-expanded-hover").addClass("tree-collapsed"); +_67(this,_af.id); +}else{ +_15(this,null,_af); +} +}); +},reloadFooter:function(jq,_b1){ +return jq.each(function(){ +var _b2=$.data(this,"treegrid").options; +var dc=$.data(this,"datagrid").dc; +if(_b1){ +$.data(this,"treegrid").footer=_b1; +} +if(_b2.showFooter){ +_b2.view.renderFooter.call(_b2.view,this,dc.footer1,true); +_b2.view.renderFooter.call(_b2.view,this,dc.footer2,false); +if(_b2.view.onAfterRender){ +_b2.view.onAfterRender.call(_b2.view,this); +} +$(this).treegrid("fixRowHeight"); +} +}); +},getData:function(jq){ +return $.data(jq[0],"treegrid").data; +},getFooterRows:function(jq){ +return $.data(jq[0],"treegrid").footer; +},getRoot:function(jq){ +return _47(jq[0]); +},getRoots:function(jq){ +return _4a(jq[0]); +},getParent:function(jq,id){ +return _4c(jq[0],id); +},getChildren:function(jq,id){ +return _1b(jq[0],id); +},getLevel:function(jq,id){ +return _59(jq[0],id); +},find:function(jq,id){ +return _37(jq[0],id); +},isLeaf:function(jq,id){ +var _b3=$.data(jq[0],"treegrid").options; +var tr=_b3.finder.getTr(jq[0],id); +var hit=tr.find("span.tree-hit"); +return hit.length==0; +},select:function(jq,id){ +return jq.each(function(){ +$(this).datagrid("selectRow",id); +}); +},unselect:function(jq,id){ +return jq.each(function(){ +$(this).datagrid("unselectRow",id); +}); +},collapse:function(jq,id){ +return jq.each(function(){ +_63(this,id); +}); +},expand:function(jq,id){ +return jq.each(function(){ +_67(this,id); +}); +},toggle:function(jq,id){ +return jq.each(function(){ +_26(this,id); +}); +},collapseAll:function(jq,id){ +return jq.each(function(){ +_71(this,id); +}); +},expandAll:function(jq,id){ +return jq.each(function(){ +_76(this,id); +}); +},expandTo:function(jq,id){ +return jq.each(function(){ +_7b(this,id); +}); +},append:function(jq,_b4){ +return jq.each(function(){ +_7f(this,_b4); +}); +},insert:function(jq,_b5){ +return jq.each(function(){ +_85(this,_b5); +}); +},remove:function(jq,id){ +return jq.each(function(){ +_91(this,id); +}); +},pop:function(jq,id){ +var row=jq.treegrid("find",id); +jq.treegrid("remove",id); +return row; +},refresh:function(jq,id){ +return jq.each(function(){ +var _b6=$.data(this,"treegrid").options; +_b6.view.refreshRow.call(_b6.view,this,id); +}); +},update:function(jq,_b7){ +return jq.each(function(){ +var _b8=$.data(this,"treegrid").options; +_b8.view.updateRow.call(_b8.view,this,_b7.id,_b7.row); +}); +},beginEdit:function(jq,id){ +return jq.each(function(){ +$(this).datagrid("beginEdit",id); +$(this).treegrid("fixRowHeight",id); +}); +},endEdit:function(jq,id){ +return jq.each(function(){ +$(this).datagrid("endEdit",id); +}); +},cancelEdit:function(jq,id){ +return jq.each(function(){ +$(this).datagrid("cancelEdit",id); +}); +},showLines:function(jq){ +return jq.each(function(){ +_95(this); +}); +}}; +$.fn.treegrid.parseOptions=function(_b9){ +return $.extend({},$.fn.datagrid.parseOptions(_b9),$.parser.parseOptions(_b9,["treeField",{animate:"boolean"}])); +}; +var _ba=$.extend({},$.fn.datagrid.defaults.view,{render:function(_bb,_bc,_bd){ +var _be=$.data(_bb,"treegrid").options; +var _bf=$(_bb).datagrid("getColumnFields",_bd); +var _c0=$.data(_bb,"datagrid").rowIdPrefix; +if(_bd){ +if(!(_be.rownumbers||(_be.frozenColumns&&_be.frozenColumns.length))){ +return; +} +} +var _c1=this; +if(this.treeNodes&&this.treeNodes.length){ +var _c2=_c3(_bd,this.treeLevel,this.treeNodes); +$(_bc).append(_c2.join("")); +} +function _c3(_c4,_c5,_c6){ +var _c7=$(_bb).treegrid("getParent",_c6[0][_be.idField]); +var _c8=(_c7?_c7.children.length:$(_bb).treegrid("getRoots").length)-_c6.length; +var _c9=[""]; +for(var i=0;i<_c6.length;i++){ +var row=_c6[i]; +if(row.state!="open"&&row.state!="closed"){ +row.state="open"; +} +var css=_be.rowStyler?_be.rowStyler.call(_bb,row):""; +var _ca=""; +var _cb=""; +if(typeof css=="string"){ +_cb=css; +}else{ +if(css){ +_ca=css["class"]||""; +_cb=css["style"]||""; +} +} +var cls="class=\"datagrid-row "+(_c8++%2&&_be.striped?"datagrid-row-alt ":" ")+_ca+"\""; +var _cc=_cb?"style=\""+_cb+"\"":""; +var _cd=_c0+"-"+(_c4?1:2)+"-"+row[_be.idField]; +_c9.push(""); +_c9=_c9.concat(_c1.renderRow.call(_c1,_bb,_bf,_c4,_c5,row)); +_c9.push(""); +if(row.children&&row.children.length){ +var tt=_c3(_c4,_c5+1,row.children); +var v=row.state=="closed"?"none":"block"; +_c9.push(""); +} +} +_c9.push("
                                                          "); +_c9=_c9.concat(tt); +_c9.push("
                                                          "); +return _c9; +}; +},renderFooter:function(_ce,_cf,_d0){ +var _d1=$.data(_ce,"treegrid").options; +var _d2=$.data(_ce,"treegrid").footer||[]; +var _d3=$(_ce).datagrid("getColumnFields",_d0); +var _d4=[""]; +for(var i=0;i<_d2.length;i++){ +var row=_d2[i]; +row[_d1.idField]=row[_d1.idField]||("foot-row-id"+i); +_d4.push(""); +_d4.push(this.renderRow.call(this,_ce,_d3,_d0,0,row)); +_d4.push(""); +} +_d4.push("
                                                          "); +$(_cf).html(_d4.join("")); +},renderRow:function(_d5,_d6,_d7,_d8,row){ +var _d9=$.data(_d5,"treegrid").options; +var cc=[]; +if(_d7&&_d9.rownumbers){ +cc.push("
                                                          0
                                                          "); +} +for(var i=0;i<_d6.length;i++){ +var _da=_d6[i]; +var col=$(_d5).datagrid("getColumnOption",_da); +if(col){ +var css=col.styler?(col.styler(row[_da],row)||""):""; +var _db=""; +var _dc=""; +if(typeof css=="string"){ +_dc=css; +}else{ +if(cc){ +_db=css["class"]||""; +_dc=css["style"]||""; +} +} +var cls=_db?"class=\""+_db+"\"":""; +var _dd=col.hidden?"style=\"display:none;"+_dc+"\"":(_dc?"style=\""+_dc+"\"":""); +cc.push(""); +var _dd=""; +if(!col.checkbox){ +if(col.align){ +_dd+="text-align:"+col.align+";"; +} +if(!_d9.nowrap){ +_dd+="white-space:normal;height:auto;"; +}else{ +if(_d9.autoRowHeight){ +_dd+="height:auto;"; +} +} +} +cc.push("
                                                          "); +if(col.checkbox){ +if(row.checked){ +cc.push(""); +}else{ +var val=null; +if(col.formatter){ +val=col.formatter(row[_da],row); +}else{ +val=row[_da]; +} +if(_da==_d9.treeField){ +for(var j=0;j<_d8;j++){ +cc.push(""); +} +if(row.state=="closed"){ +cc.push(""); +cc.push(""); +}else{ +if(row.children&&row.children.length){ +cc.push(""); +cc.push(""); +}else{ +cc.push(""); +cc.push(""); +} +} +cc.push(""+val+""); +}else{ +cc.push(val); +} +} +cc.push("
                                                          "); +cc.push(""); +} +} +return cc.join(""); +},refreshRow:function(_de,id){ +this.updateRow.call(this,_de,id,{}); +},updateRow:function(_df,id,row){ +var _e0=$.data(_df,"treegrid").options; +var _e1=$(_df).treegrid("find",id); +$.extend(_e1,row); +var _e2=$(_df).treegrid("getLevel",id)-1; +var _e3=_e0.rowStyler?_e0.rowStyler.call(_df,_e1):""; +var _e4=$.data(_df,"datagrid").rowIdPrefix; +var _e5=_e1[_e0.idField]; +function _e6(_e7){ +var _e8=$(_df).treegrid("getColumnFields",_e7); +var tr=_e0.finder.getTr(_df,id,"body",(_e7?1:2)); +var _e9=tr.find("div.datagrid-cell-rownumber").html(); +var _ea=tr.find("div.datagrid-cell-check input[type=checkbox]").is(":checked"); +tr.html(this.renderRow(_df,_e8,_e7,_e2,_e1)); +tr.attr("style",_e3||""); +tr.find("div.datagrid-cell-rownumber").html(_e9); +if(_ea){ +tr.find("div.datagrid-cell-check input[type=checkbox]")._propAttr("checked",true); +} +if(_e5!=id){ +tr.attr("id",_e4+"-"+(_e7?1:2)+"-"+_e5); +tr.attr("node-id",_e5); +} +}; +_e6.call(this,true); +_e6.call(this,false); +$(_df).treegrid("fixRowHeight",id); +},deleteRow:function(_eb,id){ +var _ec=$.data(_eb,"treegrid").options; +var tr=_ec.finder.getTr(_eb,id); +tr.next("tr.treegrid-tr-tree").remove(); +tr.remove(); +var _ed=del(id); +if(_ed){ +if(_ed.children.length==0){ +tr=_ec.finder.getTr(_eb,_ed[_ec.idField]); +tr.next("tr.treegrid-tr-tree").remove(); +var _ee=tr.children("td[field=\""+_ec.treeField+"\"]").children("div.datagrid-cell"); +_ee.find(".tree-icon").removeClass("tree-folder").addClass("tree-file"); +_ee.find(".tree-hit").remove(); +$("").prependTo(_ee); +} +} +function del(id){ +var cc; +var _ef=$(_eb).treegrid("getParent",id); +if(_ef){ +cc=_ef.children; +}else{ +cc=$(_eb).treegrid("getData"); +} +for(var i=0;ib?1:-1); +}; +r=_100(r1[sn],r2[sn])*(so=="asc"?1:-1); +if(r!=0){ +return r; +} +} +return r; +}); +for(var i=0;i<_ff.length;i++){ +var _101=_ff[i].children; +if(_101&&_101.length){ +_fe(_101); +} +} +}; +},transfer:function(_102,_103,data){ +var opts=$.data(_102,"treegrid").options; +var rows=[]; +for(var i=0;i=_3d[0]&&len<=_3d[1]; +},message:"Please enter a value between {0} and {1}."},remote:{validator:function(_3e,_3f){ +var _40={}; +_40[_3f[1]]=_3e; +var _41=$.ajax({url:_3f[0],dataType:"json",data:_40,async:false,cache:false,type:"post"}).responseText; +return _41=="true"; +},message:"Please fix this field."}},onBeforeValidate:function(){ +},onValidate:function(_42){ +}}; +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.window.js b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.window.js new file mode 100644 index 0000000..4761206 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/plugins/jquery.window.js @@ -0,0 +1,258 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +(function($){ +function _1(_2,_3){ +var _4=$.data(_2,"window"); +if(_3){ +if(_3.left!=null){ +_4.options.left=_3.left; +} +if(_3.top!=null){ +_4.options.top=_3.top; +} +} +$(_2).panel("move",_4.options); +if(_4.shadow){ +_4.shadow.css({left:_4.options.left,top:_4.options.top}); +} +}; +function _5(_6,_7){ +var _8=$.data(_6,"window").options; +var pp=$(_6).window("panel"); +var _9=pp._outerWidth(); +if(_8.inline){ +var _a=pp.parent(); +_8.left=Math.ceil((_a.width()-_9)/2+_a.scrollLeft()); +}else{ +_8.left=Math.ceil(($(window)._outerWidth()-_9)/2+$(document).scrollLeft()); +} +if(_7){ +_1(_6); +} +}; +function _b(_c,_d){ +var _e=$.data(_c,"window").options; +var pp=$(_c).window("panel"); +var _f=pp._outerHeight(); +if(_e.inline){ +var _10=pp.parent(); +_e.top=Math.ceil((_10.height()-_f)/2+_10.scrollTop()); +}else{ +_e.top=Math.ceil(($(window)._outerHeight()-_f)/2+$(document).scrollTop()); +} +if(_d){ +_1(_c); +} +}; +function _11(_12){ +var _13=$.data(_12,"window"); +var _14=_13.options; +var win=$(_12).panel($.extend({},_13.options,{border:false,doSize:true,closed:true,cls:"window",headerCls:"window-header",bodyCls:"window-body "+(_14.noheader?"window-body-noheader":""),onBeforeDestroy:function(){ +if(_14.onBeforeDestroy.call(_12)==false){ +return false; +} +if(_13.shadow){ +_13.shadow.remove(); +} +if(_13.mask){ +_13.mask.remove(); +} +},onClose:function(){ +if(_13.shadow){ +_13.shadow.hide(); +} +if(_13.mask){ +_13.mask.hide(); +} +_14.onClose.call(_12); +},onOpen:function(){ +if(_13.mask){ +_13.mask.css($.extend({display:"block",zIndex:$.fn.window.defaults.zIndex++},$.fn.window.getMaskSize(_12))); +} +if(_13.shadow){ +_13.shadow.css({display:"block",zIndex:$.fn.window.defaults.zIndex++,left:_14.left,top:_14.top,width:_13.window._outerWidth(),height:_13.window._outerHeight()}); +} +_13.window.css("z-index",$.fn.window.defaults.zIndex++); +_14.onOpen.call(_12); +},onResize:function(_15,_16){ +var _17=$(this).panel("options"); +$.extend(_14,{width:_17.width,height:_17.height,left:_17.left,top:_17.top}); +if(_13.shadow){ +_13.shadow.css({left:_14.left,top:_14.top,width:_13.window._outerWidth(),height:_13.window._outerHeight()}); +} +_14.onResize.call(_12,_15,_16); +},onMinimize:function(){ +if(_13.shadow){ +_13.shadow.hide(); +} +if(_13.mask){ +_13.mask.hide(); +} +_13.options.onMinimize.call(_12); +},onBeforeCollapse:function(){ +if(_14.onBeforeCollapse.call(_12)==false){ +return false; +} +if(_13.shadow){ +_13.shadow.hide(); +} +},onExpand:function(){ +if(_13.shadow){ +_13.shadow.show(); +} +_14.onExpand.call(_12); +}})); +_13.window=win.panel("panel"); +if(_13.mask){ +_13.mask.remove(); +} +if(_14.modal){ +_13.mask=$("
                                                          ").insertAfter(_13.window); +} +if(_13.shadow){ +_13.shadow.remove(); +} +if(_14.shadow){ +_13.shadow=$("
                                                          ").insertAfter(_13.window); +} +var _18=_14.closed; +if(_14.left==null){ +_5(_12); +} +if(_14.top==null){ +_b(_12); +} +_1(_12); +if(!_18){ +win.window("open"); +} +}; +function _19(_1a){ +var _1b=$.data(_1a,"window"); +_1b.window.draggable({handle:">div.panel-header>div.panel-title",disabled:_1b.options.draggable==false,onStartDrag:function(e){ +if(_1b.mask){ +_1b.mask.css("z-index",$.fn.window.defaults.zIndex++); +} +if(_1b.shadow){ +_1b.shadow.css("z-index",$.fn.window.defaults.zIndex++); +} +_1b.window.css("z-index",$.fn.window.defaults.zIndex++); +if(!_1b.proxy){ +_1b.proxy=$("
                                                          ").insertAfter(_1b.window); +} +_1b.proxy.css({display:"none",zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top}); +_1b.proxy._outerWidth(_1b.window._outerWidth()); +_1b.proxy._outerHeight(_1b.window._outerHeight()); +setTimeout(function(){ +if(_1b.proxy){ +_1b.proxy.show(); +} +},500); +},onDrag:function(e){ +_1b.proxy.css({display:"block",left:e.data.left,top:e.data.top}); +return false; +},onStopDrag:function(e){ +_1b.options.left=e.data.left; +_1b.options.top=e.data.top; +$(_1a).window("move"); +_1b.proxy.remove(); +_1b.proxy=null; +}}); +_1b.window.resizable({disabled:_1b.options.resizable==false,onStartResize:function(e){ +if(_1b.pmask){ +_1b.pmask.remove(); +} +_1b.pmask=$("
                                                          ").insertAfter(_1b.window); +_1b.pmask.css({zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top,width:_1b.window._outerWidth(),height:_1b.window._outerHeight()}); +if(_1b.proxy){ +_1b.proxy.remove(); +} +_1b.proxy=$("
                                                          ").insertAfter(_1b.window); +_1b.proxy.css({zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top}); +_1b.proxy._outerWidth(e.data.width)._outerHeight(e.data.height); +},onResize:function(e){ +_1b.proxy.css({left:e.data.left,top:e.data.top}); +_1b.proxy._outerWidth(e.data.width); +_1b.proxy._outerHeight(e.data.height); +return false; +},onStopResize:function(e){ +$(_1a).window("resize",e.data); +_1b.pmask.remove(); +_1b.pmask=null; +_1b.proxy.remove(); +_1b.proxy=null; +}}); +}; +$(window).resize(function(){ +$("body>div.window-mask").css({width:$(window)._outerWidth(),height:$(window)._outerHeight()}); +setTimeout(function(){ +$("body>div.window-mask").css($.fn.window.getMaskSize()); +},50); +}); +$.fn.window=function(_1c,_1d){ +if(typeof _1c=="string"){ +var _1e=$.fn.window.methods[_1c]; +if(_1e){ +return _1e(this,_1d); +}else{ +return this.panel(_1c,_1d); +} +} +_1c=_1c||{}; +return this.each(function(){ +var _1f=$.data(this,"window"); +if(_1f){ +$.extend(_1f.options,_1c); +}else{ +_1f=$.data(this,"window",{options:$.extend({},$.fn.window.defaults,$.fn.window.parseOptions(this),_1c)}); +if(!_1f.options.inline){ +document.body.appendChild(this); +} +} +_11(this); +_19(this); +}); +}; +$.fn.window.methods={options:function(jq){ +var _20=jq.panel("options"); +var _21=$.data(jq[0],"window").options; +return $.extend(_21,{closed:_20.closed,collapsed:_20.collapsed,minimized:_20.minimized,maximized:_20.maximized}); +},window:function(jq){ +return $.data(jq[0],"window").window; +},move:function(jq,_22){ +return jq.each(function(){ +_1(this,_22); +}); +},hcenter:function(jq){ +return jq.each(function(){ +_5(this,true); +}); +},vcenter:function(jq){ +return jq.each(function(){ +_b(this,true); +}); +},center:function(jq){ +return jq.each(function(){ +_5(this); +_b(this); +_1(this); +}); +}}; +$.fn.window.getMaskSize=function(_23){ +var _24=$(_23).data("window"); +var _25=(_24&&_24.options.inline); +return {width:(_25?"100%":$(document).width()),height:(_25?"100%":$(document).height())}; +}; +$.fn.window.parseOptions=function(_26){ +return $.extend({},$.fn.panel.parseOptions(_26),$.parser.parseOptions(_26,[{draggable:"boolean",resizable:"boolean",shadow:"boolean",modal:"boolean",inline:"boolean"}])); +}; +$.fn.window.defaults=$.extend({},$.fn.panel.defaults,{zIndex:9000,draggable:true,resizable:true,shadow:true,modal:false,inline:false,title:"New Window",collapsible:true,minimizable:true,maximizable:true,closable:true,closed:false}); +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/readme.txt b/src/main/webapp/jquery-easyui-1.4.4/readme.txt new file mode 100644 index 0000000..4e6c900 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/readme.txt @@ -0,0 +1,4 @@ +Current Version: 1.4.4 +====================== +This software is allowed to use under freeware license or you need to buy commercial license for better support or other purpose. +Please contact us at info@jeasyui.com diff --git a/src/main/webapp/jquery-easyui-1.4.4/src/easyloader.js b/src/main/webapp/jquery-easyui-1.4.4/src/easyloader.js new file mode 100644 index 0000000..1528bd6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/src/easyloader.js @@ -0,0 +1,426 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +/** + * easyloader - jQuery EasyUI + * + */ +(function(){ + var modules = { + draggable:{ + js:'jquery.draggable.js' + }, + droppable:{ + js:'jquery.droppable.js' + }, + resizable:{ + js:'jquery.resizable.js' + }, + linkbutton:{ + js:'jquery.linkbutton.js', + css:'linkbutton.css' + }, + progressbar:{ + js:'jquery.progressbar.js', + css:'progressbar.css' + }, + tooltip:{ + js:'jquery.tooltip.js', + css:'tooltip.css' + }, + pagination:{ + js:'jquery.pagination.js', + css:'pagination.css', + dependencies:['linkbutton'] + }, + datagrid:{ + js:'jquery.datagrid.js', + css:'datagrid.css', + dependencies:['panel','resizable','linkbutton','pagination'] + }, + treegrid:{ + js:'jquery.treegrid.js', + css:'tree.css', + dependencies:['datagrid'] + }, + propertygrid:{ + js:'jquery.propertygrid.js', + css:'propertygrid.css', + dependencies:['datagrid'] + }, + datalist:{ + js:'jquery.datalist.js', + css:'datalist.css', + dependencies:['datagrid'] + }, + panel: { + js:'jquery.panel.js', + css:'panel.css' + }, + window:{ + js:'jquery.window.js', + css:'window.css', + dependencies:['resizable','draggable','panel'] + }, + dialog:{ + js:'jquery.dialog.js', + css:'dialog.css', + dependencies:['linkbutton','window'] + }, + messager:{ + js:'jquery.messager.js', + css:'messager.css', + dependencies:['linkbutton','dialog','progressbar'] + }, + layout:{ + js:'jquery.layout.js', + css:'layout.css', + dependencies:['resizable','panel'] + }, + form:{ + js:'jquery.form.js' + }, + menu:{ + js:'jquery.menu.js', + css:'menu.css' + }, + tabs:{ + js:'jquery.tabs.js', + css:'tabs.css', + dependencies:['panel','linkbutton'] + }, + menubutton:{ + js:'jquery.menubutton.js', + css:'menubutton.css', + dependencies:['linkbutton','menu'] + }, + splitbutton:{ + js:'jquery.splitbutton.js', + css:'splitbutton.css', + dependencies:['menubutton'] + }, + switchbutton:{ + js:'jquery.switchbutton.js', + css:'switchbutton.css' + }, + accordion:{ + js:'jquery.accordion.js', + css:'accordion.css', + dependencies:['panel'] + }, + calendar:{ + js:'jquery.calendar.js', + css:'calendar.css' + }, + textbox:{ + js:'jquery.textbox.js', + css:'textbox.css', + dependencies:['validatebox','linkbutton'] + }, + filebox:{ + js:'jquery.filebox.js', + css:'filebox.css', + dependencies:['textbox'] + }, + combo:{ + js:'jquery.combo.js', + css:'combo.css', + dependencies:['panel','textbox'] + }, + combobox:{ + js:'jquery.combobox.js', + css:'combobox.css', + dependencies:['combo'] + }, + combotree:{ + js:'jquery.combotree.js', + dependencies:['combo','tree'] + }, + combogrid:{ + js:'jquery.combogrid.js', + dependencies:['combo','datagrid'] + }, + validatebox:{ + js:'jquery.validatebox.js', + css:'validatebox.css', + dependencies:['tooltip'] + }, + numberbox:{ + js:'jquery.numberbox.js', + dependencies:['textbox'] + }, + searchbox:{ + js:'jquery.searchbox.js', + css:'searchbox.css', + dependencies:['menubutton','textbox'] + }, + spinner:{ + js:'jquery.spinner.js', + css:'spinner.css', + dependencies:['textbox'] + }, + numberspinner:{ + js:'jquery.numberspinner.js', + dependencies:['spinner','numberbox'] + }, + timespinner:{ + js:'jquery.timespinner.js', + dependencies:['spinner'] + }, + tree:{ + js:'jquery.tree.js', + css:'tree.css', + dependencies:['draggable','droppable'] + }, + datebox:{ + js:'jquery.datebox.js', + css:'datebox.css', + dependencies:['calendar','combo'] + }, + datetimebox:{ + js:'jquery.datetimebox.js', + dependencies:['datebox','timespinner'] + }, + slider:{ + js:'jquery.slider.js', + dependencies:['draggable'] + }, + parser:{ + js:'jquery.parser.js' + }, + mobile:{ + js:'jquery.mobile.js' + } + }; + + var locales = { + 'af':'easyui-lang-af.js', + 'ar':'easyui-lang-ar.js', + 'bg':'easyui-lang-bg.js', + 'ca':'easyui-lang-ca.js', + 'cs':'easyui-lang-cs.js', + 'cz':'easyui-lang-cz.js', + 'da':'easyui-lang-da.js', + 'de':'easyui-lang-de.js', + 'el':'easyui-lang-el.js', + 'en':'easyui-lang-en.js', + 'es':'easyui-lang-es.js', + 'fr':'easyui-lang-fr.js', + 'it':'easyui-lang-it.js', + 'jp':'easyui-lang-jp.js', + 'nl':'easyui-lang-nl.js', + 'pl':'easyui-lang-pl.js', + 'pt_BR':'easyui-lang-pt_BR.js', + 'ru':'easyui-lang-ru.js', + 'sv_SE':'easyui-lang-sv_SE.js', + 'tr':'easyui-lang-tr.js', + 'zh_CN':'easyui-lang-zh_CN.js', + 'zh_TW':'easyui-lang-zh_TW.js' + }; + + var queues = {}; + + function loadJs(url, callback){ + var done = false; + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.language = 'javascript'; + script.src = url; + script.onload = script.onreadystatechange = function(){ + if (!done && (!script.readyState || script.readyState == 'loaded' || script.readyState == 'complete')){ + done = true; + script.onload = script.onreadystatechange = null; + if (callback){ + callback.call(script); + } + } + } + document.getElementsByTagName("head")[0].appendChild(script); + } + + function runJs(url, callback){ + loadJs(url, function(){ + document.getElementsByTagName("head")[0].removeChild(this); + if (callback){ + callback(); + } + }); + } + + function loadCss(url, callback){ + var link = document.createElement('link'); + link.rel = 'stylesheet'; + link.type = 'text/css'; + link.media = 'screen'; + link.href = url; + document.getElementsByTagName('head')[0].appendChild(link); + if (callback){ + callback.call(link); + } + } + + function loadSingle(name, callback){ + queues[name] = 'loading'; + + var module = modules[name]; + var jsStatus = 'loading'; + var cssStatus = (easyloader.css && module['css']) ? 'loading' : 'loaded'; + + if (easyloader.css && module['css']){ + if (/^http/i.test(module['css'])){ + var url = module['css']; + } else { + var url = easyloader.base + 'themes/' + easyloader.theme + '/' + module['css']; + } + loadCss(url, function(){ + cssStatus = 'loaded'; + if (jsStatus == 'loaded' && cssStatus == 'loaded'){ + finish(); + } + }); + } + + if (/^http/i.test(module['js'])){ + var url = module['js']; + } else { + var url = easyloader.base + 'plugins/' + module['js']; + } + loadJs(url, function(){ + jsStatus = 'loaded'; + if (jsStatus == 'loaded' && cssStatus == 'loaded'){ + finish(); + } + }); + + function finish(){ + queues[name] = 'loaded'; + easyloader.onProgress(name); + if (callback){ + callback(); + } + } + } + + function loadModule(name, callback){ + var mm = []; + var doLoad = false; + + if (typeof name == 'string'){ + add(name); + } else { + for(var i=0; i.panel>.accordion-header'); + if (headers.length){ + headerHeight = $(headers[0]).css('height', '')._outerHeight(); + } + if (!isNaN(parseInt(opts.height))){ + bodyHeight = cc.height() - headerHeight*headers.length; + } + + _resize(true, bodyHeight - _resize(false) + 1); + + function _resize(collapsible, height){ + var totalHeight = 0; + for(var i=0; i= panels.length){ + return null; + } else { + return panels[which]; + } + } + return findBy(container, 'title', which); + } + + function setProperties(container){ + var opts = $.data(container, 'accordion').options; + var cc = $(container); + if (opts.border){ + cc.removeClass('accordion-noborder'); + } else { + cc.addClass('accordion-noborder'); + } + } + + function init(container){ + var state = $.data(container, 'accordion'); + var cc = $(container); + cc.addClass('accordion'); + + state.panels = []; + cc.children('div').each(function(){ + var opts = $.extend({}, $.parser.parseOptions(this), { + selected: ($(this).attr('selected') ? true : undefined) + }); + var pp = $(this); + state.panels.push(pp); + createPanel(container, pp, opts); + }); + + cc.bind('_resize', function(e,force){ + if ($(this).hasClass('easyui-fluid') || force){ + setSize(container); + } + return false; + }); + } + + function createPanel(container, pp, options){ + var opts = $.data(container, 'accordion').options; + pp.panel($.extend({}, { + collapsible: true, + minimizable: false, + maximizable: false, + closable: false, + doSize: false, + collapsed: true, + headerCls: 'accordion-header', + bodyCls: 'accordion-body' + }, options, { + onBeforeExpand: function(){ + if (options.onBeforeExpand){ + if (options.onBeforeExpand.call(this) == false){return false} + } + if (!opts.multiple){ + // get all selected panel + var all = $.grep(getSelections(container), function(p){ + return p.panel('options').collapsible; + }); + for(var i=0; i').addClass('accordion-collapse accordion-expand').appendTo(tool); + t.bind('click', function(){ + togglePanel(pp); + return false; + }); + pp.panel('options').collapsible ? t.show() : t.hide(); + + header.click(function(){ + togglePanel(pp); + return false; + }); + + function togglePanel(p){ + var popts = p.panel('options'); + if (popts.collapsible){ + var index = getPanelIndex(container, p); + if (popts.collapsed){ + select(container, index); + } else { + unselect(container, index); + } + } + } + } + + /** + * select and set the specified panel active + */ + function select(container, which){ + var p = getPanel(container, which); + if (!p){return} + stopAnimate(container); + var opts = $.data(container, 'accordion').options; + p.panel('expand', opts.animate); + } + + function unselect(container, which){ + var p = getPanel(container, which); + if (!p){return} + stopAnimate(container); + var opts = $.data(container, 'accordion').options; + p.panel('collapse', opts.animate); + } + + function doFirstSelect(container){ + var opts = $.data(container, 'accordion').options; + var p = findBy(container, 'selected', true); + if (p){ + _select(getPanelIndex(container, p)); + } else { + _select(opts.selected); + } + + function _select(index){ + var animate = opts.animate; + opts.animate = false; + select(container, index); + opts.animate = animate; + } + } + + /** + * stop the animation of all panels + */ + function stopAnimate(container){ + var panels = $.data(container, 'accordion').panels; + for(var i=0; i').appendTo(container); + panels.push(pp); + createPanel(container, pp, options); + setSize(container); + + opts.onAdd.call(container, options.title, panels.length-1); + + if (options.selected){ + select(container, panels.length-1); + } + } + + function remove(container, which){ + var state = $.data(container, 'accordion'); + var opts = state.options; + var panels = state.panels; + + stopAnimate(container); + + var panel = getPanel(container, which); + var title = panel.panel('options').title; + var index = getPanelIndex(container, panel); + + if (!panel){return} + if (opts.onBeforeRemove.call(container, title, index) == false){return} + + panels.splice(index, 1); + panel.panel('destroy'); + if (panels.length){ + setSize(container); + var curr = getSelected(container); + if (!curr){ + select(container, 0); + } + } + + opts.onRemove.call(container, title, index); + } + + $.fn.accordion = function(options, param){ + if (typeof options == 'string'){ + return $.fn.accordion.methods[options](this, param); + } + + options = options || {}; + return this.each(function(){ + var state = $.data(this, 'accordion'); + if (state){ + $.extend(state.options, options); + } else { + $.data(this, 'accordion', { + options: $.extend({}, $.fn.accordion.defaults, $.fn.accordion.parseOptions(this), options), + accordion: $(this).addClass('accordion'), + panels: [] + }); + init(this); + } + + setProperties(this); + setSize(this); + doFirstSelect(this); + }); + }; + + $.fn.accordion.methods = { + options: function(jq){ + return $.data(jq[0], 'accordion').options; + }, + panels: function(jq){ + return $.data(jq[0], 'accordion').panels; + }, + resize: function(jq, param){ + return jq.each(function(){ + setSize(this, param); + }); + }, + getSelections: function(jq){ + return getSelections(jq[0]); + }, + getSelected: function(jq){ + return getSelected(jq[0]); + }, + getPanel: function(jq, which){ + return getPanel(jq[0], which); + }, + getPanelIndex: function(jq, panel){ + return getPanelIndex(jq[0], panel); + }, + select: function(jq, which){ + return jq.each(function(){ + select(this, which); + }); + }, + unselect: function(jq, which){ + return jq.each(function(){ + unselect(this, which); + }); + }, + add: function(jq, options){ + return jq.each(function(){ + add(this, options); + }); + }, + remove: function(jq, which){ + return jq.each(function(){ + remove(this, which); + }); + } + }; + + $.fn.accordion.parseOptions = function(target){ + var t = $(target); + return $.extend({}, $.parser.parseOptions(target, [ + 'width','height', + {fit:'boolean',border:'boolean',animate:'boolean',multiple:'boolean',selected:'number'} + ])); + }; + + $.fn.accordion.defaults = { + width: 'auto', + height: 'auto', + fit: false, + border: true, + animate: true, + multiple: false, + selected: 0, + + onSelect: function(title, index){}, + onUnselect: function(title, index){}, + onAdd: function(title, index){}, + onBeforeRemove: function(title, index){}, + onRemove: function(title, index){} + }; +})(jQuery); diff --git a/src/main/webapp/jquery-easyui-1.4.4/src/jquery.calendar.js b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.calendar.js new file mode 100644 index 0000000..e4914b5 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.calendar.js @@ -0,0 +1,438 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +/** + * calendar - jQuery EasyUI + * + */ +(function($){ + + function setSize(target, param){ + var opts = $.data(target, 'calendar').options; + var t = $(target); + if (param){ + $.extend(opts, { + width: param.width, + height: param.height + }); + } + t._size(opts, t.parent()); + t.find('.calendar-body')._outerHeight(t.height() - t.find('.calendar-header')._outerHeight()); + if (t.find('.calendar-menu').is(':visible')){ + showSelectMenus(target); + } + } + + function init(target){ + $(target).addClass('calendar').html( + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '' + + '' + + '' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + ); + + + $(target).bind('_resize', function(e,force){ + if ($(this).hasClass('easyui-fluid') || force){ + setSize(target); + } + return false; + }); + } + + function bindEvents(target){ + var opts = $.data(target, 'calendar').options; + var menu = $(target).find('.calendar-menu'); + menu.find('.calendar-menu-year').unbind('.calendar').bind('keypress.calendar', function(e){ + if (e.keyCode == 13){ + setDate(true); + } + }); + $(target).unbind('.calendar').bind('mouseover.calendar', function(e){ + var t = toTarget(e.target); + if (t.hasClass('calendar-nav') || t.hasClass('calendar-text') || (t.hasClass('calendar-day') && !t.hasClass('calendar-disabled'))){ + t.addClass('calendar-nav-hover'); + } + }).bind('mouseout.calendar', function(e){ + var t = toTarget(e.target); + if (t.hasClass('calendar-nav') || t.hasClass('calendar-text') || (t.hasClass('calendar-day') && !t.hasClass('calendar-disabled'))){ + t.removeClass('calendar-nav-hover'); + } + }).bind('click.calendar', function(e){ + var t = toTarget(e.target); + if (t.hasClass('calendar-menu-next') || t.hasClass('calendar-nextyear')){ + showYear(1); + } else if (t.hasClass('calendar-menu-prev') || t.hasClass('calendar-prevyear')){ + showYear(-1); + } else if (t.hasClass('calendar-menu-month')){ + menu.find('.calendar-selected').removeClass('calendar-selected'); + t.addClass('calendar-selected'); + setDate(true); + } else if (t.hasClass('calendar-prevmonth')){ + showMonth(-1); + } else if (t.hasClass('calendar-nextmonth')){ + showMonth(1); + } else if (t.hasClass('calendar-text')){ + if (menu.is(':visible')){ + menu.hide(); + } else { + showSelectMenus(target); + } + } else if (t.hasClass('calendar-day')){ + if (t.hasClass('calendar-disabled')){return} + var oldValue = opts.current; + t.closest('div.calendar-body').find('.calendar-selected').removeClass('calendar-selected'); + t.addClass('calendar-selected'); + var parts = t.attr('abbr').split(','); + var y = parseInt(parts[0]); + var m = parseInt(parts[1]); + var d = parseInt(parts[2]); + opts.current = new Date(y, m-1, d); + opts.onSelect.call(target, opts.current); + if (!oldValue || oldValue.getTime() != opts.current.getTime()){ + opts.onChange.call(target, opts.current, oldValue); + } + if (opts.year != y || opts.month != m){ + opts.year = y; + opts.month = m; + show(target); + } + } + }); + function toTarget(t){ + var day = $(t).closest('.calendar-day'); + if (day.length){ + return day; + } else { + return $(t); + } + } + function setDate(hideMenu){ + var menu = $(target).find('.calendar-menu'); + var year = menu.find('.calendar-menu-year').val(); + var month = menu.find('.calendar-selected').attr('abbr'); + if (!isNaN(year)){ + opts.year = parseInt(year); + opts.month = parseInt(month); + show(target); + } + if (hideMenu){menu.hide()} + } + function showYear(delta){ + opts.year += delta; + show(target); + menu.find('.calendar-menu-year').val(opts.year); + } + function showMonth(delta){ + opts.month += delta; + if (opts.month > 12){ + opts.year++; + opts.month = 1; + } else if (opts.month < 1){ + opts.year--; + opts.month = 12; + } + show(target); + + menu.find('td.calendar-selected').removeClass('calendar-selected'); + menu.find('td:eq(' + (opts.month-1) + ')').addClass('calendar-selected'); + } + } + + /** + * show the select menu that can change year or month, if the menu is not be created then create it. + */ + function showSelectMenus(target){ + var opts = $.data(target, 'calendar').options; + $(target).find('.calendar-menu').show(); + + if ($(target).find('.calendar-menu-month-inner').is(':empty')){ + $(target).find('.calendar-menu-month-inner').empty(); + var t = $('
                                                          ').appendTo($(target).find('.calendar-menu-month-inner')); + var idx = 0; + for(var i=0; i<3; i++){ + var tr = $('').appendTo(t); + for(var j=0; j<4; j++){ + $('').html(opts.months[idx++]).attr('abbr',idx).appendTo(tr); + } + } + } + + var body = $(target).find('.calendar-body'); + var sele = $(target).find('.calendar-menu'); + var seleYear = sele.find('.calendar-menu-year-inner'); + var seleMonth = sele.find('.calendar-menu-month-inner'); + + seleYear.find('input').val(opts.year).focus(); + seleMonth.find('td.calendar-selected').removeClass('calendar-selected'); + seleMonth.find('td:eq('+(opts.month-1)+')').addClass('calendar-selected'); + + sele._outerWidth(body._outerWidth()); + sele._outerHeight(body._outerHeight()); + seleMonth._outerHeight(sele.height() - seleYear._outerHeight()); + } + + /** + * get weeks data. + */ + function getWeeks(target, year, month){ + var opts = $.data(target, 'calendar').options; + var dates = []; + var lastDay = new Date(year, month, 0).getDate(); + for(var i=1; i<=lastDay; i++) dates.push([year,month,i]); + + // group date by week + var weeks = [], week = []; + var memoDay = -1; + while(dates.length > 0){ + var date = dates.shift(); + week.push(date); + var day = new Date(date[0],date[1]-1,date[2]).getDay(); + if (memoDay == day){ + day = 0; + } else if (day == (opts.firstDay==0 ? 7 : opts.firstDay) - 1){ + weeks.push(week); + week = []; + } + memoDay = day; + } + if (week.length){ + weeks.push(week); + } + + var firstWeek = weeks[0]; + if (firstWeek.length < 7){ + while(firstWeek.length < 7){ + var firstDate = firstWeek[0]; + var date = new Date(firstDate[0],firstDate[1]-1,firstDate[2]-1) + firstWeek.unshift([date.getFullYear(), date.getMonth()+1, date.getDate()]); + } + } else { + var firstDate = firstWeek[0]; + var week = []; + for(var i=1; i<=7; i++){ + var date = new Date(firstDate[0], firstDate[1]-1, firstDate[2]-i); + week.unshift([date.getFullYear(), date.getMonth()+1, date.getDate()]); + } + weeks.unshift(week); + } + + var lastWeek = weeks[weeks.length-1]; + while(lastWeek.length < 7){ + var lastDate = lastWeek[lastWeek.length-1]; + var date = new Date(lastDate[0], lastDate[1]-1, lastDate[2]+1); + lastWeek.push([date.getFullYear(), date.getMonth()+1, date.getDate()]); + } + if (weeks.length < 6){ + var lastDate = lastWeek[lastWeek.length-1]; + var week = []; + for(var i=1; i<=7; i++){ + var date = new Date(lastDate[0], lastDate[1]-1, lastDate[2]+i); + week.push([date.getFullYear(), date.getMonth()+1, date.getDate()]); + } + weeks.push(week); + } + + return weeks; + } + + /** + * show the calendar day. + */ + function show(target){ + var opts = $.data(target, 'calendar').options; + if (opts.current && !opts.validator.call(target, opts.current)){ + opts.current = null; + } + + var now = new Date(); + var todayInfo = now.getFullYear()+','+(now.getMonth()+1)+','+now.getDate(); + var currentInfo = opts.current ? (opts.current.getFullYear()+','+(opts.current.getMonth()+1)+','+opts.current.getDate()) : ''; + // calulate the saturday and sunday index + var saIndex = 6 - opts.firstDay; + var suIndex = saIndex + 1; + if (saIndex >= 7) saIndex -= 7; + if (suIndex >= 7) suIndex -= 7; + + $(target).find('.calendar-title span').html(opts.months[opts.month-1] + ' ' + opts.year); + + var body = $(target).find('div.calendar-body'); + body.children('table').remove(); + + var data = ['']; + data.push(''); + for(var i=opts.firstDay; i'+opts.weeks[i]+''); + } + for(var i=0; i'+opts.weeks[i]+''); + } + data.push(''); + + data.push(''); + var weeks = getWeeks(target, opts.year, opts.month); + for(var i=0; i'); + for(var j=0; j' + d + ''); + } + data.push(''); + } + data.push(''); + data.push('
                                                          '); + + body.append(data.join('')); + body.children('table.calendar-dtable').prependTo(body); + + opts.onNavigate.call(target, opts.year, opts.month); + } + + $.fn.calendar = function(options, param){ + if (typeof options == 'string'){ + return $.fn.calendar.methods[options](this, param); + } + + options = options || {}; + return this.each(function(){ + var state = $.data(this, 'calendar'); + if (state){ + $.extend(state.options, options); + } else { + state = $.data(this, 'calendar', { + options:$.extend({}, $.fn.calendar.defaults, $.fn.calendar.parseOptions(this), options) + }); + init(this); + } + if (state.options.border == false){ + $(this).addClass('calendar-noborder'); + } + setSize(this); + bindEvents(this); + show(this); + $(this).find('div.calendar-menu').hide(); // hide the calendar menu + }); + }; + + $.fn.calendar.methods = { + options: function(jq){ + return $.data(jq[0], 'calendar').options; + }, + resize: function(jq, param){ + return jq.each(function(){ + setSize(this, param); + }); + }, + moveTo: function(jq, date){ + return jq.each(function(){ + if (!date){ + var now = new Date(); + $(this).calendar({ + year: now.getFullYear(), + month: now.getMonth()+1, + current: date + }); + return; + } + var opts = $(this).calendar('options'); + if (opts.validator.call(this, date)){ + var oldValue = opts.current; + $(this).calendar({ + year: date.getFullYear(), + month: date.getMonth()+1, + current: date + }); + if (!oldValue || oldValue.getTime() != date.getTime()){ + opts.onChange.call(this, opts.current, oldValue); + } + } + }); + } + }; + + $.fn.calendar.parseOptions = function(target){ + var t = $(target); + return $.extend({}, $.parser.parseOptions(target, [ + {firstDay:'number',fit:'boolean',border:'boolean'} + ])); + }; + + $.fn.calendar.defaults = { + width:180, + height:180, + fit:false, + border:true, + firstDay:0, + weeks:['S','M','T','W','T','F','S'], + months:['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + year:new Date().getFullYear(), + month:new Date().getMonth()+1, + current:(function(){ + var d = new Date(); + return new Date(d.getFullYear(), d.getMonth(), d.getDate()); + })(), + + formatter:function(date){return date.getDate()}, + styler:function(date){return ''}, + validator:function(date){return true}, + + onSelect: function(date){}, + onChange: function(newDate, oldDate){}, + onNavigate: function(year, month){} + }; +})(jQuery); diff --git a/src/main/webapp/jquery-easyui-1.4.4/src/jquery.combobox.js b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.combobox.js new file mode 100644 index 0000000..ab98c3c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.combobox.js @@ -0,0 +1,566 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +/** + * combobox - jQuery EasyUI + * + * Dependencies: + * combo + * + */ +(function($){ + var COMBOBOX_SERNO = 0; + + function getRowIndex(target, value){ + var state = $.data(target, 'combobox'); + var opts = state.options; + var data = state.data; + for(var i=0; i panel.height()){ + var h = panel.scrollTop() + item.position().top + item.outerHeight() - panel.height(); + panel.scrollTop(h); + } + } + } + + function nav(target, dir){ + var opts = $.data(target, 'combobox').options; + var panel = $(target).combobox('panel'); + var item = panel.children('div.combobox-item-hover'); + if (!item.length){ + item = panel.children('div.combobox-item-selected'); + } + item.removeClass('combobox-item-hover'); + var firstSelector = 'div.combobox-item:visible:not(.combobox-item-disabled):first'; + var lastSelector = 'div.combobox-item:visible:not(.combobox-item-disabled):last'; + if (!item.length){ + item = panel.children(dir=='next' ? firstSelector : lastSelector); +// item = panel.children('div.combobox-item:visible:' + (dir=='next'?'first':'last')); + } else { + if (dir == 'next'){ + item = item.nextAll(firstSelector); +// item = item.nextAll('div.combobox-item:visible:first'); + if (!item.length){ + item = panel.children(firstSelector); +// item = panel.children('div.combobox-item:visible:first'); + } + } else { + item = item.prevAll(firstSelector); +// item = item.prevAll('div.combobox-item:visible:first'); + if (!item.length){ + item = panel.children(lastSelector); +// item = panel.children('div.combobox-item:visible:last'); + } + } + } + if (item.length){ + item.addClass('combobox-item-hover'); + var row = opts.finder.getRow(target, item); + if (row){ + scrollTo(target, row[opts.valueField]); + if (opts.selectOnNavigation){ + select(target, row[opts.valueField]); + } + } + } + } + + /** + * select the specified value + */ + function select(target, value){ + var opts = $.data(target, 'combobox').options; + var values = $(target).combo('getValues'); + if ($.inArray(value+'', values) == -1){ + if (opts.multiple){ + values.push(value); + } else { + values = [value]; + } + setValues(target, values); + opts.onSelect.call(target, opts.finder.getRow(target, value)); + } + } + + /** + * unselect the specified value + */ + function unselect(target, value){ + var opts = $.data(target, 'combobox').options; + var values = $(target).combo('getValues'); + var index = $.inArray(value+'', values); + if (index >= 0){ + values.splice(index, 1); + setValues(target, values); + opts.onUnselect.call(target, opts.finder.getRow(target, value)); + } + } + + /** + * set values + */ + function setValues(target, values, remainText){ + var opts = $.data(target, 'combobox').options; + var panel = $(target).combo('panel'); + + if (!$.isArray(values)){values = values.split(opts.separator)} + panel.find('div.combobox-item-selected').removeClass('combobox-item-selected'); + var vv = [], ss = []; + for(var i=0; i'); + dd.push(opts.groupFormatter ? opts.groupFormatter.call(target, g) : g); + dd.push(''); + } + } else { + group = undefined; + } + + var cls = 'combobox-item' + (row.disabled ? ' combobox-item-disabled' : '') + (g ? ' combobox-gitem' : ''); + dd.push('
                                                          '); + dd.push(opts.formatter ? opts.formatter.call(target, row) : s); + dd.push('
                                                          '); + +// if (item['selected']){ +// (function(){ +// for(var i=0; i= 0){ + vv.push(v); + } + }); + t.combobox('setValues', vv); + if (!opts.multiple){ + t.combobox('hidePanel'); + } + } + + /** + * create the component + */ + function create(target){ + var state = $.data(target, 'combobox'); + var opts = state.options; + + COMBOBOX_SERNO++; + state.itemIdPrefix = '_easyui_combobox_i' + COMBOBOX_SERNO; + state.groupIdPrefix = '_easyui_combobox_g' + COMBOBOX_SERNO; + + $(target).addClass('combobox-f'); + $(target).combo($.extend({}, opts, { + onShowPanel: function(){ + $(target).combo('panel').find('div.combobox-item:hidden,div.combobox-group:hidden').show(); + scrollTo(target, $(target).combobox('getValue')); + opts.onShowPanel.call(target); + } + })); + + $(target).combo('panel').unbind().bind('mouseover', function(e){ + $(this).children('div.combobox-item-hover').removeClass('combobox-item-hover'); + var item = $(e.target).closest('div.combobox-item'); + if (!item.hasClass('combobox-item-disabled')){ + item.addClass('combobox-item-hover'); + } + e.stopPropagation(); + }).bind('mouseout', function(e){ + $(e.target).closest('div.combobox-item').removeClass('combobox-item-hover'); + e.stopPropagation(); + }).bind('click', function(e){ + var item = $(e.target).closest('div.combobox-item'); + if (!item.length || item.hasClass('combobox-item-disabled')){return} + var row = opts.finder.getRow(target, item); + if (!row){return} + var value = row[opts.valueField]; + if (opts.multiple){ + if (item.hasClass('combobox-item-selected')){ + unselect(target, value); + } else { + select(target, value); + } + } else { + select(target, value); + $(target).combo('hidePanel'); + } + e.stopPropagation(); + }); + } + + $.fn.combobox = function(options, param){ + if (typeof options == 'string'){ + var method = $.fn.combobox.methods[options]; + if (method){ + return method(this, param); + } else { + return this.combo(options, param); + } + } + + options = options || {}; + return this.each(function(){ + var state = $.data(this, 'combobox'); + if (state){ + $.extend(state.options, options); + } else { + state = $.data(this, 'combobox', { + options: $.extend({}, $.fn.combobox.defaults, $.fn.combobox.parseOptions(this), options), + data: [] + }); + } + create(this); + if (state.options.data){ + loadData(this, state.options.data); + } else { + var data = $.fn.combobox.parseData(this); + if (data.length){ + loadData(this, data); + } + } + request(this); + }); + }; + + + $.fn.combobox.methods = { + options: function(jq){ + var copts = jq.combo('options'); + return $.extend($.data(jq[0], 'combobox').options, { + width: copts.width, + height: copts.height, + originalValue: copts.originalValue, + disabled: copts.disabled, + readonly: copts.readonly + }); + }, + getData: function(jq){ + return $.data(jq[0], 'combobox').data; + }, + setValues: function(jq, values){ + return jq.each(function(){ + setValues(this, values); + }); + }, + setValue: function(jq, value){ + return jq.each(function(){ + setValues(this, [value]); + }); + }, + clear: function(jq){ + return jq.each(function(){ + $(this).combo('clear'); + var panel = $(this).combo('panel'); + panel.find('div.combobox-item-selected').removeClass('combobox-item-selected'); + }); + }, + reset: function(jq){ + return jq.each(function(){ + var opts = $(this).combobox('options'); + if (opts.multiple){ + $(this).combobox('setValues', opts.originalValue); + } else { + $(this).combobox('setValue', opts.originalValue); + } + }); + }, + loadData: function(jq, data){ + return jq.each(function(){ + loadData(this, data); + }); + }, + reload: function(jq, url){ + return jq.each(function(){ + if (typeof url == 'string'){ + request(this, url); + } else { + if (url){ + var opts = $(this).combobox('options'); + opts.queryParams = url; + } + request(this); + } + }); + }, + select: function(jq, value){ + return jq.each(function(){ + select(this, value); + }); + }, + unselect: function(jq, value){ + return jq.each(function(){ + unselect(this, value); + }); + } + }; + + $.fn.combobox.parseOptions = function(target){ + var t = $(target); + return $.extend({}, $.fn.combo.parseOptions(target), $.parser.parseOptions(target,[ + 'valueField','textField','groupField','mode','method','url' + ])); + }; + + $.fn.combobox.parseData = function(target){ + var data = []; + var opts = $(target).combobox('options'); + $(target).children().each(function(){ + if (this.tagName.toLowerCase() == 'optgroup'){ + var group = $(this).attr('label'); + $(this).children().each(function(){ + _parseItem(this, group); + }); + } else { + _parseItem(this); + } + }); + return data; + + function _parseItem(el, group){ + var t = $(el); + var row = {}; + row[opts.valueField] = t.attr('value')!=undefined ? t.attr('value') : t.text(); + row[opts.textField] = t.text(); + row['selected'] = t.is(':selected'); + row['disabled'] = t.is(':disabled'); + if (group){ + opts.groupField = opts.groupField || 'group'; + row[opts.groupField] = group; + } + data.push(row); + } + }; + + $.fn.combobox.defaults = $.extend({}, $.fn.combo.defaults, { + valueField: 'value', + textField: 'text', + groupField: null, + groupFormatter: function(group){return group;}, + mode: 'local', // or 'remote' + method: 'post', + url: null, + data: null, + queryParams: {}, + + keyHandler: { + up: function(e){nav(this,'prev');e.preventDefault()}, + down: function(e){nav(this,'next');e.preventDefault()}, + left: function(e){}, + right: function(e){}, + enter: function(e){doEnter(this)}, + query: function(q,e){doQuery(this, q)} + }, + filter: function(q, row){ + var opts = $(this).combobox('options'); + return row[opts.textField].toLowerCase().indexOf(q.toLowerCase()) == 0; + }, + formatter: function(row){ + var opts = $(this).combobox('options'); + return row[opts.textField]; + }, + loader: function(param, success, error){ + var opts = $(this).combobox('options'); + if (!opts.url) return false; + $.ajax({ + type: opts.method, + url: opts.url, + data: param, + dataType: 'json', + success: function(data){ + success(data); + }, + error: function(){ + error.apply(this, arguments); + } + }); + }, + loadFilter: function(data){ + return data; + }, + finder:{ + getEl:function(target, value){ + var index = getRowIndex(target, value); + var id = $.data(target, 'combobox').itemIdPrefix + '_' + index; + return $('#'+id); + }, + getRow:function(target, p){ + var state = $.data(target, 'combobox'); + var index = (p instanceof jQuery) ? p.attr('id').substr(state.itemIdPrefix.length+1) : getRowIndex(target, p); + return state.data[parseInt(index)]; + } + }, + + onBeforeLoad: function(param){}, + onLoadSuccess: function(){}, + onLoadError: function(){}, + onSelect: function(record){}, + onUnselect: function(record){} + }); +})(jQuery); diff --git a/src/main/webapp/jquery-easyui-1.4.4/src/jquery.datebox.js b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.datebox.js new file mode 100644 index 0000000..b8940fe --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.datebox.js @@ -0,0 +1,285 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +/** + * datebox - jQuery EasyUI + * + * Dependencies: + * calendar + * combo + * + */ +(function($){ + /** + * create date box + */ + function createBox(target){ + var state = $.data(target, 'datebox'); + var opts = state.options; + + $(target).addClass('datebox-f').combo($.extend({}, opts, { + onShowPanel:function(){ + bindEvents(this); + setButtons(this); + setCalendar(this); + setValue(this, $(this).datebox('getText'), true); + opts.onShowPanel.call(this); + } + })); + + /** + * if the calendar isn't created, create it. + */ + if (!state.calendar){ + var panel = $(target).combo('panel').css('overflow','hidden'); + panel.panel('options').onBeforeDestroy = function(){ + var c = $(this).find('.calendar-shared'); + if (c.length){ + c.insertBefore(c[0].pholder); + } + }; + var cc = $('
                                                          ').prependTo(panel); + if (opts.sharedCalendar){ + var c = $(opts.sharedCalendar); + if (!c[0].pholder){ + c[0].pholder = $('').insertAfter(c); + } + c.addClass('calendar-shared').appendTo(cc); + if (!c.hasClass('calendar')){ + c.calendar(); + } + state.calendar = c; + } else { + state.calendar = $('
                                                          ').appendTo(cc).calendar(); + } + + $.extend(state.calendar.calendar('options'), { + fit:true, + border:false, + onSelect:function(date){ + var target = this.target; + var opts = $(target).datebox('options'); + setValue(target, opts.formatter.call(target, date)); + $(target).combo('hidePanel'); + opts.onSelect.call(target, date); + } + }); + } + + $(target).combo('textbox').parent().addClass('datebox'); + $(target).datebox('initValue', opts.value); + + function bindEvents(target){ + var opts = $(target).datebox('options'); + var panel = $(target).combo('panel'); + panel.unbind('.datebox').bind('click.datebox', function(e){ + if ($(e.target).hasClass('datebox-button-a')){ + var index = parseInt($(e.target).attr('datebox-button-index')); + opts.buttons[index].handler.call(e.target, target); + } + }); + } + function setButtons(target){ + var panel = $(target).combo('panel'); + if (panel.children('div.datebox-button').length){return} + var button = $('
                                                          ').appendTo(panel); + var tr = button.find('tr'); + for(var i=0; i').appendTo(tr); + var btn = opts.buttons[i]; + var t = $('').html($.isFunction(btn.text) ? btn.text(target) : btn.text).appendTo(td); + t.attr('datebox-button-index', i); + } + tr.find('td').css('width', (100/opts.buttons.length)+'%'); + } + function setCalendar(target){ + var panel = $(target).combo('panel'); + var cc = panel.children('div.datebox-calendar-inner'); + panel.children()._outerWidth(panel.width()); + state.calendar.appendTo(cc); + state.calendar[0].target = target; + if (opts.panelHeight != 'auto'){ + var height = panel.height(); + panel.children().not(cc).each(function(){ + height -= $(this).outerHeight(); + }); + cc._outerHeight(height); + } + state.calendar.calendar('resize'); + } + } + + /** + * called when user inputs some value in text box + */ + function doQuery(target, q){ + setValue(target, q, true); + } + + /** + * called when user press enter key + */ + function doEnter(target){ + var state = $.data(target, 'datebox'); + var opts = state.options; + var current = state.calendar.calendar('options').current; + if (current){ + setValue(target, opts.formatter.call(target, current)); + $(target).combo('hidePanel'); + } + } + + function setValue(target, value, remainText){ + var state = $.data(target, 'datebox'); + var opts = state.options; + var calendar = state.calendar; + calendar.calendar('moveTo', opts.parser.call(target, value)); + if (remainText){ + $(target).combo('setValue', value); + } else { + if (value){ + value = opts.formatter.call(target, calendar.calendar('options').current); + } + $(target).combo('setText', value).combo('setValue', value); + } + } + + $.fn.datebox = function(options, param){ + if (typeof options == 'string'){ + var method = $.fn.datebox.methods[options]; + if (method){ + return method(this, param); + } else { + return this.combo(options, param); + } + } + + options = options || {}; + return this.each(function(){ + var state = $.data(this, 'datebox'); + if (state){ + $.extend(state.options, options); + } else { + $.data(this, 'datebox', { + options: $.extend({}, $.fn.datebox.defaults, $.fn.datebox.parseOptions(this), options) + }); + } + createBox(this); + }); + }; + + $.fn.datebox.methods = { + options: function(jq){ + var copts = jq.combo('options'); + return $.extend($.data(jq[0], 'datebox').options, { + width: copts.width, + height: copts.height, + originalValue: copts.originalValue, + disabled: copts.disabled, + readonly: copts.readonly + }); + }, + cloneFrom: function(jq, from){ + return jq.each(function(){ + $(this).combo('cloneFrom', from); + $.data(this, 'datebox', { + options: $.extend(true, {}, $(from).datebox('options')), + calendar: $(from).datebox('calendar') + }); + $(this).addClass('datebox-f'); + }); + }, + calendar: function(jq){ // get the calendar object + return $.data(jq[0], 'datebox').calendar; + }, + initValue: function(jq, value){ + return jq.each(function(){ + var opts = $(this).datebox('options'); + var value = opts.value; + if (value){ + value = opts.formatter.call(this, opts.parser.call(this, value)); + } + $(this).combo('initValue', value).combo('setText', value); + }); + }, + setValue: function(jq, value){ + return jq.each(function(){ + setValue(this, value); + }); + }, + reset: function(jq){ + return jq.each(function(){ + var opts = $(this).datebox('options'); + $(this).datebox('setValue', opts.originalValue); + }); + } + }; + + $.fn.datebox.parseOptions = function(target){ + return $.extend({}, $.fn.combo.parseOptions(target), $.parser.parseOptions(target, ['sharedCalendar'])); + }; + + $.fn.datebox.defaults = $.extend({}, $.fn.combo.defaults, { + panelWidth:180, + panelHeight:'auto', + sharedCalendar:null, + + keyHandler: { + up:function(e){}, + down:function(e){}, + left: function(e){}, + right: function(e){}, + enter:function(e){doEnter(this)}, + query:function(q,e){doQuery(this, q)} + }, + + currentText:'Today', + closeText:'Close', + okText:'Ok', + + buttons:[{ + text: function(target){return $(target).datebox('options').currentText;}, + handler: function(target){ + var now = new Date(); + $(target).datebox('calendar').calendar({ + year:now.getFullYear(), + month:now.getMonth()+1, + current:new Date(now.getFullYear(), now.getMonth(), now.getDate()) + }); + doEnter(target); + } + },{ + text: function(target){return $(target).datebox('options').closeText;}, + handler: function(target){ + $(this).closest('div.combo-panel').panel('close'); + } + }], + + formatter:function(date){ + var y = date.getFullYear(); + var m = date.getMonth()+1; + var d = date.getDate(); + return (m<10?('0'+m):m)+'/'+(d<10?('0'+d):d)+'/'+y; + }, + parser:function(s){ + if (!s) return new Date(); + var ss = s.split('/'); + var m = parseInt(ss[0],10); + var d = parseInt(ss[1],10); + var y = parseInt(ss[2],10); + if (!isNaN(y) && !isNaN(m) && !isNaN(d)){ + return new Date(y,m-1,d); + } else { + return new Date(); + } + }, + + onSelect:function(date){} + }); +})(jQuery); diff --git a/src/main/webapp/jquery-easyui-1.4.4/src/jquery.draggable.js b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.draggable.js new file mode 100644 index 0000000..c69477e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.draggable.js @@ -0,0 +1,395 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +/** + * draggable - jQuery EasyUI + * + */ +(function($){ + function drag(e){ + var state = $.data(e.data.target, 'draggable'); + var opts = state.options; + var proxy = state.proxy; + + var dragData = e.data; + var left = dragData.startLeft + e.pageX - dragData.startX; + var top = dragData.startTop + e.pageY - dragData.startY; + + if (proxy){ + if (proxy.parent()[0] == document.body){ + if (opts.deltaX != null && opts.deltaX != undefined){ + left = e.pageX + opts.deltaX; + } else { + left = e.pageX - e.data.offsetWidth; + } + if (opts.deltaY != null && opts.deltaY != undefined){ + top = e.pageY + opts.deltaY; + } else { + top = e.pageY - e.data.offsetHeight; + } + } else { + if (opts.deltaX != null && opts.deltaX != undefined){ + left += e.data.offsetWidth + opts.deltaX; + } + if (opts.deltaY != null && opts.deltaY != undefined){ + top += e.data.offsetHeight + opts.deltaY; + } + } + } + + if (e.data.parent != document.body) { + left += $(e.data.parent).scrollLeft(); + top += $(e.data.parent).scrollTop(); + } + + if (opts.axis == 'h') { + dragData.left = left; + } else if (opts.axis == 'v') { + dragData.top = top; + } else { + dragData.left = left; + dragData.top = top; + } + } + + function applyDrag(e){ + var state = $.data(e.data.target, 'draggable'); + var opts = state.options; + var proxy = state.proxy; + if (!proxy){ + proxy = $(e.data.target); + } + proxy.css({ + left:e.data.left, + top:e.data.top + }); + $('body').css('cursor', opts.cursor); + } + + function doDown(e){ + if (!$.fn.draggable.isDragging){return false;} + + var state = $.data(e.data.target, 'draggable'); + var opts = state.options; + + var droppables = $('.droppable').filter(function(){ + return e.data.target != this; + }).filter(function(){ + var accept = $.data(this, 'droppable').options.accept; + if (accept){ + return $(accept).filter(function(){ + return this == e.data.target; + }).length > 0; + } else { + return true; + } + }); + state.droppables = droppables; + + var proxy = state.proxy; + if (!proxy){ + if (opts.proxy){ + if (opts.proxy == 'clone'){ + proxy = $(e.data.target).clone().insertAfter(e.data.target); + } else { + proxy = opts.proxy.call(e.data.target, e.data.target); + } + state.proxy = proxy; + } else { + proxy = $(e.data.target); + } + } + + proxy.css('position', 'absolute'); + drag(e); + applyDrag(e); + + opts.onStartDrag.call(e.data.target, e); + return false; + } + + function doMove(e){ + if (!$.fn.draggable.isDragging){return false;} + + var state = $.data(e.data.target, 'draggable'); + drag(e); + if (state.options.onDrag.call(e.data.target, e) != false){ + applyDrag(e); + } + + var source = e.data.target; + state.droppables.each(function(){ + var dropObj = $(this); + if (dropObj.droppable('options').disabled){return;} + + var p2 = dropObj.offset(); + if (e.pageX > p2.left && e.pageX < p2.left + dropObj.outerWidth() + && e.pageY > p2.top && e.pageY < p2.top + dropObj.outerHeight()){ + if (!this.entered){ + $(this).trigger('_dragenter', [source]); + this.entered = true; + } + $(this).trigger('_dragover', [source]); + } else { + if (this.entered){ + $(this).trigger('_dragleave', [source]); + this.entered = false; + } + } + }); + + return false; + } + + function doUp(e){ + if (!$.fn.draggable.isDragging){ + clearDragging(); + return false; + } + + doMove(e); + + var state = $.data(e.data.target, 'draggable'); + var proxy = state.proxy; + var opts = state.options; + if (opts.revert){ + if (checkDrop() == true){ + $(e.data.target).css({ + position:e.data.startPosition, + left:e.data.startLeft, + top:e.data.startTop + }); + } else { + if (proxy){ + var left, top; + if (proxy.parent()[0] == document.body){ + left = e.data.startX - e.data.offsetWidth; + top = e.data.startY - e.data.offsetHeight; + } else { + left = e.data.startLeft; + top = e.data.startTop; + } + proxy.animate({ + left: left, + top: top + }, function(){ + removeProxy(); + }); + } else { + $(e.data.target).animate({ + left:e.data.startLeft, + top:e.data.startTop + }, function(){ + $(e.data.target).css('position', e.data.startPosition); + }); + } + } + } else { + $(e.data.target).css({ + position:'absolute', + left:e.data.left, + top:e.data.top + }); + checkDrop(); + } + + opts.onStopDrag.call(e.data.target, e); + + clearDragging(); + + function removeProxy(){ + if (proxy){ + proxy.remove(); + } + state.proxy = null; + } + + function checkDrop(){ + var dropped = false; + state.droppables.each(function(){ + var dropObj = $(this); + if (dropObj.droppable('options').disabled){return;} + + var p2 = dropObj.offset(); + if (e.pageX > p2.left && e.pageX < p2.left + dropObj.outerWidth() + && e.pageY > p2.top && e.pageY < p2.top + dropObj.outerHeight()){ + if (opts.revert){ + $(e.data.target).css({ + position:e.data.startPosition, + left:e.data.startLeft, + top:e.data.startTop + }); + } + $(this).trigger('_drop', [e.data.target]); + removeProxy(); + dropped = true; + this.entered = false; + return false; + } + }); + if (!dropped && !opts.revert){ + removeProxy(); + } + return dropped; + } + + return false; + } + + function clearDragging(){ + if ($.fn.draggable.timer){ + clearTimeout($.fn.draggable.timer); + $.fn.draggable.timer = undefined; + } + $(document).unbind('.draggable'); + $.fn.draggable.isDragging = false; + setTimeout(function(){ + $('body').css('cursor',''); + },100); + } + + $.fn.draggable = function(options, param){ + if (typeof options == 'string'){ + return $.fn.draggable.methods[options](this, param); + } + + return this.each(function(){ + var opts; + var state = $.data(this, 'draggable'); + if (state) { + state.handle.unbind('.draggable'); + opts = $.extend(state.options, options); + } else { + opts = $.extend({}, $.fn.draggable.defaults, $.fn.draggable.parseOptions(this), options || {}); + } + var handle = opts.handle ? (typeof opts.handle=='string' ? $(opts.handle, this) : opts.handle) : $(this); + + $.data(this, 'draggable', { + options: opts, + handle: handle + }); + + if (opts.disabled) { + $(this).css('cursor', ''); + return; + } + + handle.unbind('.draggable').bind('mousemove.draggable', {target:this}, function(e){ + if ($.fn.draggable.isDragging){return} + var opts = $.data(e.data.target, 'draggable').options; + if (checkArea(e)){ + $(this).css('cursor', opts.cursor); + } else { + $(this).css('cursor', ''); + } + }).bind('mouseleave.draggable', {target:this}, function(e){ + $(this).css('cursor', ''); + }).bind('mousedown.draggable', {target:this}, function(e){ + if (checkArea(e) == false) return; + $(this).css('cursor', ''); + + var position = $(e.data.target).position(); + var offset = $(e.data.target).offset(); + var data = { + startPosition: $(e.data.target).css('position'), + startLeft: position.left, + startTop: position.top, + left: position.left, + top: position.top, + startX: e.pageX, + startY: e.pageY, + offsetWidth: (e.pageX - offset.left), + offsetHeight: (e.pageY - offset.top), + target: e.data.target, + parent: $(e.data.target).parent()[0] + }; + + $.extend(e.data, data); + var opts = $.data(e.data.target, 'draggable').options; + if (opts.onBeforeDrag.call(e.data.target, e) == false) return; + + $(document).bind('mousedown.draggable', e.data, doDown); + $(document).bind('mousemove.draggable', e.data, doMove); + $(document).bind('mouseup.draggable', e.data, doUp); + + $.fn.draggable.timer = setTimeout(function(){ + $.fn.draggable.isDragging = true; + doDown(e); + }, opts.delay); + return false; + }); + + // check if the handle can be dragged + function checkArea(e) { + var state = $.data(e.data.target, 'draggable'); + var handle = state.handle; + var offset = $(handle).offset(); + var width = $(handle).outerWidth(); + var height = $(handle).outerHeight(); + var t = e.pageY - offset.top; + var r = offset.left + width - e.pageX; + var b = offset.top + height - e.pageY; + var l = e.pageX - offset.left; + + return Math.min(t,r,b,l) > state.options.edge; + } + + }); + }; + + $.fn.draggable.methods = { + options: function(jq){ + return $.data(jq[0], 'draggable').options; + }, + proxy: function(jq){ + return $.data(jq[0], 'draggable').proxy; + }, + enable: function(jq){ + return jq.each(function(){ + $(this).draggable({disabled:false}); + }); + }, + disable: function(jq){ + return jq.each(function(){ + $(this).draggable({disabled:true}); + }); + } + }; + + $.fn.draggable.parseOptions = function(target){ + var t = $(target); + return $.extend({}, + $.parser.parseOptions(target, ['cursor','handle','axis', + {'revert':'boolean','deltaX':'number','deltaY':'number','edge':'number','delay':'number'}]), { + disabled: (t.attr('disabled') ? true : undefined) + }); + }; + + $.fn.draggable.defaults = { + proxy:null, // 'clone' or a function that will create the proxy object, + // the function has the source parameter that indicate the source object dragged. + revert:false, + cursor:'move', + deltaX:null, + deltaY:null, + handle: null, + disabled: false, + edge:0, + axis:null, // v or h + delay:100, + + onBeforeDrag: function(e){}, + onStartDrag: function(e){}, + onDrag: function(e){}, + onStopDrag: function(e){} + }; + + $.fn.draggable.isDragging = false; + +})(jQuery); diff --git a/src/main/webapp/jquery-easyui-1.4.4/src/jquery.droppable.js b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.droppable.js new file mode 100644 index 0000000..2a242a8 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.droppable.js @@ -0,0 +1,81 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +/** + * droppable - jQuery EasyUI + * + */ +(function($){ + function init(target){ + $(target).addClass('droppable'); + $(target).bind('_dragenter', function(e, source){ + $.data(target, 'droppable').options.onDragEnter.apply(target, [e, source]); + }); + $(target).bind('_dragleave', function(e, source){ + $.data(target, 'droppable').options.onDragLeave.apply(target, [e, source]); + }); + $(target).bind('_dragover', function(e, source){ + $.data(target, 'droppable').options.onDragOver.apply(target, [e, source]); + }); + $(target).bind('_drop', function(e, source){ + $.data(target, 'droppable').options.onDrop.apply(target, [e, source]); + }); + } + + $.fn.droppable = function(options, param){ + if (typeof options == 'string'){ + return $.fn.droppable.methods[options](this, param); + } + + options = options || {}; + return this.each(function(){ + var state = $.data(this, 'droppable'); + if (state){ + $.extend(state.options, options); + } else { + init(this); + $.data(this, 'droppable', { + options: $.extend({}, $.fn.droppable.defaults, $.fn.droppable.parseOptions(this), options) + }); + } + }); + }; + + $.fn.droppable.methods = { + options: function(jq){ + return $.data(jq[0], 'droppable').options; + }, + enable: function(jq){ + return jq.each(function(){ + $(this).droppable({disabled:false}); + }); + }, + disable: function(jq){ + return jq.each(function(){ + $(this).droppable({disabled:true}); + }); + } + }; + + $.fn.droppable.parseOptions = function(target){ + var t = $(target); + return $.extend({}, $.parser.parseOptions(target, ['accept']), { + disabled: (t.attr('disabled') ? true : undefined) + }); + }; + + $.fn.droppable.defaults = { + accept:null, + disabled:false, + onDragEnter:function(e, source){}, + onDragOver:function(e, source){}, + onDragLeave:function(e, source){}, + onDrop:function(e, source){} + }; +})(jQuery); diff --git a/src/main/webapp/jquery-easyui-1.4.4/src/jquery.form.js b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.form.js new file mode 100644 index 0000000..0f22bca --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.form.js @@ -0,0 +1,387 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +/** + * form - jQuery EasyUI + * + */ +(function($){ + /** + * submit the form + */ + function ajaxSubmit(target, options){ + var opts = $.data(target, 'form').options; + $.extend(opts, options||{}); + + var param = $.extend({}, opts.queryParams); + if (opts.onSubmit.call(target, param) == false){return;} + $(target).find('.textbox-text:focus').blur(); + + var frameId = 'easyui_frame_' + (new Date().getTime()); + var frame = $('').appendTo('body') + frame.attr('src', window.ActiveXObject ? 'javascript:false' : 'about:blank'); + frame.css({ + position:'absolute', + top:-1000, + left:-1000 + }); + frame.bind('load', cb); + + submit(param); + + function submit(param){ + var form = $(target); + if (opts.url){ + form.attr('action', opts.url); + } + var t = form.attr('target'), a = form.attr('action'); + form.attr('target', frameId); + var paramFields = $(); + try { + for(var n in param){ + var field = $('').val(param[n]).appendTo(form); + paramFields = paramFields.add(field); + } + checkState(); + form[0].submit(); + } finally { + form.attr('action', a); + t ? form.attr('target', t) : form.removeAttr('target'); + paramFields.remove(); + } + } + + function checkState(){ + var f = $('#'+frameId); + if (!f.length){return} + try{ + var s = f.contents()[0].readyState; + if (s && s.toLowerCase() == 'uninitialized'){ + setTimeout(checkState, 100); + } + } catch(e){ + cb(); + } + } + + var checkCount = 10; + function cb(){ + var f = $('#'+frameId); + if (!f.length){return} + f.unbind(); + var data = ''; + try{ + var body = f.contents().find('body'); + data = body.html(); + if (data == ''){ + if (--checkCount){ + setTimeout(cb, 100); + return; + } + } + var ta = body.find('>textarea'); + if (ta.length){ + data = ta.val(); + } else { + var pre = body.find('>pre'); + if (pre.length){ + data = pre.html(); + } + } + } catch(e){ + } + opts.success(data); + setTimeout(function(){ + f.unbind(); + f.remove(); + }, 100); + } + } + + /** + * load form data + * if data is a URL string type load from remote site, + * otherwise load from local data object. + */ + function load(target, data){ + var opts = $.data(target, 'form').options; + + if (typeof data == 'string'){ + var param = {}; + if (opts.onBeforeLoad.call(target, param) == false) return; + + $.ajax({ + url: data, + data: param, + dataType: 'json', + success: function(data){ + _load(data); + }, + error: function(){ + opts.onLoadError.apply(target, arguments); + } + }); + } else { + _load(data); + } + + function _load(data){ + var form = $(target); + for(var name in data){ + var val = data[name]; + if (!_checkField(name, val)){ + if (!_loadBox(name, val)){ + form.find('input[name="'+name+'"]').val(val); + form.find('textarea[name="'+name+'"]').val(val); + form.find('select[name="'+name+'"]').val(val); + } + } + } + opts.onLoadSuccess.call(target, data); + form.form('validate'); + } + + /** + * check the checkbox and radio fields + */ + function _checkField(name, val){ + var cc = $(target).find('[switchbuttonName="'+name+'"]'); + if (cc.length){ + cc.switchbutton('uncheck'); + cc.each(function(){ + if (_isChecked($(this).switchbutton('options').value, val)){ + $(this).switchbutton('check'); + } + }); + return true; + } + cc = $(target).find('input[name="'+name+'"][type=radio], input[name="'+name+'"][type=checkbox]'); + if (cc.length){ + cc._propAttr('checked', false); + cc.each(function(){ + if (_isChecked($(this).val(), val)){ + $(this)._propAttr('checked', true); + } + }); + return true; + } + return false; + } + function _isChecked(v, val){ + if (v == String(val) || $.inArray(v, $.isArray(val)?val:[val]) >= 0){ + return true; + } else { + return false; + } + } + + function _loadBox(name, val){ + var field = $(target).find('[textboxName="'+name+'"],[sliderName="'+name+'"]'); + if (field.length){ + for(var i=0; i=0; i--){ + var type = opts.fieldTypes[i]; + var field = form.find('.'+type+'-f'); + if (field.length && field[type]){ + field[type]('clear'); + } + } + form.form('validate'); + } + + function reset(target){ + target.reset(); + var form = $(target); + var opts = $.data(target, 'form').options; + for(var i=opts.fieldTypes.length-1; i>=0; i--){ + var type = opts.fieldTypes[i]; + var field = form.find('.'+type+'-f'); + if (field.length && field[type]){ + field[type]('reset'); + } + } + form.form('validate'); + } + + /** + * set the form to make it can submit with ajax. + */ + function setForm(target){ + var options = $.data(target, 'form').options; + $(target).unbind('.form'); + if (options.ajax){ + $(target).bind('submit.form', function(){ + setTimeout(function(){ + ajaxSubmit(target, options); + }, 0); + return false; + }); + } + $(target).bind('_change.form', function(e, t){ + options.onChange.call(this, t); + }).bind('change.form', function(e){ + var t = e.target; + if (!$(t).hasClass('textbox-text')){ + options.onChange.call(this, t); + } + }); + setValidation(target, options.novalidate); + } + + function initForm(target, options){ + options = options || {}; + var state = $.data(target, 'form'); + if (state){ + $.extend(state.options, options); + } else { + $.data(target, 'form', { + options: $.extend({}, $.fn.form.defaults, $.fn.form.parseOptions(target), options) + }); + } + } + + function validate(target){ + if ($.fn.validatebox){ + var t = $(target); + t.find('.validatebox-text:not(:disabled)').validatebox('validate'); + var invalidbox = t.find('.validatebox-invalid'); + invalidbox.filter(':not(:disabled):first').focus(); + return invalidbox.length == 0; + } + return true; + } + + function setValidation(target, novalidate){ + var opts = $.data(target, 'form').options; + opts.novalidate = novalidate; + $(target).find('.validatebox-text:not(:disabled)').validatebox(novalidate ? 'disableValidation' : 'enableValidation'); + } + + $.fn.form = function(options, param){ + if (typeof options == 'string'){ + this.each(function(){ + initForm(this); + }); + return $.fn.form.methods[options](this, param); + } + + return this.each(function(){ + initForm(this, options); + setForm(this); + }); + }; + + $.fn.form.methods = { + options: function(jq){ + return $.data(jq[0], 'form').options; + }, + submit: function(jq, options){ + return jq.each(function(){ + ajaxSubmit(this, options); + }); + }, + load: function(jq, data){ + return jq.each(function(){ + load(this, data); + }); + }, + clear: function(jq){ + return jq.each(function(){ + clear(this); + }); + }, + reset: function(jq){ + return jq.each(function(){ + reset(this); + }); + }, + validate: function(jq){ + return validate(jq[0]); + }, + disableValidation: function(jq){ + return jq.each(function(){ + setValidation(this, true); + }); + }, + enableValidation: function(jq){ + return jq.each(function(){ + setValidation(this, false); + }); + } + }; + + $.fn.form.parseOptions = function(target){ + var t = $(target); + return $.extend({}, $.parser.parseOptions(target, [{ajax:'boolean'}]), { + url: (t.attr('action') ? t.attr('action') : undefined) + }); + }; + + $.fn.form.defaults = { + fieldTypes: ['combobox','combotree','combogrid','datetimebox','datebox','combo', + 'datetimespinner','timespinner','numberspinner','spinner', + 'slider','searchbox','numberbox','textbox','switchbutton'], + novalidate: false, + ajax: true, + url: null, + queryParams: {}, + onSubmit: function(param){return $(this).form('validate');}, + success: function(data){}, + onBeforeLoad: function(param){}, + onLoadSuccess: function(data){}, + onLoadError: function(){}, + onChange: function(target){} + }; +})(jQuery); diff --git a/src/main/webapp/jquery-easyui-1.4.4/src/jquery.linkbutton.js b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.linkbutton.js new file mode 100644 index 0000000..92ed497 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.linkbutton.js @@ -0,0 +1,242 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +/** + * linkbutton - jQuery EasyUI + * + */ +(function($){ + function setSize(target, param){ + var opts = $.data(target, 'linkbutton').options; + if (param){ + $.extend(opts, param); + } + if (opts.width || opts.height || opts.fit){ + var btn = $(target); + var parent = btn.parent(); + var isVisible = btn.is(':visible'); + if (!isVisible){ + var spacer = $('
                                                          ').insertBefore(target); + var style = { + position: btn.css('position'), + display: btn.css('display'), + left: btn.css('left') + }; + btn.appendTo('body'); + btn.css({ + position: 'absolute', + display: 'inline-block', + left: -20000 + }); + } + btn._size(opts, parent); + var left = btn.find('.l-btn-left'); + left.css('margin-top', 0); + left.css('margin-top', parseInt((btn.height()-left.height())/2)+'px'); + if (!isVisible){ + btn.insertAfter(spacer); + btn.css(style); + spacer.remove(); + } + } + } + + function createButton(target) { + var opts = $.data(target, 'linkbutton').options; + var t = $(target).empty(); + + t.addClass('l-btn').removeClass('l-btn-plain l-btn-selected l-btn-plain-selected l-btn-outline'); + t.removeClass('l-btn-small l-btn-medium l-btn-large').addClass('l-btn-'+opts.size); + if (opts.plain){t.addClass('l-btn-plain')} + if (opts.outline){t.addClass('l-btn-outline')} + if (opts.selected){ + t.addClass(opts.plain ? 'l-btn-selected l-btn-plain-selected' : 'l-btn-selected'); + } + t.attr('group', opts.group || ''); + t.attr('id', opts.id || ''); + + var inner = $('').appendTo(t); + if (opts.text){ + $('').html(opts.text).appendTo(inner); + } else { + $(' ').appendTo(inner); + } + if (opts.iconCls){ + $(' ').addClass(opts.iconCls).appendTo(inner); + inner.addClass('l-btn-icon-'+opts.iconAlign); + } + + t.unbind('.linkbutton').bind('focus.linkbutton',function(){ + if (!opts.disabled){ + $(this).addClass('l-btn-focus'); + } + }).bind('blur.linkbutton',function(){ + $(this).removeClass('l-btn-focus'); + }).bind('click.linkbutton',function(){ + if (!opts.disabled){ + if (opts.toggle){ + if (opts.selected){ + $(this).linkbutton('unselect'); + } else { + $(this).linkbutton('select'); + } + } + opts.onClick.call(this); + } +// return false; + }); +// if (opts.toggle && !opts.disabled){ +// t.bind('click.linkbutton', function(){ +// if (opts.selected){ +// $(this).linkbutton('unselect'); +// } else { +// $(this).linkbutton('select'); +// } +// }); +// } + + setSelected(target, opts.selected) + setDisabled(target, opts.disabled); + } + + function setSelected(target, selected){ + var opts = $.data(target, 'linkbutton').options; + if (selected){ + if (opts.group){ + $('a.l-btn[group="'+opts.group+'"]').each(function(){ + var o = $(this).linkbutton('options'); + if (o.toggle){ + $(this).removeClass('l-btn-selected l-btn-plain-selected'); + o.selected = false; + } + }); + } + $(target).addClass(opts.plain ? 'l-btn-selected l-btn-plain-selected' : 'l-btn-selected'); + opts.selected = true; + } else { + if (!opts.group){ + $(target).removeClass('l-btn-selected l-btn-plain-selected'); + opts.selected = false; + } + } + } + + function setDisabled(target, disabled){ + var state = $.data(target, 'linkbutton'); + var opts = state.options; + $(target).removeClass('l-btn-disabled l-btn-plain-disabled'); + if (disabled){ + opts.disabled = true; + var href = $(target).attr('href'); + if (href){ + state.href = href; + $(target).attr('href', 'javascript:void(0)'); + } + if (target.onclick){ + state.onclick = target.onclick; + target.onclick = null; + } + opts.plain ? $(target).addClass('l-btn-disabled l-btn-plain-disabled') : $(target).addClass('l-btn-disabled'); + } else { + opts.disabled = false; + if (state.href) { + $(target).attr('href', state.href); + } + if (state.onclick) { + target.onclick = state.onclick; + } + } + } + + $.fn.linkbutton = function(options, param){ + if (typeof options == 'string'){ + return $.fn.linkbutton.methods[options](this, param); + } + + options = options || {}; + return this.each(function(){ + var state = $.data(this, 'linkbutton'); + if (state){ + $.extend(state.options, options); + } else { + $.data(this, 'linkbutton', { + options: $.extend({}, $.fn.linkbutton.defaults, $.fn.linkbutton.parseOptions(this), options) + }); + $(this).removeAttr('disabled'); + $(this).bind('_resize', function(e, force){ + if ($(this).hasClass('easyui-fluid') || force){ + setSize(this); + } + return false; + }); + } + + createButton(this); + setSize(this); + }); + }; + + $.fn.linkbutton.methods = { + options: function(jq){ + return $.data(jq[0], 'linkbutton').options; + }, + resize: function(jq, param){ + return jq.each(function(){ + setSize(this, param); + }); + }, + enable: function(jq){ + return jq.each(function(){ + setDisabled(this, false); + }); + }, + disable: function(jq){ + return jq.each(function(){ + setDisabled(this, true); + }); + }, + select: function(jq){ + return jq.each(function(){ + setSelected(this, true); + }); + }, + unselect: function(jq){ + return jq.each(function(){ + setSelected(this, false); + }); + } + }; + + $.fn.linkbutton.parseOptions = function(target){ + var t = $(target); + return $.extend({}, $.parser.parseOptions(target, + ['id','iconCls','iconAlign','group','size','text',{plain:'boolean',toggle:'boolean',selected:'boolean',outline:'boolean'}] + ), { + disabled: (t.attr('disabled') ? true : undefined), + text: ($.trim(t.html()) || undefined), + iconCls: (t.attr('icon') || t.attr('iconCls')) + }); + }; + + $.fn.linkbutton.defaults = { + id: null, + disabled: false, + toggle: false, + selected: false, + outline: false, + group: null, + plain: false, + text: '', + iconCls: null, + iconAlign: 'left', + size: 'small', // small,large + onClick: function(){} + }; + +})(jQuery); diff --git a/src/main/webapp/jquery-easyui-1.4.4/src/jquery.menu.js b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.menu.js new file mode 100644 index 0000000..879a470 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.menu.js @@ -0,0 +1,637 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +/** + * menu - jQuery EasyUI + * + */ +(function($){ + $(function(){ + $(document).unbind('.menu').bind('mousedown.menu', function(e){ + var m = $(e.target).closest('div.menu,div.combo-p'); + if (m.length){return} + $('body>div.menu-top:visible').not('.menu-inline').menu('hide'); + hideMenu($('body>div.menu:visible').not('.menu-inline')); + }); + }); + + /** + * initialize the target menu, the function can be invoked only once + */ + function init(target){ + var opts = $.data(target, 'menu').options; + $(target).addClass('menu-top'); // the top menu + opts.inline ? $(target).addClass('menu-inline') : $(target).appendTo('body'); + $(target).bind('_resize', function(e, force){ + if ($(this).hasClass('easyui-fluid') || force){ + $(target).menu('resize', target); + } + return false; + }); + + var menus = splitMenu($(target)); + for(var i=0; i').html(text)); + if (itemOpts.iconCls){ + $('').addClass(itemOpts.iconCls).appendTo(item); + } + if (itemOpts.disabled){ + setDisabled(target, item[0], true); + } + if (item[0].submenu){ + $('').appendTo(item); // has sub menu + } + + bindMenuItemEvent(target, item); + } + }); + $('').prependTo(menu); + } + setMenuSize(target, menu); + if (!menu.hasClass('menu-inline')){ + menu.hide(); + } + + bindMenuEvent(target, menu); + } + } + + function setMenuSize(target, menu){ + var opts = $.data(target, 'menu').options; + var style = menu.attr('style') || ''; + menu.css({ + display: 'block', + left:-10000, + height: 'auto', + overflow: 'hidden' + }); + menu.find('.menu-item').each(function(){ + $(this)._outerHeight(opts.itemHeight); + $(this).find('.menu-text').css({ + height: (opts.itemHeight-2)+'px', + lineHeight: (opts.itemHeight-2)+'px' + }); + }); + menu.removeClass('menu-noline').addClass(opts.noline?'menu-noline':''); + + var width = menu[0].originalWidth || 'auto'; + if (isNaN(parseInt(width))){ + width = 0; + menu.find('div.menu-text').each(function(){ + if (width < $(this)._outerWidth()){ + width = $(this)._outerWidth(); + } + }); + width += 40; + } + + var autoHeight = menu.outerHeight(); + var height = menu[0].originalHeight || 'auto'; + if (isNaN(parseInt(height))){ + height = autoHeight; + + if (menu.hasClass('menu-top') && opts.alignTo){ + var at = $(opts.alignTo); + var h1 = at.offset().top - $(document).scrollTop(); + var h2 = $(window)._outerHeight() + $(document).scrollTop() - at.offset().top - at._outerHeight(); + height = Math.min(height, Math.max(h1, h2)); + } else if (height > $(window)._outerHeight()){ + height = $(window).height(); + } + } + + menu.attr('style', style); // restore the original style + menu._size({ + fit: (menu[0]==target?opts.fit:false), + width: width, + minWidth: opts.minWidth, + height: height + }); + menu.css('overflow', menu.outerHeight() < autoHeight ? 'auto' : 'hidden'); + menu.children('div.menu-line')._outerHeight(autoHeight-2); + } + + /** + * bind menu event + */ + function bindMenuEvent(target, menu){ + if (menu.hasClass('menu-inline')){return} + var state = $.data(target, 'menu'); + menu.unbind('.menu').bind('mouseenter.menu', function(){ + if (state.timer){ + clearTimeout(state.timer); + state.timer = null; + } + }).bind('mouseleave.menu', function(){ + if (state.options.hideOnUnhover){ + state.timer = setTimeout(function(){ + hideAll(target, $(target).hasClass('menu-inline')); + }, state.options.duration); + } + }); + } + + /** + * bind menu item event + */ + function bindMenuItemEvent(target, item){ + if (!item.hasClass('menu-item')){return} + item.unbind('.menu'); + item.bind('click.menu', function(){ + if ($(this).hasClass('menu-item-disabled')){ + return; + } + // only the sub menu clicked can hide all menus + if (!this.submenu){ + hideAll(target, $(target).hasClass('menu-inline')); + var href = this.itemHref; + if (href){ + location.href = href; + } + } + $(this).trigger('mouseenter'); + var item = $(target).menu('getItem', this); + $.data(target, 'menu').options.onClick.call(target, item); + }).bind('mouseenter.menu', function(e){ + // hide other menu + item.siblings().each(function(){ + if (this.submenu){ + hideMenu(this.submenu); + } + $(this).removeClass('menu-active'); + }); + // show this menu + item.addClass('menu-active'); + + if ($(this).hasClass('menu-item-disabled')){ + item.addClass('menu-active-disabled'); + return; + } + + var submenu = item[0].submenu; + if (submenu){ + $(target).menu('show', { + menu: submenu, + parent: item + }); + } + }).bind('mouseleave.menu', function(e){ + item.removeClass('menu-active menu-active-disabled'); + var submenu = item[0].submenu; + if (submenu){ + if (e.pageX>=parseInt(submenu.css('left'))){ + item.addClass('menu-active'); + } else { + hideMenu(submenu); + } + + } else { + item.removeClass('menu-active'); + } + }); + } + + /** + * hide top menu and it's all sub menus + */ + function hideAll(target, inline){ + var state = $.data(target, 'menu'); + if (state){ + if ($(target).is(':visible')){ + hideMenu($(target)); + if (inline){ + $(target).show(); + } else { + state.options.onHide.call(target); + } + } + } + return false; + } + + /** + * show the menu, the 'param' object has one or more properties: + * left: the left position to display + * top: the top position to display + * menu: the menu to display, if not defined, the 'target menu' is used + * parent: the parent menu item to align to + * alignTo: the element object to align to + */ + function showMenu(target, param){ + var left,top; + param = param || {}; + var menu = $(param.menu || target); + $(target).menu('resize', menu[0]); + if (menu.hasClass('menu-top')){ + var opts = $.data(target, 'menu').options; + $.extend(opts, param); + left = opts.left; + top = opts.top; + if (opts.alignTo){ + var at = $(opts.alignTo); + left = at.offset().left; + top = at.offset().top + at._outerHeight(); + if (opts.align == 'right'){ + left += at.outerWidth() - menu.outerWidth(); + } + } + if (left + menu.outerWidth() > $(window)._outerWidth() + $(document)._scrollLeft()){ + left = $(window)._outerWidth() + $(document).scrollLeft() - menu.outerWidth() - 5; + } + if (left < 0){left = 0;} + top = _fixTop(top, opts.alignTo); + } else { + var parent = param.parent; // the parent menu item + left = parent.offset().left + parent.outerWidth() - 2; + if (left + menu.outerWidth() + 5 > $(window)._outerWidth() + $(document).scrollLeft()){ + left = parent.offset().left - menu.outerWidth() + 2; + } + top = _fixTop(parent.offset().top - 3); + } + + function _fixTop(top, alignTo){ + if (top + menu.outerHeight() > $(window)._outerHeight() + $(document).scrollTop()){ + if (alignTo){ + top = $(alignTo).offset().top - menu._outerHeight(); + } else { + top = $(window)._outerHeight() + $(document).scrollTop() - menu.outerHeight(); + } + } + if (top < 0){top = 0;} + return top; + } + + menu.css({left:left,top:top}); + menu.show(0, function(){ + if (!menu[0].shadow){ + menu[0].shadow = $('').insertAfter(menu); + } + menu[0].shadow.css({ + display:(menu.hasClass('menu-inline')?'none':'block'), + zIndex:$.fn.menu.defaults.zIndex++, + left:menu.css('left'), + top:menu.css('top'), + width:menu.outerWidth(), + height:menu.outerHeight() + }); + menu.css('z-index', $.fn.menu.defaults.zIndex++); + if (menu.hasClass('menu-top')){ + $.data(menu[0], 'menu').options.onShow.call(menu[0]); + } + }); + } + + function hideMenu(menu){ + if (menu && menu.length){ + hideit(menu); + menu.find('div.menu-item').each(function(){ + if (this.submenu){ + hideMenu(this.submenu); + } + $(this).removeClass('menu-active'); + }); + } + + function hideit(m){ + m.stop(true,true); + if (m[0].shadow){ + m[0].shadow.hide(); + } + m.hide(); + } + } + + function findItem(target, text){ + var result = null; + var tmp = $('
                                                          '); + function find(menu){ + menu.children('div.menu-item').each(function(){ + var item = $(target).menu('getItem', this); + var s = tmp.empty().html(item.text).text(); + if (text == $.trim(s)) { + result = item; + } else if (this.submenu && !result){ + find(this.submenu); + } + }); + } + find($(target)); + tmp.remove(); + return result; + } + + function setDisabled(target, itemEl, disabled){ + var t = $(itemEl); + if (!t.hasClass('menu-item')){return} + + if (disabled){ + t.addClass('menu-item-disabled'); + if (itemEl.onclick){ + itemEl.onclick1 = itemEl.onclick; + itemEl.onclick = null; + } + } else { + t.removeClass('menu-item-disabled'); + if (itemEl.onclick1){ + itemEl.onclick = itemEl.onclick1; + itemEl.onclick1 = null; + } + } + } + + function appendItem(target, param){ + var opts = $.data(target, 'menu').options; + var menu = $(target); + if (param.parent){ + if (!param.parent.submenu){ + var submenu = $('').appendTo('body'); + submenu.hide(); + param.parent.submenu = submenu; + $('').appendTo(param.parent); + } + menu = param.parent.submenu; + } + if (param.separator){ + var item = $('').appendTo(menu); + } else { + var item = $('').appendTo(menu); + $('').html(param.text).appendTo(item); + } + if (param.iconCls) $('').addClass(param.iconCls).appendTo(item); + if (param.id) item.attr('id', param.id); + if (param.name){item[0].itemName = param.name} + if (param.href){item[0].itemHref = param.href} + if (param.onclick){ + if (typeof param.onclick == 'string'){ + item.attr('onclick', param.onclick); + } else { + item[0].onclick = eval(param.onclick); + } + } + if (param.handler){item[0].onclick = eval(param.handler)} + if (param.disabled){setDisabled(target, item[0], true)} + + bindMenuItemEvent(target, item); + bindMenuEvent(target, menu); + setMenuSize(target, menu); + } + + function removeItem(target, itemEl){ + function removeit(el){ + if (el.submenu){ + el.submenu.children('div.menu-item').each(function(){ + removeit(this); + }); + var shadow = el.submenu[0].shadow; + if (shadow) shadow.remove(); + el.submenu.remove(); + } + $(el).remove(); + } + var menu = $(itemEl).parent(); + removeit(itemEl); + setMenuSize(target, menu); + } + + function setVisible(target, itemEl, visible){ + var menu = $(itemEl).parent(); + if (visible){ + $(itemEl).show(); + } else { + $(itemEl).hide(); + } + setMenuSize(target, menu); + } + + function destroyMenu(target){ + $(target).children('div.menu-item').each(function(){ + removeItem(target, this); + }); + if (target.shadow) target.shadow.remove(); + $(target).remove(); + } + + $.fn.menu = function(options, param){ + if (typeof options == 'string'){ + return $.fn.menu.methods[options](this, param); + } + + options = options || {}; + return this.each(function(){ + var state = $.data(this, 'menu'); + if (state){ + $.extend(state.options, options); + } else { + state = $.data(this, 'menu', { + options: $.extend({}, $.fn.menu.defaults, $.fn.menu.parseOptions(this), options) + }); + init(this); + } + $(this).css({ + left: state.options.left, + top: state.options.top + }); + }); + }; + + $.fn.menu.methods = { + options: function(jq){ + return $.data(jq[0], 'menu').options; + }, + show: function(jq, pos){ + return jq.each(function(){ + showMenu(this, pos); + }); + }, + hide: function(jq){ + return jq.each(function(){ + hideAll(this); + }); + }, + destroy: function(jq){ + return jq.each(function(){ + destroyMenu(this); + }); + }, + /** + * set the menu item text + * param: { + * target: DOM object, indicate the menu item + * text: string, the new text + * } + */ + setText: function(jq, param){ + return jq.each(function(){ + $(param.target).children('div.menu-text').html(param.text); + }); + }, + /** + * set the menu icon class + * param: { + * target: DOM object, indicate the menu item + * iconCls: the menu item icon class + * } + */ + setIcon: function(jq, param){ + return jq.each(function(){ + $(param.target).children('div.menu-icon').remove(); + if (param.iconCls){ + $('').addClass(param.iconCls).appendTo(param.target); + } + }); + }, + /** + * get the menu item data that contains the following property: + * { + * target: DOM object, the menu item + * id: the menu id + * text: the menu item text + * iconCls: the icon class + * href: a remote address to redirect to + * onclick: a function to be called when the item is clicked + * } + */ + getItem: function(jq, itemEl){ + var t = $(itemEl); + var item = { + target: itemEl, + id: t.attr('id'), + text: $.trim(t.children('div.menu-text').html()), + disabled: t.hasClass('menu-item-disabled'), +// href: t.attr('href'), +// name: t.attr('name'), + name: itemEl.itemName, + href: itemEl.itemHref, + onclick: itemEl.onclick + } + var icon = t.children('div.menu-icon'); + if (icon.length){ + var cc = []; + var aa = icon.attr('class').split(' '); + for(var i=0; i= 0){ + v = Math.floor((parent.width()-delta) * v / 100.0); + } else { + v = Math.floor((parent.height()-delta) * v / 100.0); + } + } else { + v = parseInt(v) || undefined; + } + return v; + }, + + /** + * parse options, including standard 'data-options' attribute. + * + * calling examples: + * $.parser.parseOptions(target); + * $.parser.parseOptions(target, ['id','title','width',{fit:'boolean',border:'boolean'},{min:'number'}]); + */ + parseOptions: function(target, properties){ + var t = $(target); + var options = {}; + + var s = $.trim(t.attr('data-options')); + if (s){ + if (s.substring(0, 1) != '{'){ + s = '{' + s + '}'; + } + options = (new Function('return ' + s))(); + } + $.map(['width','height','left','top','minWidth','maxWidth','minHeight','maxHeight'], function(p){ + var pv = $.trim(target.style[p] || ''); + if (pv){ + if (pv.indexOf('%') == -1){ + pv = parseInt(pv) || undefined; + } + options[p] = pv; + } + }); + + if (properties){ + var opts = {}; + for(var i=0; i').appendTo('body'); + $._boxModel = d.outerWidth()!=100; + d.remove(); + d = $('
                                                          ').appendTo('body'); + $._positionFixed = (d.css('position') == 'fixed'); + d.remove(); + + if (!window.easyloader && $.parser.auto){ + $.parser.parse(); + } + }); + + /** + * extend plugin to set box model width + */ + $.fn._outerWidth = function(width){ + if (width == undefined){ + if (this[0] == window){ + return this.width() || document.body.clientWidth; + } + return this.outerWidth()||0; + } + return this._size('width', width); + }; + + /** + * extend plugin to set box model height + */ + $.fn._outerHeight = function(height){ + if (height == undefined){ + if (this[0] == window){ + return this.height() || document.body.clientHeight; + } + return this.outerHeight()||0; + } + return this._size('height', height); + }; + + $.fn._scrollLeft = function(left){ + if (left == undefined){ + return this.scrollLeft(); + } else { + return this.each(function(){$(this).scrollLeft(left)}); + } + }; + + $.fn._propAttr = $.fn.prop || $.fn.attr; + + $.fn._size = function(options, parent){ + if (typeof options == 'string'){ + if (options == 'clear'){ + return this.each(function(){ + $(this).css({width:'',minWidth:'',maxWidth:'',height:'',minHeight:'',maxHeight:''}); + }); + } else if (options == 'fit'){ + return this.each(function(){ + _fit(this, this.tagName=='BODY' ? $('body') : $(this).parent(), true); + }); + } else if (options == 'unfit'){ + return this.each(function(){ + _fit(this, $(this).parent(), false); + }); + } else { + if (parent == undefined){ + return _css(this[0], options); + } else { + return this.each(function(){ + _css(this, options, parent); + }); + } + } + } else { + return this.each(function(){ + parent = parent || $(this).parent(); + $.extend(options, _fit(this, parent, options.fit)||{}); + var r1 = _setSize(this, 'width', parent, options); + var r2 = _setSize(this, 'height', parent, options); + if (r1 || r2){ + $(this).addClass('easyui-fluid'); + } else { + $(this).removeClass('easyui-fluid'); + } + }); + } + + function _fit(target, parent, fit){ + if (!parent.length){return false;} + var t = $(target)[0]; + var p = parent[0]; + var fcount = p.fcount || 0; + if (fit){ + if (!t.fitted){ + t.fitted = true; + p.fcount = fcount + 1; + $(p).addClass('panel-noscroll'); + if (p.tagName == 'BODY'){ + $('html').addClass('panel-fit'); + } + } + return { + width: ($(p).width()||1), + height: ($(p).height()||1) + }; + } else { + if (t.fitted){ + t.fitted = false; + p.fcount = fcount - 1; + if (p.fcount == 0){ + $(p).removeClass('panel-noscroll'); + if (p.tagName == 'BODY'){ + $('html').removeClass('panel-fit'); + } + } + } + return false; + } + } + function _setSize(target, property, parent, options){ + var t = $(target); + var p = property; + var p1 = p.substr(0,1).toUpperCase() + p.substr(1); + var min = $.parser.parseValue('min'+p1, options['min'+p1], parent);// || 0; + var max = $.parser.parseValue('max'+p1, options['max'+p1], parent);// || 99999; + var val = $.parser.parseValue(p, options[p], parent); + var fluid = (String(options[p]||'').indexOf('%') >= 0 ? true : false); + + if (!isNaN(val)){ + var v = Math.min(Math.max(val, min||0), max||99999); + if (!fluid){ + options[p] = v; + } + t._size('min'+p1, ''); + t._size('max'+p1, ''); + t._size(p, v); + } else { + t._size(p, ''); + t._size('min'+p1, min); + t._size('max'+p1, max); + } + return fluid || options.fit; + } + function _css(target, property, value){ + var t = $(target); + if (value == undefined){ + value = parseInt(target.style[property]); + if (isNaN(value)){return undefined;} + if ($._boxModel){ + value += getDeltaSize(); + } + return value; + } else if (value === ''){ + t.css(property, ''); + } else { + if ($._boxModel){ + value -= getDeltaSize(); + if (value < 0){value = 0;} + } + t.css(property, value+'px'); + } + function getDeltaSize(){ + if (property.toLowerCase().indexOf('width') >= 0){ + return t.outerWidth() - t.width(); + } else { + return t.outerHeight() - t.height(); + } + } + } + }; + +})(jQuery); + +/** + * support for mobile devices + */ +(function($){ + var longTouchTimer = null; + var dblTouchTimer = null; + var isDblClick = false; + + function onTouchStart(e){ + if (e.touches.length != 1){return} + if (!isDblClick){ + isDblClick = true; + dblClickTimer = setTimeout(function(){ + isDblClick = false; + }, 500); + } else { + clearTimeout(dblClickTimer); + isDblClick = false; + fire(e, 'dblclick'); +// e.preventDefault(); + } + longTouchTimer = setTimeout(function(){ + fire(e, 'contextmenu', 3); + }, 1000); + fire(e, 'mousedown'); + if ($.fn.draggable.isDragging || $.fn.resizable.isResizing){ + e.preventDefault(); + } + } + function onTouchMove(e){ + if (e.touches.length != 1){return} + if (longTouchTimer){ + clearTimeout(longTouchTimer); + } + fire(e, 'mousemove'); + if ($.fn.draggable.isDragging || $.fn.resizable.isResizing){ + e.preventDefault(); + } + } + function onTouchEnd(e){ +// if (e.touches.length > 0){return} + if (longTouchTimer){ + clearTimeout(longTouchTimer); + } + fire(e, 'mouseup'); + if ($.fn.draggable.isDragging || $.fn.resizable.isResizing){ + e.preventDefault(); + } + } + + function fire(e, name, which){ + var event = new $.Event(name); + event.pageX = e.changedTouches[0].pageX; + event.pageY = e.changedTouches[0].pageY; + event.which = which || 1; + $(e.target).trigger(event); + } + + if (document.addEventListener){ + document.addEventListener("touchstart", onTouchStart, true); + document.addEventListener("touchmove", onTouchMove, true); + document.addEventListener("touchend", onTouchEnd, true); + } +})(jQuery); + diff --git a/src/main/webapp/jquery-easyui-1.4.4/src/jquery.progressbar.js b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.progressbar.js new file mode 100644 index 0000000..be756d2 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.progressbar.js @@ -0,0 +1,107 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +/** + * progressbar - jQuery EasyUI + * + * Dependencies: + * none + * + */ +(function($){ + function init(target){ + $(target).addClass('progressbar'); + $(target).html('
                                                          '); + $(target).bind('_resize', function(e,force){ + if ($(this).hasClass('easyui-fluid') || force){ + setSize(target); + } + return false; + }); + return $(target); + } + + function setSize(target,width){ + var opts = $.data(target, 'progressbar').options; + var bar = $.data(target, 'progressbar').bar; + if (width) opts.width = width; + bar._size(opts); + + bar.find('div.progressbar-text').css('width', bar.width()); + bar.find('div.progressbar-text,div.progressbar-value').css({ + height: bar.height()+'px', + lineHeight: bar.height()+'px' + }); + } + + $.fn.progressbar = function(options, param){ + if (typeof options == 'string'){ + var method = $.fn.progressbar.methods[options]; + if (method){ + return method(this, param); + } + } + + options = options || {}; + return this.each(function(){ + var state = $.data(this, 'progressbar'); + if (state){ + $.extend(state.options, options); + } else { + state = $.data(this, 'progressbar', { + options: $.extend({}, $.fn.progressbar.defaults, $.fn.progressbar.parseOptions(this), options), + bar: init(this) + }); + } + $(this).progressbar('setValue', state.options.value); + setSize(this); + }); + }; + + $.fn.progressbar.methods = { + options: function(jq){ + return $.data(jq[0], 'progressbar').options; + }, + resize: function(jq, width){ + return jq.each(function(){ + setSize(this, width); + }); + }, + getValue: function(jq){ + return $.data(jq[0], 'progressbar').options.value; + }, + setValue: function(jq, value){ + if (value < 0) value = 0; + if (value > 100) value = 100; + return jq.each(function(){ + var opts = $.data(this, 'progressbar').options; + var text = opts.text.replace(/{value}/, value); + var oldValue = opts.value; + opts.value = value; + $(this).find('div.progressbar-value').width(value+'%'); + $(this).find('div.progressbar-text').html(text); + if (oldValue != value){ + opts.onChange.call(this, value, oldValue); + } + }); + } + }; + + $.fn.progressbar.parseOptions = function(target){ + return $.extend({}, $.parser.parseOptions(target, ['width','height','text',{value:'number'}])); + }; + + $.fn.progressbar.defaults = { + width: 'auto', + height: 22, + value: 0, // percentage value + text: '{value}%', + onChange:function(newValue,oldValue){} + }; +})(jQuery); diff --git a/src/main/webapp/jquery-easyui-1.4.4/src/jquery.propertygrid.js b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.propertygrid.js new file mode 100644 index 0000000..d7e321e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.propertygrid.js @@ -0,0 +1,420 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +/** + * propertygrid - jQuery EasyUI + * + * Dependencies: + * datagrid + * + */ +(function($){ + var currTarget; + $(document).unbind('.propertygrid').bind('mousedown.propertygrid', function(e){ + var p = $(e.target).closest('div.datagrid-view,div.combo-panel'); + if (p.length){return;} + stopEditing(currTarget); + currTarget = undefined; + }); + + function buildGrid(target){ + var state = $.data(target, 'propertygrid'); + var opts = $.data(target, 'propertygrid').options; + $(target).datagrid($.extend({}, opts, { + cls:'propertygrid', + view:(opts.showGroup ? opts.groupView : opts.view), + onBeforeEdit:function(index, row){ + if (opts.onBeforeEdit.call(target, index, row) == false){return false;} + var dg = $(this); + var row = dg.datagrid('getRows')[index]; + var col = dg.datagrid('getColumnOption', 'value'); + col.editor = row.editor; + }, + onClickCell:function(index, field, value){ + if (currTarget != this){ + stopEditing(currTarget); + currTarget = this; + } + if (opts.editIndex != index){ + stopEditing(currTarget); + $(this).datagrid('beginEdit', index); + var ed = $(this).datagrid('getEditor', {index:index,field:field}); + if (!ed){ + ed = $(this).datagrid('getEditor', {index:index,field:'value'}); + } + if (ed){ + var t = $(ed.target); + var input = t.data('textbox') ? t.textbox('textbox') : t; + input.focus(); + opts.editIndex = index; + } + } + opts.onClickCell.call(target, index, field, value); + }, + loadFilter:function(data){ + stopEditing(this); + return opts.loadFilter.call(this, data); + } + })); + } + + function stopEditing(target){ + var t = $(target); + if (!t.length){return} + var opts = $.data(target, 'propertygrid').options; + opts.finder.getTr(target, null, 'editing').each(function(){ + var index = parseInt($(this).attr('datagrid-row-index')); + if (t.datagrid('validateRow', index)){ + t.datagrid('endEdit', index); + } else { + t.datagrid('cancelEdit', index); + } + }); + opts.editIndex = undefined; + } + + $.fn.propertygrid = function(options, param){ + if (typeof options == 'string'){ + var method = $.fn.propertygrid.methods[options]; + if (method){ + return method(this, param); + } else { + return this.datagrid(options, param); + } + } + + options = options || {}; + return this.each(function(){ + var state = $.data(this, 'propertygrid'); + if (state){ + $.extend(state.options, options); + } else { + var opts = $.extend({}, $.fn.propertygrid.defaults, $.fn.propertygrid.parseOptions(this), options); + opts.frozenColumns = $.extend(true, [], opts.frozenColumns); + opts.columns = $.extend(true, [], opts.columns); + $.data(this, 'propertygrid', { + options: opts + }); + } + buildGrid(this); + }); + } + + $.fn.propertygrid.methods = { + options: function(jq){ + return $.data(jq[0], 'propertygrid').options; + } + }; + + $.fn.propertygrid.parseOptions = function(target){ + return $.extend({}, $.fn.datagrid.parseOptions(target), $.parser.parseOptions(target,[{showGroup:'boolean'}])); + }; + + // the group view definition + var groupview = $.extend({}, $.fn.datagrid.defaults.view, { + render: function(target, container, frozen){ + var table = []; + var groups = this.groups; + for(var i=0; i'); + if ((frozen && (opts.rownumbers || opts.frozenColumns.length)) || + (!frozen && !(opts.rownumbers || opts.frozenColumns.length))){ + table.push(''); + table.push(' '); + table.push(''); + } + if (!frozen){ + table.push(''); + table.push(opts.groupFormatter.call(target, group.value, group.rows)); + table.push(''); + } + table.push(''); + + table.push(''); + var index = group.startIndex; + for(var j=0; j'); + table.push(this.renderRow.call(this, target, fields, frozen, index, group.rows[j])); + table.push(''); + index++; + } + table.push('
                                                          '); + return table.join(''); + }, + + bindEvents: function(target){ + var state = $.data(target, 'datagrid'); + var dc = state.dc; + var body = dc.body1.add(dc.body2); + var clickHandler = ($.data(body[0],'events')||$._data(body[0],'events')).click[0].handler; + body.unbind('click').bind('click', function(e){ + var tt = $(e.target); + var expander = tt.closest('span.datagrid-row-expander'); + if (expander.length){ + var gindex = expander.closest('div.datagrid-group').attr('group-index'); + if (expander.hasClass('datagrid-row-collapse')){ + $(target).datagrid('collapseGroup', gindex); + } else { + $(target).datagrid('expandGroup', gindex); + } + } else { + clickHandler(e); + } + e.stopPropagation(); + }); + }, + + onBeforeRender: function(target, rows){ + var state = $.data(target, 'datagrid'); + var opts = state.options; + + initCss(); + + var groups = []; + for(var i=0; i' + + '.datagrid-group{height:'+opts.groupHeight+'px;overflow:hidden;font-weight:bold;border-bottom:1px solid #ccc;}' + + '.datagrid-group-title,.datagrid-group-expander{display:inline-block;vertical-align:bottom;height:100%;line-height:'+opts.groupHeight+'px;padding:0 4px;}' + + '.datagrid-group-expander{width:'+opts.expanderWidth+'px;text-align:center;padding:0}' + + '.datagrid-row-expander{margin:'+Math.floor((opts.groupHeight-16)/2)+'px 0;display:inline-block;width:16px;height:16px;cursor:pointer}' + + '' + ); + } + } + } + }); + + $.extend($.fn.datagrid.methods, { + groups:function(jq){ + return jq.datagrid('options').view.groups; + }, + expandGroup:function(jq, groupIndex){ + return jq.each(function(){ + var view = $.data(this, 'datagrid').dc.view; + var group = view.find(groupIndex!=undefined ? 'div.datagrid-group[group-index="'+groupIndex+'"]' : 'div.datagrid-group'); + var expander = group.find('span.datagrid-row-expander'); + if (expander.hasClass('datagrid-row-expand')){ + expander.removeClass('datagrid-row-expand').addClass('datagrid-row-collapse'); + group.next('table').show(); + } + $(this).datagrid('fixRowHeight'); + }); + }, + collapseGroup:function(jq, groupIndex){ + return jq.each(function(){ + var view = $.data(this, 'datagrid').dc.view; + var group = view.find(groupIndex!=undefined ? 'div.datagrid-group[group-index="'+groupIndex+'"]' : 'div.datagrid-group'); + var expander = group.find('span.datagrid-row-expander'); + if (expander.hasClass('datagrid-row-collapse')){ + expander.removeClass('datagrid-row-collapse').addClass('datagrid-row-expand'); + group.next('table').hide(); + } + $(this).datagrid('fixRowHeight'); + }); + } + }); + + $.extend(groupview, { + refreshGroupTitle: function(target, groupIndex){ + var state = $.data(target, 'datagrid'); + var opts = state.options; + var dc = state.dc; + var group = this.groups[groupIndex]; + var span = dc.body2.children('div.datagrid-group[group-index=' + groupIndex + ']').find('span.datagrid-group-title'); + span.html(opts.groupFormatter.call(target, group.value, group.rows)); + }, + + insertRow: function(target, index, row){ + var state = $.data(target, 'datagrid'); + var opts = state.options; + var dc = state.dc; + var group = null; + var groupIndex; + + if (!state.data.rows.length){ + $(target).datagrid('loadData', [row]); + return; + } + + for(var i=0; i group.startIndex + group.rows.length){ + index = group.startIndex + group.rows.length; + } + $.fn.datagrid.defaults.view.insertRow.call(this, target, index, row); + + if (index >= group.startIndex + group.rows.length){ + _moveTr(index, true); + _moveTr(index, false); + } + group.rows.splice(index - group.startIndex, 0, row); + } else { + group = { + value: row[opts.groupField], + rows: [row], + startIndex: state.data.rows.length + } + groupIndex = this.groups.length; + dc.body1.append(this.renderGroup.call(this, target, groupIndex, group, true)); + dc.body2.append(this.renderGroup.call(this, target, groupIndex, group, false)); + this.groups.push(group); + state.data.rows.push(row); + } + + this.refreshGroupTitle(target, groupIndex); + + function _moveTr(index,frozen){ + var serno = frozen?1:2; + var prevTr = opts.finder.getTr(target, index-1, 'body', serno); + var tr = opts.finder.getTr(target, index, 'body', serno); + tr.insertAfter(prevTr); + } + }, + + updateRow: function(target, index, row){ + var opts = $.data(target, 'datagrid').options; + $.fn.datagrid.defaults.view.updateRow.call(this, target, index, row); + var tb = opts.finder.getTr(target, index, 'body', 2).closest('table.datagrid-btable'); + var groupIndex = parseInt(tb.prev().attr('group-index')); + this.refreshGroupTitle(target, groupIndex); + }, + + deleteRow: function(target, index){ + var state = $.data(target, 'datagrid'); + var opts = state.options; + var dc = state.dc; + var body = dc.body1.add(dc.body2); + + var tb = opts.finder.getTr(target, index, 'body', 2).closest('table.datagrid-btable'); + var groupIndex = parseInt(tb.prev().attr('group-index')); + + $.fn.datagrid.defaults.view.deleteRow.call(this, target, index); + + var group = this.groups[groupIndex]; + if (group.rows.length > 1){ + group.rows.splice(index-group.startIndex, 1); + this.refreshGroupTitle(target, groupIndex); + } else { + body.children('div.datagrid-group[group-index='+groupIndex+']').remove(); + for(var i=groupIndex+1; i= options.minWidth && resizeData.width <= options.maxWidth) { +// resizeData.left = resizeData.startLeft + e.pageX - resizeData.startX; +// } + } + if (resizeData.dir.indexOf('n') != -1) { + var height = resizeData.startHeight - e.pageY + resizeData.startY; + height = Math.min( + Math.max(height, options.minHeight), + options.maxHeight + ); + resizeData.height = height; + resizeData.top = resizeData.startTop + resizeData.startHeight - resizeData.height; + +// resizeData.height = resizeData.startHeight - e.pageY + resizeData.startY; +// if (resizeData.height >= options.minHeight && resizeData.height <= options.maxHeight) { +// resizeData.top = resizeData.startTop + e.pageY - resizeData.startY; +// } + } + } + + function applySize(e){ + var resizeData = e.data; + var t = $(resizeData.target); + t.css({ + left: resizeData.left, + top: resizeData.top + }); + if (t.outerWidth() != resizeData.width){t._outerWidth(resizeData.width)} + if (t.outerHeight() != resizeData.height){t._outerHeight(resizeData.height)} +// t._outerWidth(resizeData.width)._outerHeight(resizeData.height); + } + + function doDown(e){ +// isResizing = true; + $.fn.resizable.isResizing = true; + $.data(e.data.target, 'resizable').options.onStartResize.call(e.data.target, e); + return false; + } + + function doMove(e){ + resize(e); + if ($.data(e.data.target, 'resizable').options.onResize.call(e.data.target, e) != false){ + applySize(e) + } + return false; + } + + function doUp(e){ +// isResizing = false; + $.fn.resizable.isResizing = false; + resize(e, true); + applySize(e); + $.data(e.data.target, 'resizable').options.onStopResize.call(e.data.target, e); + $(document).unbind('.resizable'); + $('body').css('cursor',''); +// $('body').css('cursor','auto'); + return false; + } + + return this.each(function(){ + var opts = null; + var state = $.data(this, 'resizable'); + if (state) { + $(this).unbind('.resizable'); + opts = $.extend(state.options, options || {}); + } else { + opts = $.extend({}, $.fn.resizable.defaults, $.fn.resizable.parseOptions(this), options || {}); + $.data(this, 'resizable', { + options:opts + }); + } + + if (opts.disabled == true) { + return; + } + + // bind mouse event using namespace resizable + $(this).bind('mousemove.resizable', {target:this}, function(e){ +// if (isResizing) return; + if ($.fn.resizable.isResizing){return} + var dir = getDirection(e); + if (dir == '') { + $(e.data.target).css('cursor', ''); + } else { + $(e.data.target).css('cursor', dir + '-resize'); + } + }).bind('mouseleave.resizable', {target:this}, function(e){ + $(e.data.target).css('cursor', ''); + }).bind('mousedown.resizable', {target:this}, function(e){ + var dir = getDirection(e); + if (dir == '') return; + + function getCssValue(css) { + var val = parseInt($(e.data.target).css(css)); + if (isNaN(val)) { + return 0; + } else { + return val; + } + } + + var data = { + target: e.data.target, + dir: dir, + startLeft: getCssValue('left'), + startTop: getCssValue('top'), + left: getCssValue('left'), + top: getCssValue('top'), + startX: e.pageX, + startY: e.pageY, + startWidth: $(e.data.target).outerWidth(), + startHeight: $(e.data.target).outerHeight(), + width: $(e.data.target).outerWidth(), + height: $(e.data.target).outerHeight(), + deltaWidth: $(e.data.target).outerWidth() - $(e.data.target).width(), + deltaHeight: $(e.data.target).outerHeight() - $(e.data.target).height() + }; + $(document).bind('mousedown.resizable', data, doDown); + $(document).bind('mousemove.resizable', data, doMove); + $(document).bind('mouseup.resizable', data, doUp); + $('body').css('cursor', dir+'-resize'); + }); + + // get the resize direction + function getDirection(e) { + var tt = $(e.data.target); + var dir = ''; + var offset = tt.offset(); + var width = tt.outerWidth(); + var height = tt.outerHeight(); + var edge = opts.edge; + if (e.pageY > offset.top && e.pageY < offset.top + edge) { + dir += 'n'; + } else if (e.pageY < offset.top + height && e.pageY > offset.top + height - edge) { + dir += 's'; + } + if (e.pageX > offset.left && e.pageX < offset.left + edge) { + dir += 'w'; + } else if (e.pageX < offset.left + width && e.pageX > offset.left + width - edge) { + dir += 'e'; + } + + var handles = opts.handles.split(','); + for(var i=0; i' + + '
                                                          ' + + '' + + '' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '' + + '').insertAfter(target); + var t = $(target); + t.addClass('slider-f').hide(); + var name = t.attr('name'); + if (name){ + slider.find('input.slider-value').attr('name', name); + t.removeAttr('name').attr('sliderName', name); + } + slider.bind('_resize', function(e,force){ + if ($(this).hasClass('easyui-fluid') || force){ + setSize(target); + } + return false; + }); + return slider; + } + + /** + * set the slider size, for vertical slider, the height property is required + */ + function setSize(target, param){ + var state = $.data(target, 'slider'); + var opts = state.options; + var slider = state.slider; + + if (param){ + if (param.width) opts.width = param.width; + if (param.height) opts.height = param.height; + } + slider._size(opts); + if (opts.mode == 'h'){ + slider.css('height', ''); + slider.children('div').css('height', ''); + } else { + slider.css('width', ''); + slider.children('div').css('width', ''); + slider.children('div.slider-rule,div.slider-rulelabel,div.slider-inner')._outerHeight(slider._outerHeight()); + } + initValue(target); + } + + /** + * show slider rule if needed + */ + function showRule(target){ + var state = $.data(target, 'slider'); + var opts = state.options; + var slider = state.slider; + + var aa = opts.mode == 'h' ? opts.rule : opts.rule.slice(0).reverse(); + if (opts.reversed){ + aa = aa.slice(0).reverse(); + } + _build(aa); + + function _build(aa){ + var rule = slider.find('div.slider-rule'); + var label = slider.find('div.slider-rulelabel'); + rule.empty(); + label.empty(); + for(var i=0; i').appendTo(rule); + span.css((opts.mode=='h'?'left':'top'), distance); + + // show the labels + if (aa[i] != '|'){ + span = $('').appendTo(label); + span.html(aa[i]); + if (opts.mode == 'h'){ + span.css({ + left: distance, + marginLeft: -Math.round(span.outerWidth()/2) + }); + } else { + span.css({ + top: distance, + marginTop: -Math.round(span.outerHeight()/2) + }); + } + } + } + } + } + + /** + * build the slider and set some properties + */ + function buildSlider(target){ + var state = $.data(target, 'slider'); + var opts = state.options; + var slider = state.slider; + + slider.removeClass('slider-h slider-v slider-disabled'); + slider.addClass(opts.mode == 'h' ? 'slider-h' : 'slider-v'); + slider.addClass(opts.disabled ? 'slider-disabled' : ''); + + var inner = slider.find('.slider-inner'); + inner.html( + '' + + '' + ); + if (opts.range){ + inner.append( + '' + + '' + ); + } + + slider.find('a.slider-handle').draggable({ + axis:opts.mode, + cursor:'pointer', + disabled: opts.disabled, + onDrag:function(e){ + var left = e.data.left; + var width = slider.width(); + if (opts.mode!='h'){ + left = e.data.top; + width = slider.height(); + } + if (left < 0 || left > width) { + return false; + } else { + setPos(left, this); + return false; + } + }, + onStartDrag:function(){ + state.isDragging = true; + opts.onSlideStart.call(target, opts.value); + }, + onStopDrag:function(e){ + setPos(opts.mode=='h'?e.data.left:e.data.top, this); + opts.onSlideEnd.call(target, opts.value); + opts.onComplete.call(target, opts.value); + state.isDragging = false; + } + }); + slider.find('div.slider-inner').unbind('.slider').bind('mousedown.slider', function(e){ + if (state.isDragging || opts.disabled){return} + var pos = $(this).offset(); + setPos(opts.mode=='h'?(e.pageX-pos.left):(e.pageY-pos.top)); + opts.onComplete.call(target, opts.value); + }); + + function setPos(pos, handle){ + var value = pos2value(target, pos); + var s = Math.abs(value % opts.step); + if (s < opts.step/2){ + value -= s; + } else { + value = value - s + opts.step; + } + if (opts.range){ + var v1 = opts.value[0]; + var v2 = opts.value[1]; + var m = parseFloat((v1+v2)/2); + if (handle){ + var isLeft = $(handle).nextAll('.slider-handle').length > 0; + if (value <= v2 && isLeft){ + v1 = value; + } else if (value >= v1 && (!isLeft)){ + v2 = value; + } + } else { + if (value < v1){ + v1 = value; + } else if (value > v2){ + v2 = value; + } else { + value < m ? v1 = value : v2 = value; + } + } + $(target).slider('setValues', [v1,v2]); + } else { + $(target).slider('setValue', value); + } + } + } + + /** + * set a specified value to slider + */ + function setValues(target, values){ + var state = $.data(target, 'slider'); + var opts = state.options; + var slider = state.slider; + var oldValues = $.isArray(opts.value) ? opts.value : [opts.value]; + var newValues = []; + + if (!$.isArray(values)){ + values = $.map(String(values).split(opts.separator), function(v){ + return parseFloat(v); + }); + } + + slider.find('.slider-value').remove(); + var name = $(target).attr('sliderName') || ''; + for(var i=0; i opts.max) value = opts.max; + + var input = $('').appendTo(slider); + input.attr('name', name); + input.val(value); + newValues.push(value); + + var handle = slider.find('.slider-handle:eq('+i+')'); + var tip = handle.next(); + var pos = value2pos(target, value); + if (opts.showTip){ + tip.show(); + tip.html(opts.tipFormatter.call(target, value)); + } else { + tip.hide(); + } + + if (opts.mode == 'h'){ + var style = 'left:'+pos+'px;'; + handle.attr('style', style); + tip.attr('style', style + 'margin-left:' + (-Math.round(tip.outerWidth()/2)) + 'px'); + } else { + var style = 'top:' + pos + 'px;'; + handle.attr('style', style); + tip.attr('style', style + 'margin-left:' + (-Math.round(tip.outerWidth())) + 'px'); + } + } + opts.value = opts.range ? newValues : newValues[0]; + $(target).val(opts.range ? newValues.join(opts.separator) : newValues[0]); + + if (oldValues.join(',') != newValues.join(',')){ + opts.onChange.call(target, opts.value, (opts.range?oldValues:oldValues[0])); + } + } + + function initValue(target){ + var opts = $.data(target, 'slider').options; + var fn = opts.onChange; + opts.onChange = function(){}; + setValues(target, opts.value); + opts.onChange = fn; + } + + /** + * translate value to slider position + */ + function value2pos(target, value){ + var state = $.data(target, 'slider'); + var opts = state.options; + var slider = state.slider; + var size = opts.mode == 'h' ? slider.width() : slider.height(); + var pos = opts.converter.toPosition.call(target, value, size); + if (opts.mode == 'v'){ + pos = slider.height() - pos; + } + if (opts.reversed){ + pos = size - pos; + } + return pos.toFixed(0); + } + + /** + * translate slider position to value + */ + function pos2value(target, pos){ + var state = $.data(target, 'slider'); + var opts = state.options; + var slider = state.slider; + var size = opts.mode == 'h' ? slider.width() : slider.height(); + var pos = opts.mode=='h' ? (opts.reversed?(size-pos):pos) : (opts.reversed?pos:(size-pos)); + var value = opts.converter.toValue.call(target, pos, size); + return value.toFixed(0); + } + + $.fn.slider = function(options, param){ + if (typeof options == 'string'){ + return $.fn.slider.methods[options](this, param); + } + + options = options || {}; + return this.each(function(){ + var state = $.data(this, 'slider'); + if (state){ + $.extend(state.options, options); + } else { + state = $.data(this, 'slider', { + options: $.extend({}, $.fn.slider.defaults, $.fn.slider.parseOptions(this), options), + slider: init(this) + }); + $(this).removeAttr('disabled'); + } + + var opts = state.options; + opts.min = parseFloat(opts.min); + opts.max = parseFloat(opts.max); + if (opts.range){ + if (!$.isArray(opts.value)){ + opts.value = $.map(String(opts.value).split(opts.separator), function(v){ + return parseFloat(v); + }); + } + if (opts.value.length < 2){ + opts.value.push(opts.max); + } + } else { + opts.value = parseFloat(opts.value); + } + opts.step = parseFloat(opts.step); + opts.originalValue = opts.value; + + buildSlider(this); + showRule(this); + setSize(this); + }); + }; + + $.fn.slider.methods = { + options: function(jq){ + return $.data(jq[0], 'slider').options; + }, + destroy: function(jq){ + return jq.each(function(){ + $.data(this, 'slider').slider.remove(); + $(this).remove(); + }); + }, + resize: function(jq, param){ + return jq.each(function(){ + setSize(this, param); + }); + }, + getValue: function(jq){ + return jq.slider('options').value; + }, + getValues: function(jq){ + return jq.slider('options').value; + }, + setValue: function(jq, value){ + return jq.each(function(){ + setValues(this, [value]); + }); + }, + setValues: function(jq, values){ + return jq.each(function(){ + setValues(this, values); + }); + }, + clear: function(jq){ + return jq.each(function(){ + var opts = $(this).slider('options'); + setValues(this, opts.range?[opts.min,opts.max]:[opts.min]); + }); + }, + reset: function(jq){ + return jq.each(function(){ + var opts = $(this).slider('options'); + $(this).slider(opts.range?'setValues':'setValue', opts.originalValue); + }); + }, + enable: function(jq){ + return jq.each(function(){ + $.data(this, 'slider').options.disabled = false; + buildSlider(this); + }); + }, + disable: function(jq){ + return jq.each(function(){ + $.data(this, 'slider').options.disabled = true; + buildSlider(this); + }); + } + }; + + $.fn.slider.parseOptions = function(target){ + var t = $(target); + return $.extend({}, $.parser.parseOptions(target, [ + 'width','height','mode',{reversed:'boolean',showTip:'boolean',range:'boolean',min:'number',max:'number',step:'number'} + ]), { + value: (t.val() || undefined), + disabled: (t.attr('disabled') ? true : undefined), + rule: (t.attr('rule') ? eval(t.attr('rule')) : undefined) + }); + }; + + $.fn.slider.defaults = { + width: 'auto', + height: 'auto', + mode: 'h', // 'h'(horizontal) or 'v'(vertical) + reversed: false, + showTip: false, + disabled: false, + range: false, + value: 0, + separator: ',', + min: 0, + max: 100, + step: 1, + rule: [], // [0,'|',100] + tipFormatter: function(value){return value}, + converter:{ + toPosition:function(value, size){ + var opts = $(this).slider('options'); + return (value-opts.min)/(opts.max-opts.min)*size; + }, + toValue:function(pos, size){ + var opts = $(this).slider('options'); + return opts.min + (opts.max-opts.min)*(pos/size); + } + }, + onChange: function(value, oldValue){}, + onSlideStart: function(value){}, + onSlideEnd: function(value){}, + onComplete: function(value){} + }; +})(jQuery); diff --git a/src/main/webapp/jquery-easyui-1.4.4/src/jquery.tabs.js b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.tabs.js new file mode 100644 index 0000000..45b0e15 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.tabs.js @@ -0,0 +1,884 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +/** + * tabs - jQuery EasyUI + * + * Dependencies: + * panel + * linkbutton + * + */ +(function($){ + function getContentWidth(c){ + var w = 0; + $(c).children().each(function(){ + w += $(this).outerWidth(true); + }); + return w; + } + /** + * set the tabs scrollers to show or not, + * dependent on the tabs count and width + */ + function setScrollers(container) { + var opts = $.data(container, 'tabs').options; + if (opts.tabPosition == 'left' || opts.tabPosition == 'right' || !opts.showHeader){return} + + var header = $(container).children('div.tabs-header'); + var tool = header.children('div.tabs-tool:not(.tabs-tool-hidden)'); + var sLeft = header.children('div.tabs-scroller-left'); + var sRight = header.children('div.tabs-scroller-right'); + var wrap = header.children('div.tabs-wrap'); + + // set the tool height + var tHeight = header.outerHeight(); + if (opts.plain){ + tHeight -= tHeight - header.height(); + } + tool._outerHeight(tHeight); + + var tabsWidth = getContentWidth(header.find('ul.tabs')); + var cWidth = header.width() - tool._outerWidth(); + + if (tabsWidth > cWidth) { + sLeft.add(sRight).show()._outerHeight(tHeight); + if (opts.toolPosition == 'left'){ + tool.css({ + left: sLeft.outerWidth(), + right: '' + }); + wrap.css({ + marginLeft: sLeft.outerWidth() + tool._outerWidth(), + marginRight: sRight._outerWidth(), + width: cWidth - sLeft.outerWidth() - sRight.outerWidth() + }); + } else { + tool.css({ + left: '', + right: sRight.outerWidth() + }); + wrap.css({ + marginLeft: sLeft.outerWidth(), + marginRight: sRight.outerWidth() + tool._outerWidth(), + width: cWidth - sLeft.outerWidth() - sRight.outerWidth() + }); + } + } else { + sLeft.add(sRight).hide(); + if (opts.toolPosition == 'left'){ + tool.css({ + left: 0, + right: '' + }); + wrap.css({ + marginLeft: tool._outerWidth(), + marginRight: 0, + width: cWidth + }); + } else { + tool.css({ + left: '', + right: 0 + }); + wrap.css({ + marginLeft: 0, + marginRight: tool._outerWidth(), + width: cWidth + }); + } + } + } + + function addTools(container){ + var opts = $.data(container, 'tabs').options; + var header = $(container).children('div.tabs-header'); + if (opts.tools) { + if (typeof opts.tools == 'string'){ + $(opts.tools).addClass('tabs-tool').appendTo(header); + $(opts.tools).show(); + } else { + header.children('div.tabs-tool').remove(); + var tools = $('
                                                          ').appendTo(header); + var tr = tools.find('tr'); + for(var i=0; i').appendTo(tr); + var tool = $('').appendTo(td); + tool[0].onclick = eval(opts.tools[i].handler || function(){}); + tool.linkbutton($.extend({}, opts.tools[i], { + plain: true + })); + } + } + } else { + header.children('div.tabs-tool').remove(); + } + } + + function setSize(container, param) { + var state = $.data(container, 'tabs'); + var opts = state.options; + var cc = $(container); + + if (!opts.doSize){return} + if (param){ + $.extend(opts, { + width: param.width, + height: param.height + }); + } + cc._size(opts); + + var header = cc.children('div.tabs-header'); + var panels = cc.children('div.tabs-panels'); + var wrap = header.find('div.tabs-wrap'); + var ul = wrap.find('.tabs'); + ul.children('li').removeClass('tabs-first tabs-last'); + ul.children('li:first').addClass('tabs-first'); + ul.children('li:last').addClass('tabs-last'); + + if (opts.tabPosition == 'left' || opts.tabPosition == 'right'){ + header._outerWidth(opts.showHeader ? opts.headerWidth : 0); + panels._outerWidth(cc.width() - header.outerWidth()); + header.add(panels)._size('height', isNaN(parseInt(opts.height)) ? '' : cc.height()); + wrap._outerWidth(header.width()); + ul._outerWidth(wrap.width()).css('height',''); + } else { + header.children('div.tabs-scroller-left,div.tabs-scroller-right,div.tabs-tool:not(.tabs-tool-hidden)').css('display', opts.showHeader?'block':'none'); + header._outerWidth(cc.width()).css('height',''); + if (opts.showHeader){ + header.css('background-color',''); + wrap.css('height',''); + } else { + header.css('background-color','transparent'); + header._outerHeight(0); + wrap._outerHeight(0); + } + ul._outerHeight(opts.tabHeight).css('width',''); + ul._outerHeight(ul.outerHeight()-ul.height()-1+opts.tabHeight).css('width',''); + + panels._size('height', isNaN(parseInt(opts.height)) ? '' : (cc.height()-header.outerHeight())); + panels._size('width', cc.width()); + } + + if (state.tabs.length){ + var d1 = ul.outerWidth(true) - ul.width(); + var li = ul.children('li:first'); + var d2 = li.outerWidth(true) - li.width(); + var hwidth = header.width() - header.children('.tabs-tool:not(.tabs-tool-hidden)')._outerWidth(); + var justifiedWidth = Math.floor((hwidth-d1-d2*state.tabs.length)/state.tabs.length); + + $.map(state.tabs, function(p){ + setTabSize(p, (opts.justified && $.inArray(opts.tabPosition,['top','bottom'])>=0) ? justifiedWidth : undefined); + }); + if (opts.justified && $.inArray(opts.tabPosition,['top','bottom'])>=0){ + var deltaWidth = hwidth - d1 - getContentWidth(ul); + setTabSize(state.tabs[state.tabs.length-1], justifiedWidth+deltaWidth); + } + } + setScrollers(container); + + function setTabSize(p, width){ + var p_opts = p.panel('options'); + var p_t = p_opts.tab.find('a.tabs-inner'); + var width = width ? width : (parseInt(p_opts.tabWidth||opts.tabWidth||undefined)); + if (width){ + p_t._outerWidth(width); + } else { + p_t.css('width', ''); + } + p_t._outerHeight(opts.tabHeight); + p_t.css('lineHeight', p_t.height()+'px'); + p_t.find('.easyui-fluid:visible').triggerHandler('_resize'); + } + } + + /** + * set selected tab panel size + */ + function setSelectedSize(container){ + var opts = $.data(container, 'tabs').options; + var tab = getSelectedTab(container); + if (tab){ + var panels = $(container).children('div.tabs-panels'); + var width = opts.width=='auto' ? 'auto' : panels.width(); + var height = opts.height=='auto' ? 'auto' : panels.height(); + tab.panel('resize', { + width: width, + height: height + }); + } + } + + /** + * wrap the tabs header and body + */ + function wrapTabs(container) { + var tabs = $.data(container, 'tabs').tabs; + var cc = $(container).addClass('tabs-container'); + var panels = $('
                                                          ').insertBefore(cc); + cc.children('div').each(function(){ + panels[0].appendChild(this); + }); + cc[0].appendChild(panels[0]); + $('
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '
                                                            ' + + '
                                                            ' + + '
                                                            ').prependTo(container); + + cc.children('div.tabs-panels').children('div').each(function(i){ + var opts = $.extend({}, $.parser.parseOptions(this), { + disabled: ($(this).attr('disabled') ? true : undefined), + selected: ($(this).attr('selected') ? true : undefined) + }); + createTab(container, opts, $(this)); + }); + + cc.children('div.tabs-header').find('.tabs-scroller-left, .tabs-scroller-right').hover( + function(){$(this).addClass('tabs-scroller-over');}, + function(){$(this).removeClass('tabs-scroller-over');} + ); + cc.bind('_resize', function(e,force){ + if ($(this).hasClass('easyui-fluid') || force){ + setSize(container); + setSelectedSize(container); + } + return false; + }); + } + + function bindEvents(container){ + var state = $.data(container, 'tabs') + var opts = state.options; + $(container).children('div.tabs-header').unbind().bind('click', function(e){ + if ($(e.target).hasClass('tabs-scroller-left')){ + $(container).tabs('scrollBy', -opts.scrollIncrement); + } else if ($(e.target).hasClass('tabs-scroller-right')){ + $(container).tabs('scrollBy', opts.scrollIncrement); + } else { + var li = $(e.target).closest('li'); + if (li.hasClass('tabs-disabled')){return false;} + var a = $(e.target).closest('a.tabs-close'); + if (a.length){ + closeTab(container, getLiIndex(li)); + } else if (li.length){ +// selectTab(container, getLiIndex(li)); + var index = getLiIndex(li); + var popts = state.tabs[index].panel('options'); + if (popts.collapsible){ + popts.closed ? selectTab(container, index) : unselectTab(container, index); + } else { + selectTab(container, index); + } + } + return false; + } + }).bind('contextmenu', function(e){ + var li = $(e.target).closest('li'); + if (li.hasClass('tabs-disabled')){return;} + if (li.length){ + opts.onContextMenu.call(container, e, li.find('span.tabs-title').html(), getLiIndex(li)); + } + }); + + function getLiIndex(li){ + var index = 0; + li.parent().children('li').each(function(i){ + if (li[0] == this){ + index = i; + return false; + } + }); + return index; + } + } + + function setProperties(container){ + var opts = $.data(container, 'tabs').options; + var header = $(container).children('div.tabs-header'); + var panels = $(container).children('div.tabs-panels'); + + header.removeClass('tabs-header-top tabs-header-bottom tabs-header-left tabs-header-right'); + panels.removeClass('tabs-panels-top tabs-panels-bottom tabs-panels-left tabs-panels-right'); + if (opts.tabPosition == 'top'){ + header.insertBefore(panels); + } else if (opts.tabPosition == 'bottom'){ + header.insertAfter(panels); + header.addClass('tabs-header-bottom'); + panels.addClass('tabs-panels-top'); + } else if (opts.tabPosition == 'left'){ + header.addClass('tabs-header-left'); + panels.addClass('tabs-panels-right'); + } else if (opts.tabPosition == 'right'){ + header.addClass('tabs-header-right'); + panels.addClass('tabs-panels-left'); + } + + if (opts.plain == true) { + header.addClass('tabs-header-plain'); + } else { + header.removeClass('tabs-header-plain'); + } + header.removeClass('tabs-header-narrow').addClass(opts.narrow?'tabs-header-narrow':''); + var tabs = header.find('.tabs'); + tabs.removeClass('tabs-pill').addClass(opts.pill?'tabs-pill':''); + tabs.removeClass('tabs-narrow').addClass(opts.narrow?'tabs-narrow':''); + tabs.removeClass('tabs-justified').addClass(opts.justified?'tabs-justified':''); + if (opts.border == true){ + header.removeClass('tabs-header-noborder'); + panels.removeClass('tabs-panels-noborder'); + } else { + header.addClass('tabs-header-noborder'); + panels.addClass('tabs-panels-noborder'); + } + opts.doSize = true; + } + + function createTab(container, options, pp) { + options = options || {}; + var state = $.data(container, 'tabs'); + var tabs = state.tabs; + if (options.index == undefined || options.index > tabs.length){options.index = tabs.length} + if (options.index < 0){options.index = 0} + + var ul = $(container).children('div.tabs-header').find('ul.tabs'); + var panels = $(container).children('div.tabs-panels'); + var tab = $( + '
                                                          • ' + + '' + + '' + + '' + + '' + + '
                                                          • '); + if (!pp){pp = $('
                                                            ');} + if (options.index >= tabs.length){ + tab.appendTo(ul); + pp.appendTo(panels); + tabs.push(pp); + } else { + tab.insertBefore(ul.children('li:eq('+options.index+')')); + pp.insertBefore(panels.children('div.panel:eq('+options.index+')')); + tabs.splice(options.index, 0, pp); + } + + // create panel + pp.panel($.extend({}, options, { + tab: tab, + border: false, + noheader: true, + closed: true, + doSize: false, + iconCls: (options.icon ? options.icon : undefined), + onLoad: function(){ + if (options.onLoad){ + options.onLoad.call(this, arguments); + } + state.options.onLoad.call(container, $(this)); + }, + onBeforeOpen: function(){ + if (options.onBeforeOpen){ + if (options.onBeforeOpen.call(this) == false){return false;} + } + var p = $(container).tabs('getSelected'); + if (p){ + if (p[0] != this){ + $(container).tabs('unselect', getTabIndex(container, p)); + p = $(container).tabs('getSelected'); + if (p){ + return false; + } + } else { + setSelectedSize(container); + return false; + } + } + + var popts = $(this).panel('options'); + popts.tab.addClass('tabs-selected'); + // scroll the tab to center position if required. + var wrap = $(container).find('>div.tabs-header>div.tabs-wrap'); + var left = popts.tab.position().left; + var right = left + popts.tab.outerWidth(); + if (left < 0 || right > wrap.width()){ + var deltaX = left - (wrap.width()-popts.tab.width()) / 2; + $(container).tabs('scrollBy', deltaX); + } else { + $(container).tabs('scrollBy', 0); + } + + var panel = $(this).panel('panel'); + panel.css('display','block'); + setSelectedSize(container); + panel.css('display','none'); + }, + onOpen: function(){ + if (options.onOpen){ + options.onOpen.call(this); + } + var popts = $(this).panel('options'); + state.selectHis.push(popts.title); + state.options.onSelect.call(container, popts.title, getTabIndex(container, this)); + }, + onBeforeClose: function(){ + if (options.onBeforeClose){ + if (options.onBeforeClose.call(this) == false){return false;} + } + $(this).panel('options').tab.removeClass('tabs-selected'); + }, + onClose: function(){ + if (options.onClose){ + options.onClose.call(this); + } + var popts = $(this).panel('options'); + state.options.onUnselect.call(container, popts.title, getTabIndex(container, this)); + } + })); + + // only update the tab header + $(container).tabs('update', { + tab: pp, + options: pp.panel('options'), + type: 'header' + }); + } + + function addTab(container, options) { + var state = $.data(container, 'tabs'); + var opts = state.options; + if (options.selected == undefined) options.selected = true; + + createTab(container, options); + opts.onAdd.call(container, options.title, options.index); + if (options.selected){ + selectTab(container, options.index); // select the added tab panel + } + } + + /** + * update tab panel, param has following properties: + * tab: the tab panel to be updated + * options: the tab panel options + * type: the update type, possible values are: 'header','body','all' + */ + function updateTab(container, param){ + param.type = param.type || 'all'; + var selectHis = $.data(container, 'tabs').selectHis; + var pp = param.tab; // the tab panel + var opts = pp.panel('options'); // get the tab panel options + var oldTitle = opts.title; + $.extend(opts, param.options, { + iconCls: (param.options.icon ? param.options.icon : undefined) + }); + + if (param.type == 'all' || param.type == 'body'){ + pp.panel(); + } + if (param.type == 'all' || param.type == 'header'){ + var tab = opts.tab; + + if (opts.header){ + tab.find('.tabs-inner').html($(opts.header)); + } else { + var s_title = tab.find('span.tabs-title'); + var s_icon = tab.find('span.tabs-icon'); + s_title.html(opts.title); + s_icon.attr('class', 'tabs-icon'); + + tab.find('a.tabs-close').remove(); + if (opts.closable){ + s_title.addClass('tabs-closable'); + $('').appendTo(tab); + } else{ + s_title.removeClass('tabs-closable'); + } + if (opts.iconCls){ + s_title.addClass('tabs-with-icon'); + s_icon.addClass(opts.iconCls); + } else { + s_title.removeClass('tabs-with-icon'); + } + if (opts.tools){ + var p_tool = tab.find('span.tabs-p-tool'); + if (!p_tool.length){ + var p_tool = $('').insertAfter(tab.find('a.tabs-inner')); + } + if ($.isArray(opts.tools)){ + p_tool.empty(); + for(var i=0; i').appendTo(p_tool); + t.addClass(opts.tools[i].iconCls); + if (opts.tools[i].handler){ + t.bind('click', {handler:opts.tools[i].handler}, function(e){ + if ($(this).parents('li').hasClass('tabs-disabled')){return;} + e.data.handler.call(this); + }); + } + } + } else { + $(opts.tools).children().appendTo(p_tool); + } + var pr = p_tool.children().length * 12; + if (opts.closable) { + pr += 8; + } else { + pr -= 3; + p_tool.css('right','5px'); + } + s_title.css('padding-right', pr+'px'); + } else { + tab.find('span.tabs-p-tool').remove(); + s_title.css('padding-right', ''); + } + } + if (oldTitle != opts.title){ + for(var i=0; i= tabs.length){ + return null; + } else { + var tab = tabs[which]; + if (removeit) { + tabs.splice(which, 1); + } + return tab; + } + } + for(var i=0; i.tabs-header>.tabs-tool'); + if (visible){ + tool.removeClass('tabs-tool-hidden').show(); + } else { + tool.addClass('tabs-tool-hidden').hide(); + } + $(container).tabs('resize').tabs('scrollBy', 0); + } + + + $.fn.tabs = function(options, param){ + if (typeof options == 'string') { + return $.fn.tabs.methods[options](this, param); + } + + options = options || {}; + return this.each(function(){ + var state = $.data(this, 'tabs'); + if (state) { + $.extend(state.options, options); + } else { + $.data(this, 'tabs', { + options: $.extend({},$.fn.tabs.defaults, $.fn.tabs.parseOptions(this), options), + tabs: [], + selectHis: [] + }); + wrapTabs(this); + } + + addTools(this); + setProperties(this); + setSize(this); + bindEvents(this); + + doFirstSelect(this); + }); + }; + + $.fn.tabs.methods = { + options: function(jq){ + var cc = jq[0]; + var opts = $.data(cc, 'tabs').options; + var s = getSelectedTab(cc); + opts.selected = s ? getTabIndex(cc, s) : -1; + return opts; + }, + tabs: function(jq){ + return $.data(jq[0], 'tabs').tabs; + }, + resize: function(jq, param){ + return jq.each(function(){ + setSize(this, param); + setSelectedSize(this); + }); + }, + add: function(jq, options){ + return jq.each(function(){ + addTab(this, options); + }); + }, + close: function(jq, which){ + return jq.each(function(){ + closeTab(this, which); + }); + }, + getTab: function(jq, which){ + return getTab(jq[0], which); + }, + getTabIndex: function(jq, tab){ + return getTabIndex(jq[0], tab); + }, + getSelected: function(jq){ + return getSelectedTab(jq[0]); + }, + select: function(jq, which){ + return jq.each(function(){ + selectTab(this, which); + }); + }, + unselect: function(jq, which){ + return jq.each(function(){ + unselectTab(this, which); + }); + }, + exists: function(jq, which){ + return exists(jq[0], which); + }, + update: function(jq, options){ + return jq.each(function(){ + updateTab(this, options); + }); + }, + enableTab: function(jq, which){ + return jq.each(function(){ + var opts = $(this).tabs('getTab', which).panel('options'); + opts.tab.removeClass('tabs-disabled'); + opts.disabled = false; + }); + }, + disableTab: function(jq, which){ + return jq.each(function(){ + var opts = $(this).tabs('getTab', which).panel('options'); + opts.tab.addClass('tabs-disabled'); + opts.disabled = true; + }); + }, + showHeader: function(jq){ + return jq.each(function(){ + showHeader(this, true); + }); + }, + hideHeader: function(jq){ + return jq.each(function(){ + showHeader(this, false); + }); + }, + showTool: function(jq){ + return jq.each(function(){ + showTool(this, true); + }); + }, + hideTool: function(jq){ + return jq.each(function(){ + showTool(this, false); + }); + }, + scrollBy: function(jq, deltaX){ // scroll the tab header by the specified amount of pixels + return jq.each(function(){ + var opts = $(this).tabs('options'); + var wrap = $(this).find('>div.tabs-header>div.tabs-wrap'); + var pos = Math.min(wrap._scrollLeft() + deltaX, getMaxScrollWidth()); + wrap.animate({scrollLeft: pos}, opts.scrollDuration); + + function getMaxScrollWidth(){ + var w = 0; + var ul = wrap.children('ul'); + ul.children('li').each(function(){ + w += $(this).outerWidth(true); + }); + return w - wrap.width() + (ul.outerWidth() - ul.width()); + } + }); + } + }; + + $.fn.tabs.parseOptions = function(target){ + return $.extend({}, $.parser.parseOptions(target, [ + 'tools','toolPosition','tabPosition', + {fit:'boolean',border:'boolean',plain:'boolean'}, + {headerWidth:'number',tabWidth:'number',tabHeight:'number',selected:'number'}, + {showHeader:'boolean',justified:'boolean',narrow:'boolean',pill:'boolean'} + ])); + }; + + $.fn.tabs.defaults = { + width: 'auto', + height: 'auto', + headerWidth: 150, // the tab header width, it is valid only when tabPosition set to 'left' or 'right' + tabWidth: 'auto', // the tab width + tabHeight: 27, // the tab height + selected: 0, // the initialized selected tab index + showHeader: true, + plain: false, + fit: false, + border: true, + justified: false, + narrow: false, + pill: false, + tools: null, + toolPosition: 'right', // left,right + tabPosition: 'top', // possible values: top,bottom + scrollIncrement: 100, + scrollDuration: 400, + onLoad: function(panel){}, + onSelect: function(title, index){}, + onUnselect: function(title, index){}, + onBeforeClose: function(title, index){}, + onClose: function(title, index){}, + onAdd: function(title, index){}, + onUpdate: function(title, index){}, + onContextMenu: function(e, title, index){} + }; +})(jQuery); diff --git a/src/main/webapp/jquery-easyui-1.4.4/src/jquery.window.js b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.window.js new file mode 100644 index 0000000..fbb93e1 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/src/jquery.window.js @@ -0,0 +1,374 @@ +/** + * jQuery EasyUI 1.4.4 + * + * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved. + * + * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php + * To use it on other terms please contact us: info@jeasyui.com + * + */ +/** + * window - jQuery EasyUI + * + * Dependencies: + * panel + * draggable + * resizable + * + */ +(function($){ + function moveWindow(target, param){ + var state = $.data(target, 'window'); + if (param){ + if (param.left != null) state.options.left = param.left; + if (param.top != null) state.options.top = param.top; + } + $(target).panel('move', state.options); + if (state.shadow){ + state.shadow.css({ + left: state.options.left, + top: state.options.top + }); + } + } + + /** + * center the window only horizontally + */ + function hcenter(target, tomove){ + var opts = $.data(target, 'window').options; + var pp = $(target).window('panel'); + var width = pp._outerWidth(); + if (opts.inline){ + var parent = pp.parent(); + opts.left = Math.ceil((parent.width() - width) / 2 + parent.scrollLeft()); + } else { + opts.left = Math.ceil(($(window)._outerWidth() - width) / 2 + $(document).scrollLeft()); + } + if (tomove){moveWindow(target);} + } + + /** + * center the window only vertically + */ + function vcenter(target, tomove){ + var opts = $.data(target, 'window').options; + var pp = $(target).window('panel'); + var height = pp._outerHeight(); + if (opts.inline){ + var parent = pp.parent(); + opts.top = Math.ceil((parent.height() - height) / 2 + parent.scrollTop()); + } else { + opts.top = Math.ceil(($(window)._outerHeight() - height) / 2 + $(document).scrollTop()); + } + if (tomove){moveWindow(target);} + } + + function create(target){ + var state = $.data(target, 'window'); + var opts = state.options; + var win = $(target).panel($.extend({}, state.options, { + border: false, + doSize: true, // size the panel, the property undefined in window component + closed: true, // close the panel + cls: 'window', + headerCls: 'window-header', + bodyCls: 'window-body ' + (opts.noheader ? 'window-body-noheader' : ''), + + onBeforeDestroy: function(){ + if (opts.onBeforeDestroy.call(target) == false){return false;} + if (state.shadow){state.shadow.remove();} + if (state.mask){state.mask.remove();} + }, + onClose: function(){ + if (state.shadow){state.shadow.hide();} + if (state.mask){state.mask.hide();} + opts.onClose.call(target); + }, + onOpen: function(){ + if (state.mask){ + state.mask.css($.extend({ + display:'block', + zIndex: $.fn.window.defaults.zIndex++ + }, $.fn.window.getMaskSize(target))); + } + if (state.shadow){ + state.shadow.css({ + display:'block', + zIndex: $.fn.window.defaults.zIndex++, + left: opts.left, + top: opts.top, + width: state.window._outerWidth(), + height: state.window._outerHeight() + }); + } + state.window.css('z-index', $.fn.window.defaults.zIndex++); + + opts.onOpen.call(target); + }, + onResize: function(width, height){ + var popts = $(this).panel('options'); + $.extend(opts, { + width: popts.width, + height: popts.height, + left: popts.left, + top: popts.top + }); + if (state.shadow){ + state.shadow.css({ + left: opts.left, + top: opts.top, + width: state.window._outerWidth(), + height: state.window._outerHeight() + }); + } + opts.onResize.call(target, width, height); + }, + onMinimize: function(){ + if (state.shadow){state.shadow.hide();} + if (state.mask){state.mask.hide();} + state.options.onMinimize.call(target); + }, + onBeforeCollapse: function(){ + if (opts.onBeforeCollapse.call(target) == false){return false;} + if (state.shadow){state.shadow.hide();} + }, + onExpand: function(){ + if (state.shadow){state.shadow.show();} + opts.onExpand.call(target); + } + })); + + state.window = win.panel('panel'); + + // create mask + if (state.mask){state.mask.remove();} + if (opts.modal){ + state.mask = $('').insertAfter(state.window); + } + + // create shadow + if (state.shadow){state.shadow.remove();} + if (opts.shadow){ + state.shadow = $('').insertAfter(state.window); + } + + // center and open the window + var closed = opts.closed; + if (opts.left == null){hcenter(target);} + if (opts.top == null){vcenter(target);} + moveWindow(target); + if (!closed){win.window('open');} + } + + + /** + * set window drag and resize property + */ + function setProperties(target){ + var state = $.data(target, 'window'); + + state.window.draggable({ + handle: '>div.panel-header>div.panel-title', + disabled: state.options.draggable == false, + onStartDrag: function(e){ + if (state.mask) state.mask.css('z-index', $.fn.window.defaults.zIndex++); + if (state.shadow) state.shadow.css('z-index', $.fn.window.defaults.zIndex++); + state.window.css('z-index', $.fn.window.defaults.zIndex++); + + if (!state.proxy){ + state.proxy = $('
                                                            ').insertAfter(state.window); + } + state.proxy.css({ + display:'none', + zIndex: $.fn.window.defaults.zIndex++, + left: e.data.left, + top: e.data.top + }); + state.proxy._outerWidth(state.window._outerWidth()); + state.proxy._outerHeight(state.window._outerHeight()); + setTimeout(function(){ + if (state.proxy) state.proxy.show(); + }, 500); + }, + onDrag: function(e){ + state.proxy.css({ + display:'block', + left: e.data.left, + top: e.data.top + }); + return false; + }, + onStopDrag: function(e){ + state.options.left = e.data.left; + state.options.top = e.data.top; + $(target).window('move'); + state.proxy.remove(); + state.proxy = null; + } + }); + + state.window.resizable({ + disabled: state.options.resizable == false, + onStartResize:function(e){ + if (state.pmask){state.pmask.remove();} + state.pmask = $('
                                                            ').insertAfter(state.window); + state.pmask.css({ + zIndex: $.fn.window.defaults.zIndex++, + left: e.data.left, + top: e.data.top, + width: state.window._outerWidth(), + height: state.window._outerHeight() + }); + if (state.proxy){state.proxy.remove();} + state.proxy = $('
                                                            ').insertAfter(state.window); + state.proxy.css({ + zIndex: $.fn.window.defaults.zIndex++, + left: e.data.left, + top: e.data.top + }); + state.proxy._outerWidth(e.data.width)._outerHeight(e.data.height); + }, + onResize: function(e){ + state.proxy.css({ + left: e.data.left, + top: e.data.top + }); + state.proxy._outerWidth(e.data.width); + state.proxy._outerHeight(e.data.height); + return false; + }, + onStopResize: function(e){ + $(target).window('resize', e.data); + state.pmask.remove(); + state.pmask = null; + state.proxy.remove(); + state.proxy = null; + } + }); + } + + // function getPageArea() { + // if (document.compatMode == 'BackCompat') { + // return { + // width: Math.max(document.body.scrollWidth, document.body.clientWidth), + // height: Math.max(document.body.scrollHeight, document.body.clientHeight) + // } + // } else { + // return { + // width: Math.max(document.documentElement.scrollWidth, document.documentElement.clientWidth), + // height: Math.max(document.documentElement.scrollHeight, document.documentElement.clientHeight) + // } + // } + // } + + // when window resize, reset the width and height of the window's mask + $(window).resize(function(){ + $('body>div.window-mask').css({ + width: $(window)._outerWidth(), + height: $(window)._outerHeight() + }); + setTimeout(function(){ + $('body>div.window-mask').css($.fn.window.getMaskSize()); + }, 50); + }); + + $.fn.window = function(options, param){ + if (typeof options == 'string'){ + var method = $.fn.window.methods[options]; + if (method){ + return method(this, param); + } else { + return this.panel(options, param); + } + } + + options = options || {}; + return this.each(function(){ + var state = $.data(this, 'window'); + if (state){ + $.extend(state.options, options); + } else { + state = $.data(this, 'window', { + options: $.extend({}, $.fn.window.defaults, $.fn.window.parseOptions(this), options) + }); + if (!state.options.inline){ + document.body.appendChild(this); + } + } + create(this); + setProperties(this); + }); + }; + + $.fn.window.methods = { + options: function(jq){ + var popts = jq.panel('options'); + var wopts = $.data(jq[0], 'window').options; + return $.extend(wopts, { + closed: popts.closed, + collapsed: popts.collapsed, + minimized: popts.minimized, + maximized: popts.maximized + }); + }, + window: function(jq){ + return $.data(jq[0], 'window').window; + }, + move: function(jq, param){ + return jq.each(function(){ + moveWindow(this, param); + }); + }, + hcenter: function(jq){ + return jq.each(function(){ + hcenter(this, true); + }); + }, + vcenter: function(jq){ + return jq.each(function(){ + vcenter(this, true); + }); + }, + center: function(jq){ + return jq.each(function(){ + hcenter(this); + vcenter(this); + moveWindow(this); + }); + } + }; + + $.fn.window.getMaskSize = function(target){ + var state = $(target).data('window'); + var inline = (state && state.options.inline); + return { + width: (inline ? '100%' : $(document).width()), + height: (inline ? '100%' : $(document).height()) + }; + }; + + $.fn.window.parseOptions = function(target){ + return $.extend({}, $.fn.panel.parseOptions(target), $.parser.parseOptions(target, [ + {draggable:'boolean',resizable:'boolean',shadow:'boolean',modal:'boolean',inline:'boolean'} + ])); + }; + + // Inherited from $.fn.panel.defaults + $.fn.window.defaults = $.extend({}, $.fn.panel.defaults, { + zIndex: 9000, + draggable: true, + resizable: true, + shadow: true, + modal: false, + inline: false, // true to stay inside its parent, false to go on top of all elements + + // window's property which difference from panel + title: 'New Window', + collapsible: true, + minimizable: true, + maximizable: true, + closable: true, + closed: false + }); +})(jQuery); diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/themes/black/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/accordion.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/accordion.css new file mode 100644 index 0000000..a0f6ddc --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/accordion.css @@ -0,0 +1,41 @@ +.accordion { + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.accordion .accordion-header { + border-width: 0 0 1px; + cursor: pointer; +} +.accordion .accordion-body { + border-width: 0 0 1px; +} +.accordion-noborder { + border-width: 0; +} +.accordion-noborder .accordion-header { + border-width: 0 0 1px; +} +.accordion-noborder .accordion-body { + border-width: 0 0 1px; +} +.accordion-collapse { + background: url('images/accordion_arrows.png') no-repeat 0 0; +} +.accordion-expand { + background: url('images/accordion_arrows.png') no-repeat -16px 0; +} +.accordion { + background: #666; + border-color: #000; +} +.accordion .accordion-header { + background: #3d3d3d; + filter: none; +} +.accordion .accordion-header-selected { + background: #0052A3; +} +.accordion .accordion-header-selected .panel-title { + color: #fff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/calendar.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/calendar.css new file mode 100644 index 0000000..e862e22 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/calendar.css @@ -0,0 +1,197 @@ +.calendar { + border-width: 1px; + border-style: solid; + padding: 1px; + overflow: hidden; +} +.calendar table { + table-layout: fixed; + border-collapse: separate; + font-size: 12px; + width: 100%; + height: 100%; +} +.calendar table td, +.calendar table th { + font-size: 12px; +} +.calendar-noborder { + border: 0; +} +.calendar-header { + position: relative; + height: 22px; +} +.calendar-title { + text-align: center; + height: 22px; +} +.calendar-title span { + position: relative; + display: inline-block; + top: 2px; + padding: 0 3px; + height: 18px; + line-height: 18px; + font-size: 12px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth, +.calendar-nextmonth, +.calendar-prevyear, +.calendar-nextyear { + position: absolute; + top: 50%; + margin-top: -7px; + width: 14px; + height: 14px; + cursor: pointer; + font-size: 1px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth { + left: 20px; + background: url('images/calendar_arrows.png') no-repeat -18px -2px; +} +.calendar-nextmonth { + right: 20px; + background: url('images/calendar_arrows.png') no-repeat -34px -2px; +} +.calendar-prevyear { + left: 3px; + background: url('images/calendar_arrows.png') no-repeat -1px -2px; +} +.calendar-nextyear { + right: 3px; + background: url('images/calendar_arrows.png') no-repeat -49px -2px; +} +.calendar-body { + position: relative; +} +.calendar-body th, +.calendar-body td { + text-align: center; +} +.calendar-day { + border: 0; + padding: 1px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-other-month { + opacity: 0.3; + filter: alpha(opacity=30); +} +.calendar-disabled { + opacity: 0.6; + filter: alpha(opacity=60); + cursor: default; +} +.calendar-menu { + position: absolute; + top: 0; + left: 0; + width: 180px; + height: 150px; + padding: 5px; + font-size: 12px; + display: none; + overflow: hidden; +} +.calendar-menu-year-inner { + text-align: center; + padding-bottom: 5px; +} +.calendar-menu-year { + width: 40px; + text-align: center; + border-width: 1px; + border-style: solid; + margin: 0; + padding: 2px; + font-weight: bold; + font-size: 12px; +} +.calendar-menu-prev, +.calendar-menu-next { + display: inline-block; + width: 21px; + height: 21px; + vertical-align: top; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-menu-prev { + margin-right: 10px; + background: url('images/calendar_arrows.png') no-repeat 2px 2px; +} +.calendar-menu-next { + margin-left: 10px; + background: url('images/calendar_arrows.png') no-repeat -45px 2px; +} +.calendar-menu-month { + text-align: center; + cursor: pointer; + font-weight: bold; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-body th, +.calendar-menu-month { + color: #ffffff; +} +.calendar-day { + color: #fff; +} +.calendar-sunday { + color: #CC2222; +} +.calendar-saturday { + color: #00ee00; +} +.calendar-today { + color: #0000ff; +} +.calendar-menu-year { + border-color: #000; +} +.calendar { + border-color: #000; +} +.calendar-header { + background: #3d3d3d; +} +.calendar-body, +.calendar-menu { + background: #666; +} +.calendar-body th { + background: #555; + padding: 2px 0; +} +.calendar-hover, +.calendar-nav-hover, +.calendar-menu-hover { + background-color: #777; + color: #fff; +} +.calendar-hover { + border: 1px solid #555; + padding: 0; +} +.calendar-selected { + background-color: #0052A3; + color: #fff; + border: 1px solid #00458a; + padding: 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/combo.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/combo.css new file mode 100644 index 0000000..ca0e461 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/combo.css @@ -0,0 +1,60 @@ +.combo { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.combo .combo-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0px 2px; + vertical-align: baseline; +} +.combo-arrow { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.combo-arrow-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.combo-panel { + overflow: auto; +} +.combo-arrow { + background: url('images/combo_arrow.png') no-repeat center center; +} +.combo-panel { + background-color: #666; +} +.combo { + border-color: #000; + background-color: #fff; +} +.combo-arrow { + background-color: #3d3d3d; +} +.combo-arrow-hover { + background-color: #777; +} +.combo-arrow:hover { + background-color: #777; +} +.combo .textbox-icon-disabled:hover { + cursor: default; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/combobox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/combobox.css new file mode 100644 index 0000000..284332e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/combobox.css @@ -0,0 +1,24 @@ +.combobox-item, +.combobox-group { + font-size: 12px; + padding: 3px; + padding-right: 0px; +} +.combobox-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.combobox-gitem { + padding-left: 10px; +} +.combobox-group { + font-weight: bold; +} +.combobox-item-hover { + background-color: #777; + color: #fff; +} +.combobox-item-selected { + background-color: #0052A3; + color: #fff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/datagrid.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/datagrid.css new file mode 100644 index 0000000..c0d09f5 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/datagrid.css @@ -0,0 +1,276 @@ +.datagrid .panel-body { + overflow: hidden; + position: relative; +} +.datagrid-view { + position: relative; + overflow: hidden; +} +.datagrid-view1, +.datagrid-view2 { + position: absolute; + overflow: hidden; + top: 0; +} +.datagrid-view1 { + left: 0; +} +.datagrid-view2 { + right: 0; +} +.datagrid-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0.3; + filter: alpha(opacity=30); + display: none; +} +.datagrid-mask-msg { + position: absolute; + top: 50%; + margin-top: -20px; + padding: 10px 5px 10px 30px; + width: auto; + height: 16px; + border-width: 2px; + border-style: solid; + display: none; +} +.datagrid-sort-icon { + padding: 0; + display: none; +} +.datagrid-toolbar { + height: auto; + padding: 1px 2px; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #444; + border-right: 1px solid #777; + margin: 2px 1px; +} +.datagrid .datagrid-pager { + display: block; + margin: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.datagrid .datagrid-pager-top { + border-width: 0 0 1px 0; +} +.datagrid-header { + overflow: hidden; + cursor: default; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-header-inner { + float: left; + width: 10000px; +} +.datagrid-header-row, +.datagrid-row { + height: 25px; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-width: 0 1px 1px 0; + border-style: dotted; + margin: 0; + padding: 0; +} +.datagrid-cell, +.datagrid-cell-group, +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + margin: 0; + padding: 0 4px; + white-space: nowrap; + word-wrap: normal; + overflow: hidden; + height: 18px; + line-height: 18px; + font-size: 12px; +} +.datagrid-header .datagrid-cell { + height: auto; +} +.datagrid-header .datagrid-cell span { + font-size: 12px; +} +.datagrid-cell-group { + text-align: center; + text-overflow: ellipsis; +} +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + width: 30px; + text-align: center; + margin: 0; + padding: 0; +} +.datagrid-body { + margin: 0; + padding: 0; + overflow: auto; + zoom: 1; +} +.datagrid-view1 .datagrid-body-inner { + padding-bottom: 20px; +} +.datagrid-view1 .datagrid-body { + overflow: hidden; +} +.datagrid-footer { + overflow: hidden; +} +.datagrid-footer-inner { + border-width: 1px 0 0 0; + border-style: solid; + width: 10000px; + float: left; +} +.datagrid-row-editing .datagrid-cell { + height: auto; +} +.datagrid-header-check, +.datagrid-cell-check { + padding: 0; + width: 27px; + height: 18px; + font-size: 1px; + text-align: center; + overflow: hidden; +} +.datagrid-header-check input, +.datagrid-cell-check input { + margin: 0; + padding: 0; + width: 15px; + height: 18px; +} +.datagrid-resize-proxy { + position: absolute; + width: 1px; + height: 10000px; + top: 0; + cursor: e-resize; + display: none; +} +.datagrid-body .datagrid-editable { + margin: 0; + padding: 0; +} +.datagrid-body .datagrid-editable table { + width: 100%; + height: 100%; +} +.datagrid-body .datagrid-editable td { + border: 0; + margin: 0; + padding: 0; +} +.datagrid-view .datagrid-editable-input { + margin: 0; + padding: 2px 4px; + border: 1px solid #000; + font-size: 12px; + outline-style: none; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.datagrid-sort .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -64px center; +} +.datagrid-sort-desc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -16px center; +} +.datagrid-sort-asc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat 0px center; +} +.datagrid-row-collapse { + background: url('images/datagrid_icons.png') no-repeat -48px center; +} +.datagrid-row-expand { + background: url('images/datagrid_icons.png') no-repeat -32px center; +} +.datagrid-mask-msg { + background: #666 url('images/loading.gif') no-repeat scroll 5px center; +} +.datagrid-header, +.datagrid-td-rownumber { + background-color: #444; + background: -webkit-linear-gradient(top,#4c4c4c 0,#3f3f3f 100%); + background: -moz-linear-gradient(top,#4c4c4c 0,#3f3f3f 100%); + background: -o-linear-gradient(top,#4c4c4c 0,#3f3f3f 100%); + background: linear-gradient(to bottom,#4c4c4c 0,#3f3f3f 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4c4c4c,endColorstr=#3f3f3f,GradientType=0); +} +.datagrid-cell-rownumber { + color: #fff; +} +.datagrid-resize-proxy { + background: #cccccc; +} +.datagrid-mask { + background: #000; +} +.datagrid-mask-msg { + border-color: #000; +} +.datagrid-toolbar, +.datagrid-pager { + background: #555; +} +.datagrid-header, +.datagrid-toolbar, +.datagrid-pager, +.datagrid-footer-inner { + border-color: #222; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-color: #222; +} +.datagrid-htable, +.datagrid-btable, +.datagrid-ftable { + color: #fff; + border-collapse: separate; +} +.datagrid-row-alt { + background: #555; +} +.datagrid-row-over, +.datagrid-header td.datagrid-header-over { + background: #777; + color: #fff; + cursor: default; +} +.datagrid-row-selected { + background: #0052A3; + color: #fff; +} +.datagrid-row-editing .textbox, +.datagrid-row-editing .textbox-text { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/datalist.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/datalist.css new file mode 100644 index 0000000..94dd67e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/datalist.css @@ -0,0 +1,95 @@ +.datalist .datagrid-header { + border-width: 0; +} +.datalist .datagrid-group, +.m-list .m-list-group { + height: 25px; + line-height: 25px; + font-weight: bold; + overflow: hidden; + background-color: #444; + border-style: solid; + border-width: 0 0 1px 0; + border-color: #222; +} +.datalist .datagrid-group-expander { + display: none; +} +.datalist .datagrid-group-title { + padding: 0 4px; +} +.datalist .datagrid-btable { + width: 100%; + table-layout: fixed; +} +.datalist .datagrid-row td { + border-style: solid; + border-left-color: transparent; + border-right-color: transparent; + border-bottom-width: 0; +} +.datalist-lines .datagrid-row td { + border-bottom-width: 1px; +} +.datalist .datagrid-cell, +.m-list li { + width: auto; + height: auto; + padding: 2px 4px; + line-height: 18px; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link, +.m-list li>a { + display: block; + position: relative; + cursor: pointer; + color: #fff; + text-decoration: none; + overflow: hidden; + margin: -2px -4px; + padding: 2px 4px; + padding-right: 16px; + line-height: 18px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link::after, +.m-list li>a::after { + position: absolute; + display: block; + width: 8px; + height: 8px; + content: ''; + right: 6px; + top: 50%; + margin-top: -4px; + border-style: solid; + border-width: 1px 1px 0 0; + -ms-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} +.m-list { + margin: 0; + padding: 0; + list-style: none; +} +.m-list li { + border-style: solid; + border-width: 0 0 1px 0; + border-color: #222; +} +.m-list li>a:hover { + background: #777; + color: #fff; +} +.m-list .m-list-group { + padding: 0 4px; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/datebox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/datebox.css new file mode 100644 index 0000000..e368f64 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/datebox.css @@ -0,0 +1,36 @@ +.datebox-calendar-inner { + height: 180px; +} +.datebox-button { + height: 18px; + padding: 2px 5px; + text-align: center; +} +.datebox-button a { + font-size: 12px; + font-weight: bold; + text-decoration: none; + opacity: 0.6; + filter: alpha(opacity=60); +} +.datebox-button a:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.datebox-current, +.datebox-close { + float: left; +} +.datebox-close { + float: right; +} +.datebox .combo-arrow { + background-image: url('images/datebox_arrow.png'); + background-position: center center; +} +.datebox-button { + background-color: #555; +} +.datebox-button a { + color: #fff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/dialog.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/dialog.css new file mode 100644 index 0000000..ed832df --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/dialog.css @@ -0,0 +1,32 @@ +.dialog-content { + overflow: auto; +} +.dialog-toolbar { + padding: 2px 5px; +} +.dialog-tool-separator { + float: left; + height: 24px; + border-left: 1px solid #444; + border-right: 1px solid #777; + margin: 2px 1px; +} +.dialog-button { + padding: 5px; + text-align: right; +} +.dialog-button .l-btn { + margin-left: 5px; +} +.dialog-toolbar, +.dialog-button { + background: #555; + border-width: 1px; + border-style: solid; +} +.dialog-toolbar { + border-color: #000 #000 #222 #000; +} +.dialog-button { + border-color: #222 #000 #000 #000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/easyui.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/easyui.css new file mode 100644 index 0000000..597207a --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/easyui.css @@ -0,0 +1,2869 @@ +.panel { + overflow: hidden; + text-align: left; + margin: 0; + border: 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.panel-header, +.panel-body { + border-width: 1px; + border-style: solid; +} +.panel-header { + padding: 5px; + position: relative; +} +.panel-title { + background: url('images/blank.gif') no-repeat; +} +.panel-header-noborder { + border-width: 0 0 1px 0; +} +.panel-body { + overflow: auto; + border-top-width: 0; + padding: 0; +} +.panel-body-noheader { + border-top-width: 1px; +} +.panel-body-noborder { + border-width: 0px; +} +.panel-body-nobottom { + border-bottom-width: 0; +} +.panel-with-icon { + padding-left: 18px; +} +.panel-icon, +.panel-tool { + position: absolute; + top: 50%; + margin-top: -8px; + height: 16px; + overflow: hidden; +} +.panel-icon { + left: 5px; + width: 16px; +} +.panel-tool { + right: 5px; + width: auto; +} +.panel-tool a { + display: inline-block; + width: 16px; + height: 16px; + opacity: 0.6; + filter: alpha(opacity=60); + margin: 0 0 0 2px; + vertical-align: top; +} +.panel-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + background-color: #777; + -moz-border-radius: 3px 3px 3px 3px; + -webkit-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; +} +.panel-loading { + padding: 11px 0px 10px 30px; +} +.panel-noscroll { + overflow: hidden; +} +.panel-fit, +.panel-fit body { + height: 100%; + margin: 0; + padding: 0; + border: 0; + overflow: hidden; +} +.panel-loading { + background: url('images/loading.gif') no-repeat 10px 10px; +} +.panel-tool-close { + background: url('images/panel_tools.png') no-repeat -16px 0px; +} +.panel-tool-min { + background: url('images/panel_tools.png') no-repeat 0px 0px; +} +.panel-tool-max { + background: url('images/panel_tools.png') no-repeat 0px -16px; +} +.panel-tool-restore { + background: url('images/panel_tools.png') no-repeat -16px -16px; +} +.panel-tool-collapse { + background: url('images/panel_tools.png') no-repeat -32px 0; +} +.panel-tool-expand { + background: url('images/panel_tools.png') no-repeat -32px -16px; +} +.panel-header, +.panel-body { + border-color: #000; +} +.panel-header { + background-color: #3d3d3d; + background: -webkit-linear-gradient(top,#454545 0,#383838 100%); + background: -moz-linear-gradient(top,#454545 0,#383838 100%); + background: -o-linear-gradient(top,#454545 0,#383838 100%); + background: linear-gradient(to bottom,#454545 0,#383838 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#454545,endColorstr=#383838,GradientType=0); +} +.panel-body { + background-color: #666; + color: #fff; + font-size: 12px; +} +.panel-title { + font-size: 12px; + font-weight: bold; + color: #fff; + height: 16px; + line-height: 16px; +} +.panel-footer { + border: 1px solid #000; + overflow: hidden; + background: #555; +} +.panel-footer-noborder { + border-width: 1px 0 0 0; +} +.accordion { + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.accordion .accordion-header { + border-width: 0 0 1px; + cursor: pointer; +} +.accordion .accordion-body { + border-width: 0 0 1px; +} +.accordion-noborder { + border-width: 0; +} +.accordion-noborder .accordion-header { + border-width: 0 0 1px; +} +.accordion-noborder .accordion-body { + border-width: 0 0 1px; +} +.accordion-collapse { + background: url('images/accordion_arrows.png') no-repeat 0 0; +} +.accordion-expand { + background: url('images/accordion_arrows.png') no-repeat -16px 0; +} +.accordion { + background: #666; + border-color: #000; +} +.accordion .accordion-header { + background: #3d3d3d; + filter: none; +} +.accordion .accordion-header-selected { + background: #0052A3; +} +.accordion .accordion-header-selected .panel-title { + color: #fff; +} +.window { + overflow: hidden; + padding: 5px; + border-width: 1px; + border-style: solid; +} +.window .window-header { + background: transparent; + padding: 0px 0px 6px 0px; +} +.window .window-body { + border-width: 1px; + border-style: solid; + border-top-width: 0px; +} +.window .window-body-noheader { + border-top-width: 1px; +} +.window .panel-body-nobottom { + border-bottom-width: 0; +} +.window .window-header .panel-icon, +.window .window-header .panel-tool { + top: 50%; + margin-top: -11px; +} +.window .window-header .panel-icon { + left: 1px; +} +.window .window-header .panel-tool { + right: 1px; +} +.window .window-header .panel-with-icon { + padding-left: 18px; +} +.window-proxy { + position: absolute; + overflow: hidden; +} +.window-proxy-mask { + position: absolute; + filter: alpha(opacity=5); + opacity: 0.05; +} +.window-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + filter: alpha(opacity=40); + opacity: 0.40; + font-size: 1px; + overflow: hidden; +} +.window, +.window-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.window-shadow { + background: #777; + -moz-box-shadow: 2px 2px 3px #787878; + -webkit-box-shadow: 2px 2px 3px #787878; + box-shadow: 2px 2px 3px #787878; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.window, +.window .window-body { + border-color: #000; +} +.window { + background-color: #3d3d3d; + background: -webkit-linear-gradient(top,#454545 0,#383838 20%); + background: -moz-linear-gradient(top,#454545 0,#383838 20%); + background: -o-linear-gradient(top,#454545 0,#383838 20%); + background: linear-gradient(to bottom,#454545 0,#383838 20%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#454545,endColorstr=#383838,GradientType=0); +} +.window-proxy { + border: 1px dashed #000; +} +.window-proxy-mask, +.window-mask { + background: #000; +} +.window .panel-footer { + border: 1px solid #000; + position: relative; + top: -1px; +} +.dialog-content { + overflow: auto; +} +.dialog-toolbar { + padding: 2px 5px; +} +.dialog-tool-separator { + float: left; + height: 24px; + border-left: 1px solid #444; + border-right: 1px solid #777; + margin: 2px 1px; +} +.dialog-button { + padding: 5px; + text-align: right; +} +.dialog-button .l-btn { + margin-left: 5px; +} +.dialog-toolbar, +.dialog-button { + background: #555; + border-width: 1px; + border-style: solid; +} +.dialog-toolbar { + border-color: #000 #000 #222 #000; +} +.dialog-button { + border-color: #222 #000 #000 #000; +} +.l-btn { + text-decoration: none; + display: inline-block; + overflow: hidden; + margin: 0; + padding: 0; + cursor: pointer; + outline: none; + text-align: center; + vertical-align: middle; + line-height: normal; +} +.l-btn-plain { + border-width: 0; + padding: 1px; +} +.l-btn-left { + display: inline-block; + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + vertical-align: top; +} +.l-btn-text { + display: inline-block; + vertical-align: top; + width: auto; + line-height: 24px; + font-size: 12px; + padding: 0; + margin: 0 4px; +} +.l-btn-icon { + display: inline-block; + width: 16px; + height: 16px; + line-height: 16px; + position: absolute; + top: 50%; + margin-top: -8px; + font-size: 1px; +} +.l-btn span span .l-btn-empty { + display: inline-block; + margin: 0; + width: 16px; + height: 24px; + font-size: 1px; + vertical-align: top; +} +.l-btn span .l-btn-icon-left { + padding: 0 0 0 20px; + background-position: left center; +} +.l-btn span .l-btn-icon-right { + padding: 0 20px 0 0; + background-position: right center; +} +.l-btn-icon-left .l-btn-text { + margin: 0 4px 0 24px; +} +.l-btn-icon-left .l-btn-icon { + left: 4px; +} +.l-btn-icon-right .l-btn-text { + margin: 0 24px 0 4px; +} +.l-btn-icon-right .l-btn-icon { + right: 4px; +} +.l-btn-icon-top .l-btn-text { + margin: 20px 4px 0 4px; +} +.l-btn-icon-top .l-btn-icon { + top: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-icon-bottom .l-btn-text { + margin: 0 4px 20px 4px; +} +.l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-left .l-btn-empty { + margin: 0 4px; + width: 16px; +} +.l-btn-plain:hover { + padding: 0; +} +.l-btn-focus { + outline: #0000FF dotted thin; +} +.l-btn-large .l-btn-text { + line-height: 40px; +} +.l-btn-large .l-btn-icon { + width: 32px; + height: 32px; + line-height: 32px; + margin-top: -16px; +} +.l-btn-large .l-btn-icon-left .l-btn-text { + margin-left: 40px; +} +.l-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.l-btn-large .l-btn-icon-top .l-btn-text { + margin-top: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-top .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-left .l-btn-empty { + margin: 0 4px; + width: 32px; +} +.l-btn { + color: #fff; + background: #777; + background-repeat: repeat-x; + border: 1px solid #555; + background: -webkit-linear-gradient(top,#919191 0,#6a6a6a 100%); + background: -moz-linear-gradient(top,#919191 0,#6a6a6a 100%); + background: -o-linear-gradient(top,#919191 0,#6a6a6a 100%); + background: linear-gradient(to bottom,#919191 0,#6a6a6a 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#919191,endColorstr=#6a6a6a,GradientType=0); + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn:hover { + background: #777; + color: #fff; + border: 1px solid #555; + filter: none; +} +.l-btn-plain { + background: transparent; + border-width: 0; + filter: none; +} +.l-btn-outline { + border-width: 1px; + border-color: #555; + padding: 0; +} +.l-btn-plain:hover { + background: #777; + color: #fff; + border: 1px solid #555; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn-disabled, +.l-btn-disabled:hover { + opacity: 0.5; + cursor: default; + background: #777; + color: #fff; + background: -webkit-linear-gradient(top,#919191 0,#6a6a6a 100%); + background: -moz-linear-gradient(top,#919191 0,#6a6a6a 100%); + background: -o-linear-gradient(top,#919191 0,#6a6a6a 100%); + background: linear-gradient(to bottom,#919191 0,#6a6a6a 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#919191,endColorstr=#6a6a6a,GradientType=0); +} +.l-btn-disabled .l-btn-text, +.l-btn-disabled .l-btn-icon { + filter: alpha(opacity=50); +} +.l-btn-plain-disabled, +.l-btn-plain-disabled:hover { + background: transparent; + filter: alpha(opacity=50); +} +.l-btn-selected, +.l-btn-selected:hover { + background: #000; + filter: none; +} +.l-btn-plain-selected, +.l-btn-plain-selected:hover { + background: #000; +} +.textbox { + position: relative; + border: 1px solid #000; + background-color: #fff; + vertical-align: middle; + display: inline-block; + overflow: hidden; + white-space: nowrap; + margin: 0; + padding: 0; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox .textbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 4px; + white-space: normal; + vertical-align: top; + outline-style: none; + resize: none; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox textarea.textbox-text { + white-space: pre-wrap; +} +.textbox .textbox-prompt { + font-size: 12px; + color: #aaa; +} +.textbox .textbox-button, +.textbox .textbox-button:hover { + position: absolute; + top: 0; + padding: 0; + vertical-align: top; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.textbox-button-right, +.textbox-button-right:hover { + border-width: 0 0 0 1px; +} +.textbox-button-left, +.textbox-button-left:hover { + border-width: 0 1px 0 0; +} +.textbox-addon { + position: absolute; + top: 0; +} +.textbox-icon { + display: inline-block; + width: 18px; + height: 20px; + overflow: hidden; + vertical-align: top; + background-position: center center; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); + text-decoration: none; + outline-style: none; +} +.textbox-icon-disabled, +.textbox-icon-readonly { + cursor: default; +} +.textbox-icon:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.textbox-icon-disabled:hover { + opacity: 0.6; + filter: alpha(opacity=60); +} +.textbox-focused { + -moz-box-shadow: 0 0 3px 0 #000; + -webkit-box-shadow: 0 0 3px 0 #000; + box-shadow: 0 0 3px 0 #000; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} +.filebox .textbox-value { + vertical-align: top; + position: absolute; + top: 0; + left: -5000px; +} +.filebox-label { + display: inline-block; + position: absolute; + width: 100%; + height: 100%; + cursor: pointer; + left: 0; + top: 0; + z-index: 10; + background: url('images/blank.gif') no-repeat; +} +.l-btn-disabled .filebox-label { + cursor: default; +} +.combo { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.combo .combo-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0px 2px; + vertical-align: baseline; +} +.combo-arrow { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.combo-arrow-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.combo-panel { + overflow: auto; +} +.combo-arrow { + background: url('images/combo_arrow.png') no-repeat center center; +} +.combo-panel { + background-color: #666; +} +.combo { + border-color: #000; + background-color: #fff; +} +.combo-arrow { + background-color: #3d3d3d; +} +.combo-arrow-hover { + background-color: #777; +} +.combo-arrow:hover { + background-color: #777; +} +.combo .textbox-icon-disabled:hover { + cursor: default; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} +.combobox-item, +.combobox-group { + font-size: 12px; + padding: 3px; + padding-right: 0px; +} +.combobox-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.combobox-gitem { + padding-left: 10px; +} +.combobox-group { + font-weight: bold; +} +.combobox-item-hover { + background-color: #777; + color: #fff; +} +.combobox-item-selected { + background-color: #0052A3; + color: #fff; +} +.layout { + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + z-index: 0; +} +.layout-panel { + position: absolute; + overflow: hidden; +} +.layout-body { + min-width: 1px; + min-height: 1px; +} +.layout-panel-east, +.layout-panel-west { + z-index: 2; +} +.layout-panel-north, +.layout-panel-south { + z-index: 3; +} +.layout-expand { + position: absolute; + padding: 0px; + font-size: 1px; + cursor: pointer; + z-index: 1; +} +.layout-expand .panel-header, +.layout-expand .panel-body { + background: transparent; + filter: none; + overflow: hidden; +} +.layout-expand .panel-header { + border-bottom-width: 0px; +} +.layout-expand .panel-body { + position: relative; +} +.layout-expand .panel-body .panel-icon { + margin-top: 0; + top: 0; + left: 50%; + margin-left: -8px; +} +.layout-expand-west .panel-header .panel-icon, +.layout-expand-east .panel-header .panel-icon { + display: none; +} +.layout-expand-title { + position: absolute; + top: 0; + left: 21px; + white-space: nowrap; + word-wrap: normal; + -webkit-transform: rotate(90deg); + -webkit-transform-origin: 0 0; + -moz-transform: rotate(90deg); + -moz-transform-origin: 0 0; + -o-transform: rotate(90deg); + -o-transform-origin: 0 0; + transform: rotate(90deg); + transform-origin: 0 0; +} +.layout-expand-with-icon { + top: 18px; +} +.layout-expand .panel-body-noheader .layout-expand-title, +.layout-expand .panel-body-noheader .panel-icon { + top: 5px; +} +.layout-expand .panel-body-noheader .layout-expand-with-icon { + top: 23px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + position: absolute; + font-size: 1px; + display: none; + z-index: 5; +} +.layout-split-proxy-h { + width: 5px; + cursor: e-resize; +} +.layout-split-proxy-v { + height: 5px; + cursor: n-resize; +} +.layout-mask { + position: absolute; + background: #fafafa; + filter: alpha(opacity=10); + opacity: 0.10; + z-index: 4; +} +.layout-button-up { + background: url('images/layout_arrows.png') no-repeat -16px -16px; +} +.layout-button-down { + background: url('images/layout_arrows.png') no-repeat -16px 0; +} +.layout-button-left { + background: url('images/layout_arrows.png') no-repeat 0 0; +} +.layout-button-right { + background: url('images/layout_arrows.png') no-repeat 0 -16px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + background-color: #cccccc; +} +.layout-split-north { + border-bottom: 5px solid #444; +} +.layout-split-south { + border-top: 5px solid #444; +} +.layout-split-east { + border-left: 5px solid #444; +} +.layout-split-west { + border-right: 5px solid #444; +} +.layout-expand { + background-color: #3d3d3d; +} +.layout-expand-over { + background-color: #3d3d3d; +} +.tabs-container { + overflow: hidden; +} +.tabs-header { + border-width: 1px; + border-style: solid; + border-bottom-width: 0; + position: relative; + padding: 0; + padding-top: 2px; + overflow: hidden; +} +.tabs-scroller-left, +.tabs-scroller-right { + position: absolute; + top: auto; + bottom: 0; + width: 18px; + font-size: 1px; + display: none; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.tabs-scroller-left { + left: 0; +} +.tabs-scroller-right { + right: 0; +} +.tabs-tool { + position: absolute; + bottom: 0; + padding: 1px; + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.tabs-header-plain .tabs-tool { + padding: 0 1px; +} +.tabs-wrap { + position: relative; + left: 0; + overflow: hidden; + width: 100%; + margin: 0; + padding: 0; +} +.tabs-scrolling { + margin-left: 18px; + margin-right: 18px; +} +.tabs-disabled { + opacity: 0.3; + filter: alpha(opacity=30); +} +.tabs { + list-style-type: none; + height: 26px; + margin: 0px; + padding: 0px; + padding-left: 4px; + width: 50000px; + border-style: solid; + border-width: 0 0 1px 0; +} +.tabs li { + float: left; + display: inline-block; + margin: 0 4px -1px 0; + padding: 0; + position: relative; + border: 0; +} +.tabs li a.tabs-inner { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0 10px; + height: 25px; + line-height: 25px; + text-align: center; + white-space: nowrap; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.tabs li.tabs-selected a.tabs-inner { + font-weight: bold; + outline: none; +} +.tabs li.tabs-selected a:hover.tabs-inner { + cursor: default; + pointer: default; +} +.tabs li a.tabs-close, +.tabs-p-tool { + position: absolute; + font-size: 1px; + display: block; + height: 12px; + padding: 0; + top: 50%; + margin-top: -6px; + overflow: hidden; +} +.tabs li a.tabs-close { + width: 12px; + right: 5px; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs-p-tool { + right: 16px; +} +.tabs-p-tool a { + display: inline-block; + font-size: 1px; + width: 12px; + height: 12px; + margin: 0; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs li a:hover.tabs-close, +.tabs-p-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + cursor: hand; + cursor: pointer; +} +.tabs-with-icon { + padding-left: 18px; +} +.tabs-icon { + position: absolute; + width: 16px; + height: 16px; + left: 10px; + top: 50%; + margin-top: -8px; +} +.tabs-title { + font-size: 12px; +} +.tabs-closable { + padding-right: 8px; +} +.tabs-panels { + margin: 0px; + padding: 0px; + border-width: 1px; + border-style: solid; + border-top-width: 0; + overflow: hidden; +} +.tabs-header-bottom { + border-width: 0 1px 1px 1px; + padding: 0 0 2px 0; +} +.tabs-header-bottom .tabs { + border-width: 1px 0 0 0; +} +.tabs-header-bottom .tabs li { + margin: -1px 4px 0 0; +} +.tabs-header-bottom .tabs li a.tabs-inner { + -moz-border-radius: 0 0 5px 5px; + -webkit-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; +} +.tabs-header-bottom .tabs-tool { + top: 0; +} +.tabs-header-bottom .tabs-scroller-left, +.tabs-header-bottom .tabs-scroller-right { + top: 0; + bottom: auto; +} +.tabs-panels-top { + border-width: 1px 1px 0 1px; +} +.tabs-header-left { + float: left; + border-width: 1px 0 1px 1px; + padding: 0; +} +.tabs-header-right { + float: right; + border-width: 1px 1px 1px 0; + padding: 0; +} +.tabs-header-left .tabs-wrap, +.tabs-header-right .tabs-wrap { + height: 100%; +} +.tabs-header-left .tabs { + height: 100%; + padding: 4px 0 0 2px; + border-width: 0 1px 0 0; +} +.tabs-header-right .tabs { + height: 100%; + padding: 4px 2px 0 0; + border-width: 0 0 0 1px; +} +.tabs-header-left .tabs li, +.tabs-header-right .tabs li { + display: block; + width: 100%; + position: relative; +} +.tabs-header-left .tabs li { + left: auto; + right: 0; + margin: 0 -1px 4px 0; + float: right; +} +.tabs-header-right .tabs li { + left: 0; + right: auto; + margin: 0 0 4px -1px; + float: left; +} +.tabs-justified li a.tabs-inner { + padding-left: 0; + padding-right: 0; +} +.tabs-header-left .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.tabs-header-right .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.tabs-panels-right { + float: right; + border-width: 1px 1px 1px 0; +} +.tabs-panels-left { + float: left; + border-width: 1px 0 1px 1px; +} +.tabs-header-noborder, +.tabs-panels-noborder { + border: 0px; +} +.tabs-header-plain { + border: 0px; + background: transparent; +} +.tabs-pill { + padding-bottom: 3px; +} +.tabs-header-bottom .tabs-pill { + padding-top: 3px; + padding-bottom: 0; +} +.tabs-header-left .tabs-pill { + padding-right: 3px; +} +.tabs-header-right .tabs-pill { + padding-left: 3px; +} +.tabs-header .tabs-pill li a.tabs-inner { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tabs-header-narrow, +.tabs-header-narrow .tabs-narrow { + padding: 0; +} +.tabs-narrow li, +.tabs-header-bottom .tabs-narrow li { + margin-left: 0; + margin-right: -1px; +} +.tabs-narrow li.tabs-last, +.tabs-header-bottom .tabs-narrow li.tabs-last { + margin-right: 0; +} +.tabs-header-left .tabs-narrow, +.tabs-header-right .tabs-narrow { + padding-top: 0; +} +.tabs-header-left .tabs-narrow li { + margin-bottom: -1px; + margin-right: -1px; +} +.tabs-header-left .tabs-narrow li.tabs-last, +.tabs-header-right .tabs-narrow li.tabs-last { + margin-bottom: 0; +} +.tabs-header-right .tabs-narrow li { + margin-bottom: -1px; + margin-left: -1px; +} +.tabs-scroller-left { + background: #3d3d3d url('images/tabs_icons.png') no-repeat 1px center; +} +.tabs-scroller-right { + background: #3d3d3d url('images/tabs_icons.png') no-repeat -15px center; +} +.tabs li a.tabs-close { + background: url('images/tabs_icons.png') no-repeat -34px center; +} +.tabs li a.tabs-inner:hover { + background: #777; + color: #fff; + filter: none; +} +.tabs li.tabs-selected a.tabs-inner { + background-color: #666; + color: #fff; + background: -webkit-linear-gradient(top,#454545 0,#666 100%); + background: -moz-linear-gradient(top,#454545 0,#666 100%); + background: -o-linear-gradient(top,#454545 0,#666 100%); + background: linear-gradient(to bottom,#454545 0,#666 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#454545,endColorstr=#666,GradientType=0); +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(top,#666 0,#454545 100%); + background: -moz-linear-gradient(top,#666 0,#454545 100%); + background: -o-linear-gradient(top,#666 0,#454545 100%); + background: linear-gradient(to bottom,#666 0,#454545 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#666,endColorstr=#454545,GradientType=0); +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#454545 0,#666 100%); + background: -moz-linear-gradient(left,#454545 0,#666 100%); + background: -o-linear-gradient(left,#454545 0,#666 100%); + background: linear-gradient(to right,#454545 0,#666 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#454545,endColorstr=#666,GradientType=1); +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#666 0,#454545 100%); + background: -moz-linear-gradient(left,#666 0,#454545 100%); + background: -o-linear-gradient(left,#666 0,#454545 100%); + background: linear-gradient(to right,#666 0,#454545 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#666,endColorstr=#454545,GradientType=1); +} +.tabs li a.tabs-inner { + color: #fff; + background-color: #3d3d3d; + background: -webkit-linear-gradient(top,#454545 0,#383838 100%); + background: -moz-linear-gradient(top,#454545 0,#383838 100%); + background: -o-linear-gradient(top,#454545 0,#383838 100%); + background: linear-gradient(to bottom,#454545 0,#383838 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#454545,endColorstr=#383838,GradientType=0); +} +.tabs-header, +.tabs-tool { + background-color: #3d3d3d; +} +.tabs-header-plain { + background: transparent; +} +.tabs-header, +.tabs-scroller-left, +.tabs-scroller-right, +.tabs-tool, +.tabs, +.tabs-panels, +.tabs li a.tabs-inner, +.tabs li.tabs-selected a.tabs-inner, +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner, +.tabs-header-left .tabs li.tabs-selected a.tabs-inner, +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-color: #000; +} +.tabs-p-tool a:hover, +.tabs li a:hover.tabs-close, +.tabs-scroller-over { + background-color: #777; +} +.tabs li.tabs-selected a.tabs-inner { + border-bottom: 1px solid #666; +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + border-top: 1px solid #666; +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + border-right: 1px solid #666; +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-left: 1px solid #666; +} +.tabs-header .tabs-pill li.tabs-selected a.tabs-inner { + background: #0052A3; + color: #fff; + filter: none; + border-color: #000; +} +.datagrid .panel-body { + overflow: hidden; + position: relative; +} +.datagrid-view { + position: relative; + overflow: hidden; +} +.datagrid-view1, +.datagrid-view2 { + position: absolute; + overflow: hidden; + top: 0; +} +.datagrid-view1 { + left: 0; +} +.datagrid-view2 { + right: 0; +} +.datagrid-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0.3; + filter: alpha(opacity=30); + display: none; +} +.datagrid-mask-msg { + position: absolute; + top: 50%; + margin-top: -20px; + padding: 10px 5px 10px 30px; + width: auto; + height: 16px; + border-width: 2px; + border-style: solid; + display: none; +} +.datagrid-sort-icon { + padding: 0; + display: none; +} +.datagrid-toolbar { + height: auto; + padding: 1px 2px; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #444; + border-right: 1px solid #777; + margin: 2px 1px; +} +.datagrid .datagrid-pager { + display: block; + margin: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.datagrid .datagrid-pager-top { + border-width: 0 0 1px 0; +} +.datagrid-header { + overflow: hidden; + cursor: default; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-header-inner { + float: left; + width: 10000px; +} +.datagrid-header-row, +.datagrid-row { + height: 25px; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-width: 0 1px 1px 0; + border-style: dotted; + margin: 0; + padding: 0; +} +.datagrid-cell, +.datagrid-cell-group, +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + margin: 0; + padding: 0 4px; + white-space: nowrap; + word-wrap: normal; + overflow: hidden; + height: 18px; + line-height: 18px; + font-size: 12px; +} +.datagrid-header .datagrid-cell { + height: auto; +} +.datagrid-header .datagrid-cell span { + font-size: 12px; +} +.datagrid-cell-group { + text-align: center; + text-overflow: ellipsis; +} +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + width: 30px; + text-align: center; + margin: 0; + padding: 0; +} +.datagrid-body { + margin: 0; + padding: 0; + overflow: auto; + zoom: 1; +} +.datagrid-view1 .datagrid-body-inner { + padding-bottom: 20px; +} +.datagrid-view1 .datagrid-body { + overflow: hidden; +} +.datagrid-footer { + overflow: hidden; +} +.datagrid-footer-inner { + border-width: 1px 0 0 0; + border-style: solid; + width: 10000px; + float: left; +} +.datagrid-row-editing .datagrid-cell { + height: auto; +} +.datagrid-header-check, +.datagrid-cell-check { + padding: 0; + width: 27px; + height: 18px; + font-size: 1px; + text-align: center; + overflow: hidden; +} +.datagrid-header-check input, +.datagrid-cell-check input { + margin: 0; + padding: 0; + width: 15px; + height: 18px; +} +.datagrid-resize-proxy { + position: absolute; + width: 1px; + height: 10000px; + top: 0; + cursor: e-resize; + display: none; +} +.datagrid-body .datagrid-editable { + margin: 0; + padding: 0; +} +.datagrid-body .datagrid-editable table { + width: 100%; + height: 100%; +} +.datagrid-body .datagrid-editable td { + border: 0; + margin: 0; + padding: 0; +} +.datagrid-view .datagrid-editable-input { + margin: 0; + padding: 2px 4px; + border: 1px solid #000; + font-size: 12px; + outline-style: none; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.datagrid-sort .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -64px center; +} +.datagrid-sort-desc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -16px center; +} +.datagrid-sort-asc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat 0px center; +} +.datagrid-row-collapse { + background: url('images/datagrid_icons.png') no-repeat -48px center; +} +.datagrid-row-expand { + background: url('images/datagrid_icons.png') no-repeat -32px center; +} +.datagrid-mask-msg { + background: #666 url('images/loading.gif') no-repeat scroll 5px center; +} +.datagrid-header, +.datagrid-td-rownumber { + background-color: #444; + background: -webkit-linear-gradient(top,#4c4c4c 0,#3f3f3f 100%); + background: -moz-linear-gradient(top,#4c4c4c 0,#3f3f3f 100%); + background: -o-linear-gradient(top,#4c4c4c 0,#3f3f3f 100%); + background: linear-gradient(to bottom,#4c4c4c 0,#3f3f3f 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4c4c4c,endColorstr=#3f3f3f,GradientType=0); +} +.datagrid-cell-rownumber { + color: #fff; +} +.datagrid-resize-proxy { + background: #cccccc; +} +.datagrid-mask { + background: #000; +} +.datagrid-mask-msg { + border-color: #000; +} +.datagrid-toolbar, +.datagrid-pager { + background: #555; +} +.datagrid-header, +.datagrid-toolbar, +.datagrid-pager, +.datagrid-footer-inner { + border-color: #222; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-color: #222; +} +.datagrid-htable, +.datagrid-btable, +.datagrid-ftable { + color: #fff; + border-collapse: separate; +} +.datagrid-row-alt { + background: #555; +} +.datagrid-row-over, +.datagrid-header td.datagrid-header-over { + background: #777; + color: #fff; + cursor: default; +} +.datagrid-row-selected { + background: #0052A3; + color: #fff; +} +.datagrid-row-editing .textbox, +.datagrid-row-editing .textbox-text { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.propertygrid .datagrid-view1 .datagrid-body td { + padding-bottom: 1px; + border-width: 0 1px 0 0; +} +.propertygrid .datagrid-group { + height: 21px; + overflow: hidden; + border-width: 0 0 1px 0; + border-style: solid; +} +.propertygrid .datagrid-group span { + font-weight: bold; +} +.propertygrid .datagrid-view1 .datagrid-body td { + border-color: #222; +} +.propertygrid .datagrid-view1 .datagrid-group { + border-color: #3d3d3d; +} +.propertygrid .datagrid-view2 .datagrid-group { + border-color: #222; +} +.propertygrid .datagrid-group, +.propertygrid .datagrid-view1 .datagrid-body, +.propertygrid .datagrid-view1 .datagrid-row-over, +.propertygrid .datagrid-view1 .datagrid-row-selected { + background: #3d3d3d; +} +.datalist .datagrid-header { + border-width: 0; +} +.datalist .datagrid-group, +.m-list .m-list-group { + height: 25px; + line-height: 25px; + font-weight: bold; + overflow: hidden; + background-color: #444; + border-style: solid; + border-width: 0 0 1px 0; + border-color: #222; +} +.datalist .datagrid-group-expander { + display: none; +} +.datalist .datagrid-group-title { + padding: 0 4px; +} +.datalist .datagrid-btable { + width: 100%; + table-layout: fixed; +} +.datalist .datagrid-row td { + border-style: solid; + border-left-color: transparent; + border-right-color: transparent; + border-bottom-width: 0; +} +.datalist-lines .datagrid-row td { + border-bottom-width: 1px; +} +.datalist .datagrid-cell, +.m-list li { + width: auto; + height: auto; + padding: 2px 4px; + line-height: 18px; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link, +.m-list li>a { + display: block; + position: relative; + cursor: pointer; + color: #fff; + text-decoration: none; + overflow: hidden; + margin: -2px -4px; + padding: 2px 4px; + padding-right: 16px; + line-height: 18px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link::after, +.m-list li>a::after { + position: absolute; + display: block; + width: 8px; + height: 8px; + content: ''; + right: 6px; + top: 50%; + margin-top: -4px; + border-style: solid; + border-width: 1px 1px 0 0; + -ms-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} +.m-list { + margin: 0; + padding: 0; + list-style: none; +} +.m-list li { + border-style: solid; + border-width: 0 0 1px 0; + border-color: #222; +} +.m-list li>a:hover { + background: #777; + color: #fff; +} +.m-list .m-list-group { + padding: 0 4px; +} +.pagination { + zoom: 1; +} +.pagination table { + float: left; + height: 30px; +} +.pagination td { + border: 0; +} +.pagination-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #444; + border-right: 1px solid #777; + margin: 3px 1px; +} +.pagination .pagination-num { + border-width: 1px; + border-style: solid; + margin: 0 2px; + padding: 2px; + width: 2em; + height: auto; +} +.pagination-page-list { + margin: 0px 6px; + padding: 1px 2px; + width: auto; + height: auto; + border-width: 1px; + border-style: solid; +} +.pagination-info { + float: right; + margin: 0 6px 0 0; + padding: 0; + height: 30px; + line-height: 30px; + font-size: 12px; +} +.pagination span { + font-size: 12px; +} +.pagination-link .l-btn-text { + width: 24px; + text-align: center; + margin: 0; +} +.pagination-first { + background: url('images/pagination_icons.png') no-repeat 0 center; +} +.pagination-prev { + background: url('images/pagination_icons.png') no-repeat -16px center; +} +.pagination-next { + background: url('images/pagination_icons.png') no-repeat -32px center; +} +.pagination-last { + background: url('images/pagination_icons.png') no-repeat -48px center; +} +.pagination-load { + background: url('images/pagination_icons.png') no-repeat -64px center; +} +.pagination-loading { + background: url('images/loading.gif') no-repeat center center; +} +.pagination-page-list, +.pagination .pagination-num { + border-color: #000; +} +.calendar { + border-width: 1px; + border-style: solid; + padding: 1px; + overflow: hidden; +} +.calendar table { + table-layout: fixed; + border-collapse: separate; + font-size: 12px; + width: 100%; + height: 100%; +} +.calendar table td, +.calendar table th { + font-size: 12px; +} +.calendar-noborder { + border: 0; +} +.calendar-header { + position: relative; + height: 22px; +} +.calendar-title { + text-align: center; + height: 22px; +} +.calendar-title span { + position: relative; + display: inline-block; + top: 2px; + padding: 0 3px; + height: 18px; + line-height: 18px; + font-size: 12px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth, +.calendar-nextmonth, +.calendar-prevyear, +.calendar-nextyear { + position: absolute; + top: 50%; + margin-top: -7px; + width: 14px; + height: 14px; + cursor: pointer; + font-size: 1px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth { + left: 20px; + background: url('images/calendar_arrows.png') no-repeat -18px -2px; +} +.calendar-nextmonth { + right: 20px; + background: url('images/calendar_arrows.png') no-repeat -34px -2px; +} +.calendar-prevyear { + left: 3px; + background: url('images/calendar_arrows.png') no-repeat -1px -2px; +} +.calendar-nextyear { + right: 3px; + background: url('images/calendar_arrows.png') no-repeat -49px -2px; +} +.calendar-body { + position: relative; +} +.calendar-body th, +.calendar-body td { + text-align: center; +} +.calendar-day { + border: 0; + padding: 1px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-other-month { + opacity: 0.3; + filter: alpha(opacity=30); +} +.calendar-disabled { + opacity: 0.6; + filter: alpha(opacity=60); + cursor: default; +} +.calendar-menu { + position: absolute; + top: 0; + left: 0; + width: 180px; + height: 150px; + padding: 5px; + font-size: 12px; + display: none; + overflow: hidden; +} +.calendar-menu-year-inner { + text-align: center; + padding-bottom: 5px; +} +.calendar-menu-year { + width: 40px; + text-align: center; + border-width: 1px; + border-style: solid; + margin: 0; + padding: 2px; + font-weight: bold; + font-size: 12px; +} +.calendar-menu-prev, +.calendar-menu-next { + display: inline-block; + width: 21px; + height: 21px; + vertical-align: top; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-menu-prev { + margin-right: 10px; + background: url('images/calendar_arrows.png') no-repeat 2px 2px; +} +.calendar-menu-next { + margin-left: 10px; + background: url('images/calendar_arrows.png') no-repeat -45px 2px; +} +.calendar-menu-month { + text-align: center; + cursor: pointer; + font-weight: bold; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-body th, +.calendar-menu-month { + color: #ffffff; +} +.calendar-day { + color: #fff; +} +.calendar-sunday { + color: #CC2222; +} +.calendar-saturday { + color: #00ee00; +} +.calendar-today { + color: #0000ff; +} +.calendar-menu-year { + border-color: #000; +} +.calendar { + border-color: #000; +} +.calendar-header { + background: #3d3d3d; +} +.calendar-body, +.calendar-menu { + background: #666; +} +.calendar-body th { + background: #555; + padding: 2px 0; +} +.calendar-hover, +.calendar-nav-hover, +.calendar-menu-hover { + background-color: #777; + color: #fff; +} +.calendar-hover { + border: 1px solid #555; + padding: 0; +} +.calendar-selected { + background-color: #0052A3; + color: #fff; + border: 1px solid #00458a; + padding: 0; +} +.datebox-calendar-inner { + height: 180px; +} +.datebox-button { + height: 18px; + padding: 2px 5px; + text-align: center; +} +.datebox-button a { + font-size: 12px; + font-weight: bold; + text-decoration: none; + opacity: 0.6; + filter: alpha(opacity=60); +} +.datebox-button a:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.datebox-current, +.datebox-close { + float: left; +} +.datebox-close { + float: right; +} +.datebox .combo-arrow { + background-image: url('images/datebox_arrow.png'); + background-position: center center; +} +.datebox-button { + background-color: #555; +} +.datebox-button a { + color: #fff; +} +.numberbox { + border: 1px solid #000; + margin: 0; + padding: 0 2px; + vertical-align: middle; +} +.textbox { + padding: 0; +} +.spinner { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.spinner .spinner-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0 2px; + vertical-align: baseline; +} +.spinner-arrow { + background-color: #3d3d3d; + display: inline-block; + overflow: hidden; + vertical-align: top; + margin: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + width: 18px; +} +.spinner-arrow-up, +.spinner-arrow-down { + opacity: 0.6; + filter: alpha(opacity=60); + display: block; + font-size: 1px; + width: 18px; + height: 10px; + width: 100%; + height: 50%; + color: #fff; + outline-style: none; +} +.spinner-arrow-hover { + background-color: #777; + opacity: 1.0; + filter: alpha(opacity=100); +} +.spinner-arrow-up:hover, +.spinner-arrow-down:hover { + opacity: 1.0; + filter: alpha(opacity=100); + background-color: #777; +} +.textbox-icon-disabled .spinner-arrow-up:hover, +.textbox-icon-disabled .spinner-arrow-down:hover { + opacity: 0.6; + filter: alpha(opacity=60); + background-color: #3d3d3d; + cursor: default; +} +.spinner .textbox-icon-disabled { + opacity: 0.6; + filter: alpha(opacity=60); +} +.spinner-arrow-up { + background: url('images/spinner_arrows.png') no-repeat 1px center; +} +.spinner-arrow-down { + background: url('images/spinner_arrows.png') no-repeat -15px center; +} +.spinner { + border-color: #000; +} +.progressbar { + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + overflow: hidden; + position: relative; +} +.progressbar-text { + text-align: center; + position: absolute; +} +.progressbar-value { + position: relative; + overflow: hidden; + width: 0; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.progressbar { + border-color: #000; +} +.progressbar-text { + color: #fff; + font-size: 12px; +} +.progressbar-value .progressbar-text { + background-color: #0052A3; + color: #fff; +} +.searchbox { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.searchbox .searchbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 0 2px; + vertical-align: top; +} +.searchbox .searchbox-prompt { + font-size: 12px; + color: #ccc; +} +.searchbox-button { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.searchbox-button-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.searchbox .l-btn-plain { + border: 0; + padding: 0; + vertical-align: top; + opacity: 0.6; + filter: alpha(opacity=60); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .l-btn-plain:hover { + border: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox a.m-btn-plain-active { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .m-btn-active { + border-width: 0 1px 0 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .textbox-button-right { + border-width: 0 0 0 1px; +} +.searchbox .textbox-button-left { + border-width: 0 1px 0 0; +} +.searchbox-button { + background: url('images/searchbox_button.png') no-repeat center center; +} +.searchbox { + border-color: #000; + background-color: #fff; +} +.searchbox .l-btn-plain { + background: #3d3d3d; +} +.searchbox .l-btn-plain-disabled, +.searchbox .l-btn-plain-disabled:hover { + opacity: 0.5; + filter: alpha(opacity=50); +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} +.slider-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.slider-h { + height: 22px; +} +.slider-v { + width: 22px; +} +.slider-inner { + position: relative; + height: 6px; + top: 7px; + border-width: 1px; + border-style: solid; + border-radius: 5px; +} +.slider-handle { + position: absolute; + display: block; + outline: none; + width: 20px; + height: 20px; + top: 50%; + margin-top: -10px; + margin-left: -10px; +} +.slider-tip { + position: absolute; + display: inline-block; + line-height: 12px; + font-size: 12px; + white-space: nowrap; + top: -22px; +} +.slider-rule { + position: relative; + top: 15px; +} +.slider-rule span { + position: absolute; + display: inline-block; + font-size: 0; + height: 5px; + border-width: 0 0 0 1px; + border-style: solid; +} +.slider-rulelabel { + position: relative; + top: 20px; +} +.slider-rulelabel span { + position: absolute; + display: inline-block; + font-size: 12px; +} +.slider-v .slider-inner { + width: 6px; + left: 7px; + top: 0; + float: left; +} +.slider-v .slider-handle { + left: 50%; + margin-top: -10px; +} +.slider-v .slider-tip { + left: -10px; + margin-top: -6px; +} +.slider-v .slider-rule { + float: left; + top: 0; + left: 16px; +} +.slider-v .slider-rule span { + width: 5px; + height: 'auto'; + border-left: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.slider-v .slider-rulelabel { + float: left; + top: 0; + left: 23px; +} +.slider-handle { + background: url('images/slider_handle.png') no-repeat; +} +.slider-inner { + border-color: #000; + background: #3d3d3d; +} +.slider-rule span { + border-color: #000; +} +.slider-rulelabel span { + color: #fff; +} +.menu { + position: absolute; + margin: 0; + padding: 2px; + border-width: 1px; + border-style: solid; + overflow: hidden; +} +.menu-inline { + position: relative; +} +.menu-item { + position: relative; + margin: 0; + padding: 0; + overflow: hidden; + white-space: nowrap; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.menu-text { + height: 20px; + line-height: 20px; + float: left; + padding-left: 28px; +} +.menu-icon { + position: absolute; + width: 16px; + height: 16px; + left: 2px; + top: 50%; + margin-top: -8px; +} +.menu-rightarrow { + position: absolute; + width: 16px; + height: 16px; + right: 0; + top: 50%; + margin-top: -8px; +} +.menu-line { + position: absolute; + left: 26px; + top: 0; + height: 2000px; + font-size: 1px; +} +.menu-sep { + margin: 3px 0px 3px 25px; + font-size: 1px; +} +.menu-noline .menu-line { + display: none; +} +.menu-noline .menu-sep { + margin-left: 0; + margin-right: 0; +} +.menu-active { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.menu-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default; +} +.menu-text, +.menu-text span { + font-size: 12px; +} +.menu-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + background: #777; + -moz-box-shadow: 2px 2px 3px #787878; + -webkit-box-shadow: 2px 2px 3px #787878; + box-shadow: 2px 2px 3px #787878; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.menu-rightarrow { + background: url('images/menu_arrows.png') no-repeat -32px center; +} +.menu-line { + border-left: 1px solid #444; + border-right: 1px solid #777; +} +.menu-sep { + border-top: 1px solid #444; + border-bottom: 1px solid #777; +} +.menu { + background-color: #666; + border-color: #444; + color: #fff; +} +.menu-content { + background: #666; +} +.menu-item { + border-color: transparent; + _border-color: #666; +} +.menu-active { + border-color: #555; + color: #fff; + background: #777; +} +.menu-active-disabled { + border-color: transparent; + background: transparent; + color: #fff; +} +.m-btn-downarrow, +.s-btn-downarrow { + display: inline-block; + position: absolute; + width: 16px; + height: 16px; + font-size: 1px; + right: 0; + top: 50%; + margin-top: -8px; +} +.m-btn-active, +.s-btn-active { + background: #777; + color: #fff; + border: 1px solid #555; + filter: none; +} +.m-btn-plain-active, +.s-btn-plain-active { + background: transparent; + padding: 0; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.m-btn .l-btn-left .l-btn-text { + margin-right: 20px; +} +.m-btn .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.m-btn .l-btn-icon-right .l-btn-icon { + right: 20px; +} +.m-btn .l-btn-icon-top .l-btn-text { + margin-right: 4px; + margin-bottom: 14px; +} +.m-btn .l-btn-icon-bottom .l-btn-text { + margin-right: 4px; + margin-bottom: 34px; +} +.m-btn .l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 20px; +} +.m-btn .l-btn-icon-top .m-btn-downarrow, +.m-btn .l-btn-icon-bottom .m-btn-downarrow { + top: auto; + bottom: 0px; + left: 50%; + margin-left: -8px; +} +.m-btn-line { + display: inline-block; + position: absolute; + font-size: 1px; + display: none; +} +.m-btn .l-btn-left .m-btn-line { + right: 0; + width: 16px; + height: 500px; + border-style: solid; + border-color: #cccccc; + border-width: 0 0 0 1px; +} +.m-btn .l-btn-icon-top .m-btn-line, +.m-btn .l-btn-icon-bottom .m-btn-line { + left: 0; + bottom: 0; + width: 500px; + height: 16px; + border-width: 1px 0 0 0; +} +.m-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 56px; +} +.m-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 50px; +} +.m-btn-downarrow, +.s-btn-downarrow { + background: url('images/menu_arrows.png') no-repeat 0 center; +} +.m-btn-plain-active, +.s-btn-plain-active { + border-color: #555; + background-color: #777; + color: #fff; +} +.s-btn:hover .m-btn-line, +.s-btn-active .m-btn-line, +.s-btn-plain-active .m-btn-line { + display: inline-block; +} +.l-btn:hover .s-btn-downarrow, +.s-btn-active .s-btn-downarrow, +.s-btn-plain-active .s-btn-downarrow { + border-style: solid; + border-color: #cccccc; + border-width: 0 0 0 1px; +} +.messager-body { + padding: 10px; + overflow: auto; +} +.messager-button { + text-align: center; + padding: 5px; +} +.messager-button .l-btn { + width: 70px; +} +.messager-icon { + float: left; + width: 32px; + height: 32px; + margin: 0 10px 10px 0; +} +.messager-error { + background: url('images/messager_icons.png') no-repeat scroll -64px 0; +} +.messager-info { + background: url('images/messager_icons.png') no-repeat scroll 0 0; +} +.messager-question { + background: url('images/messager_icons.png') no-repeat scroll -32px 0; +} +.messager-warning { + background: url('images/messager_icons.png') no-repeat scroll -96px 0; +} +.messager-progress { + padding: 10px; +} +.messager-p-msg { + margin-bottom: 5px; +} +.messager-body .messager-input { + width: 100%; + padding: 1px 0; + border: 1px solid #000; +} +.tree { + margin: 0; + padding: 0; + list-style-type: none; +} +.tree li { + white-space: nowrap; +} +.tree li ul { + list-style-type: none; + margin: 0; + padding: 0; +} +.tree-node { + height: 18px; + white-space: nowrap; + cursor: pointer; +} +.tree-hit { + cursor: pointer; +} +.tree-expanded, +.tree-collapsed, +.tree-folder, +.tree-file, +.tree-checkbox, +.tree-indent { + display: inline-block; + width: 16px; + height: 18px; + vertical-align: top; + overflow: hidden; +} +.tree-expanded { + background: url('images/tree_icons.png') no-repeat -18px 0px; +} +.tree-expanded-hover { + background: url('images/tree_icons.png') no-repeat -50px 0px; +} +.tree-collapsed { + background: url('images/tree_icons.png') no-repeat 0px 0px; +} +.tree-collapsed-hover { + background: url('images/tree_icons.png') no-repeat -32px 0px; +} +.tree-lines .tree-expanded, +.tree-lines .tree-root-first .tree-expanded { + background: url('images/tree_icons.png') no-repeat -144px 0; +} +.tree-lines .tree-collapsed, +.tree-lines .tree-root-first .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -128px 0; +} +.tree-lines .tree-node-last .tree-expanded, +.tree-lines .tree-root-one .tree-expanded { + background: url('images/tree_icons.png') no-repeat -80px 0; +} +.tree-lines .tree-node-last .tree-collapsed, +.tree-lines .tree-root-one .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -64px 0; +} +.tree-line { + background: url('images/tree_icons.png') no-repeat -176px 0; +} +.tree-join { + background: url('images/tree_icons.png') no-repeat -192px 0; +} +.tree-joinbottom { + background: url('images/tree_icons.png') no-repeat -160px 0; +} +.tree-folder { + background: url('images/tree_icons.png') no-repeat -208px 0; +} +.tree-folder-open { + background: url('images/tree_icons.png') no-repeat -224px 0; +} +.tree-file { + background: url('images/tree_icons.png') no-repeat -240px 0; +} +.tree-loading { + background: url('images/loading.gif') no-repeat center center; +} +.tree-checkbox0 { + background: url('images/tree_icons.png') no-repeat -208px -18px; +} +.tree-checkbox1 { + background: url('images/tree_icons.png') no-repeat -224px -18px; +} +.tree-checkbox2 { + background: url('images/tree_icons.png') no-repeat -240px -18px; +} +.tree-title { + font-size: 12px; + display: inline-block; + text-decoration: none; + vertical-align: top; + white-space: nowrap; + padding: 0 2px; + height: 18px; + line-height: 18px; +} +.tree-node-proxy { + font-size: 12px; + line-height: 20px; + padding: 0 2px 0 20px; + border-width: 1px; + border-style: solid; + z-index: 9900000; +} +.tree-dnd-icon { + display: inline-block; + position: absolute; + width: 16px; + height: 18px; + left: 2px; + top: 50%; + margin-top: -9px; +} +.tree-dnd-yes { + background: url('images/tree_icons.png') no-repeat -256px 0; +} +.tree-dnd-no { + background: url('images/tree_icons.png') no-repeat -256px -18px; +} +.tree-node-top { + border-top: 1px dotted red; +} +.tree-node-bottom { + border-bottom: 1px dotted red; +} +.tree-node-append .tree-title { + border: 1px dotted red; +} +.tree-editor { + border: 1px solid #ccc; + font-size: 12px; + height: 14px !important; + height: 18px; + line-height: 14px; + padding: 1px 2px; + width: 80px; + position: absolute; + top: 0; +} +.tree-node-proxy { + background-color: #666; + color: #fff; + border-color: #000; +} +.tree-node-hover { + background: #777; + color: #fff; +} +.tree-node-selected { + background: #0052A3; + color: #fff; +} +.tree-node-hidden { + display: none; +} +.validatebox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; + color: #000; +} +.tooltip { + position: absolute; + display: none; + z-index: 9900000; + outline: none; + opacity: 1; + filter: alpha(opacity=100); + padding: 5px; + border-width: 1px; + border-style: solid; + border-radius: 5px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tooltip-content { + font-size: 12px; +} +.tooltip-arrow-outer, +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + line-height: 0; + font-size: 0; + border-style: solid; + border-width: 6px; + border-color: transparent; + _border-color: tomato; + _filter: chroma(color=tomato); +} +.tooltip-arrow { + display: none \9; +} +.tooltip-right .tooltip-arrow-outer { + left: 0; + top: 50%; + margin: -6px 0 0 -13px; +} +.tooltip-right .tooltip-arrow { + left: 0; + top: 50%; + margin: -6px 0 0 -12px; +} +.tooltip-left .tooltip-arrow-outer { + right: 0; + top: 50%; + margin: -6px -13px 0 0; +} +.tooltip-left .tooltip-arrow { + right: 0; + top: 50%; + margin: -6px -12px 0 0; +} +.tooltip-top .tooltip-arrow-outer { + bottom: 0; + left: 50%; + margin: 0 0 -13px -6px; +} +.tooltip-top .tooltip-arrow { + bottom: 0; + left: 50%; + margin: 0 0 -12px -6px; +} +.tooltip-bottom .tooltip-arrow-outer { + top: 0; + left: 50%; + margin: -13px 0 0 -6px; +} +.tooltip-bottom .tooltip-arrow { + top: 0; + left: 50%; + margin: -12px 0 0 -6px; +} +.tooltip { + background-color: #666; + border-color: #000; + color: #fff; +} +.tooltip-right .tooltip-arrow-outer { + border-right-color: #000; +} +.tooltip-right .tooltip-arrow { + border-right-color: #666; +} +.tooltip-left .tooltip-arrow-outer { + border-left-color: #000; +} +.tooltip-left .tooltip-arrow { + border-left-color: #666; +} +.tooltip-top .tooltip-arrow-outer { + border-top-color: #000; +} +.tooltip-top .tooltip-arrow { + border-top-color: #666; +} +.tooltip-bottom .tooltip-arrow-outer { + border-bottom-color: #000; +} +.tooltip-bottom .tooltip-arrow { + border-bottom-color: #666; +} +.switchbutton { + text-decoration: none; + display: inline-block; + overflow: hidden; + vertical-align: middle; + margin: 0; + padding: 0; + cursor: pointer; + background: #555; + border: 1px solid #555; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-inner { + display: inline-block; + overflow: hidden; + position: relative; + top: -1px; + left: -1px; +} +.switchbutton-on, +.switchbutton-off, +.switchbutton-handle { + display: inline-block; + text-align: center; + height: 100%; + float: left; + font-size: 12px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-on { + background: #0052A3; + color: #fff; +} +.switchbutton-off { + background-color: #666; + color: #fff; +} +.switchbutton-on, +.switchbutton-reversed .switchbutton-off { + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.switchbutton-off, +.switchbutton-reversed .switchbutton-on { + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.switchbutton-handle { + position: absolute; + top: 0; + left: 50%; + background-color: #666; + color: #fff; + border: 1px solid #555; + -moz-box-shadow: 0 0 3px 0 #555; + -webkit-box-shadow: 0 0 3px 0 #555; + box-shadow: 0 0 3px 0 #555; +} +.switchbutton-value { + position: absolute; + top: 0; + left: -5000px; +} +.switchbutton-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.switchbutton-disabled, +.switchbutton-readonly { + cursor: default; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/filebox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/filebox.css new file mode 100644 index 0000000..c6bac66 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/filebox.css @@ -0,0 +1,20 @@ +.filebox .textbox-value { + vertical-align: top; + position: absolute; + top: 0; + left: -5000px; +} +.filebox-label { + display: inline-block; + position: absolute; + width: 100%; + height: 100%; + cursor: pointer; + left: 0; + top: 0; + z-index: 10; + background: url('images/blank.gif') no-repeat; +} +.l-btn-disabled .filebox-label { + cursor: default; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/accordion_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/accordion_arrows.png new file mode 100644 index 0000000..45fd44a Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/accordion_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/blank.gif b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/blank.gif new file mode 100644 index 0000000..1d11fa9 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/blank.gif differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/calendar_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/calendar_arrows.png new file mode 100644 index 0000000..430c4ad Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/calendar_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/combo_arrow.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/combo_arrow.png new file mode 100644 index 0000000..ac58921 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/combo_arrow.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/datagrid_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/datagrid_icons.png new file mode 100644 index 0000000..7f19b93 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/datagrid_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/datebox_arrow.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/datebox_arrow.png new file mode 100644 index 0000000..783c833 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/datebox_arrow.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/layout_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/layout_arrows.png new file mode 100644 index 0000000..19c611f Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/layout_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/linkbutton_bg.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/linkbutton_bg.png new file mode 100644 index 0000000..fc66bd2 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/linkbutton_bg.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/loading.gif b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/loading.gif new file mode 100644 index 0000000..68f01d0 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/loading.gif differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/menu_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/menu_arrows.png new file mode 100644 index 0000000..2a98494 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/menu_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/messager_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/messager_icons.png new file mode 100644 index 0000000..62c18c1 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/messager_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/pagination_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/pagination_icons.png new file mode 100644 index 0000000..b3315fa Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/pagination_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/panel_tools.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/panel_tools.png new file mode 100644 index 0000000..f97761e Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/panel_tools.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/searchbox_button.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/searchbox_button.png new file mode 100644 index 0000000..6dd1931 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/searchbox_button.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/slider_handle.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/slider_handle.png new file mode 100644 index 0000000..b9802ba Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/slider_handle.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/spinner_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/spinner_arrows.png new file mode 100644 index 0000000..25ee848 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/spinner_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/tabs_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/tabs_icons.png new file mode 100644 index 0000000..732b123 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/tabs_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/tree_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/tree_icons.png new file mode 100644 index 0000000..2b4fd20 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/tree_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/validatebox_warning.png b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/validatebox_warning.png new file mode 100644 index 0000000..2b3d4f0 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/black/images/validatebox_warning.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/layout.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/layout.css new file mode 100644 index 0000000..e5ebc51 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/layout.css @@ -0,0 +1,133 @@ +.layout { + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + z-index: 0; +} +.layout-panel { + position: absolute; + overflow: hidden; +} +.layout-body { + min-width: 1px; + min-height: 1px; +} +.layout-panel-east, +.layout-panel-west { + z-index: 2; +} +.layout-panel-north, +.layout-panel-south { + z-index: 3; +} +.layout-expand { + position: absolute; + padding: 0px; + font-size: 1px; + cursor: pointer; + z-index: 1; +} +.layout-expand .panel-header, +.layout-expand .panel-body { + background: transparent; + filter: none; + overflow: hidden; +} +.layout-expand .panel-header { + border-bottom-width: 0px; +} +.layout-expand .panel-body { + position: relative; +} +.layout-expand .panel-body .panel-icon { + margin-top: 0; + top: 0; + left: 50%; + margin-left: -8px; +} +.layout-expand-west .panel-header .panel-icon, +.layout-expand-east .panel-header .panel-icon { + display: none; +} +.layout-expand-title { + position: absolute; + top: 0; + left: 21px; + white-space: nowrap; + word-wrap: normal; + -webkit-transform: rotate(90deg); + -webkit-transform-origin: 0 0; + -moz-transform: rotate(90deg); + -moz-transform-origin: 0 0; + -o-transform: rotate(90deg); + -o-transform-origin: 0 0; + transform: rotate(90deg); + transform-origin: 0 0; +} +.layout-expand-with-icon { + top: 18px; +} +.layout-expand .panel-body-noheader .layout-expand-title, +.layout-expand .panel-body-noheader .panel-icon { + top: 5px; +} +.layout-expand .panel-body-noheader .layout-expand-with-icon { + top: 23px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + position: absolute; + font-size: 1px; + display: none; + z-index: 5; +} +.layout-split-proxy-h { + width: 5px; + cursor: e-resize; +} +.layout-split-proxy-v { + height: 5px; + cursor: n-resize; +} +.layout-mask { + position: absolute; + background: #fafafa; + filter: alpha(opacity=10); + opacity: 0.10; + z-index: 4; +} +.layout-button-up { + background: url('images/layout_arrows.png') no-repeat -16px -16px; +} +.layout-button-down { + background: url('images/layout_arrows.png') no-repeat -16px 0; +} +.layout-button-left { + background: url('images/layout_arrows.png') no-repeat 0 0; +} +.layout-button-right { + background: url('images/layout_arrows.png') no-repeat 0 -16px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + background-color: #cccccc; +} +.layout-split-north { + border-bottom: 5px solid #444; +} +.layout-split-south { + border-top: 5px solid #444; +} +.layout-split-east { + border-left: 5px solid #444; +} +.layout-split-west { + border-right: 5px solid #444; +} +.layout-expand { + background-color: #3d3d3d; +} +.layout-expand-over { + background-color: #3d3d3d; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/linkbutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/linkbutton.css new file mode 100644 index 0000000..18a7f0e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/linkbutton.css @@ -0,0 +1,203 @@ +.l-btn { + text-decoration: none; + display: inline-block; + overflow: hidden; + margin: 0; + padding: 0; + cursor: pointer; + outline: none; + text-align: center; + vertical-align: middle; + line-height: normal; +} +.l-btn-plain { + border-width: 0; + padding: 1px; +} +.l-btn-left { + display: inline-block; + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + vertical-align: top; +} +.l-btn-text { + display: inline-block; + vertical-align: top; + width: auto; + line-height: 24px; + font-size: 12px; + padding: 0; + margin: 0 4px; +} +.l-btn-icon { + display: inline-block; + width: 16px; + height: 16px; + line-height: 16px; + position: absolute; + top: 50%; + margin-top: -8px; + font-size: 1px; +} +.l-btn span span .l-btn-empty { + display: inline-block; + margin: 0; + width: 16px; + height: 24px; + font-size: 1px; + vertical-align: top; +} +.l-btn span .l-btn-icon-left { + padding: 0 0 0 20px; + background-position: left center; +} +.l-btn span .l-btn-icon-right { + padding: 0 20px 0 0; + background-position: right center; +} +.l-btn-icon-left .l-btn-text { + margin: 0 4px 0 24px; +} +.l-btn-icon-left .l-btn-icon { + left: 4px; +} +.l-btn-icon-right .l-btn-text { + margin: 0 24px 0 4px; +} +.l-btn-icon-right .l-btn-icon { + right: 4px; +} +.l-btn-icon-top .l-btn-text { + margin: 20px 4px 0 4px; +} +.l-btn-icon-top .l-btn-icon { + top: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-icon-bottom .l-btn-text { + margin: 0 4px 20px 4px; +} +.l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-left .l-btn-empty { + margin: 0 4px; + width: 16px; +} +.l-btn-plain:hover { + padding: 0; +} +.l-btn-focus { + outline: #0000FF dotted thin; +} +.l-btn-large .l-btn-text { + line-height: 40px; +} +.l-btn-large .l-btn-icon { + width: 32px; + height: 32px; + line-height: 32px; + margin-top: -16px; +} +.l-btn-large .l-btn-icon-left .l-btn-text { + margin-left: 40px; +} +.l-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.l-btn-large .l-btn-icon-top .l-btn-text { + margin-top: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-top .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-left .l-btn-empty { + margin: 0 4px; + width: 32px; +} +.l-btn { + color: #fff; + background: #777; + background-repeat: repeat-x; + border: 1px solid #555; + background: -webkit-linear-gradient(top,#919191 0,#6a6a6a 100%); + background: -moz-linear-gradient(top,#919191 0,#6a6a6a 100%); + background: -o-linear-gradient(top,#919191 0,#6a6a6a 100%); + background: linear-gradient(to bottom,#919191 0,#6a6a6a 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#919191,endColorstr=#6a6a6a,GradientType=0); + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn:hover { + background: #777; + color: #fff; + border: 1px solid #555; + filter: none; +} +.l-btn-plain { + background: transparent; + border-width: 0; + filter: none; +} +.l-btn-outline { + border-width: 1px; + border-color: #555; + padding: 0; +} +.l-btn-plain:hover { + background: #777; + color: #fff; + border: 1px solid #555; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn-disabled, +.l-btn-disabled:hover { + opacity: 0.5; + cursor: default; + background: #777; + color: #fff; + background: -webkit-linear-gradient(top,#919191 0,#6a6a6a 100%); + background: -moz-linear-gradient(top,#919191 0,#6a6a6a 100%); + background: -o-linear-gradient(top,#919191 0,#6a6a6a 100%); + background: linear-gradient(to bottom,#919191 0,#6a6a6a 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#919191,endColorstr=#6a6a6a,GradientType=0); +} +.l-btn-disabled .l-btn-text, +.l-btn-disabled .l-btn-icon { + filter: alpha(opacity=50); +} +.l-btn-plain-disabled, +.l-btn-plain-disabled:hover { + background: transparent; + filter: alpha(opacity=50); +} +.l-btn-selected, +.l-btn-selected:hover { + background: #000; + filter: none; +} +.l-btn-plain-selected, +.l-btn-plain-selected:hover { + background: #000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/menu.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/menu.css new file mode 100644 index 0000000..430d0d8 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/menu.css @@ -0,0 +1,119 @@ +.menu { + position: absolute; + margin: 0; + padding: 2px; + border-width: 1px; + border-style: solid; + overflow: hidden; +} +.menu-inline { + position: relative; +} +.menu-item { + position: relative; + margin: 0; + padding: 0; + overflow: hidden; + white-space: nowrap; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.menu-text { + height: 20px; + line-height: 20px; + float: left; + padding-left: 28px; +} +.menu-icon { + position: absolute; + width: 16px; + height: 16px; + left: 2px; + top: 50%; + margin-top: -8px; +} +.menu-rightarrow { + position: absolute; + width: 16px; + height: 16px; + right: 0; + top: 50%; + margin-top: -8px; +} +.menu-line { + position: absolute; + left: 26px; + top: 0; + height: 2000px; + font-size: 1px; +} +.menu-sep { + margin: 3px 0px 3px 25px; + font-size: 1px; +} +.menu-noline .menu-line { + display: none; +} +.menu-noline .menu-sep { + margin-left: 0; + margin-right: 0; +} +.menu-active { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.menu-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default; +} +.menu-text, +.menu-text span { + font-size: 12px; +} +.menu-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + background: #777; + -moz-box-shadow: 2px 2px 3px #787878; + -webkit-box-shadow: 2px 2px 3px #787878; + box-shadow: 2px 2px 3px #787878; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.menu-rightarrow { + background: url('images/menu_arrows.png') no-repeat -32px center; +} +.menu-line { + border-left: 1px solid #444; + border-right: 1px solid #777; +} +.menu-sep { + border-top: 1px solid #444; + border-bottom: 1px solid #777; +} +.menu { + background-color: #666; + border-color: #444; + color: #fff; +} +.menu-content { + background: #666; +} +.menu-item { + border-color: transparent; + _border-color: #666; +} +.menu-active { + border-color: #555; + color: #fff; + background: #777; +} +.menu-active-disabled { + border-color: transparent; + background: transparent; + color: #fff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/menubutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/menubutton.css new file mode 100644 index 0000000..55a2b5e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/menubutton.css @@ -0,0 +1,94 @@ +.m-btn-downarrow, +.s-btn-downarrow { + display: inline-block; + position: absolute; + width: 16px; + height: 16px; + font-size: 1px; + right: 0; + top: 50%; + margin-top: -8px; +} +.m-btn-active, +.s-btn-active { + background: #777; + color: #fff; + border: 1px solid #555; + filter: none; +} +.m-btn-plain-active, +.s-btn-plain-active { + background: transparent; + padding: 0; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.m-btn .l-btn-left .l-btn-text { + margin-right: 20px; +} +.m-btn .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.m-btn .l-btn-icon-right .l-btn-icon { + right: 20px; +} +.m-btn .l-btn-icon-top .l-btn-text { + margin-right: 4px; + margin-bottom: 14px; +} +.m-btn .l-btn-icon-bottom .l-btn-text { + margin-right: 4px; + margin-bottom: 34px; +} +.m-btn .l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 20px; +} +.m-btn .l-btn-icon-top .m-btn-downarrow, +.m-btn .l-btn-icon-bottom .m-btn-downarrow { + top: auto; + bottom: 0px; + left: 50%; + margin-left: -8px; +} +.m-btn-line { + display: inline-block; + position: absolute; + font-size: 1px; + display: none; +} +.m-btn .l-btn-left .m-btn-line { + right: 0; + width: 16px; + height: 500px; + border-style: solid; + border-color: #cccccc; + border-width: 0 0 0 1px; +} +.m-btn .l-btn-icon-top .m-btn-line, +.m-btn .l-btn-icon-bottom .m-btn-line { + left: 0; + bottom: 0; + width: 500px; + height: 16px; + border-width: 1px 0 0 0; +} +.m-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 56px; +} +.m-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 50px; +} +.m-btn-downarrow, +.s-btn-downarrow { + background: url('images/menu_arrows.png') no-repeat 0 center; +} +.m-btn-plain-active, +.s-btn-plain-active { + border-color: #555; + background-color: #777; + color: #fff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/messager.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/messager.css new file mode 100644 index 0000000..b5ddb99 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/messager.css @@ -0,0 +1,40 @@ +.messager-body { + padding: 10px; + overflow: auto; +} +.messager-button { + text-align: center; + padding: 5px; +} +.messager-button .l-btn { + width: 70px; +} +.messager-icon { + float: left; + width: 32px; + height: 32px; + margin: 0 10px 10px 0; +} +.messager-error { + background: url('images/messager_icons.png') no-repeat scroll -64px 0; +} +.messager-info { + background: url('images/messager_icons.png') no-repeat scroll 0 0; +} +.messager-question { + background: url('images/messager_icons.png') no-repeat scroll -32px 0; +} +.messager-warning { + background: url('images/messager_icons.png') no-repeat scroll -96px 0; +} +.messager-progress { + padding: 10px; +} +.messager-p-msg { + margin-bottom: 5px; +} +.messager-body .messager-input { + width: 100%; + padding: 1px 0; + border: 1px solid #000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/numberbox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/numberbox.css new file mode 100644 index 0000000..3ee54c3 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/numberbox.css @@ -0,0 +1,9 @@ +.numberbox { + border: 1px solid #000; + margin: 0; + padding: 0 2px; + vertical-align: middle; +} +.textbox { + padding: 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/pagination.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/pagination.css new file mode 100644 index 0000000..0431a22 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/pagination.css @@ -0,0 +1,71 @@ +.pagination { + zoom: 1; +} +.pagination table { + float: left; + height: 30px; +} +.pagination td { + border: 0; +} +.pagination-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #444; + border-right: 1px solid #777; + margin: 3px 1px; +} +.pagination .pagination-num { + border-width: 1px; + border-style: solid; + margin: 0 2px; + padding: 2px; + width: 2em; + height: auto; +} +.pagination-page-list { + margin: 0px 6px; + padding: 1px 2px; + width: auto; + height: auto; + border-width: 1px; + border-style: solid; +} +.pagination-info { + float: right; + margin: 0 6px 0 0; + padding: 0; + height: 30px; + line-height: 30px; + font-size: 12px; +} +.pagination span { + font-size: 12px; +} +.pagination-link .l-btn-text { + width: 24px; + text-align: center; + margin: 0; +} +.pagination-first { + background: url('images/pagination_icons.png') no-repeat 0 center; +} +.pagination-prev { + background: url('images/pagination_icons.png') no-repeat -16px center; +} +.pagination-next { + background: url('images/pagination_icons.png') no-repeat -32px center; +} +.pagination-last { + background: url('images/pagination_icons.png') no-repeat -48px center; +} +.pagination-load { + background: url('images/pagination_icons.png') no-repeat -64px center; +} +.pagination-loading { + background: url('images/loading.gif') no-repeat center center; +} +.pagination-page-list, +.pagination .pagination-num { + border-color: #000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/panel.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/panel.css new file mode 100644 index 0000000..07845d2 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/panel.css @@ -0,0 +1,142 @@ +.panel { + overflow: hidden; + text-align: left; + margin: 0; + border: 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.panel-header, +.panel-body { + border-width: 1px; + border-style: solid; +} +.panel-header { + padding: 5px; + position: relative; +} +.panel-title { + background: url('images/blank.gif') no-repeat; +} +.panel-header-noborder { + border-width: 0 0 1px 0; +} +.panel-body { + overflow: auto; + border-top-width: 0; + padding: 0; +} +.panel-body-noheader { + border-top-width: 1px; +} +.panel-body-noborder { + border-width: 0px; +} +.panel-body-nobottom { + border-bottom-width: 0; +} +.panel-with-icon { + padding-left: 18px; +} +.panel-icon, +.panel-tool { + position: absolute; + top: 50%; + margin-top: -8px; + height: 16px; + overflow: hidden; +} +.panel-icon { + left: 5px; + width: 16px; +} +.panel-tool { + right: 5px; + width: auto; +} +.panel-tool a { + display: inline-block; + width: 16px; + height: 16px; + opacity: 0.6; + filter: alpha(opacity=60); + margin: 0 0 0 2px; + vertical-align: top; +} +.panel-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + background-color: #777; + -moz-border-radius: 3px 3px 3px 3px; + -webkit-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; +} +.panel-loading { + padding: 11px 0px 10px 30px; +} +.panel-noscroll { + overflow: hidden; +} +.panel-fit, +.panel-fit body { + height: 100%; + margin: 0; + padding: 0; + border: 0; + overflow: hidden; +} +.panel-loading { + background: url('images/loading.gif') no-repeat 10px 10px; +} +.panel-tool-close { + background: url('images/panel_tools.png') no-repeat -16px 0px; +} +.panel-tool-min { + background: url('images/panel_tools.png') no-repeat 0px 0px; +} +.panel-tool-max { + background: url('images/panel_tools.png') no-repeat 0px -16px; +} +.panel-tool-restore { + background: url('images/panel_tools.png') no-repeat -16px -16px; +} +.panel-tool-collapse { + background: url('images/panel_tools.png') no-repeat -32px 0; +} +.panel-tool-expand { + background: url('images/panel_tools.png') no-repeat -32px -16px; +} +.panel-header, +.panel-body { + border-color: #000; +} +.panel-header { + background-color: #3d3d3d; + background: -webkit-linear-gradient(top,#454545 0,#383838 100%); + background: -moz-linear-gradient(top,#454545 0,#383838 100%); + background: -o-linear-gradient(top,#454545 0,#383838 100%); + background: linear-gradient(to bottom,#454545 0,#383838 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#454545,endColorstr=#383838,GradientType=0); +} +.panel-body { + background-color: #666; + color: #fff; + font-size: 12px; +} +.panel-title { + font-size: 12px; + font-weight: bold; + color: #fff; + height: 16px; + line-height: 16px; +} +.panel-footer { + border: 1px solid #000; + overflow: hidden; + background: #555; +} +.panel-footer-noborder { + border-width: 1px 0 0 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/progressbar.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/progressbar.css new file mode 100644 index 0000000..79fcf62 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/progressbar.css @@ -0,0 +1,32 @@ +.progressbar { + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + overflow: hidden; + position: relative; +} +.progressbar-text { + text-align: center; + position: absolute; +} +.progressbar-value { + position: relative; + overflow: hidden; + width: 0; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.progressbar { + border-color: #000; +} +.progressbar-text { + color: #fff; + font-size: 12px; +} +.progressbar-value .progressbar-text { + background-color: #0052A3; + color: #fff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/propertygrid.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/propertygrid.css new file mode 100644 index 0000000..d71ce7c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/propertygrid.css @@ -0,0 +1,28 @@ +.propertygrid .datagrid-view1 .datagrid-body td { + padding-bottom: 1px; + border-width: 0 1px 0 0; +} +.propertygrid .datagrid-group { + height: 21px; + overflow: hidden; + border-width: 0 0 1px 0; + border-style: solid; +} +.propertygrid .datagrid-group span { + font-weight: bold; +} +.propertygrid .datagrid-view1 .datagrid-body td { + border-color: #222; +} +.propertygrid .datagrid-view1 .datagrid-group { + border-color: #3d3d3d; +} +.propertygrid .datagrid-view2 .datagrid-group { + border-color: #222; +} +.propertygrid .datagrid-group, +.propertygrid .datagrid-view1 .datagrid-body, +.propertygrid .datagrid-view1 .datagrid-row-over, +.propertygrid .datagrid-view1 .datagrid-row-selected { + background: #3d3d3d; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/searchbox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/searchbox.css new file mode 100644 index 0000000..4260efb --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/searchbox.css @@ -0,0 +1,90 @@ +.searchbox { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.searchbox .searchbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 0 2px; + vertical-align: top; +} +.searchbox .searchbox-prompt { + font-size: 12px; + color: #ccc; +} +.searchbox-button { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.searchbox-button-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.searchbox .l-btn-plain { + border: 0; + padding: 0; + vertical-align: top; + opacity: 0.6; + filter: alpha(opacity=60); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .l-btn-plain:hover { + border: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox a.m-btn-plain-active { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .m-btn-active { + border-width: 0 1px 0 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .textbox-button-right { + border-width: 0 0 0 1px; +} +.searchbox .textbox-button-left { + border-width: 0 1px 0 0; +} +.searchbox-button { + background: url('images/searchbox_button.png') no-repeat center center; +} +.searchbox { + border-color: #000; + background-color: #fff; +} +.searchbox .l-btn-plain { + background: #3d3d3d; +} +.searchbox .l-btn-plain-disabled, +.searchbox .l-btn-plain-disabled:hover { + opacity: 0.5; + filter: alpha(opacity=50); +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/slider.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/slider.css new file mode 100644 index 0000000..cd66bf5 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/slider.css @@ -0,0 +1,101 @@ +.slider-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.slider-h { + height: 22px; +} +.slider-v { + width: 22px; +} +.slider-inner { + position: relative; + height: 6px; + top: 7px; + border-width: 1px; + border-style: solid; + border-radius: 5px; +} +.slider-handle { + position: absolute; + display: block; + outline: none; + width: 20px; + height: 20px; + top: 50%; + margin-top: -10px; + margin-left: -10px; +} +.slider-tip { + position: absolute; + display: inline-block; + line-height: 12px; + font-size: 12px; + white-space: nowrap; + top: -22px; +} +.slider-rule { + position: relative; + top: 15px; +} +.slider-rule span { + position: absolute; + display: inline-block; + font-size: 0; + height: 5px; + border-width: 0 0 0 1px; + border-style: solid; +} +.slider-rulelabel { + position: relative; + top: 20px; +} +.slider-rulelabel span { + position: absolute; + display: inline-block; + font-size: 12px; +} +.slider-v .slider-inner { + width: 6px; + left: 7px; + top: 0; + float: left; +} +.slider-v .slider-handle { + left: 50%; + margin-top: -10px; +} +.slider-v .slider-tip { + left: -10px; + margin-top: -6px; +} +.slider-v .slider-rule { + float: left; + top: 0; + left: 16px; +} +.slider-v .slider-rule span { + width: 5px; + height: 'auto'; + border-left: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.slider-v .slider-rulelabel { + float: left; + top: 0; + left: 23px; +} +.slider-handle { + background: url('images/slider_handle.png') no-repeat; +} +.slider-inner { + border-color: #000; + background: #3d3d3d; +} +.slider-rule span { + border-color: #000; +} +.slider-rulelabel span { + color: #fff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/spinner.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/spinner.css new file mode 100644 index 0000000..041b3a2 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/spinner.css @@ -0,0 +1,72 @@ +.spinner { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.spinner .spinner-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0 2px; + vertical-align: baseline; +} +.spinner-arrow { + background-color: #3d3d3d; + display: inline-block; + overflow: hidden; + vertical-align: top; + margin: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + width: 18px; +} +.spinner-arrow-up, +.spinner-arrow-down { + opacity: 0.6; + filter: alpha(opacity=60); + display: block; + font-size: 1px; + width: 18px; + height: 10px; + width: 100%; + height: 50%; + color: #fff; + outline-style: none; +} +.spinner-arrow-hover { + background-color: #777; + opacity: 1.0; + filter: alpha(opacity=100); +} +.spinner-arrow-up:hover, +.spinner-arrow-down:hover { + opacity: 1.0; + filter: alpha(opacity=100); + background-color: #777; +} +.textbox-icon-disabled .spinner-arrow-up:hover, +.textbox-icon-disabled .spinner-arrow-down:hover { + opacity: 0.6; + filter: alpha(opacity=60); + background-color: #3d3d3d; + cursor: default; +} +.spinner .textbox-icon-disabled { + opacity: 0.6; + filter: alpha(opacity=60); +} +.spinner-arrow-up { + background: url('images/spinner_arrows.png') no-repeat 1px center; +} +.spinner-arrow-down { + background: url('images/spinner_arrows.png') no-repeat -15px center; +} +.spinner { + border-color: #000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/splitbutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/splitbutton.css new file mode 100644 index 0000000..b42e396 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/splitbutton.css @@ -0,0 +1,12 @@ +.s-btn:hover .m-btn-line, +.s-btn-active .m-btn-line, +.s-btn-plain-active .m-btn-line { + display: inline-block; +} +.l-btn:hover .s-btn-downarrow, +.s-btn-active .s-btn-downarrow, +.s-btn-plain-active .s-btn-downarrow { + border-style: solid; + border-color: #cccccc; + border-width: 0 0 0 1px; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/switchbutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/switchbutton.css new file mode 100644 index 0000000..b1b5714 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/switchbutton.css @@ -0,0 +1,77 @@ +.switchbutton { + text-decoration: none; + display: inline-block; + overflow: hidden; + vertical-align: middle; + margin: 0; + padding: 0; + cursor: pointer; + background: #555; + border: 1px solid #555; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-inner { + display: inline-block; + overflow: hidden; + position: relative; + top: -1px; + left: -1px; +} +.switchbutton-on, +.switchbutton-off, +.switchbutton-handle { + display: inline-block; + text-align: center; + height: 100%; + float: left; + font-size: 12px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-on { + background: #0052A3; + color: #fff; +} +.switchbutton-off { + background-color: #666; + color: #fff; +} +.switchbutton-on, +.switchbutton-reversed .switchbutton-off { + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.switchbutton-off, +.switchbutton-reversed .switchbutton-on { + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.switchbutton-handle { + position: absolute; + top: 0; + left: 50%; + background-color: #666; + color: #fff; + border: 1px solid #555; + -moz-box-shadow: 0 0 3px 0 #555; + -webkit-box-shadow: 0 0 3px 0 #555; + box-shadow: 0 0 3px 0 #555; +} +.switchbutton-value { + position: absolute; + top: 0; + left: -5000px; +} +.switchbutton-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.switchbutton-disabled, +.switchbutton-readonly { + cursor: default; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/tabs.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/tabs.css new file mode 100644 index 0000000..4ab73de --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/tabs.css @@ -0,0 +1,413 @@ +.tabs-container { + overflow: hidden; +} +.tabs-header { + border-width: 1px; + border-style: solid; + border-bottom-width: 0; + position: relative; + padding: 0; + padding-top: 2px; + overflow: hidden; +} +.tabs-scroller-left, +.tabs-scroller-right { + position: absolute; + top: auto; + bottom: 0; + width: 18px; + font-size: 1px; + display: none; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.tabs-scroller-left { + left: 0; +} +.tabs-scroller-right { + right: 0; +} +.tabs-tool { + position: absolute; + bottom: 0; + padding: 1px; + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.tabs-header-plain .tabs-tool { + padding: 0 1px; +} +.tabs-wrap { + position: relative; + left: 0; + overflow: hidden; + width: 100%; + margin: 0; + padding: 0; +} +.tabs-scrolling { + margin-left: 18px; + margin-right: 18px; +} +.tabs-disabled { + opacity: 0.3; + filter: alpha(opacity=30); +} +.tabs { + list-style-type: none; + height: 26px; + margin: 0px; + padding: 0px; + padding-left: 4px; + width: 50000px; + border-style: solid; + border-width: 0 0 1px 0; +} +.tabs li { + float: left; + display: inline-block; + margin: 0 4px -1px 0; + padding: 0; + position: relative; + border: 0; +} +.tabs li a.tabs-inner { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0 10px; + height: 25px; + line-height: 25px; + text-align: center; + white-space: nowrap; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.tabs li.tabs-selected a.tabs-inner { + font-weight: bold; + outline: none; +} +.tabs li.tabs-selected a:hover.tabs-inner { + cursor: default; + pointer: default; +} +.tabs li a.tabs-close, +.tabs-p-tool { + position: absolute; + font-size: 1px; + display: block; + height: 12px; + padding: 0; + top: 50%; + margin-top: -6px; + overflow: hidden; +} +.tabs li a.tabs-close { + width: 12px; + right: 5px; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs-p-tool { + right: 16px; +} +.tabs-p-tool a { + display: inline-block; + font-size: 1px; + width: 12px; + height: 12px; + margin: 0; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs li a:hover.tabs-close, +.tabs-p-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + cursor: hand; + cursor: pointer; +} +.tabs-with-icon { + padding-left: 18px; +} +.tabs-icon { + position: absolute; + width: 16px; + height: 16px; + left: 10px; + top: 50%; + margin-top: -8px; +} +.tabs-title { + font-size: 12px; +} +.tabs-closable { + padding-right: 8px; +} +.tabs-panels { + margin: 0px; + padding: 0px; + border-width: 1px; + border-style: solid; + border-top-width: 0; + overflow: hidden; +} +.tabs-header-bottom { + border-width: 0 1px 1px 1px; + padding: 0 0 2px 0; +} +.tabs-header-bottom .tabs { + border-width: 1px 0 0 0; +} +.tabs-header-bottom .tabs li { + margin: -1px 4px 0 0; +} +.tabs-header-bottom .tabs li a.tabs-inner { + -moz-border-radius: 0 0 5px 5px; + -webkit-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; +} +.tabs-header-bottom .tabs-tool { + top: 0; +} +.tabs-header-bottom .tabs-scroller-left, +.tabs-header-bottom .tabs-scroller-right { + top: 0; + bottom: auto; +} +.tabs-panels-top { + border-width: 1px 1px 0 1px; +} +.tabs-header-left { + float: left; + border-width: 1px 0 1px 1px; + padding: 0; +} +.tabs-header-right { + float: right; + border-width: 1px 1px 1px 0; + padding: 0; +} +.tabs-header-left .tabs-wrap, +.tabs-header-right .tabs-wrap { + height: 100%; +} +.tabs-header-left .tabs { + height: 100%; + padding: 4px 0 0 2px; + border-width: 0 1px 0 0; +} +.tabs-header-right .tabs { + height: 100%; + padding: 4px 2px 0 0; + border-width: 0 0 0 1px; +} +.tabs-header-left .tabs li, +.tabs-header-right .tabs li { + display: block; + width: 100%; + position: relative; +} +.tabs-header-left .tabs li { + left: auto; + right: 0; + margin: 0 -1px 4px 0; + float: right; +} +.tabs-header-right .tabs li { + left: 0; + right: auto; + margin: 0 0 4px -1px; + float: left; +} +.tabs-justified li a.tabs-inner { + padding-left: 0; + padding-right: 0; +} +.tabs-header-left .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.tabs-header-right .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.tabs-panels-right { + float: right; + border-width: 1px 1px 1px 0; +} +.tabs-panels-left { + float: left; + border-width: 1px 0 1px 1px; +} +.tabs-header-noborder, +.tabs-panels-noborder { + border: 0px; +} +.tabs-header-plain { + border: 0px; + background: transparent; +} +.tabs-pill { + padding-bottom: 3px; +} +.tabs-header-bottom .tabs-pill { + padding-top: 3px; + padding-bottom: 0; +} +.tabs-header-left .tabs-pill { + padding-right: 3px; +} +.tabs-header-right .tabs-pill { + padding-left: 3px; +} +.tabs-header .tabs-pill li a.tabs-inner { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tabs-header-narrow, +.tabs-header-narrow .tabs-narrow { + padding: 0; +} +.tabs-narrow li, +.tabs-header-bottom .tabs-narrow li { + margin-left: 0; + margin-right: -1px; +} +.tabs-narrow li.tabs-last, +.tabs-header-bottom .tabs-narrow li.tabs-last { + margin-right: 0; +} +.tabs-header-left .tabs-narrow, +.tabs-header-right .tabs-narrow { + padding-top: 0; +} +.tabs-header-left .tabs-narrow li { + margin-bottom: -1px; + margin-right: -1px; +} +.tabs-header-left .tabs-narrow li.tabs-last, +.tabs-header-right .tabs-narrow li.tabs-last { + margin-bottom: 0; +} +.tabs-header-right .tabs-narrow li { + margin-bottom: -1px; + margin-left: -1px; +} +.tabs-scroller-left { + background: #3d3d3d url('images/tabs_icons.png') no-repeat 1px center; +} +.tabs-scroller-right { + background: #3d3d3d url('images/tabs_icons.png') no-repeat -15px center; +} +.tabs li a.tabs-close { + background: url('images/tabs_icons.png') no-repeat -34px center; +} +.tabs li a.tabs-inner:hover { + background: #777; + color: #fff; + filter: none; +} +.tabs li.tabs-selected a.tabs-inner { + background-color: #666; + color: #fff; + background: -webkit-linear-gradient(top,#454545 0,#666 100%); + background: -moz-linear-gradient(top,#454545 0,#666 100%); + background: -o-linear-gradient(top,#454545 0,#666 100%); + background: linear-gradient(to bottom,#454545 0,#666 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#454545,endColorstr=#666,GradientType=0); +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(top,#666 0,#454545 100%); + background: -moz-linear-gradient(top,#666 0,#454545 100%); + background: -o-linear-gradient(top,#666 0,#454545 100%); + background: linear-gradient(to bottom,#666 0,#454545 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#666,endColorstr=#454545,GradientType=0); +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#454545 0,#666 100%); + background: -moz-linear-gradient(left,#454545 0,#666 100%); + background: -o-linear-gradient(left,#454545 0,#666 100%); + background: linear-gradient(to right,#454545 0,#666 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#454545,endColorstr=#666,GradientType=1); +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#666 0,#454545 100%); + background: -moz-linear-gradient(left,#666 0,#454545 100%); + background: -o-linear-gradient(left,#666 0,#454545 100%); + background: linear-gradient(to right,#666 0,#454545 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#666,endColorstr=#454545,GradientType=1); +} +.tabs li a.tabs-inner { + color: #fff; + background-color: #3d3d3d; + background: -webkit-linear-gradient(top,#454545 0,#383838 100%); + background: -moz-linear-gradient(top,#454545 0,#383838 100%); + background: -o-linear-gradient(top,#454545 0,#383838 100%); + background: linear-gradient(to bottom,#454545 0,#383838 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#454545,endColorstr=#383838,GradientType=0); +} +.tabs-header, +.tabs-tool { + background-color: #3d3d3d; +} +.tabs-header-plain { + background: transparent; +} +.tabs-header, +.tabs-scroller-left, +.tabs-scroller-right, +.tabs-tool, +.tabs, +.tabs-panels, +.tabs li a.tabs-inner, +.tabs li.tabs-selected a.tabs-inner, +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner, +.tabs-header-left .tabs li.tabs-selected a.tabs-inner, +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-color: #000; +} +.tabs-p-tool a:hover, +.tabs li a:hover.tabs-close, +.tabs-scroller-over { + background-color: #777; +} +.tabs li.tabs-selected a.tabs-inner { + border-bottom: 1px solid #666; +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + border-top: 1px solid #666; +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + border-right: 1px solid #666; +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-left: 1px solid #666; +} +.tabs-header .tabs-pill li.tabs-selected a.tabs-inner { + background: #0052A3; + color: #fff; + filter: none; + border-color: #000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/textbox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/textbox.css new file mode 100644 index 0000000..6debaea --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/textbox.css @@ -0,0 +1,90 @@ +.textbox { + position: relative; + border: 1px solid #000; + background-color: #fff; + vertical-align: middle; + display: inline-block; + overflow: hidden; + white-space: nowrap; + margin: 0; + padding: 0; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox .textbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 4px; + white-space: normal; + vertical-align: top; + outline-style: none; + resize: none; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox textarea.textbox-text { + white-space: pre-wrap; +} +.textbox .textbox-prompt { + font-size: 12px; + color: #aaa; +} +.textbox .textbox-button, +.textbox .textbox-button:hover { + position: absolute; + top: 0; + padding: 0; + vertical-align: top; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.textbox-button-right, +.textbox-button-right:hover { + border-width: 0 0 0 1px; +} +.textbox-button-left, +.textbox-button-left:hover { + border-width: 0 1px 0 0; +} +.textbox-addon { + position: absolute; + top: 0; +} +.textbox-icon { + display: inline-block; + width: 18px; + height: 20px; + overflow: hidden; + vertical-align: top; + background-position: center center; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); + text-decoration: none; + outline-style: none; +} +.textbox-icon-disabled, +.textbox-icon-readonly { + cursor: default; +} +.textbox-icon:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.textbox-icon-disabled:hover { + opacity: 0.6; + filter: alpha(opacity=60); +} +.textbox-focused { + -moz-box-shadow: 0 0 3px 0 #000; + -webkit-box-shadow: 0 0 3px 0 #000; + box-shadow: 0 0 3px 0 #000; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/tooltip.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/tooltip.css new file mode 100644 index 0000000..391fd95 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/tooltip.css @@ -0,0 +1,103 @@ +.tooltip { + position: absolute; + display: none; + z-index: 9900000; + outline: none; + opacity: 1; + filter: alpha(opacity=100); + padding: 5px; + border-width: 1px; + border-style: solid; + border-radius: 5px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tooltip-content { + font-size: 12px; +} +.tooltip-arrow-outer, +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + line-height: 0; + font-size: 0; + border-style: solid; + border-width: 6px; + border-color: transparent; + _border-color: tomato; + _filter: chroma(color=tomato); +} +.tooltip-arrow { + display: none \9; +} +.tooltip-right .tooltip-arrow-outer { + left: 0; + top: 50%; + margin: -6px 0 0 -13px; +} +.tooltip-right .tooltip-arrow { + left: 0; + top: 50%; + margin: -6px 0 0 -12px; +} +.tooltip-left .tooltip-arrow-outer { + right: 0; + top: 50%; + margin: -6px -13px 0 0; +} +.tooltip-left .tooltip-arrow { + right: 0; + top: 50%; + margin: -6px -12px 0 0; +} +.tooltip-top .tooltip-arrow-outer { + bottom: 0; + left: 50%; + margin: 0 0 -13px -6px; +} +.tooltip-top .tooltip-arrow { + bottom: 0; + left: 50%; + margin: 0 0 -12px -6px; +} +.tooltip-bottom .tooltip-arrow-outer { + top: 0; + left: 50%; + margin: -13px 0 0 -6px; +} +.tooltip-bottom .tooltip-arrow { + top: 0; + left: 50%; + margin: -12px 0 0 -6px; +} +.tooltip { + background-color: #666; + border-color: #000; + color: #fff; +} +.tooltip-right .tooltip-arrow-outer { + border-right-color: #000; +} +.tooltip-right .tooltip-arrow { + border-right-color: #666; +} +.tooltip-left .tooltip-arrow-outer { + border-left-color: #000; +} +.tooltip-left .tooltip-arrow { + border-left-color: #666; +} +.tooltip-top .tooltip-arrow-outer { + border-top-color: #000; +} +.tooltip-top .tooltip-arrow { + border-top-color: #666; +} +.tooltip-bottom .tooltip-arrow-outer { + border-bottom-color: #000; +} +.tooltip-bottom .tooltip-arrow { + border-bottom-color: #666; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/tree.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/tree.css new file mode 100644 index 0000000..e55f905 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/tree.css @@ -0,0 +1,160 @@ +.tree { + margin: 0; + padding: 0; + list-style-type: none; +} +.tree li { + white-space: nowrap; +} +.tree li ul { + list-style-type: none; + margin: 0; + padding: 0; +} +.tree-node { + height: 18px; + white-space: nowrap; + cursor: pointer; +} +.tree-hit { + cursor: pointer; +} +.tree-expanded, +.tree-collapsed, +.tree-folder, +.tree-file, +.tree-checkbox, +.tree-indent { + display: inline-block; + width: 16px; + height: 18px; + vertical-align: top; + overflow: hidden; +} +.tree-expanded { + background: url('images/tree_icons.png') no-repeat -18px 0px; +} +.tree-expanded-hover { + background: url('images/tree_icons.png') no-repeat -50px 0px; +} +.tree-collapsed { + background: url('images/tree_icons.png') no-repeat 0px 0px; +} +.tree-collapsed-hover { + background: url('images/tree_icons.png') no-repeat -32px 0px; +} +.tree-lines .tree-expanded, +.tree-lines .tree-root-first .tree-expanded { + background: url('images/tree_icons.png') no-repeat -144px 0; +} +.tree-lines .tree-collapsed, +.tree-lines .tree-root-first .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -128px 0; +} +.tree-lines .tree-node-last .tree-expanded, +.tree-lines .tree-root-one .tree-expanded { + background: url('images/tree_icons.png') no-repeat -80px 0; +} +.tree-lines .tree-node-last .tree-collapsed, +.tree-lines .tree-root-one .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -64px 0; +} +.tree-line { + background: url('images/tree_icons.png') no-repeat -176px 0; +} +.tree-join { + background: url('images/tree_icons.png') no-repeat -192px 0; +} +.tree-joinbottom { + background: url('images/tree_icons.png') no-repeat -160px 0; +} +.tree-folder { + background: url('images/tree_icons.png') no-repeat -208px 0; +} +.tree-folder-open { + background: url('images/tree_icons.png') no-repeat -224px 0; +} +.tree-file { + background: url('images/tree_icons.png') no-repeat -240px 0; +} +.tree-loading { + background: url('images/loading.gif') no-repeat center center; +} +.tree-checkbox0 { + background: url('images/tree_icons.png') no-repeat -208px -18px; +} +.tree-checkbox1 { + background: url('images/tree_icons.png') no-repeat -224px -18px; +} +.tree-checkbox2 { + background: url('images/tree_icons.png') no-repeat -240px -18px; +} +.tree-title { + font-size: 12px; + display: inline-block; + text-decoration: none; + vertical-align: top; + white-space: nowrap; + padding: 0 2px; + height: 18px; + line-height: 18px; +} +.tree-node-proxy { + font-size: 12px; + line-height: 20px; + padding: 0 2px 0 20px; + border-width: 1px; + border-style: solid; + z-index: 9900000; +} +.tree-dnd-icon { + display: inline-block; + position: absolute; + width: 16px; + height: 18px; + left: 2px; + top: 50%; + margin-top: -9px; +} +.tree-dnd-yes { + background: url('images/tree_icons.png') no-repeat -256px 0; +} +.tree-dnd-no { + background: url('images/tree_icons.png') no-repeat -256px -18px; +} +.tree-node-top { + border-top: 1px dotted red; +} +.tree-node-bottom { + border-bottom: 1px dotted red; +} +.tree-node-append .tree-title { + border: 1px dotted red; +} +.tree-editor { + border: 1px solid #ccc; + font-size: 12px; + height: 14px !important; + height: 18px; + line-height: 14px; + padding: 1px 2px; + width: 80px; + position: absolute; + top: 0; +} +.tree-node-proxy { + background-color: #666; + color: #fff; + border-color: #000; +} +.tree-node-hover { + background: #777; + color: #fff; +} +.tree-node-selected { + background: #0052A3; + color: #fff; +} +.tree-node-hidden { + display: none; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/validatebox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/validatebox.css new file mode 100644 index 0000000..1fc3ad6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/validatebox.css @@ -0,0 +1,5 @@ +.validatebox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; + color: #000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/black/window.css b/src/main/webapp/jquery-easyui-1.4.4/themes/black/window.css new file mode 100644 index 0000000..01942ab --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/black/window.css @@ -0,0 +1,94 @@ +.window { + overflow: hidden; + padding: 5px; + border-width: 1px; + border-style: solid; +} +.window .window-header { + background: transparent; + padding: 0px 0px 6px 0px; +} +.window .window-body { + border-width: 1px; + border-style: solid; + border-top-width: 0px; +} +.window .window-body-noheader { + border-top-width: 1px; +} +.window .panel-body-nobottom { + border-bottom-width: 0; +} +.window .window-header .panel-icon, +.window .window-header .panel-tool { + top: 50%; + margin-top: -11px; +} +.window .window-header .panel-icon { + left: 1px; +} +.window .window-header .panel-tool { + right: 1px; +} +.window .window-header .panel-with-icon { + padding-left: 18px; +} +.window-proxy { + position: absolute; + overflow: hidden; +} +.window-proxy-mask { + position: absolute; + filter: alpha(opacity=5); + opacity: 0.05; +} +.window-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + filter: alpha(opacity=40); + opacity: 0.40; + font-size: 1px; + overflow: hidden; +} +.window, +.window-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.window-shadow { + background: #777; + -moz-box-shadow: 2px 2px 3px #787878; + -webkit-box-shadow: 2px 2px 3px #787878; + box-shadow: 2px 2px 3px #787878; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.window, +.window .window-body { + border-color: #000; +} +.window { + background-color: #3d3d3d; + background: -webkit-linear-gradient(top,#454545 0,#383838 20%); + background: -moz-linear-gradient(top,#454545 0,#383838 20%); + background: -o-linear-gradient(top,#454545 0,#383838 20%); + background: linear-gradient(to bottom,#454545 0,#383838 20%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#454545,endColorstr=#383838,GradientType=0); +} +.window-proxy { + border: 1px dashed #000; +} +.window-proxy-mask, +.window-mask { + background: #000; +} +.window .panel-footer { + border: 1px solid #000; + position: relative; + top: -1px; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/accordion.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/accordion.css new file mode 100644 index 0000000..26db0fa --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/accordion.css @@ -0,0 +1,41 @@ +.accordion { + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.accordion .accordion-header { + border-width: 0 0 1px; + cursor: pointer; +} +.accordion .accordion-body { + border-width: 0 0 1px; +} +.accordion-noborder { + border-width: 0; +} +.accordion-noborder .accordion-header { + border-width: 0 0 1px; +} +.accordion-noborder .accordion-body { + border-width: 0 0 1px; +} +.accordion-collapse { + background: url('images/accordion_arrows.png') no-repeat 0 0; +} +.accordion-expand { + background: url('images/accordion_arrows.png') no-repeat -16px 0; +} +.accordion { + background: #ffffff; + border-color: #D4D4D4; +} +.accordion .accordion-header { + background: #F2F2F2; + filter: none; +} +.accordion .accordion-header-selected { + background: #0081c2; +} +.accordion .accordion-header-selected .panel-title { + color: #fff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/calendar.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/calendar.css new file mode 100644 index 0000000..5eb1eff --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/calendar.css @@ -0,0 +1,197 @@ +.calendar { + border-width: 1px; + border-style: solid; + padding: 1px; + overflow: hidden; +} +.calendar table { + table-layout: fixed; + border-collapse: separate; + font-size: 12px; + width: 100%; + height: 100%; +} +.calendar table td, +.calendar table th { + font-size: 12px; +} +.calendar-noborder { + border: 0; +} +.calendar-header { + position: relative; + height: 22px; +} +.calendar-title { + text-align: center; + height: 22px; +} +.calendar-title span { + position: relative; + display: inline-block; + top: 2px; + padding: 0 3px; + height: 18px; + line-height: 18px; + font-size: 12px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth, +.calendar-nextmonth, +.calendar-prevyear, +.calendar-nextyear { + position: absolute; + top: 50%; + margin-top: -7px; + width: 14px; + height: 14px; + cursor: pointer; + font-size: 1px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth { + left: 20px; + background: url('images/calendar_arrows.png') no-repeat -18px -2px; +} +.calendar-nextmonth { + right: 20px; + background: url('images/calendar_arrows.png') no-repeat -34px -2px; +} +.calendar-prevyear { + left: 3px; + background: url('images/calendar_arrows.png') no-repeat -1px -2px; +} +.calendar-nextyear { + right: 3px; + background: url('images/calendar_arrows.png') no-repeat -49px -2px; +} +.calendar-body { + position: relative; +} +.calendar-body th, +.calendar-body td { + text-align: center; +} +.calendar-day { + border: 0; + padding: 1px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-other-month { + opacity: 0.3; + filter: alpha(opacity=30); +} +.calendar-disabled { + opacity: 0.6; + filter: alpha(opacity=60); + cursor: default; +} +.calendar-menu { + position: absolute; + top: 0; + left: 0; + width: 180px; + height: 150px; + padding: 5px; + font-size: 12px; + display: none; + overflow: hidden; +} +.calendar-menu-year-inner { + text-align: center; + padding-bottom: 5px; +} +.calendar-menu-year { + width: 40px; + text-align: center; + border-width: 1px; + border-style: solid; + margin: 0; + padding: 2px; + font-weight: bold; + font-size: 12px; +} +.calendar-menu-prev, +.calendar-menu-next { + display: inline-block; + width: 21px; + height: 21px; + vertical-align: top; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-menu-prev { + margin-right: 10px; + background: url('images/calendar_arrows.png') no-repeat 2px 2px; +} +.calendar-menu-next { + margin-left: 10px; + background: url('images/calendar_arrows.png') no-repeat -45px 2px; +} +.calendar-menu-month { + text-align: center; + cursor: pointer; + font-weight: bold; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-body th, +.calendar-menu-month { + color: #808080; +} +.calendar-day { + color: #333; +} +.calendar-sunday { + color: #CC2222; +} +.calendar-saturday { + color: #00ee00; +} +.calendar-today { + color: #0000ff; +} +.calendar-menu-year { + border-color: #D4D4D4; +} +.calendar { + border-color: #D4D4D4; +} +.calendar-header { + background: #F2F2F2; +} +.calendar-body, +.calendar-menu { + background: #ffffff; +} +.calendar-body th { + background: #F5F5F5; + padding: 2px 0; +} +.calendar-hover, +.calendar-nav-hover, +.calendar-menu-hover { + background-color: #e6e6e6; + color: #00438a; +} +.calendar-hover { + border: 1px solid #ddd; + padding: 0; +} +.calendar-selected { + background-color: #0081c2; + color: #fff; + border: 1px solid #0070a9; + padding: 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/combo.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/combo.css new file mode 100644 index 0000000..e3ee8e1 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/combo.css @@ -0,0 +1,60 @@ +.combo { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.combo .combo-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0px 2px; + vertical-align: baseline; +} +.combo-arrow { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.combo-arrow-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.combo-panel { + overflow: auto; +} +.combo-arrow { + background: url('images/combo_arrow.png') no-repeat center center; +} +.combo-panel { + background-color: #ffffff; +} +.combo { + border-color: #D4D4D4; + background-color: #fff; +} +.combo-arrow { + background-color: #F2F2F2; +} +.combo-arrow-hover { + background-color: #e6e6e6; +} +.combo-arrow:hover { + background-color: #e6e6e6; +} +.combo .textbox-icon-disabled:hover { + cursor: default; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/combobox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/combobox.css new file mode 100644 index 0000000..82abe63 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/combobox.css @@ -0,0 +1,24 @@ +.combobox-item, +.combobox-group { + font-size: 12px; + padding: 3px; + padding-right: 0px; +} +.combobox-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.combobox-gitem { + padding-left: 10px; +} +.combobox-group { + font-weight: bold; +} +.combobox-item-hover { + background-color: #e6e6e6; + color: #00438a; +} +.combobox-item-selected { + background-color: #0081c2; + color: #fff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/datagrid.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/datagrid.css new file mode 100644 index 0000000..d0cbc9a --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/datagrid.css @@ -0,0 +1,276 @@ +.datagrid .panel-body { + overflow: hidden; + position: relative; +} +.datagrid-view { + position: relative; + overflow: hidden; +} +.datagrid-view1, +.datagrid-view2 { + position: absolute; + overflow: hidden; + top: 0; +} +.datagrid-view1 { + left: 0; +} +.datagrid-view2 { + right: 0; +} +.datagrid-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0.3; + filter: alpha(opacity=30); + display: none; +} +.datagrid-mask-msg { + position: absolute; + top: 50%; + margin-top: -20px; + padding: 10px 5px 10px 30px; + width: auto; + height: 16px; + border-width: 2px; + border-style: solid; + display: none; +} +.datagrid-sort-icon { + padding: 0; + display: none; +} +.datagrid-toolbar { + height: auto; + padding: 1px 2px; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.datagrid .datagrid-pager { + display: block; + margin: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.datagrid .datagrid-pager-top { + border-width: 0 0 1px 0; +} +.datagrid-header { + overflow: hidden; + cursor: default; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-header-inner { + float: left; + width: 10000px; +} +.datagrid-header-row, +.datagrid-row { + height: 25px; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-width: 0 1px 1px 0; + border-style: dotted; + margin: 0; + padding: 0; +} +.datagrid-cell, +.datagrid-cell-group, +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + margin: 0; + padding: 0 4px; + white-space: nowrap; + word-wrap: normal; + overflow: hidden; + height: 18px; + line-height: 18px; + font-size: 12px; +} +.datagrid-header .datagrid-cell { + height: auto; +} +.datagrid-header .datagrid-cell span { + font-size: 12px; +} +.datagrid-cell-group { + text-align: center; + text-overflow: ellipsis; +} +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + width: 30px; + text-align: center; + margin: 0; + padding: 0; +} +.datagrid-body { + margin: 0; + padding: 0; + overflow: auto; + zoom: 1; +} +.datagrid-view1 .datagrid-body-inner { + padding-bottom: 20px; +} +.datagrid-view1 .datagrid-body { + overflow: hidden; +} +.datagrid-footer { + overflow: hidden; +} +.datagrid-footer-inner { + border-width: 1px 0 0 0; + border-style: solid; + width: 10000px; + float: left; +} +.datagrid-row-editing .datagrid-cell { + height: auto; +} +.datagrid-header-check, +.datagrid-cell-check { + padding: 0; + width: 27px; + height: 18px; + font-size: 1px; + text-align: center; + overflow: hidden; +} +.datagrid-header-check input, +.datagrid-cell-check input { + margin: 0; + padding: 0; + width: 15px; + height: 18px; +} +.datagrid-resize-proxy { + position: absolute; + width: 1px; + height: 10000px; + top: 0; + cursor: e-resize; + display: none; +} +.datagrid-body .datagrid-editable { + margin: 0; + padding: 0; +} +.datagrid-body .datagrid-editable table { + width: 100%; + height: 100%; +} +.datagrid-body .datagrid-editable td { + border: 0; + margin: 0; + padding: 0; +} +.datagrid-view .datagrid-editable-input { + margin: 0; + padding: 2px 4px; + border: 1px solid #D4D4D4; + font-size: 12px; + outline-style: none; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.datagrid-sort .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -64px center; +} +.datagrid-sort-desc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -16px center; +} +.datagrid-sort-asc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat 0px center; +} +.datagrid-row-collapse { + background: url('images/datagrid_icons.png') no-repeat -48px center; +} +.datagrid-row-expand { + background: url('images/datagrid_icons.png') no-repeat -32px center; +} +.datagrid-mask-msg { + background: #ffffff url('images/loading.gif') no-repeat scroll 5px center; +} +.datagrid-header, +.datagrid-td-rownumber { + background-color: #F2F2F2; + background: -webkit-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: -moz-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: -o-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: linear-gradient(to bottom,#ffffff 0,#F2F2F2 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#F2F2F2,GradientType=0); +} +.datagrid-cell-rownumber { + color: #333; +} +.datagrid-resize-proxy { + background: #bbb; +} +.datagrid-mask { + background: #ccc; +} +.datagrid-mask-msg { + border-color: #D4D4D4; +} +.datagrid-toolbar, +.datagrid-pager { + background: #F5F5F5; +} +.datagrid-header, +.datagrid-toolbar, +.datagrid-pager, +.datagrid-footer-inner { + border-color: #e6e6e6; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-color: #ccc; +} +.datagrid-htable, +.datagrid-btable, +.datagrid-ftable { + color: #333; + border-collapse: separate; +} +.datagrid-row-alt { + background: #F5F5F5; +} +.datagrid-row-over, +.datagrid-header td.datagrid-header-over { + background: #e6e6e6; + color: #00438a; + cursor: default; +} +.datagrid-row-selected { + background: #0081c2; + color: #fff; +} +.datagrid-row-editing .textbox, +.datagrid-row-editing .textbox-text { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/datalist.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/datalist.css new file mode 100644 index 0000000..68e8df6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/datalist.css @@ -0,0 +1,95 @@ +.datalist .datagrid-header { + border-width: 0; +} +.datalist .datagrid-group, +.m-list .m-list-group { + height: 25px; + line-height: 25px; + font-weight: bold; + overflow: hidden; + background-color: #F2F2F2; + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ccc; +} +.datalist .datagrid-group-expander { + display: none; +} +.datalist .datagrid-group-title { + padding: 0 4px; +} +.datalist .datagrid-btable { + width: 100%; + table-layout: fixed; +} +.datalist .datagrid-row td { + border-style: solid; + border-left-color: transparent; + border-right-color: transparent; + border-bottom-width: 0; +} +.datalist-lines .datagrid-row td { + border-bottom-width: 1px; +} +.datalist .datagrid-cell, +.m-list li { + width: auto; + height: auto; + padding: 2px 4px; + line-height: 18px; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link, +.m-list li>a { + display: block; + position: relative; + cursor: pointer; + color: #333; + text-decoration: none; + overflow: hidden; + margin: -2px -4px; + padding: 2px 4px; + padding-right: 16px; + line-height: 18px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link::after, +.m-list li>a::after { + position: absolute; + display: block; + width: 8px; + height: 8px; + content: ''; + right: 6px; + top: 50%; + margin-top: -4px; + border-style: solid; + border-width: 1px 1px 0 0; + -ms-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} +.m-list { + margin: 0; + padding: 0; + list-style: none; +} +.m-list li { + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ccc; +} +.m-list li>a:hover { + background: #e6e6e6; + color: #00438a; +} +.m-list .m-list-group { + padding: 0 4px; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/datebox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/datebox.css new file mode 100644 index 0000000..b9d2bcb --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/datebox.css @@ -0,0 +1,36 @@ +.datebox-calendar-inner { + height: 180px; +} +.datebox-button { + height: 18px; + padding: 2px 5px; + text-align: center; +} +.datebox-button a { + font-size: 12px; + font-weight: bold; + text-decoration: none; + opacity: 0.6; + filter: alpha(opacity=60); +} +.datebox-button a:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.datebox-current, +.datebox-close { + float: left; +} +.datebox-close { + float: right; +} +.datebox .combo-arrow { + background-image: url('images/datebox_arrow.png'); + background-position: center center; +} +.datebox-button { + background-color: #F5F5F5; +} +.datebox-button a { + color: #444; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/dialog.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/dialog.css new file mode 100644 index 0000000..5fdaec3 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/dialog.css @@ -0,0 +1,32 @@ +.dialog-content { + overflow: auto; +} +.dialog-toolbar { + padding: 2px 5px; +} +.dialog-tool-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.dialog-button { + padding: 5px; + text-align: right; +} +.dialog-button .l-btn { + margin-left: 5px; +} +.dialog-toolbar, +.dialog-button { + background: #F5F5F5; + border-width: 1px; + border-style: solid; +} +.dialog-toolbar { + border-color: #D4D4D4 #D4D4D4 #e6e6e6 #D4D4D4; +} +.dialog-button { + border-color: #e6e6e6 #D4D4D4 #D4D4D4 #D4D4D4; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/easyui.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/easyui.css new file mode 100644 index 0000000..763f5c7 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/easyui.css @@ -0,0 +1,2888 @@ +.panel { + overflow: hidden; + text-align: left; + margin: 0; + border: 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.panel-header, +.panel-body { + border-width: 1px; + border-style: solid; +} +.panel-header { + padding: 5px; + position: relative; +} +.panel-title { + background: url('images/blank.gif') no-repeat; +} +.panel-header-noborder { + border-width: 0 0 1px 0; +} +.panel-body { + overflow: auto; + border-top-width: 0; + padding: 0; +} +.panel-body-noheader { + border-top-width: 1px; +} +.panel-body-noborder { + border-width: 0px; +} +.panel-body-nobottom { + border-bottom-width: 0; +} +.panel-with-icon { + padding-left: 18px; +} +.panel-icon, +.panel-tool { + position: absolute; + top: 50%; + margin-top: -8px; + height: 16px; + overflow: hidden; +} +.panel-icon { + left: 5px; + width: 16px; +} +.panel-tool { + right: 5px; + width: auto; +} +.panel-tool a { + display: inline-block; + width: 16px; + height: 16px; + opacity: 0.6; + filter: alpha(opacity=60); + margin: 0 0 0 2px; + vertical-align: top; +} +.panel-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + background-color: #e6e6e6; + -moz-border-radius: 3px 3px 3px 3px; + -webkit-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; +} +.panel-loading { + padding: 11px 0px 10px 30px; +} +.panel-noscroll { + overflow: hidden; +} +.panel-fit, +.panel-fit body { + height: 100%; + margin: 0; + padding: 0; + border: 0; + overflow: hidden; +} +.panel-loading { + background: url('images/loading.gif') no-repeat 10px 10px; +} +.panel-tool-close { + background: url('images/panel_tools.png') no-repeat -16px 0px; +} +.panel-tool-min { + background: url('images/panel_tools.png') no-repeat 0px 0px; +} +.panel-tool-max { + background: url('images/panel_tools.png') no-repeat 0px -16px; +} +.panel-tool-restore { + background: url('images/panel_tools.png') no-repeat -16px -16px; +} +.panel-tool-collapse { + background: url('images/panel_tools.png') no-repeat -32px 0; +} +.panel-tool-expand { + background: url('images/panel_tools.png') no-repeat -32px -16px; +} +.panel-header, +.panel-body { + border-color: #D4D4D4; +} +.panel-header { + background-color: #F2F2F2; + background: -webkit-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: -moz-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: -o-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: linear-gradient(to bottom,#ffffff 0,#F2F2F2 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#F2F2F2,GradientType=0); +} +.panel-body { + background-color: #ffffff; + color: #333; + font-size: 12px; +} +.panel-title { + font-size: 12px; + font-weight: bold; + color: #777; + height: 16px; + line-height: 16px; +} +.panel-footer { + border: 1px solid #D4D4D4; + overflow: hidden; + background: #F5F5F5; +} +.panel-footer-noborder { + border-width: 1px 0 0 0; +} +.accordion { + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.accordion .accordion-header { + border-width: 0 0 1px; + cursor: pointer; +} +.accordion .accordion-body { + border-width: 0 0 1px; +} +.accordion-noborder { + border-width: 0; +} +.accordion-noborder .accordion-header { + border-width: 0 0 1px; +} +.accordion-noborder .accordion-body { + border-width: 0 0 1px; +} +.accordion-collapse { + background: url('images/accordion_arrows.png') no-repeat 0 0; +} +.accordion-expand { + background: url('images/accordion_arrows.png') no-repeat -16px 0; +} +.accordion { + background: #ffffff; + border-color: #D4D4D4; +} +.accordion .accordion-header { + background: #F2F2F2; + filter: none; +} +.accordion .accordion-header-selected { + background: #0081c2; +} +.accordion .accordion-header-selected .panel-title { + color: #fff; +} +.window { + overflow: hidden; + padding: 5px; + border-width: 1px; + border-style: solid; +} +.window .window-header { + background: transparent; + padding: 0px 0px 6px 0px; +} +.window .window-body { + border-width: 1px; + border-style: solid; + border-top-width: 0px; +} +.window .window-body-noheader { + border-top-width: 1px; +} +.window .panel-body-nobottom { + border-bottom-width: 0; +} +.window .window-header .panel-icon, +.window .window-header .panel-tool { + top: 50%; + margin-top: -11px; +} +.window .window-header .panel-icon { + left: 1px; +} +.window .window-header .panel-tool { + right: 1px; +} +.window .window-header .panel-with-icon { + padding-left: 18px; +} +.window-proxy { + position: absolute; + overflow: hidden; +} +.window-proxy-mask { + position: absolute; + filter: alpha(opacity=5); + opacity: 0.05; +} +.window-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + filter: alpha(opacity=40); + opacity: 0.40; + font-size: 1px; + overflow: hidden; +} +.window, +.window-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.window-shadow { + background: #ccc; + -moz-box-shadow: 2px 2px 3px #cccccc; + -webkit-box-shadow: 2px 2px 3px #cccccc; + box-shadow: 2px 2px 3px #cccccc; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.window, +.window .window-body { + border-color: #D4D4D4; +} +.window { + background-color: #F2F2F2; + background: -webkit-linear-gradient(top,#ffffff 0,#F2F2F2 20%); + background: -moz-linear-gradient(top,#ffffff 0,#F2F2F2 20%); + background: -o-linear-gradient(top,#ffffff 0,#F2F2F2 20%); + background: linear-gradient(to bottom,#ffffff 0,#F2F2F2 20%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#F2F2F2,GradientType=0); +} +.window-proxy { + border: 1px dashed #D4D4D4; +} +.window-proxy-mask, +.window-mask { + background: #ccc; +} +.window .panel-footer { + border: 1px solid #D4D4D4; + position: relative; + top: -1px; +} +.dialog-content { + overflow: auto; +} +.dialog-toolbar { + padding: 2px 5px; +} +.dialog-tool-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.dialog-button { + padding: 5px; + text-align: right; +} +.dialog-button .l-btn { + margin-left: 5px; +} +.dialog-toolbar, +.dialog-button { + background: #F5F5F5; + border-width: 1px; + border-style: solid; +} +.dialog-toolbar { + border-color: #D4D4D4 #D4D4D4 #e6e6e6 #D4D4D4; +} +.dialog-button { + border-color: #e6e6e6 #D4D4D4 #D4D4D4 #D4D4D4; +} +.l-btn { + text-decoration: none; + display: inline-block; + overflow: hidden; + margin: 0; + padding: 0; + cursor: pointer; + outline: none; + text-align: center; + vertical-align: middle; + line-height: normal; +} +.l-btn-plain { + border-width: 0; + padding: 1px; +} +.l-btn-left { + display: inline-block; + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + vertical-align: top; +} +.l-btn-text { + display: inline-block; + vertical-align: top; + width: auto; + line-height: 24px; + font-size: 12px; + padding: 0; + margin: 0 4px; +} +.l-btn-icon { + display: inline-block; + width: 16px; + height: 16px; + line-height: 16px; + position: absolute; + top: 50%; + margin-top: -8px; + font-size: 1px; +} +.l-btn span span .l-btn-empty { + display: inline-block; + margin: 0; + width: 16px; + height: 24px; + font-size: 1px; + vertical-align: top; +} +.l-btn span .l-btn-icon-left { + padding: 0 0 0 20px; + background-position: left center; +} +.l-btn span .l-btn-icon-right { + padding: 0 20px 0 0; + background-position: right center; +} +.l-btn-icon-left .l-btn-text { + margin: 0 4px 0 24px; +} +.l-btn-icon-left .l-btn-icon { + left: 4px; +} +.l-btn-icon-right .l-btn-text { + margin: 0 24px 0 4px; +} +.l-btn-icon-right .l-btn-icon { + right: 4px; +} +.l-btn-icon-top .l-btn-text { + margin: 20px 4px 0 4px; +} +.l-btn-icon-top .l-btn-icon { + top: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-icon-bottom .l-btn-text { + margin: 0 4px 20px 4px; +} +.l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-left .l-btn-empty { + margin: 0 4px; + width: 16px; +} +.l-btn-plain:hover { + padding: 0; +} +.l-btn-focus { + outline: #0000FF dotted thin; +} +.l-btn-large .l-btn-text { + line-height: 40px; +} +.l-btn-large .l-btn-icon { + width: 32px; + height: 32px; + line-height: 32px; + margin-top: -16px; +} +.l-btn-large .l-btn-icon-left .l-btn-text { + margin-left: 40px; +} +.l-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.l-btn-large .l-btn-icon-top .l-btn-text { + margin-top: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-top .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-left .l-btn-empty { + margin: 0 4px; + width: 32px; +} +.l-btn { + color: #444; + background: #f5f5f5; + background-repeat: repeat-x; + border: 1px solid #bbb; + background: -webkit-linear-gradient(top,#ffffff 0,#e6e6e6 100%); + background: -moz-linear-gradient(top,#ffffff 0,#e6e6e6 100%); + background: -o-linear-gradient(top,#ffffff 0,#e6e6e6 100%); + background: linear-gradient(to bottom,#ffffff 0,#e6e6e6 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#e6e6e6,GradientType=0); + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn:hover { + background: #e6e6e6; + color: #00438a; + border: 1px solid #ddd; + filter: none; +} +.l-btn-plain { + background: transparent; + border-width: 0; + filter: none; +} +.l-btn-outline { + border-width: 1px; + border-color: #ddd; + padding: 0; +} +.l-btn-plain:hover { + background: #e6e6e6; + color: #00438a; + border: 1px solid #ddd; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn-disabled, +.l-btn-disabled:hover { + opacity: 0.5; + cursor: default; + background: #f5f5f5; + color: #444; + background: -webkit-linear-gradient(top,#ffffff 0,#e6e6e6 100%); + background: -moz-linear-gradient(top,#ffffff 0,#e6e6e6 100%); + background: -o-linear-gradient(top,#ffffff 0,#e6e6e6 100%); + background: linear-gradient(to bottom,#ffffff 0,#e6e6e6 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#e6e6e6,GradientType=0); +} +.l-btn-disabled .l-btn-text, +.l-btn-disabled .l-btn-icon { + filter: alpha(opacity=50); +} +.l-btn-plain-disabled, +.l-btn-plain-disabled:hover { + background: transparent; + filter: alpha(opacity=50); +} +.l-btn-selected, +.l-btn-selected:hover { + background: #ddd; + filter: none; +} +.l-btn-plain-selected, +.l-btn-plain-selected:hover { + background: #ddd; +} +.textbox { + position: relative; + border: 1px solid #D4D4D4; + background-color: #fff; + vertical-align: middle; + display: inline-block; + overflow: hidden; + white-space: nowrap; + margin: 0; + padding: 0; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox .textbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 4px; + white-space: normal; + vertical-align: top; + outline-style: none; + resize: none; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox textarea.textbox-text { + white-space: pre-wrap; +} +.textbox .textbox-prompt { + font-size: 12px; + color: #aaa; +} +.textbox .textbox-button, +.textbox .textbox-button:hover { + position: absolute; + top: 0; + padding: 0; + vertical-align: top; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.textbox-button-right, +.textbox-button-right:hover { + border-width: 0 0 0 1px; +} +.textbox-button-left, +.textbox-button-left:hover { + border-width: 0 1px 0 0; +} +.textbox-addon { + position: absolute; + top: 0; +} +.textbox-icon { + display: inline-block; + width: 18px; + height: 20px; + overflow: hidden; + vertical-align: top; + background-position: center center; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); + text-decoration: none; + outline-style: none; +} +.textbox-icon-disabled, +.textbox-icon-readonly { + cursor: default; +} +.textbox-icon:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.textbox-icon-disabled:hover { + opacity: 0.6; + filter: alpha(opacity=60); +} +.textbox-focused { + -moz-box-shadow: 0 0 3px 0 #D4D4D4; + -webkit-box-shadow: 0 0 3px 0 #D4D4D4; + box-shadow: 0 0 3px 0 #D4D4D4; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} +.filebox .textbox-value { + vertical-align: top; + position: absolute; + top: 0; + left: -5000px; +} +.filebox-label { + display: inline-block; + position: absolute; + width: 100%; + height: 100%; + cursor: pointer; + left: 0; + top: 0; + z-index: 10; + background: url('images/blank.gif') no-repeat; +} +.l-btn-disabled .filebox-label { + cursor: default; +} +.combo { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.combo .combo-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0px 2px; + vertical-align: baseline; +} +.combo-arrow { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.combo-arrow-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.combo-panel { + overflow: auto; +} +.combo-arrow { + background: url('images/combo_arrow.png') no-repeat center center; +} +.combo-panel { + background-color: #ffffff; +} +.combo { + border-color: #D4D4D4; + background-color: #fff; +} +.combo-arrow { + background-color: #F2F2F2; +} +.combo-arrow-hover { + background-color: #e6e6e6; +} +.combo-arrow:hover { + background-color: #e6e6e6; +} +.combo .textbox-icon-disabled:hover { + cursor: default; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} +.combobox-item, +.combobox-group { + font-size: 12px; + padding: 3px; + padding-right: 0px; +} +.combobox-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.combobox-gitem { + padding-left: 10px; +} +.combobox-group { + font-weight: bold; +} +.combobox-item-hover { + background-color: #e6e6e6; + color: #00438a; +} +.combobox-item-selected { + background-color: #0081c2; + color: #fff; +} +.layout { + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + z-index: 0; +} +.layout-panel { + position: absolute; + overflow: hidden; +} +.layout-body { + min-width: 1px; + min-height: 1px; +} +.layout-panel-east, +.layout-panel-west { + z-index: 2; +} +.layout-panel-north, +.layout-panel-south { + z-index: 3; +} +.layout-expand { + position: absolute; + padding: 0px; + font-size: 1px; + cursor: pointer; + z-index: 1; +} +.layout-expand .panel-header, +.layout-expand .panel-body { + background: transparent; + filter: none; + overflow: hidden; +} +.layout-expand .panel-header { + border-bottom-width: 0px; +} +.layout-expand .panel-body { + position: relative; +} +.layout-expand .panel-body .panel-icon { + margin-top: 0; + top: 0; + left: 50%; + margin-left: -8px; +} +.layout-expand-west .panel-header .panel-icon, +.layout-expand-east .panel-header .panel-icon { + display: none; +} +.layout-expand-title { + position: absolute; + top: 0; + left: 21px; + white-space: nowrap; + word-wrap: normal; + -webkit-transform: rotate(90deg); + -webkit-transform-origin: 0 0; + -moz-transform: rotate(90deg); + -moz-transform-origin: 0 0; + -o-transform: rotate(90deg); + -o-transform-origin: 0 0; + transform: rotate(90deg); + transform-origin: 0 0; +} +.layout-expand-with-icon { + top: 18px; +} +.layout-expand .panel-body-noheader .layout-expand-title, +.layout-expand .panel-body-noheader .panel-icon { + top: 5px; +} +.layout-expand .panel-body-noheader .layout-expand-with-icon { + top: 23px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + position: absolute; + font-size: 1px; + display: none; + z-index: 5; +} +.layout-split-proxy-h { + width: 5px; + cursor: e-resize; +} +.layout-split-proxy-v { + height: 5px; + cursor: n-resize; +} +.layout-mask { + position: absolute; + background: #fafafa; + filter: alpha(opacity=10); + opacity: 0.10; + z-index: 4; +} +.layout-button-up { + background: url('images/layout_arrows.png') no-repeat -16px -16px; +} +.layout-button-down { + background: url('images/layout_arrows.png') no-repeat -16px 0; +} +.layout-button-left { + background: url('images/layout_arrows.png') no-repeat 0 0; +} +.layout-button-right { + background: url('images/layout_arrows.png') no-repeat 0 -16px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + background-color: #bbb; +} +.layout-split-north { + border-bottom: 5px solid #eee; +} +.layout-split-south { + border-top: 5px solid #eee; +} +.layout-split-east { + border-left: 5px solid #eee; +} +.layout-split-west { + border-right: 5px solid #eee; +} +.layout-expand { + background-color: #F2F2F2; +} +.layout-expand-over { + background-color: #F2F2F2; +} +.tabs-container { + overflow: hidden; +} +.tabs-header { + border-width: 1px; + border-style: solid; + border-bottom-width: 0; + position: relative; + padding: 0; + padding-top: 2px; + overflow: hidden; +} +.tabs-scroller-left, +.tabs-scroller-right { + position: absolute; + top: auto; + bottom: 0; + width: 18px; + font-size: 1px; + display: none; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.tabs-scroller-left { + left: 0; +} +.tabs-scroller-right { + right: 0; +} +.tabs-tool { + position: absolute; + bottom: 0; + padding: 1px; + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.tabs-header-plain .tabs-tool { + padding: 0 1px; +} +.tabs-wrap { + position: relative; + left: 0; + overflow: hidden; + width: 100%; + margin: 0; + padding: 0; +} +.tabs-scrolling { + margin-left: 18px; + margin-right: 18px; +} +.tabs-disabled { + opacity: 0.3; + filter: alpha(opacity=30); +} +.tabs { + list-style-type: none; + height: 26px; + margin: 0px; + padding: 0px; + padding-left: 4px; + width: 50000px; + border-style: solid; + border-width: 0 0 1px 0; +} +.tabs li { + float: left; + display: inline-block; + margin: 0 4px -1px 0; + padding: 0; + position: relative; + border: 0; +} +.tabs li a.tabs-inner { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0 10px; + height: 25px; + line-height: 25px; + text-align: center; + white-space: nowrap; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.tabs li.tabs-selected a.tabs-inner { + font-weight: bold; + outline: none; +} +.tabs li.tabs-selected a:hover.tabs-inner { + cursor: default; + pointer: default; +} +.tabs li a.tabs-close, +.tabs-p-tool { + position: absolute; + font-size: 1px; + display: block; + height: 12px; + padding: 0; + top: 50%; + margin-top: -6px; + overflow: hidden; +} +.tabs li a.tabs-close { + width: 12px; + right: 5px; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs-p-tool { + right: 16px; +} +.tabs-p-tool a { + display: inline-block; + font-size: 1px; + width: 12px; + height: 12px; + margin: 0; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs li a:hover.tabs-close, +.tabs-p-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + cursor: hand; + cursor: pointer; +} +.tabs-with-icon { + padding-left: 18px; +} +.tabs-icon { + position: absolute; + width: 16px; + height: 16px; + left: 10px; + top: 50%; + margin-top: -8px; +} +.tabs-title { + font-size: 12px; +} +.tabs-closable { + padding-right: 8px; +} +.tabs-panels { + margin: 0px; + padding: 0px; + border-width: 1px; + border-style: solid; + border-top-width: 0; + overflow: hidden; +} +.tabs-header-bottom { + border-width: 0 1px 1px 1px; + padding: 0 0 2px 0; +} +.tabs-header-bottom .tabs { + border-width: 1px 0 0 0; +} +.tabs-header-bottom .tabs li { + margin: -1px 4px 0 0; +} +.tabs-header-bottom .tabs li a.tabs-inner { + -moz-border-radius: 0 0 5px 5px; + -webkit-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; +} +.tabs-header-bottom .tabs-tool { + top: 0; +} +.tabs-header-bottom .tabs-scroller-left, +.tabs-header-bottom .tabs-scroller-right { + top: 0; + bottom: auto; +} +.tabs-panels-top { + border-width: 1px 1px 0 1px; +} +.tabs-header-left { + float: left; + border-width: 1px 0 1px 1px; + padding: 0; +} +.tabs-header-right { + float: right; + border-width: 1px 1px 1px 0; + padding: 0; +} +.tabs-header-left .tabs-wrap, +.tabs-header-right .tabs-wrap { + height: 100%; +} +.tabs-header-left .tabs { + height: 100%; + padding: 4px 0 0 2px; + border-width: 0 1px 0 0; +} +.tabs-header-right .tabs { + height: 100%; + padding: 4px 2px 0 0; + border-width: 0 0 0 1px; +} +.tabs-header-left .tabs li, +.tabs-header-right .tabs li { + display: block; + width: 100%; + position: relative; +} +.tabs-header-left .tabs li { + left: auto; + right: 0; + margin: 0 -1px 4px 0; + float: right; +} +.tabs-header-right .tabs li { + left: 0; + right: auto; + margin: 0 0 4px -1px; + float: left; +} +.tabs-justified li a.tabs-inner { + padding-left: 0; + padding-right: 0; +} +.tabs-header-left .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.tabs-header-right .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.tabs-panels-right { + float: right; + border-width: 1px 1px 1px 0; +} +.tabs-panels-left { + float: left; + border-width: 1px 0 1px 1px; +} +.tabs-header-noborder, +.tabs-panels-noborder { + border: 0px; +} +.tabs-header-plain { + border: 0px; + background: transparent; +} +.tabs-pill { + padding-bottom: 3px; +} +.tabs-header-bottom .tabs-pill { + padding-top: 3px; + padding-bottom: 0; +} +.tabs-header-left .tabs-pill { + padding-right: 3px; +} +.tabs-header-right .tabs-pill { + padding-left: 3px; +} +.tabs-header .tabs-pill li a.tabs-inner { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tabs-header-narrow, +.tabs-header-narrow .tabs-narrow { + padding: 0; +} +.tabs-narrow li, +.tabs-header-bottom .tabs-narrow li { + margin-left: 0; + margin-right: -1px; +} +.tabs-narrow li.tabs-last, +.tabs-header-bottom .tabs-narrow li.tabs-last { + margin-right: 0; +} +.tabs-header-left .tabs-narrow, +.tabs-header-right .tabs-narrow { + padding-top: 0; +} +.tabs-header-left .tabs-narrow li { + margin-bottom: -1px; + margin-right: -1px; +} +.tabs-header-left .tabs-narrow li.tabs-last, +.tabs-header-right .tabs-narrow li.tabs-last { + margin-bottom: 0; +} +.tabs-header-right .tabs-narrow li { + margin-bottom: -1px; + margin-left: -1px; +} +.tabs-scroller-left { + background: #F2F2F2 url('images/tabs_icons.png') no-repeat 1px center; +} +.tabs-scroller-right { + background: #F2F2F2 url('images/tabs_icons.png') no-repeat -15px center; +} +.tabs li a.tabs-close { + background: url('images/tabs_icons.png') no-repeat -34px center; +} +.tabs li a.tabs-inner:hover { + background: #e6e6e6; + color: #00438a; + filter: none; +} +.tabs li.tabs-selected a.tabs-inner { + background-color: #ffffff; + color: #777; + background: -webkit-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -moz-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -o-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: linear-gradient(to bottom,#ffffff 0,#ffffff 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#ffffff,GradientType=0); +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -moz-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -o-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: linear-gradient(to bottom,#ffffff 0,#ffffff 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#ffffff,GradientType=0); +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#ffffff 0,#ffffff 100%); + background: -moz-linear-gradient(left,#ffffff 0,#ffffff 100%); + background: -o-linear-gradient(left,#ffffff 0,#ffffff 100%); + background: linear-gradient(to right,#ffffff 0,#ffffff 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#ffffff,GradientType=1); +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#ffffff 0,#ffffff 100%); + background: -moz-linear-gradient(left,#ffffff 0,#ffffff 100%); + background: -o-linear-gradient(left,#ffffff 0,#ffffff 100%); + background: linear-gradient(to right,#ffffff 0,#ffffff 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#ffffff,GradientType=1); +} +.tabs li a.tabs-inner { + color: #777; + background-color: #F2F2F2; + background: -webkit-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: -moz-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: -o-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: linear-gradient(to bottom,#ffffff 0,#F2F2F2 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#F2F2F2,GradientType=0); +} +.tabs-header, +.tabs-tool { + background-color: #F2F2F2; +} +.tabs-header-plain { + background: transparent; +} +.tabs-header, +.tabs-scroller-left, +.tabs-scroller-right, +.tabs-tool, +.tabs, +.tabs-panels, +.tabs li a.tabs-inner, +.tabs li.tabs-selected a.tabs-inner, +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner, +.tabs-header-left .tabs li.tabs-selected a.tabs-inner, +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-color: #D4D4D4; +} +.tabs-p-tool a:hover, +.tabs li a:hover.tabs-close, +.tabs-scroller-over { + background-color: #e6e6e6; +} +.tabs li.tabs-selected a.tabs-inner { + border-bottom: 1px solid #ffffff; +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + border-top: 1px solid #ffffff; +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + border-right: 1px solid #ffffff; +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-left: 1px solid #ffffff; +} +.tabs-header .tabs-pill li.tabs-selected a.tabs-inner { + background: #0081c2; + color: #fff; + filter: none; + border-color: #D4D4D4; +} +.datagrid .panel-body { + overflow: hidden; + position: relative; +} +.datagrid-view { + position: relative; + overflow: hidden; +} +.datagrid-view1, +.datagrid-view2 { + position: absolute; + overflow: hidden; + top: 0; +} +.datagrid-view1 { + left: 0; +} +.datagrid-view2 { + right: 0; +} +.datagrid-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0.3; + filter: alpha(opacity=30); + display: none; +} +.datagrid-mask-msg { + position: absolute; + top: 50%; + margin-top: -20px; + padding: 10px 5px 10px 30px; + width: auto; + height: 16px; + border-width: 2px; + border-style: solid; + display: none; +} +.datagrid-sort-icon { + padding: 0; + display: none; +} +.datagrid-toolbar { + height: auto; + padding: 1px 2px; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.datagrid .datagrid-pager { + display: block; + margin: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.datagrid .datagrid-pager-top { + border-width: 0 0 1px 0; +} +.datagrid-header { + overflow: hidden; + cursor: default; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-header-inner { + float: left; + width: 10000px; +} +.datagrid-header-row, +.datagrid-row { + height: 25px; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-width: 0 1px 1px 0; + border-style: dotted; + margin: 0; + padding: 0; +} +.datagrid-cell, +.datagrid-cell-group, +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + margin: 0; + padding: 0 4px; + white-space: nowrap; + word-wrap: normal; + overflow: hidden; + height: 18px; + line-height: 18px; + font-size: 12px; +} +.datagrid-header .datagrid-cell { + height: auto; +} +.datagrid-header .datagrid-cell span { + font-size: 12px; +} +.datagrid-cell-group { + text-align: center; + text-overflow: ellipsis; +} +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + width: 30px; + text-align: center; + margin: 0; + padding: 0; +} +.datagrid-body { + margin: 0; + padding: 0; + overflow: auto; + zoom: 1; +} +.datagrid-view1 .datagrid-body-inner { + padding-bottom: 20px; +} +.datagrid-view1 .datagrid-body { + overflow: hidden; +} +.datagrid-footer { + overflow: hidden; +} +.datagrid-footer-inner { + border-width: 1px 0 0 0; + border-style: solid; + width: 10000px; + float: left; +} +.datagrid-row-editing .datagrid-cell { + height: auto; +} +.datagrid-header-check, +.datagrid-cell-check { + padding: 0; + width: 27px; + height: 18px; + font-size: 1px; + text-align: center; + overflow: hidden; +} +.datagrid-header-check input, +.datagrid-cell-check input { + margin: 0; + padding: 0; + width: 15px; + height: 18px; +} +.datagrid-resize-proxy { + position: absolute; + width: 1px; + height: 10000px; + top: 0; + cursor: e-resize; + display: none; +} +.datagrid-body .datagrid-editable { + margin: 0; + padding: 0; +} +.datagrid-body .datagrid-editable table { + width: 100%; + height: 100%; +} +.datagrid-body .datagrid-editable td { + border: 0; + margin: 0; + padding: 0; +} +.datagrid-view .datagrid-editable-input { + margin: 0; + padding: 2px 4px; + border: 1px solid #D4D4D4; + font-size: 12px; + outline-style: none; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.datagrid-sort .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -64px center; +} +.datagrid-sort-desc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -16px center; +} +.datagrid-sort-asc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat 0px center; +} +.datagrid-row-collapse { + background: url('images/datagrid_icons.png') no-repeat -48px center; +} +.datagrid-row-expand { + background: url('images/datagrid_icons.png') no-repeat -32px center; +} +.datagrid-mask-msg { + background: #ffffff url('images/loading.gif') no-repeat scroll 5px center; +} +.datagrid-header, +.datagrid-td-rownumber { + background-color: #F2F2F2; + background: -webkit-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: -moz-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: -o-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: linear-gradient(to bottom,#ffffff 0,#F2F2F2 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#F2F2F2,GradientType=0); +} +.datagrid-cell-rownumber { + color: #333; +} +.datagrid-resize-proxy { + background: #bbb; +} +.datagrid-mask { + background: #ccc; +} +.datagrid-mask-msg { + border-color: #D4D4D4; +} +.datagrid-toolbar, +.datagrid-pager { + background: #F5F5F5; +} +.datagrid-header, +.datagrid-toolbar, +.datagrid-pager, +.datagrid-footer-inner { + border-color: #e6e6e6; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-color: #ccc; +} +.datagrid-htable, +.datagrid-btable, +.datagrid-ftable { + color: #333; + border-collapse: separate; +} +.datagrid-row-alt { + background: #F5F5F5; +} +.datagrid-row-over, +.datagrid-header td.datagrid-header-over { + background: #e6e6e6; + color: #00438a; + cursor: default; +} +.datagrid-row-selected { + background: #0081c2; + color: #fff; +} +.datagrid-row-editing .textbox, +.datagrid-row-editing .textbox-text { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.propertygrid .datagrid-view1 .datagrid-body td { + padding-bottom: 1px; + border-width: 0 1px 0 0; +} +.propertygrid .datagrid-group { + height: 21px; + overflow: hidden; + border-width: 0 0 1px 0; + border-style: solid; +} +.propertygrid .datagrid-group span { + font-weight: bold; +} +.propertygrid .datagrid-view1 .datagrid-body td { + border-color: #e6e6e6; +} +.propertygrid .datagrid-view1 .datagrid-group { + border-color: #F2F2F2; +} +.propertygrid .datagrid-view2 .datagrid-group { + border-color: #e6e6e6; +} +.propertygrid .datagrid-group, +.propertygrid .datagrid-view1 .datagrid-body, +.propertygrid .datagrid-view1 .datagrid-row-over, +.propertygrid .datagrid-view1 .datagrid-row-selected { + background: #F2F2F2; +} +.datalist .datagrid-header { + border-width: 0; +} +.datalist .datagrid-group, +.m-list .m-list-group { + height: 25px; + line-height: 25px; + font-weight: bold; + overflow: hidden; + background-color: #F2F2F2; + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ccc; +} +.datalist .datagrid-group-expander { + display: none; +} +.datalist .datagrid-group-title { + padding: 0 4px; +} +.datalist .datagrid-btable { + width: 100%; + table-layout: fixed; +} +.datalist .datagrid-row td { + border-style: solid; + border-left-color: transparent; + border-right-color: transparent; + border-bottom-width: 0; +} +.datalist-lines .datagrid-row td { + border-bottom-width: 1px; +} +.datalist .datagrid-cell, +.m-list li { + width: auto; + height: auto; + padding: 2px 4px; + line-height: 18px; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link, +.m-list li>a { + display: block; + position: relative; + cursor: pointer; + color: #333; + text-decoration: none; + overflow: hidden; + margin: -2px -4px; + padding: 2px 4px; + padding-right: 16px; + line-height: 18px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link::after, +.m-list li>a::after { + position: absolute; + display: block; + width: 8px; + height: 8px; + content: ''; + right: 6px; + top: 50%; + margin-top: -4px; + border-style: solid; + border-width: 1px 1px 0 0; + -ms-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} +.m-list { + margin: 0; + padding: 0; + list-style: none; +} +.m-list li { + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ccc; +} +.m-list li>a:hover { + background: #e6e6e6; + color: #00438a; +} +.m-list .m-list-group { + padding: 0 4px; +} +.pagination { + zoom: 1; +} +.pagination table { + float: left; + height: 30px; +} +.pagination td { + border: 0; +} +.pagination-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 3px 1px; +} +.pagination .pagination-num { + border-width: 1px; + border-style: solid; + margin: 0 2px; + padding: 2px; + width: 2em; + height: auto; +} +.pagination-page-list { + margin: 0px 6px; + padding: 1px 2px; + width: auto; + height: auto; + border-width: 1px; + border-style: solid; +} +.pagination-info { + float: right; + margin: 0 6px 0 0; + padding: 0; + height: 30px; + line-height: 30px; + font-size: 12px; +} +.pagination span { + font-size: 12px; +} +.pagination-link .l-btn-text { + width: 24px; + text-align: center; + margin: 0; +} +.pagination-first { + background: url('images/pagination_icons.png') no-repeat 0 center; +} +.pagination-prev { + background: url('images/pagination_icons.png') no-repeat -16px center; +} +.pagination-next { + background: url('images/pagination_icons.png') no-repeat -32px center; +} +.pagination-last { + background: url('images/pagination_icons.png') no-repeat -48px center; +} +.pagination-load { + background: url('images/pagination_icons.png') no-repeat -64px center; +} +.pagination-loading { + background: url('images/loading.gif') no-repeat center center; +} +.pagination-page-list, +.pagination .pagination-num { + border-color: #D4D4D4; +} +.calendar { + border-width: 1px; + border-style: solid; + padding: 1px; + overflow: hidden; +} +.calendar table { + table-layout: fixed; + border-collapse: separate; + font-size: 12px; + width: 100%; + height: 100%; +} +.calendar table td, +.calendar table th { + font-size: 12px; +} +.calendar-noborder { + border: 0; +} +.calendar-header { + position: relative; + height: 22px; +} +.calendar-title { + text-align: center; + height: 22px; +} +.calendar-title span { + position: relative; + display: inline-block; + top: 2px; + padding: 0 3px; + height: 18px; + line-height: 18px; + font-size: 12px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth, +.calendar-nextmonth, +.calendar-prevyear, +.calendar-nextyear { + position: absolute; + top: 50%; + margin-top: -7px; + width: 14px; + height: 14px; + cursor: pointer; + font-size: 1px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth { + left: 20px; + background: url('images/calendar_arrows.png') no-repeat -18px -2px; +} +.calendar-nextmonth { + right: 20px; + background: url('images/calendar_arrows.png') no-repeat -34px -2px; +} +.calendar-prevyear { + left: 3px; + background: url('images/calendar_arrows.png') no-repeat -1px -2px; +} +.calendar-nextyear { + right: 3px; + background: url('images/calendar_arrows.png') no-repeat -49px -2px; +} +.calendar-body { + position: relative; +} +.calendar-body th, +.calendar-body td { + text-align: center; +} +.calendar-day { + border: 0; + padding: 1px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-other-month { + opacity: 0.3; + filter: alpha(opacity=30); +} +.calendar-disabled { + opacity: 0.6; + filter: alpha(opacity=60); + cursor: default; +} +.calendar-menu { + position: absolute; + top: 0; + left: 0; + width: 180px; + height: 150px; + padding: 5px; + font-size: 12px; + display: none; + overflow: hidden; +} +.calendar-menu-year-inner { + text-align: center; + padding-bottom: 5px; +} +.calendar-menu-year { + width: 40px; + text-align: center; + border-width: 1px; + border-style: solid; + margin: 0; + padding: 2px; + font-weight: bold; + font-size: 12px; +} +.calendar-menu-prev, +.calendar-menu-next { + display: inline-block; + width: 21px; + height: 21px; + vertical-align: top; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-menu-prev { + margin-right: 10px; + background: url('images/calendar_arrows.png') no-repeat 2px 2px; +} +.calendar-menu-next { + margin-left: 10px; + background: url('images/calendar_arrows.png') no-repeat -45px 2px; +} +.calendar-menu-month { + text-align: center; + cursor: pointer; + font-weight: bold; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-body th, +.calendar-menu-month { + color: #808080; +} +.calendar-day { + color: #333; +} +.calendar-sunday { + color: #CC2222; +} +.calendar-saturday { + color: #00ee00; +} +.calendar-today { + color: #0000ff; +} +.calendar-menu-year { + border-color: #D4D4D4; +} +.calendar { + border-color: #D4D4D4; +} +.calendar-header { + background: #F2F2F2; +} +.calendar-body, +.calendar-menu { + background: #ffffff; +} +.calendar-body th { + background: #F5F5F5; + padding: 2px 0; +} +.calendar-hover, +.calendar-nav-hover, +.calendar-menu-hover { + background-color: #e6e6e6; + color: #00438a; +} +.calendar-hover { + border: 1px solid #ddd; + padding: 0; +} +.calendar-selected { + background-color: #0081c2; + color: #fff; + border: 1px solid #0070a9; + padding: 0; +} +.datebox-calendar-inner { + height: 180px; +} +.datebox-button { + height: 18px; + padding: 2px 5px; + text-align: center; +} +.datebox-button a { + font-size: 12px; + font-weight: bold; + text-decoration: none; + opacity: 0.6; + filter: alpha(opacity=60); +} +.datebox-button a:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.datebox-current, +.datebox-close { + float: left; +} +.datebox-close { + float: right; +} +.datebox .combo-arrow { + background-image: url('images/datebox_arrow.png'); + background-position: center center; +} +.datebox-button { + background-color: #F5F5F5; +} +.datebox-button a { + color: #444; +} +.numberbox { + border: 1px solid #D4D4D4; + margin: 0; + padding: 0 2px; + vertical-align: middle; +} +.textbox { + padding: 0; +} +.spinner { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.spinner .spinner-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0 2px; + vertical-align: baseline; +} +.spinner-arrow { + background-color: #F2F2F2; + display: inline-block; + overflow: hidden; + vertical-align: top; + margin: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + width: 18px; +} +.spinner-arrow-up, +.spinner-arrow-down { + opacity: 0.6; + filter: alpha(opacity=60); + display: block; + font-size: 1px; + width: 18px; + height: 10px; + width: 100%; + height: 50%; + color: #444; + outline-style: none; +} +.spinner-arrow-hover { + background-color: #e6e6e6; + opacity: 1.0; + filter: alpha(opacity=100); +} +.spinner-arrow-up:hover, +.spinner-arrow-down:hover { + opacity: 1.0; + filter: alpha(opacity=100); + background-color: #e6e6e6; +} +.textbox-icon-disabled .spinner-arrow-up:hover, +.textbox-icon-disabled .spinner-arrow-down:hover { + opacity: 0.6; + filter: alpha(opacity=60); + background-color: #F2F2F2; + cursor: default; +} +.spinner .textbox-icon-disabled { + opacity: 0.6; + filter: alpha(opacity=60); +} +.spinner-arrow-up { + background: url('images/spinner_arrows.png') no-repeat 1px center; +} +.spinner-arrow-down { + background: url('images/spinner_arrows.png') no-repeat -15px center; +} +.spinner { + border-color: #D4D4D4; +} +.progressbar { + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + overflow: hidden; + position: relative; +} +.progressbar-text { + text-align: center; + position: absolute; +} +.progressbar-value { + position: relative; + overflow: hidden; + width: 0; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.progressbar { + border-color: #D4D4D4; +} +.progressbar-text { + color: #333; + font-size: 12px; +} +.progressbar-value .progressbar-text { + background-color: #0081c2; + color: #fff; +} +.searchbox { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.searchbox .searchbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 0 2px; + vertical-align: top; +} +.searchbox .searchbox-prompt { + font-size: 12px; + color: #ccc; +} +.searchbox-button { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.searchbox-button-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.searchbox .l-btn-plain { + border: 0; + padding: 0; + vertical-align: top; + opacity: 0.6; + filter: alpha(opacity=60); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .l-btn-plain:hover { + border: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox a.m-btn-plain-active { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .m-btn-active { + border-width: 0 1px 0 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .textbox-button-right { + border-width: 0 0 0 1px; +} +.searchbox .textbox-button-left { + border-width: 0 1px 0 0; +} +.searchbox-button { + background: url('images/searchbox_button.png') no-repeat center center; +} +.searchbox { + border-color: #D4D4D4; + background-color: #fff; +} +.searchbox .l-btn-plain { + background: #F2F2F2; +} +.searchbox .l-btn-plain-disabled, +.searchbox .l-btn-plain-disabled:hover { + opacity: 0.5; + filter: alpha(opacity=50); +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} +.slider-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.slider-h { + height: 22px; +} +.slider-v { + width: 22px; +} +.slider-inner { + position: relative; + height: 6px; + top: 7px; + border-width: 1px; + border-style: solid; + border-radius: 5px; +} +.slider-handle { + position: absolute; + display: block; + outline: none; + width: 20px; + height: 20px; + top: 50%; + margin-top: -10px; + margin-left: -10px; +} +.slider-tip { + position: absolute; + display: inline-block; + line-height: 12px; + font-size: 12px; + white-space: nowrap; + top: -22px; +} +.slider-rule { + position: relative; + top: 15px; +} +.slider-rule span { + position: absolute; + display: inline-block; + font-size: 0; + height: 5px; + border-width: 0 0 0 1px; + border-style: solid; +} +.slider-rulelabel { + position: relative; + top: 20px; +} +.slider-rulelabel span { + position: absolute; + display: inline-block; + font-size: 12px; +} +.slider-v .slider-inner { + width: 6px; + left: 7px; + top: 0; + float: left; +} +.slider-v .slider-handle { + left: 50%; + margin-top: -10px; +} +.slider-v .slider-tip { + left: -10px; + margin-top: -6px; +} +.slider-v .slider-rule { + float: left; + top: 0; + left: 16px; +} +.slider-v .slider-rule span { + width: 5px; + height: 'auto'; + border-left: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.slider-v .slider-rulelabel { + float: left; + top: 0; + left: 23px; +} +.slider-handle { + background: url('images/slider_handle.png') no-repeat; +} +.slider-inner { + border-color: #D4D4D4; + background: #F2F2F2; +} +.slider-rule span { + border-color: #D4D4D4; +} +.slider-rulelabel span { + color: #333; +} +.menu { + position: absolute; + margin: 0; + padding: 2px; + border-width: 1px; + border-style: solid; + overflow: hidden; +} +.menu-inline { + position: relative; +} +.menu-item { + position: relative; + margin: 0; + padding: 0; + overflow: hidden; + white-space: nowrap; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.menu-text { + height: 20px; + line-height: 20px; + float: left; + padding-left: 28px; +} +.menu-icon { + position: absolute; + width: 16px; + height: 16px; + left: 2px; + top: 50%; + margin-top: -8px; +} +.menu-rightarrow { + position: absolute; + width: 16px; + height: 16px; + right: 0; + top: 50%; + margin-top: -8px; +} +.menu-line { + position: absolute; + left: 26px; + top: 0; + height: 2000px; + font-size: 1px; +} +.menu-sep { + margin: 3px 0px 3px 25px; + font-size: 1px; +} +.menu-noline .menu-line { + display: none; +} +.menu-noline .menu-sep { + margin-left: 0; + margin-right: 0; +} +.menu-active { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.menu-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default; +} +.menu-text, +.menu-text span { + font-size: 12px; +} +.menu-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + background: #ccc; + -moz-box-shadow: 2px 2px 3px #cccccc; + -webkit-box-shadow: 2px 2px 3px #cccccc; + box-shadow: 2px 2px 3px #cccccc; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.menu-rightarrow { + background: url('images/menu_arrows.png') no-repeat -32px center; +} +.menu-line { + border-left: 1px solid #ccc; + border-right: 1px solid #fff; +} +.menu-sep { + border-top: 1px solid #ccc; + border-bottom: 1px solid #fff; +} +.menu { + background-color: #fff; + border-color: #e6e6e6; + color: #333; +} +.menu-content { + background: #ffffff; +} +.menu-item { + border-color: transparent; + _border-color: #fff; +} +.menu-active { + border-color: #ddd; + color: #00438a; + background: #e6e6e6; +} +.menu-active-disabled { + border-color: transparent; + background: transparent; + color: #333; +} +.m-btn-downarrow, +.s-btn-downarrow { + display: inline-block; + position: absolute; + width: 16px; + height: 16px; + font-size: 1px; + right: 0; + top: 50%; + margin-top: -8px; +} +.m-btn-active, +.s-btn-active { + background: #e6e6e6; + color: #00438a; + border: 1px solid #ddd; + filter: none; +} +.m-btn-plain-active, +.s-btn-plain-active { + background: transparent; + padding: 0; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.m-btn .l-btn-left .l-btn-text { + margin-right: 20px; +} +.m-btn .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.m-btn .l-btn-icon-right .l-btn-icon { + right: 20px; +} +.m-btn .l-btn-icon-top .l-btn-text { + margin-right: 4px; + margin-bottom: 14px; +} +.m-btn .l-btn-icon-bottom .l-btn-text { + margin-right: 4px; + margin-bottom: 34px; +} +.m-btn .l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 20px; +} +.m-btn .l-btn-icon-top .m-btn-downarrow, +.m-btn .l-btn-icon-bottom .m-btn-downarrow { + top: auto; + bottom: 0px; + left: 50%; + margin-left: -8px; +} +.m-btn-line { + display: inline-block; + position: absolute; + font-size: 1px; + display: none; +} +.m-btn .l-btn-left .m-btn-line { + right: 0; + width: 16px; + height: 500px; + border-style: solid; + border-color: #bbb; + border-width: 0 0 0 1px; +} +.m-btn .l-btn-icon-top .m-btn-line, +.m-btn .l-btn-icon-bottom .m-btn-line { + left: 0; + bottom: 0; + width: 500px; + height: 16px; + border-width: 1px 0 0 0; +} +.m-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 56px; +} +.m-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 50px; +} +.m-btn-downarrow, +.s-btn-downarrow { + background: url('images/menu_arrows.png') no-repeat 0 center; +} +.m-btn-plain-active, +.s-btn-plain-active { + border-color: #ddd; + background-color: #e6e6e6; + color: #00438a; +} +.s-btn:hover .m-btn-line, +.s-btn-active .m-btn-line, +.s-btn-plain-active .m-btn-line { + display: inline-block; +} +.l-btn:hover .s-btn-downarrow, +.s-btn-active .s-btn-downarrow, +.s-btn-plain-active .s-btn-downarrow { + border-style: solid; + border-color: #bbb; + border-width: 0 0 0 1px; +} +.messager-body { + padding: 10px; + overflow: auto; +} +.messager-button { + text-align: center; + padding: 5px; +} +.messager-button .l-btn { + width: 70px; +} +.messager-icon { + float: left; + width: 32px; + height: 32px; + margin: 0 10px 10px 0; +} +.messager-error { + background: url('images/messager_icons.png') no-repeat scroll -64px 0; +} +.messager-info { + background: url('images/messager_icons.png') no-repeat scroll 0 0; +} +.messager-question { + background: url('images/messager_icons.png') no-repeat scroll -32px 0; +} +.messager-warning { + background: url('images/messager_icons.png') no-repeat scroll -96px 0; +} +.messager-progress { + padding: 10px; +} +.messager-p-msg { + margin-bottom: 5px; +} +.messager-body .messager-input { + width: 100%; + padding: 1px 0; + border: 1px solid #D4D4D4; +} +.tree { + margin: 0; + padding: 0; + list-style-type: none; +} +.tree li { + white-space: nowrap; +} +.tree li ul { + list-style-type: none; + margin: 0; + padding: 0; +} +.tree-node { + height: 18px; + white-space: nowrap; + cursor: pointer; +} +.tree-hit { + cursor: pointer; +} +.tree-expanded, +.tree-collapsed, +.tree-folder, +.tree-file, +.tree-checkbox, +.tree-indent { + display: inline-block; + width: 16px; + height: 18px; + vertical-align: top; + overflow: hidden; +} +.tree-expanded { + background: url('images/tree_icons.png') no-repeat -18px 0px; +} +.tree-expanded-hover { + background: url('images/tree_icons.png') no-repeat -50px 0px; +} +.tree-collapsed { + background: url('images/tree_icons.png') no-repeat 0px 0px; +} +.tree-collapsed-hover { + background: url('images/tree_icons.png') no-repeat -32px 0px; +} +.tree-lines .tree-expanded, +.tree-lines .tree-root-first .tree-expanded { + background: url('images/tree_icons.png') no-repeat -144px 0; +} +.tree-lines .tree-collapsed, +.tree-lines .tree-root-first .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -128px 0; +} +.tree-lines .tree-node-last .tree-expanded, +.tree-lines .tree-root-one .tree-expanded { + background: url('images/tree_icons.png') no-repeat -80px 0; +} +.tree-lines .tree-node-last .tree-collapsed, +.tree-lines .tree-root-one .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -64px 0; +} +.tree-line { + background: url('images/tree_icons.png') no-repeat -176px 0; +} +.tree-join { + background: url('images/tree_icons.png') no-repeat -192px 0; +} +.tree-joinbottom { + background: url('images/tree_icons.png') no-repeat -160px 0; +} +.tree-folder { + background: url('images/tree_icons.png') no-repeat -208px 0; +} +.tree-folder-open { + background: url('images/tree_icons.png') no-repeat -224px 0; +} +.tree-file { + background: url('images/tree_icons.png') no-repeat -240px 0; +} +.tree-loading { + background: url('images/loading.gif') no-repeat center center; +} +.tree-checkbox0 { + background: url('images/tree_icons.png') no-repeat -208px -18px; +} +.tree-checkbox1 { + background: url('images/tree_icons.png') no-repeat -224px -18px; +} +.tree-checkbox2 { + background: url('images/tree_icons.png') no-repeat -240px -18px; +} +.tree-title { + font-size: 12px; + display: inline-block; + text-decoration: none; + vertical-align: top; + white-space: nowrap; + padding: 0 2px; + height: 18px; + line-height: 18px; +} +.tree-node-proxy { + font-size: 12px; + line-height: 20px; + padding: 0 2px 0 20px; + border-width: 1px; + border-style: solid; + z-index: 9900000; +} +.tree-dnd-icon { + display: inline-block; + position: absolute; + width: 16px; + height: 18px; + left: 2px; + top: 50%; + margin-top: -9px; +} +.tree-dnd-yes { + background: url('images/tree_icons.png') no-repeat -256px 0; +} +.tree-dnd-no { + background: url('images/tree_icons.png') no-repeat -256px -18px; +} +.tree-node-top { + border-top: 1px dotted red; +} +.tree-node-bottom { + border-bottom: 1px dotted red; +} +.tree-node-append .tree-title { + border: 1px dotted red; +} +.tree-editor { + border: 1px solid #ccc; + font-size: 12px; + height: 14px !important; + height: 18px; + line-height: 14px; + padding: 1px 2px; + width: 80px; + position: absolute; + top: 0; +} +.tree-node-proxy { + background-color: #ffffff; + color: #333; + border-color: #D4D4D4; +} +.tree-node-hover { + background: #e6e6e6; + color: #00438a; +} +.tree-node-selected { + background: #0081c2; + color: #fff; +} +.tree-node-hidden { + display: none; +} +.validatebox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; + color: #000; +} +.tooltip { + position: absolute; + display: none; + z-index: 9900000; + outline: none; + opacity: 1; + filter: alpha(opacity=100); + padding: 5px; + border-width: 1px; + border-style: solid; + border-radius: 5px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tooltip-content { + font-size: 12px; +} +.tooltip-arrow-outer, +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + line-height: 0; + font-size: 0; + border-style: solid; + border-width: 6px; + border-color: transparent; + _border-color: tomato; + _filter: chroma(color=tomato); +} +.tooltip-arrow { + display: none \9; +} +.tooltip-right .tooltip-arrow-outer { + left: 0; + top: 50%; + margin: -6px 0 0 -13px; +} +.tooltip-right .tooltip-arrow { + left: 0; + top: 50%; + margin: -6px 0 0 -12px; +} +.tooltip-left .tooltip-arrow-outer { + right: 0; + top: 50%; + margin: -6px -13px 0 0; +} +.tooltip-left .tooltip-arrow { + right: 0; + top: 50%; + margin: -6px -12px 0 0; +} +.tooltip-top .tooltip-arrow-outer { + bottom: 0; + left: 50%; + margin: 0 0 -13px -6px; +} +.tooltip-top .tooltip-arrow { + bottom: 0; + left: 50%; + margin: 0 0 -12px -6px; +} +.tooltip-bottom .tooltip-arrow-outer { + top: 0; + left: 50%; + margin: -13px 0 0 -6px; +} +.tooltip-bottom .tooltip-arrow { + top: 0; + left: 50%; + margin: -12px 0 0 -6px; +} +.tooltip { + background-color: #ffffff; + border-color: #D4D4D4; + color: #333; +} +.tooltip-right .tooltip-arrow-outer { + border-right-color: #D4D4D4; +} +.tooltip-right .tooltip-arrow { + border-right-color: #ffffff; +} +.tooltip-left .tooltip-arrow-outer { + border-left-color: #D4D4D4; +} +.tooltip-left .tooltip-arrow { + border-left-color: #ffffff; +} +.tooltip-top .tooltip-arrow-outer { + border-top-color: #D4D4D4; +} +.tooltip-top .tooltip-arrow { + border-top-color: #ffffff; +} +.tooltip-bottom .tooltip-arrow-outer { + border-bottom-color: #D4D4D4; +} +.tooltip-bottom .tooltip-arrow { + border-bottom-color: #ffffff; +} +.switchbutton { + text-decoration: none; + display: inline-block; + overflow: hidden; + vertical-align: middle; + margin: 0; + padding: 0; + cursor: pointer; + background: #bbb; + border: 1px solid #bbb; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-inner { + display: inline-block; + overflow: hidden; + position: relative; + top: -1px; + left: -1px; +} +.switchbutton-on, +.switchbutton-off, +.switchbutton-handle { + display: inline-block; + text-align: center; + height: 100%; + float: left; + font-size: 12px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-on { + background: #0081c2; + color: #fff; +} +.switchbutton-off { + background-color: #ffffff; + color: #333; +} +.switchbutton-on, +.switchbutton-reversed .switchbutton-off { + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.switchbutton-off, +.switchbutton-reversed .switchbutton-on { + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.switchbutton-handle { + position: absolute; + top: 0; + left: 50%; + background-color: #ffffff; + color: #333; + border: 1px solid #bbb; + -moz-box-shadow: 0 0 3px 0 #bbb; + -webkit-box-shadow: 0 0 3px 0 #bbb; + box-shadow: 0 0 3px 0 #bbb; +} +.switchbutton-value { + position: absolute; + top: 0; + left: -5000px; +} +.switchbutton-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.switchbutton-disabled, +.switchbutton-readonly { + cursor: default; +} +.tabs-panels { + border-color: transparent; +} +.tabs li a.tabs-inner { + border-color: transparent; + background: transparent; + filter: none; + color: #0088CC; +} +.menu-active { + background-color: #0081C2; + border-color: #0081C2; + color: #fff; +} +.menu-active-disabled { + border-color: transparent; + background: transparent; + color: #333; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/filebox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/filebox.css new file mode 100644 index 0000000..c6bac66 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/filebox.css @@ -0,0 +1,20 @@ +.filebox .textbox-value { + vertical-align: top; + position: absolute; + top: 0; + left: -5000px; +} +.filebox-label { + display: inline-block; + position: absolute; + width: 100%; + height: 100%; + cursor: pointer; + left: 0; + top: 0; + z-index: 10; + background: url('images/blank.gif') no-repeat; +} +.l-btn-disabled .filebox-label { + cursor: default; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/accordion_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/accordion_arrows.png new file mode 100644 index 0000000..720835f Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/accordion_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/blank.gif b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/blank.gif new file mode 100644 index 0000000..1d11fa9 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/blank.gif differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/calendar_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/calendar_arrows.png new file mode 100644 index 0000000..430c4ad Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/calendar_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/combo_arrow.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/combo_arrow.png new file mode 100644 index 0000000..2e59fb9 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/combo_arrow.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/datagrid_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/datagrid_icons.png new file mode 100644 index 0000000..762d0ce Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/datagrid_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/datebox_arrow.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/datebox_arrow.png new file mode 100644 index 0000000..783c833 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/datebox_arrow.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/layout_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/layout_arrows.png new file mode 100644 index 0000000..6f41654 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/layout_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/linkbutton_bg.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/linkbutton_bg.png new file mode 100644 index 0000000..fc66bd2 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/linkbutton_bg.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/loading.gif b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/loading.gif new file mode 100644 index 0000000..68f01d0 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/loading.gif differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/menu_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/menu_arrows.png new file mode 100644 index 0000000..b986842 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/menu_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/messager_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/messager_icons.png new file mode 100644 index 0000000..62c18c1 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/messager_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/pagination_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/pagination_icons.png new file mode 100644 index 0000000..616f0bd Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/pagination_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/panel_tools.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/panel_tools.png new file mode 100644 index 0000000..fe682ef Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/panel_tools.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/searchbox_button.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/searchbox_button.png new file mode 100644 index 0000000..6dd1931 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/searchbox_button.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/slider_handle.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/slider_handle.png new file mode 100644 index 0000000..b9802ba Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/slider_handle.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/spinner_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/spinner_arrows.png new file mode 100644 index 0000000..b68592d Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/spinner_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/tabs_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/tabs_icons.png new file mode 100644 index 0000000..4d29966 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/tabs_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/tree_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/tree_icons.png new file mode 100644 index 0000000..e9be4f3 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/tree_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/validatebox_warning.png b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/validatebox_warning.png new file mode 100644 index 0000000..2b3d4f0 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/images/validatebox_warning.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/layout.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/layout.css new file mode 100644 index 0000000..ebd38a8 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/layout.css @@ -0,0 +1,133 @@ +.layout { + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + z-index: 0; +} +.layout-panel { + position: absolute; + overflow: hidden; +} +.layout-body { + min-width: 1px; + min-height: 1px; +} +.layout-panel-east, +.layout-panel-west { + z-index: 2; +} +.layout-panel-north, +.layout-panel-south { + z-index: 3; +} +.layout-expand { + position: absolute; + padding: 0px; + font-size: 1px; + cursor: pointer; + z-index: 1; +} +.layout-expand .panel-header, +.layout-expand .panel-body { + background: transparent; + filter: none; + overflow: hidden; +} +.layout-expand .panel-header { + border-bottom-width: 0px; +} +.layout-expand .panel-body { + position: relative; +} +.layout-expand .panel-body .panel-icon { + margin-top: 0; + top: 0; + left: 50%; + margin-left: -8px; +} +.layout-expand-west .panel-header .panel-icon, +.layout-expand-east .panel-header .panel-icon { + display: none; +} +.layout-expand-title { + position: absolute; + top: 0; + left: 21px; + white-space: nowrap; + word-wrap: normal; + -webkit-transform: rotate(90deg); + -webkit-transform-origin: 0 0; + -moz-transform: rotate(90deg); + -moz-transform-origin: 0 0; + -o-transform: rotate(90deg); + -o-transform-origin: 0 0; + transform: rotate(90deg); + transform-origin: 0 0; +} +.layout-expand-with-icon { + top: 18px; +} +.layout-expand .panel-body-noheader .layout-expand-title, +.layout-expand .panel-body-noheader .panel-icon { + top: 5px; +} +.layout-expand .panel-body-noheader .layout-expand-with-icon { + top: 23px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + position: absolute; + font-size: 1px; + display: none; + z-index: 5; +} +.layout-split-proxy-h { + width: 5px; + cursor: e-resize; +} +.layout-split-proxy-v { + height: 5px; + cursor: n-resize; +} +.layout-mask { + position: absolute; + background: #fafafa; + filter: alpha(opacity=10); + opacity: 0.10; + z-index: 4; +} +.layout-button-up { + background: url('images/layout_arrows.png') no-repeat -16px -16px; +} +.layout-button-down { + background: url('images/layout_arrows.png') no-repeat -16px 0; +} +.layout-button-left { + background: url('images/layout_arrows.png') no-repeat 0 0; +} +.layout-button-right { + background: url('images/layout_arrows.png') no-repeat 0 -16px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + background-color: #bbb; +} +.layout-split-north { + border-bottom: 5px solid #eee; +} +.layout-split-south { + border-top: 5px solid #eee; +} +.layout-split-east { + border-left: 5px solid #eee; +} +.layout-split-west { + border-right: 5px solid #eee; +} +.layout-expand { + background-color: #F2F2F2; +} +.layout-expand-over { + background-color: #F2F2F2; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/linkbutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/linkbutton.css new file mode 100644 index 0000000..35ccfae --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/linkbutton.css @@ -0,0 +1,203 @@ +.l-btn { + text-decoration: none; + display: inline-block; + overflow: hidden; + margin: 0; + padding: 0; + cursor: pointer; + outline: none; + text-align: center; + vertical-align: middle; + line-height: normal; +} +.l-btn-plain { + border-width: 0; + padding: 1px; +} +.l-btn-left { + display: inline-block; + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + vertical-align: top; +} +.l-btn-text { + display: inline-block; + vertical-align: top; + width: auto; + line-height: 24px; + font-size: 12px; + padding: 0; + margin: 0 4px; +} +.l-btn-icon { + display: inline-block; + width: 16px; + height: 16px; + line-height: 16px; + position: absolute; + top: 50%; + margin-top: -8px; + font-size: 1px; +} +.l-btn span span .l-btn-empty { + display: inline-block; + margin: 0; + width: 16px; + height: 24px; + font-size: 1px; + vertical-align: top; +} +.l-btn span .l-btn-icon-left { + padding: 0 0 0 20px; + background-position: left center; +} +.l-btn span .l-btn-icon-right { + padding: 0 20px 0 0; + background-position: right center; +} +.l-btn-icon-left .l-btn-text { + margin: 0 4px 0 24px; +} +.l-btn-icon-left .l-btn-icon { + left: 4px; +} +.l-btn-icon-right .l-btn-text { + margin: 0 24px 0 4px; +} +.l-btn-icon-right .l-btn-icon { + right: 4px; +} +.l-btn-icon-top .l-btn-text { + margin: 20px 4px 0 4px; +} +.l-btn-icon-top .l-btn-icon { + top: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-icon-bottom .l-btn-text { + margin: 0 4px 20px 4px; +} +.l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-left .l-btn-empty { + margin: 0 4px; + width: 16px; +} +.l-btn-plain:hover { + padding: 0; +} +.l-btn-focus { + outline: #0000FF dotted thin; +} +.l-btn-large .l-btn-text { + line-height: 40px; +} +.l-btn-large .l-btn-icon { + width: 32px; + height: 32px; + line-height: 32px; + margin-top: -16px; +} +.l-btn-large .l-btn-icon-left .l-btn-text { + margin-left: 40px; +} +.l-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.l-btn-large .l-btn-icon-top .l-btn-text { + margin-top: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-top .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-left .l-btn-empty { + margin: 0 4px; + width: 32px; +} +.l-btn { + color: #444; + background: #f5f5f5; + background-repeat: repeat-x; + border: 1px solid #bbb; + background: -webkit-linear-gradient(top,#ffffff 0,#e6e6e6 100%); + background: -moz-linear-gradient(top,#ffffff 0,#e6e6e6 100%); + background: -o-linear-gradient(top,#ffffff 0,#e6e6e6 100%); + background: linear-gradient(to bottom,#ffffff 0,#e6e6e6 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#e6e6e6,GradientType=0); + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn:hover { + background: #e6e6e6; + color: #00438a; + border: 1px solid #ddd; + filter: none; +} +.l-btn-plain { + background: transparent; + border-width: 0; + filter: none; +} +.l-btn-outline { + border-width: 1px; + border-color: #ddd; + padding: 0; +} +.l-btn-plain:hover { + background: #e6e6e6; + color: #00438a; + border: 1px solid #ddd; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn-disabled, +.l-btn-disabled:hover { + opacity: 0.5; + cursor: default; + background: #f5f5f5; + color: #444; + background: -webkit-linear-gradient(top,#ffffff 0,#e6e6e6 100%); + background: -moz-linear-gradient(top,#ffffff 0,#e6e6e6 100%); + background: -o-linear-gradient(top,#ffffff 0,#e6e6e6 100%); + background: linear-gradient(to bottom,#ffffff 0,#e6e6e6 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#e6e6e6,GradientType=0); +} +.l-btn-disabled .l-btn-text, +.l-btn-disabled .l-btn-icon { + filter: alpha(opacity=50); +} +.l-btn-plain-disabled, +.l-btn-plain-disabled:hover { + background: transparent; + filter: alpha(opacity=50); +} +.l-btn-selected, +.l-btn-selected:hover { + background: #ddd; + filter: none; +} +.l-btn-plain-selected, +.l-btn-plain-selected:hover { + background: #ddd; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/menu.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/menu.css new file mode 100644 index 0000000..d74908f --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/menu.css @@ -0,0 +1,119 @@ +.menu { + position: absolute; + margin: 0; + padding: 2px; + border-width: 1px; + border-style: solid; + overflow: hidden; +} +.menu-inline { + position: relative; +} +.menu-item { + position: relative; + margin: 0; + padding: 0; + overflow: hidden; + white-space: nowrap; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.menu-text { + height: 20px; + line-height: 20px; + float: left; + padding-left: 28px; +} +.menu-icon { + position: absolute; + width: 16px; + height: 16px; + left: 2px; + top: 50%; + margin-top: -8px; +} +.menu-rightarrow { + position: absolute; + width: 16px; + height: 16px; + right: 0; + top: 50%; + margin-top: -8px; +} +.menu-line { + position: absolute; + left: 26px; + top: 0; + height: 2000px; + font-size: 1px; +} +.menu-sep { + margin: 3px 0px 3px 25px; + font-size: 1px; +} +.menu-noline .menu-line { + display: none; +} +.menu-noline .menu-sep { + margin-left: 0; + margin-right: 0; +} +.menu-active { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.menu-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default; +} +.menu-text, +.menu-text span { + font-size: 12px; +} +.menu-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + background: #ccc; + -moz-box-shadow: 2px 2px 3px #cccccc; + -webkit-box-shadow: 2px 2px 3px #cccccc; + box-shadow: 2px 2px 3px #cccccc; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.menu-rightarrow { + background: url('images/menu_arrows.png') no-repeat -32px center; +} +.menu-line { + border-left: 1px solid #ccc; + border-right: 1px solid #fff; +} +.menu-sep { + border-top: 1px solid #ccc; + border-bottom: 1px solid #fff; +} +.menu { + background-color: #fff; + border-color: #e6e6e6; + color: #333; +} +.menu-content { + background: #ffffff; +} +.menu-item { + border-color: transparent; + _border-color: #fff; +} +.menu-active { + border-color: #ddd; + color: #00438a; + background: #e6e6e6; +} +.menu-active-disabled { + border-color: transparent; + background: transparent; + color: #333; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/menubutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/menubutton.css new file mode 100644 index 0000000..89ac235 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/menubutton.css @@ -0,0 +1,94 @@ +.m-btn-downarrow, +.s-btn-downarrow { + display: inline-block; + position: absolute; + width: 16px; + height: 16px; + font-size: 1px; + right: 0; + top: 50%; + margin-top: -8px; +} +.m-btn-active, +.s-btn-active { + background: #e6e6e6; + color: #00438a; + border: 1px solid #ddd; + filter: none; +} +.m-btn-plain-active, +.s-btn-plain-active { + background: transparent; + padding: 0; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.m-btn .l-btn-left .l-btn-text { + margin-right: 20px; +} +.m-btn .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.m-btn .l-btn-icon-right .l-btn-icon { + right: 20px; +} +.m-btn .l-btn-icon-top .l-btn-text { + margin-right: 4px; + margin-bottom: 14px; +} +.m-btn .l-btn-icon-bottom .l-btn-text { + margin-right: 4px; + margin-bottom: 34px; +} +.m-btn .l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 20px; +} +.m-btn .l-btn-icon-top .m-btn-downarrow, +.m-btn .l-btn-icon-bottom .m-btn-downarrow { + top: auto; + bottom: 0px; + left: 50%; + margin-left: -8px; +} +.m-btn-line { + display: inline-block; + position: absolute; + font-size: 1px; + display: none; +} +.m-btn .l-btn-left .m-btn-line { + right: 0; + width: 16px; + height: 500px; + border-style: solid; + border-color: #bbb; + border-width: 0 0 0 1px; +} +.m-btn .l-btn-icon-top .m-btn-line, +.m-btn .l-btn-icon-bottom .m-btn-line { + left: 0; + bottom: 0; + width: 500px; + height: 16px; + border-width: 1px 0 0 0; +} +.m-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 56px; +} +.m-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 50px; +} +.m-btn-downarrow, +.s-btn-downarrow { + background: url('images/menu_arrows.png') no-repeat 0 center; +} +.m-btn-plain-active, +.s-btn-plain-active { + border-color: #ddd; + background-color: #e6e6e6; + color: #00438a; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/messager.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/messager.css new file mode 100644 index 0000000..ca59b51 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/messager.css @@ -0,0 +1,40 @@ +.messager-body { + padding: 10px; + overflow: auto; +} +.messager-button { + text-align: center; + padding: 5px; +} +.messager-button .l-btn { + width: 70px; +} +.messager-icon { + float: left; + width: 32px; + height: 32px; + margin: 0 10px 10px 0; +} +.messager-error { + background: url('images/messager_icons.png') no-repeat scroll -64px 0; +} +.messager-info { + background: url('images/messager_icons.png') no-repeat scroll 0 0; +} +.messager-question { + background: url('images/messager_icons.png') no-repeat scroll -32px 0; +} +.messager-warning { + background: url('images/messager_icons.png') no-repeat scroll -96px 0; +} +.messager-progress { + padding: 10px; +} +.messager-p-msg { + margin-bottom: 5px; +} +.messager-body .messager-input { + width: 100%; + padding: 1px 0; + border: 1px solid #D4D4D4; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/numberbox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/numberbox.css new file mode 100644 index 0000000..f3023a7 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/numberbox.css @@ -0,0 +1,9 @@ +.numberbox { + border: 1px solid #D4D4D4; + margin: 0; + padding: 0 2px; + vertical-align: middle; +} +.textbox { + padding: 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/pagination.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/pagination.css new file mode 100644 index 0000000..02c2d7e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/pagination.css @@ -0,0 +1,71 @@ +.pagination { + zoom: 1; +} +.pagination table { + float: left; + height: 30px; +} +.pagination td { + border: 0; +} +.pagination-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 3px 1px; +} +.pagination .pagination-num { + border-width: 1px; + border-style: solid; + margin: 0 2px; + padding: 2px; + width: 2em; + height: auto; +} +.pagination-page-list { + margin: 0px 6px; + padding: 1px 2px; + width: auto; + height: auto; + border-width: 1px; + border-style: solid; +} +.pagination-info { + float: right; + margin: 0 6px 0 0; + padding: 0; + height: 30px; + line-height: 30px; + font-size: 12px; +} +.pagination span { + font-size: 12px; +} +.pagination-link .l-btn-text { + width: 24px; + text-align: center; + margin: 0; +} +.pagination-first { + background: url('images/pagination_icons.png') no-repeat 0 center; +} +.pagination-prev { + background: url('images/pagination_icons.png') no-repeat -16px center; +} +.pagination-next { + background: url('images/pagination_icons.png') no-repeat -32px center; +} +.pagination-last { + background: url('images/pagination_icons.png') no-repeat -48px center; +} +.pagination-load { + background: url('images/pagination_icons.png') no-repeat -64px center; +} +.pagination-loading { + background: url('images/loading.gif') no-repeat center center; +} +.pagination-page-list, +.pagination .pagination-num { + border-color: #D4D4D4; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/panel.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/panel.css new file mode 100644 index 0000000..a200052 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/panel.css @@ -0,0 +1,142 @@ +.panel { + overflow: hidden; + text-align: left; + margin: 0; + border: 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.panel-header, +.panel-body { + border-width: 1px; + border-style: solid; +} +.panel-header { + padding: 5px; + position: relative; +} +.panel-title { + background: url('images/blank.gif') no-repeat; +} +.panel-header-noborder { + border-width: 0 0 1px 0; +} +.panel-body { + overflow: auto; + border-top-width: 0; + padding: 0; +} +.panel-body-noheader { + border-top-width: 1px; +} +.panel-body-noborder { + border-width: 0px; +} +.panel-body-nobottom { + border-bottom-width: 0; +} +.panel-with-icon { + padding-left: 18px; +} +.panel-icon, +.panel-tool { + position: absolute; + top: 50%; + margin-top: -8px; + height: 16px; + overflow: hidden; +} +.panel-icon { + left: 5px; + width: 16px; +} +.panel-tool { + right: 5px; + width: auto; +} +.panel-tool a { + display: inline-block; + width: 16px; + height: 16px; + opacity: 0.6; + filter: alpha(opacity=60); + margin: 0 0 0 2px; + vertical-align: top; +} +.panel-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + background-color: #e6e6e6; + -moz-border-radius: 3px 3px 3px 3px; + -webkit-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; +} +.panel-loading { + padding: 11px 0px 10px 30px; +} +.panel-noscroll { + overflow: hidden; +} +.panel-fit, +.panel-fit body { + height: 100%; + margin: 0; + padding: 0; + border: 0; + overflow: hidden; +} +.panel-loading { + background: url('images/loading.gif') no-repeat 10px 10px; +} +.panel-tool-close { + background: url('images/panel_tools.png') no-repeat -16px 0px; +} +.panel-tool-min { + background: url('images/panel_tools.png') no-repeat 0px 0px; +} +.panel-tool-max { + background: url('images/panel_tools.png') no-repeat 0px -16px; +} +.panel-tool-restore { + background: url('images/panel_tools.png') no-repeat -16px -16px; +} +.panel-tool-collapse { + background: url('images/panel_tools.png') no-repeat -32px 0; +} +.panel-tool-expand { + background: url('images/panel_tools.png') no-repeat -32px -16px; +} +.panel-header, +.panel-body { + border-color: #D4D4D4; +} +.panel-header { + background-color: #F2F2F2; + background: -webkit-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: -moz-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: -o-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: linear-gradient(to bottom,#ffffff 0,#F2F2F2 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#F2F2F2,GradientType=0); +} +.panel-body { + background-color: #ffffff; + color: #333; + font-size: 12px; +} +.panel-title { + font-size: 12px; + font-weight: bold; + color: #777; + height: 16px; + line-height: 16px; +} +.panel-footer { + border: 1px solid #D4D4D4; + overflow: hidden; + background: #F5F5F5; +} +.panel-footer-noborder { + border-width: 1px 0 0 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/progressbar.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/progressbar.css new file mode 100644 index 0000000..c660f0e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/progressbar.css @@ -0,0 +1,32 @@ +.progressbar { + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + overflow: hidden; + position: relative; +} +.progressbar-text { + text-align: center; + position: absolute; +} +.progressbar-value { + position: relative; + overflow: hidden; + width: 0; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.progressbar { + border-color: #D4D4D4; +} +.progressbar-text { + color: #333; + font-size: 12px; +} +.progressbar-value .progressbar-text { + background-color: #0081c2; + color: #fff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/propertygrid.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/propertygrid.css new file mode 100644 index 0000000..abf87d6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/propertygrid.css @@ -0,0 +1,28 @@ +.propertygrid .datagrid-view1 .datagrid-body td { + padding-bottom: 1px; + border-width: 0 1px 0 0; +} +.propertygrid .datagrid-group { + height: 21px; + overflow: hidden; + border-width: 0 0 1px 0; + border-style: solid; +} +.propertygrid .datagrid-group span { + font-weight: bold; +} +.propertygrid .datagrid-view1 .datagrid-body td { + border-color: #e6e6e6; +} +.propertygrid .datagrid-view1 .datagrid-group { + border-color: #F2F2F2; +} +.propertygrid .datagrid-view2 .datagrid-group { + border-color: #e6e6e6; +} +.propertygrid .datagrid-group, +.propertygrid .datagrid-view1 .datagrid-body, +.propertygrid .datagrid-view1 .datagrid-row-over, +.propertygrid .datagrid-view1 .datagrid-row-selected { + background: #F2F2F2; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/searchbox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/searchbox.css new file mode 100644 index 0000000..a56a088 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/searchbox.css @@ -0,0 +1,90 @@ +.searchbox { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.searchbox .searchbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 0 2px; + vertical-align: top; +} +.searchbox .searchbox-prompt { + font-size: 12px; + color: #ccc; +} +.searchbox-button { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.searchbox-button-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.searchbox .l-btn-plain { + border: 0; + padding: 0; + vertical-align: top; + opacity: 0.6; + filter: alpha(opacity=60); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .l-btn-plain:hover { + border: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox a.m-btn-plain-active { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .m-btn-active { + border-width: 0 1px 0 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .textbox-button-right { + border-width: 0 0 0 1px; +} +.searchbox .textbox-button-left { + border-width: 0 1px 0 0; +} +.searchbox-button { + background: url('images/searchbox_button.png') no-repeat center center; +} +.searchbox { + border-color: #D4D4D4; + background-color: #fff; +} +.searchbox .l-btn-plain { + background: #F2F2F2; +} +.searchbox .l-btn-plain-disabled, +.searchbox .l-btn-plain-disabled:hover { + opacity: 0.5; + filter: alpha(opacity=50); +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/slider.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/slider.css new file mode 100644 index 0000000..b58d8de --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/slider.css @@ -0,0 +1,101 @@ +.slider-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.slider-h { + height: 22px; +} +.slider-v { + width: 22px; +} +.slider-inner { + position: relative; + height: 6px; + top: 7px; + border-width: 1px; + border-style: solid; + border-radius: 5px; +} +.slider-handle { + position: absolute; + display: block; + outline: none; + width: 20px; + height: 20px; + top: 50%; + margin-top: -10px; + margin-left: -10px; +} +.slider-tip { + position: absolute; + display: inline-block; + line-height: 12px; + font-size: 12px; + white-space: nowrap; + top: -22px; +} +.slider-rule { + position: relative; + top: 15px; +} +.slider-rule span { + position: absolute; + display: inline-block; + font-size: 0; + height: 5px; + border-width: 0 0 0 1px; + border-style: solid; +} +.slider-rulelabel { + position: relative; + top: 20px; +} +.slider-rulelabel span { + position: absolute; + display: inline-block; + font-size: 12px; +} +.slider-v .slider-inner { + width: 6px; + left: 7px; + top: 0; + float: left; +} +.slider-v .slider-handle { + left: 50%; + margin-top: -10px; +} +.slider-v .slider-tip { + left: -10px; + margin-top: -6px; +} +.slider-v .slider-rule { + float: left; + top: 0; + left: 16px; +} +.slider-v .slider-rule span { + width: 5px; + height: 'auto'; + border-left: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.slider-v .slider-rulelabel { + float: left; + top: 0; + left: 23px; +} +.slider-handle { + background: url('images/slider_handle.png') no-repeat; +} +.slider-inner { + border-color: #D4D4D4; + background: #F2F2F2; +} +.slider-rule span { + border-color: #D4D4D4; +} +.slider-rulelabel span { + color: #333; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/spinner.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/spinner.css new file mode 100644 index 0000000..abdef0e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/spinner.css @@ -0,0 +1,72 @@ +.spinner { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.spinner .spinner-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0 2px; + vertical-align: baseline; +} +.spinner-arrow { + background-color: #F2F2F2; + display: inline-block; + overflow: hidden; + vertical-align: top; + margin: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + width: 18px; +} +.spinner-arrow-up, +.spinner-arrow-down { + opacity: 0.6; + filter: alpha(opacity=60); + display: block; + font-size: 1px; + width: 18px; + height: 10px; + width: 100%; + height: 50%; + color: #444; + outline-style: none; +} +.spinner-arrow-hover { + background-color: #e6e6e6; + opacity: 1.0; + filter: alpha(opacity=100); +} +.spinner-arrow-up:hover, +.spinner-arrow-down:hover { + opacity: 1.0; + filter: alpha(opacity=100); + background-color: #e6e6e6; +} +.textbox-icon-disabled .spinner-arrow-up:hover, +.textbox-icon-disabled .spinner-arrow-down:hover { + opacity: 0.6; + filter: alpha(opacity=60); + background-color: #F2F2F2; + cursor: default; +} +.spinner .textbox-icon-disabled { + opacity: 0.6; + filter: alpha(opacity=60); +} +.spinner-arrow-up { + background: url('images/spinner_arrows.png') no-repeat 1px center; +} +.spinner-arrow-down { + background: url('images/spinner_arrows.png') no-repeat -15px center; +} +.spinner { + border-color: #D4D4D4; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/splitbutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/splitbutton.css new file mode 100644 index 0000000..bf86453 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/splitbutton.css @@ -0,0 +1,12 @@ +.s-btn:hover .m-btn-line, +.s-btn-active .m-btn-line, +.s-btn-plain-active .m-btn-line { + display: inline-block; +} +.l-btn:hover .s-btn-downarrow, +.s-btn-active .s-btn-downarrow, +.s-btn-plain-active .s-btn-downarrow { + border-style: solid; + border-color: #bbb; + border-width: 0 0 0 1px; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/switchbutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/switchbutton.css new file mode 100644 index 0000000..38803aa --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/switchbutton.css @@ -0,0 +1,77 @@ +.switchbutton { + text-decoration: none; + display: inline-block; + overflow: hidden; + vertical-align: middle; + margin: 0; + padding: 0; + cursor: pointer; + background: #bbb; + border: 1px solid #bbb; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-inner { + display: inline-block; + overflow: hidden; + position: relative; + top: -1px; + left: -1px; +} +.switchbutton-on, +.switchbutton-off, +.switchbutton-handle { + display: inline-block; + text-align: center; + height: 100%; + float: left; + font-size: 12px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-on { + background: #0081c2; + color: #fff; +} +.switchbutton-off { + background-color: #ffffff; + color: #333; +} +.switchbutton-on, +.switchbutton-reversed .switchbutton-off { + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.switchbutton-off, +.switchbutton-reversed .switchbutton-on { + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.switchbutton-handle { + position: absolute; + top: 0; + left: 50%; + background-color: #ffffff; + color: #333; + border: 1px solid #bbb; + -moz-box-shadow: 0 0 3px 0 #bbb; + -webkit-box-shadow: 0 0 3px 0 #bbb; + box-shadow: 0 0 3px 0 #bbb; +} +.switchbutton-value { + position: absolute; + top: 0; + left: -5000px; +} +.switchbutton-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.switchbutton-disabled, +.switchbutton-readonly { + cursor: default; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/tabs.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/tabs.css new file mode 100644 index 0000000..c06a4aa --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/tabs.css @@ -0,0 +1,413 @@ +.tabs-container { + overflow: hidden; +} +.tabs-header { + border-width: 1px; + border-style: solid; + border-bottom-width: 0; + position: relative; + padding: 0; + padding-top: 2px; + overflow: hidden; +} +.tabs-scroller-left, +.tabs-scroller-right { + position: absolute; + top: auto; + bottom: 0; + width: 18px; + font-size: 1px; + display: none; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.tabs-scroller-left { + left: 0; +} +.tabs-scroller-right { + right: 0; +} +.tabs-tool { + position: absolute; + bottom: 0; + padding: 1px; + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.tabs-header-plain .tabs-tool { + padding: 0 1px; +} +.tabs-wrap { + position: relative; + left: 0; + overflow: hidden; + width: 100%; + margin: 0; + padding: 0; +} +.tabs-scrolling { + margin-left: 18px; + margin-right: 18px; +} +.tabs-disabled { + opacity: 0.3; + filter: alpha(opacity=30); +} +.tabs { + list-style-type: none; + height: 26px; + margin: 0px; + padding: 0px; + padding-left: 4px; + width: 50000px; + border-style: solid; + border-width: 0 0 1px 0; +} +.tabs li { + float: left; + display: inline-block; + margin: 0 4px -1px 0; + padding: 0; + position: relative; + border: 0; +} +.tabs li a.tabs-inner { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0 10px; + height: 25px; + line-height: 25px; + text-align: center; + white-space: nowrap; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.tabs li.tabs-selected a.tabs-inner { + font-weight: bold; + outline: none; +} +.tabs li.tabs-selected a:hover.tabs-inner { + cursor: default; + pointer: default; +} +.tabs li a.tabs-close, +.tabs-p-tool { + position: absolute; + font-size: 1px; + display: block; + height: 12px; + padding: 0; + top: 50%; + margin-top: -6px; + overflow: hidden; +} +.tabs li a.tabs-close { + width: 12px; + right: 5px; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs-p-tool { + right: 16px; +} +.tabs-p-tool a { + display: inline-block; + font-size: 1px; + width: 12px; + height: 12px; + margin: 0; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs li a:hover.tabs-close, +.tabs-p-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + cursor: hand; + cursor: pointer; +} +.tabs-with-icon { + padding-left: 18px; +} +.tabs-icon { + position: absolute; + width: 16px; + height: 16px; + left: 10px; + top: 50%; + margin-top: -8px; +} +.tabs-title { + font-size: 12px; +} +.tabs-closable { + padding-right: 8px; +} +.tabs-panels { + margin: 0px; + padding: 0px; + border-width: 1px; + border-style: solid; + border-top-width: 0; + overflow: hidden; +} +.tabs-header-bottom { + border-width: 0 1px 1px 1px; + padding: 0 0 2px 0; +} +.tabs-header-bottom .tabs { + border-width: 1px 0 0 0; +} +.tabs-header-bottom .tabs li { + margin: -1px 4px 0 0; +} +.tabs-header-bottom .tabs li a.tabs-inner { + -moz-border-radius: 0 0 5px 5px; + -webkit-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; +} +.tabs-header-bottom .tabs-tool { + top: 0; +} +.tabs-header-bottom .tabs-scroller-left, +.tabs-header-bottom .tabs-scroller-right { + top: 0; + bottom: auto; +} +.tabs-panels-top { + border-width: 1px 1px 0 1px; +} +.tabs-header-left { + float: left; + border-width: 1px 0 1px 1px; + padding: 0; +} +.tabs-header-right { + float: right; + border-width: 1px 1px 1px 0; + padding: 0; +} +.tabs-header-left .tabs-wrap, +.tabs-header-right .tabs-wrap { + height: 100%; +} +.tabs-header-left .tabs { + height: 100%; + padding: 4px 0 0 2px; + border-width: 0 1px 0 0; +} +.tabs-header-right .tabs { + height: 100%; + padding: 4px 2px 0 0; + border-width: 0 0 0 1px; +} +.tabs-header-left .tabs li, +.tabs-header-right .tabs li { + display: block; + width: 100%; + position: relative; +} +.tabs-header-left .tabs li { + left: auto; + right: 0; + margin: 0 -1px 4px 0; + float: right; +} +.tabs-header-right .tabs li { + left: 0; + right: auto; + margin: 0 0 4px -1px; + float: left; +} +.tabs-justified li a.tabs-inner { + padding-left: 0; + padding-right: 0; +} +.tabs-header-left .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.tabs-header-right .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.tabs-panels-right { + float: right; + border-width: 1px 1px 1px 0; +} +.tabs-panels-left { + float: left; + border-width: 1px 0 1px 1px; +} +.tabs-header-noborder, +.tabs-panels-noborder { + border: 0px; +} +.tabs-header-plain { + border: 0px; + background: transparent; +} +.tabs-pill { + padding-bottom: 3px; +} +.tabs-header-bottom .tabs-pill { + padding-top: 3px; + padding-bottom: 0; +} +.tabs-header-left .tabs-pill { + padding-right: 3px; +} +.tabs-header-right .tabs-pill { + padding-left: 3px; +} +.tabs-header .tabs-pill li a.tabs-inner { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tabs-header-narrow, +.tabs-header-narrow .tabs-narrow { + padding: 0; +} +.tabs-narrow li, +.tabs-header-bottom .tabs-narrow li { + margin-left: 0; + margin-right: -1px; +} +.tabs-narrow li.tabs-last, +.tabs-header-bottom .tabs-narrow li.tabs-last { + margin-right: 0; +} +.tabs-header-left .tabs-narrow, +.tabs-header-right .tabs-narrow { + padding-top: 0; +} +.tabs-header-left .tabs-narrow li { + margin-bottom: -1px; + margin-right: -1px; +} +.tabs-header-left .tabs-narrow li.tabs-last, +.tabs-header-right .tabs-narrow li.tabs-last { + margin-bottom: 0; +} +.tabs-header-right .tabs-narrow li { + margin-bottom: -1px; + margin-left: -1px; +} +.tabs-scroller-left { + background: #F2F2F2 url('images/tabs_icons.png') no-repeat 1px center; +} +.tabs-scroller-right { + background: #F2F2F2 url('images/tabs_icons.png') no-repeat -15px center; +} +.tabs li a.tabs-close { + background: url('images/tabs_icons.png') no-repeat -34px center; +} +.tabs li a.tabs-inner:hover { + background: #e6e6e6; + color: #00438a; + filter: none; +} +.tabs li.tabs-selected a.tabs-inner { + background-color: #ffffff; + color: #777; + background: -webkit-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -moz-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -o-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: linear-gradient(to bottom,#ffffff 0,#ffffff 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#ffffff,GradientType=0); +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -moz-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -o-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: linear-gradient(to bottom,#ffffff 0,#ffffff 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#ffffff,GradientType=0); +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#ffffff 0,#ffffff 100%); + background: -moz-linear-gradient(left,#ffffff 0,#ffffff 100%); + background: -o-linear-gradient(left,#ffffff 0,#ffffff 100%); + background: linear-gradient(to right,#ffffff 0,#ffffff 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#ffffff,GradientType=1); +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#ffffff 0,#ffffff 100%); + background: -moz-linear-gradient(left,#ffffff 0,#ffffff 100%); + background: -o-linear-gradient(left,#ffffff 0,#ffffff 100%); + background: linear-gradient(to right,#ffffff 0,#ffffff 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#ffffff,GradientType=1); +} +.tabs li a.tabs-inner { + color: #777; + background-color: #F2F2F2; + background: -webkit-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: -moz-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: -o-linear-gradient(top,#ffffff 0,#F2F2F2 100%); + background: linear-gradient(to bottom,#ffffff 0,#F2F2F2 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#F2F2F2,GradientType=0); +} +.tabs-header, +.tabs-tool { + background-color: #F2F2F2; +} +.tabs-header-plain { + background: transparent; +} +.tabs-header, +.tabs-scroller-left, +.tabs-scroller-right, +.tabs-tool, +.tabs, +.tabs-panels, +.tabs li a.tabs-inner, +.tabs li.tabs-selected a.tabs-inner, +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner, +.tabs-header-left .tabs li.tabs-selected a.tabs-inner, +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-color: #D4D4D4; +} +.tabs-p-tool a:hover, +.tabs li a:hover.tabs-close, +.tabs-scroller-over { + background-color: #e6e6e6; +} +.tabs li.tabs-selected a.tabs-inner { + border-bottom: 1px solid #ffffff; +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + border-top: 1px solid #ffffff; +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + border-right: 1px solid #ffffff; +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-left: 1px solid #ffffff; +} +.tabs-header .tabs-pill li.tabs-selected a.tabs-inner { + background: #0081c2; + color: #fff; + filter: none; + border-color: #D4D4D4; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/textbox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/textbox.css new file mode 100644 index 0000000..5110137 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/textbox.css @@ -0,0 +1,90 @@ +.textbox { + position: relative; + border: 1px solid #D4D4D4; + background-color: #fff; + vertical-align: middle; + display: inline-block; + overflow: hidden; + white-space: nowrap; + margin: 0; + padding: 0; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox .textbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 4px; + white-space: normal; + vertical-align: top; + outline-style: none; + resize: none; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox textarea.textbox-text { + white-space: pre-wrap; +} +.textbox .textbox-prompt { + font-size: 12px; + color: #aaa; +} +.textbox .textbox-button, +.textbox .textbox-button:hover { + position: absolute; + top: 0; + padding: 0; + vertical-align: top; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.textbox-button-right, +.textbox-button-right:hover { + border-width: 0 0 0 1px; +} +.textbox-button-left, +.textbox-button-left:hover { + border-width: 0 1px 0 0; +} +.textbox-addon { + position: absolute; + top: 0; +} +.textbox-icon { + display: inline-block; + width: 18px; + height: 20px; + overflow: hidden; + vertical-align: top; + background-position: center center; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); + text-decoration: none; + outline-style: none; +} +.textbox-icon-disabled, +.textbox-icon-readonly { + cursor: default; +} +.textbox-icon:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.textbox-icon-disabled:hover { + opacity: 0.6; + filter: alpha(opacity=60); +} +.textbox-focused { + -moz-box-shadow: 0 0 3px 0 #D4D4D4; + -webkit-box-shadow: 0 0 3px 0 #D4D4D4; + box-shadow: 0 0 3px 0 #D4D4D4; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/tooltip.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/tooltip.css new file mode 100644 index 0000000..ed9fe1c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/tooltip.css @@ -0,0 +1,103 @@ +.tooltip { + position: absolute; + display: none; + z-index: 9900000; + outline: none; + opacity: 1; + filter: alpha(opacity=100); + padding: 5px; + border-width: 1px; + border-style: solid; + border-radius: 5px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tooltip-content { + font-size: 12px; +} +.tooltip-arrow-outer, +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + line-height: 0; + font-size: 0; + border-style: solid; + border-width: 6px; + border-color: transparent; + _border-color: tomato; + _filter: chroma(color=tomato); +} +.tooltip-arrow { + display: none \9; +} +.tooltip-right .tooltip-arrow-outer { + left: 0; + top: 50%; + margin: -6px 0 0 -13px; +} +.tooltip-right .tooltip-arrow { + left: 0; + top: 50%; + margin: -6px 0 0 -12px; +} +.tooltip-left .tooltip-arrow-outer { + right: 0; + top: 50%; + margin: -6px -13px 0 0; +} +.tooltip-left .tooltip-arrow { + right: 0; + top: 50%; + margin: -6px -12px 0 0; +} +.tooltip-top .tooltip-arrow-outer { + bottom: 0; + left: 50%; + margin: 0 0 -13px -6px; +} +.tooltip-top .tooltip-arrow { + bottom: 0; + left: 50%; + margin: 0 0 -12px -6px; +} +.tooltip-bottom .tooltip-arrow-outer { + top: 0; + left: 50%; + margin: -13px 0 0 -6px; +} +.tooltip-bottom .tooltip-arrow { + top: 0; + left: 50%; + margin: -12px 0 0 -6px; +} +.tooltip { + background-color: #ffffff; + border-color: #D4D4D4; + color: #333; +} +.tooltip-right .tooltip-arrow-outer { + border-right-color: #D4D4D4; +} +.tooltip-right .tooltip-arrow { + border-right-color: #ffffff; +} +.tooltip-left .tooltip-arrow-outer { + border-left-color: #D4D4D4; +} +.tooltip-left .tooltip-arrow { + border-left-color: #ffffff; +} +.tooltip-top .tooltip-arrow-outer { + border-top-color: #D4D4D4; +} +.tooltip-top .tooltip-arrow { + border-top-color: #ffffff; +} +.tooltip-bottom .tooltip-arrow-outer { + border-bottom-color: #D4D4D4; +} +.tooltip-bottom .tooltip-arrow { + border-bottom-color: #ffffff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/tree.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/tree.css new file mode 100644 index 0000000..c9e76a1 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/tree.css @@ -0,0 +1,160 @@ +.tree { + margin: 0; + padding: 0; + list-style-type: none; +} +.tree li { + white-space: nowrap; +} +.tree li ul { + list-style-type: none; + margin: 0; + padding: 0; +} +.tree-node { + height: 18px; + white-space: nowrap; + cursor: pointer; +} +.tree-hit { + cursor: pointer; +} +.tree-expanded, +.tree-collapsed, +.tree-folder, +.tree-file, +.tree-checkbox, +.tree-indent { + display: inline-block; + width: 16px; + height: 18px; + vertical-align: top; + overflow: hidden; +} +.tree-expanded { + background: url('images/tree_icons.png') no-repeat -18px 0px; +} +.tree-expanded-hover { + background: url('images/tree_icons.png') no-repeat -50px 0px; +} +.tree-collapsed { + background: url('images/tree_icons.png') no-repeat 0px 0px; +} +.tree-collapsed-hover { + background: url('images/tree_icons.png') no-repeat -32px 0px; +} +.tree-lines .tree-expanded, +.tree-lines .tree-root-first .tree-expanded { + background: url('images/tree_icons.png') no-repeat -144px 0; +} +.tree-lines .tree-collapsed, +.tree-lines .tree-root-first .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -128px 0; +} +.tree-lines .tree-node-last .tree-expanded, +.tree-lines .tree-root-one .tree-expanded { + background: url('images/tree_icons.png') no-repeat -80px 0; +} +.tree-lines .tree-node-last .tree-collapsed, +.tree-lines .tree-root-one .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -64px 0; +} +.tree-line { + background: url('images/tree_icons.png') no-repeat -176px 0; +} +.tree-join { + background: url('images/tree_icons.png') no-repeat -192px 0; +} +.tree-joinbottom { + background: url('images/tree_icons.png') no-repeat -160px 0; +} +.tree-folder { + background: url('images/tree_icons.png') no-repeat -208px 0; +} +.tree-folder-open { + background: url('images/tree_icons.png') no-repeat -224px 0; +} +.tree-file { + background: url('images/tree_icons.png') no-repeat -240px 0; +} +.tree-loading { + background: url('images/loading.gif') no-repeat center center; +} +.tree-checkbox0 { + background: url('images/tree_icons.png') no-repeat -208px -18px; +} +.tree-checkbox1 { + background: url('images/tree_icons.png') no-repeat -224px -18px; +} +.tree-checkbox2 { + background: url('images/tree_icons.png') no-repeat -240px -18px; +} +.tree-title { + font-size: 12px; + display: inline-block; + text-decoration: none; + vertical-align: top; + white-space: nowrap; + padding: 0 2px; + height: 18px; + line-height: 18px; +} +.tree-node-proxy { + font-size: 12px; + line-height: 20px; + padding: 0 2px 0 20px; + border-width: 1px; + border-style: solid; + z-index: 9900000; +} +.tree-dnd-icon { + display: inline-block; + position: absolute; + width: 16px; + height: 18px; + left: 2px; + top: 50%; + margin-top: -9px; +} +.tree-dnd-yes { + background: url('images/tree_icons.png') no-repeat -256px 0; +} +.tree-dnd-no { + background: url('images/tree_icons.png') no-repeat -256px -18px; +} +.tree-node-top { + border-top: 1px dotted red; +} +.tree-node-bottom { + border-bottom: 1px dotted red; +} +.tree-node-append .tree-title { + border: 1px dotted red; +} +.tree-editor { + border: 1px solid #ccc; + font-size: 12px; + height: 14px !important; + height: 18px; + line-height: 14px; + padding: 1px 2px; + width: 80px; + position: absolute; + top: 0; +} +.tree-node-proxy { + background-color: #ffffff; + color: #333; + border-color: #D4D4D4; +} +.tree-node-hover { + background: #e6e6e6; + color: #00438a; +} +.tree-node-selected { + background: #0081c2; + color: #fff; +} +.tree-node-hidden { + display: none; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/validatebox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/validatebox.css new file mode 100644 index 0000000..1fc3ad6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/validatebox.css @@ -0,0 +1,5 @@ +.validatebox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; + color: #000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/window.css b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/window.css new file mode 100644 index 0000000..dcbd624 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/bootstrap/window.css @@ -0,0 +1,94 @@ +.window { + overflow: hidden; + padding: 5px; + border-width: 1px; + border-style: solid; +} +.window .window-header { + background: transparent; + padding: 0px 0px 6px 0px; +} +.window .window-body { + border-width: 1px; + border-style: solid; + border-top-width: 0px; +} +.window .window-body-noheader { + border-top-width: 1px; +} +.window .panel-body-nobottom { + border-bottom-width: 0; +} +.window .window-header .panel-icon, +.window .window-header .panel-tool { + top: 50%; + margin-top: -11px; +} +.window .window-header .panel-icon { + left: 1px; +} +.window .window-header .panel-tool { + right: 1px; +} +.window .window-header .panel-with-icon { + padding-left: 18px; +} +.window-proxy { + position: absolute; + overflow: hidden; +} +.window-proxy-mask { + position: absolute; + filter: alpha(opacity=5); + opacity: 0.05; +} +.window-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + filter: alpha(opacity=40); + opacity: 0.40; + font-size: 1px; + overflow: hidden; +} +.window, +.window-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.window-shadow { + background: #ccc; + -moz-box-shadow: 2px 2px 3px #cccccc; + -webkit-box-shadow: 2px 2px 3px #cccccc; + box-shadow: 2px 2px 3px #cccccc; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.window, +.window .window-body { + border-color: #D4D4D4; +} +.window { + background-color: #F2F2F2; + background: -webkit-linear-gradient(top,#ffffff 0,#F2F2F2 20%); + background: -moz-linear-gradient(top,#ffffff 0,#F2F2F2 20%); + background: -o-linear-gradient(top,#ffffff 0,#F2F2F2 20%); + background: linear-gradient(to bottom,#ffffff 0,#F2F2F2 20%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#F2F2F2,GradientType=0); +} +.window-proxy { + border: 1px dashed #D4D4D4; +} +.window-proxy-mask, +.window-mask { + background: #ccc; +} +.window .panel-footer { + border: 1px solid #D4D4D4; + position: relative; + top: -1px; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/color.css b/src/main/webapp/jquery-easyui-1.4.4/themes/color.css new file mode 100644 index 0000000..ee224c9 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/color.css @@ -0,0 +1,112 @@ +.c1,.c1:hover{ + color: #fff; + border-color: #3c8b3c; + background: #4cae4c; + background: -webkit-linear-gradient(top,#4cae4c 0,#449d44 100%); + background: -moz-linear-gradient(top,#4cae4c 0,#449d44 100%); + background: -o-linear-gradient(top,#4cae4c 0,#449d44 100%); + background: linear-gradient(to bottom,#4cae4c 0,#449d44 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4cae4c,endColorstr=#449d44,GradientType=0); +} +a.c1:hover{ + background: #449d44; + filter: none; +} +.c2,.c2:hover{ + color: #fff; + border-color: #5f5f5f; + background: #747474; + background: -webkit-linear-gradient(top,#747474 0,#676767 100%); + background: -moz-linear-gradient(top,#747474 0,#676767 100%); + background: -o-linear-gradient(top,#747474 0,#676767 100%); + background: linear-gradient(to bottom,#747474 0,#676767 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#747474,endColorstr=#676767,GradientType=0); +} +a.c2:hover{ + background: #676767; + filter: none; +} +.c3,.c3:hover{ + color: #333; + border-color: #ff8080; + background: #ffb3b3; + background: -webkit-linear-gradient(top,#ffb3b3 0,#ff9999 100%); + background: -moz-linear-gradient(top,#ffb3b3 0,#ff9999 100%); + background: -o-linear-gradient(top,#ffb3b3 0,#ff9999 100%); + background: linear-gradient(to bottom,#ffb3b3 0,#ff9999 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffb3b3,endColorstr=#ff9999,GradientType=0); +} +a.c3:hover{ + background: #ff9999; + filter: none; +} +.c4,.c4:hover{ + color: #333; + border-color: #52d689; + background: #b8eecf; + background: -webkit-linear-gradient(top,#b8eecf 0,#a4e9c1 100%); + background: -moz-linear-gradient(top,#b8eecf 0,#a4e9c1 100%); + background: -o-linear-gradient(top,#b8eecf 0,#a4e9c1 100%); + background: linear-gradient(to bottom,#b8eecf 0,#a4e9c1 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b8eecf,endColorstr=#a4e9c1,GradientType=0); +} +a.c4:hover{ + background: #a4e9c1; + filter: none; +} +.c5,.c5:hover{ + color: #fff; + border-color: #b52b27; + background: #d84f4b; + background: -webkit-linear-gradient(top,#d84f4b 0,#c9302c 100%); + background: -moz-linear-gradient(top,#d84f4b 0,#c9302c 100%); + background: -o-linear-gradient(top,#d84f4b 0,#c9302c 100%); + background: linear-gradient(to bottom,#d84f4b 0,#c9302c 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#d84f4b,endColorstr=#c9302c,GradientType=0); +} +a.c5:hover{ + background: #c9302c; + filter: none; +} +.c6,.c6:hover{ + color: #fff; + border-color: #1f637b; + background: #2984a4; + background: -webkit-linear-gradient(top,#2984a4 0,#24748f 100%); + background: -moz-linear-gradient(top,#2984a4 0,#24748f 100%); + background: -o-linear-gradient(top,#2984a4 0,#24748f 100%); + background: linear-gradient(to bottom,#2984a4 0,#24748f 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#2984a4,endColorstr=#24748f,GradientType=0); +} +a.c6:hover{ + background: #24748f; + filter: none; +} +.c7,.c7:hover{ + color: #333; + border-color: #e68900; + background: #ffab2e; + background: -webkit-linear-gradient(top,#ffab2e 0,#ff9900 100%); + background: -moz-linear-gradient(top,#ffab2e 0,#ff9900 100%); + background: -o-linear-gradient(top,#ffab2e 0,#ff9900 100%); + background: linear-gradient(to bottom,#ffab2e 0,#ff9900 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffab2e,endColorstr=#ff9900,GradientType=0); +} +a.c7:hover{ + background: #ff9900; + filter: none; +} +.c8,.c8:hover{ + color: #fff; + border-color: #4b72a4; + background: #698cba; + background: -webkit-linear-gradient(top,#698cba 0,#577eb2 100%); + background: -moz-linear-gradient(top,#698cba 0,#577eb2 100%); + background: -o-linear-gradient(top,#698cba 0,#577eb2 100%); + background: linear-gradient(to bottom,#698cba 0,#577eb2 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#698cba,endColorstr=#577eb2,GradientType=0); +} +a.c8:hover{ + background: #577eb2; + filter: none; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/themes/default/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/accordion.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/accordion.css new file mode 100644 index 0000000..40696c7 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/accordion.css @@ -0,0 +1,41 @@ +.accordion { + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.accordion .accordion-header { + border-width: 0 0 1px; + cursor: pointer; +} +.accordion .accordion-body { + border-width: 0 0 1px; +} +.accordion-noborder { + border-width: 0; +} +.accordion-noborder .accordion-header { + border-width: 0 0 1px; +} +.accordion-noborder .accordion-body { + border-width: 0 0 1px; +} +.accordion-collapse { + background: url('images/accordion_arrows.png') no-repeat 0 0; +} +.accordion-expand { + background: url('images/accordion_arrows.png') no-repeat -16px 0; +} +.accordion { + background: #ffffff; + border-color: #95B8E7; +} +.accordion .accordion-header { + background: #E0ECFF; + filter: none; +} +.accordion .accordion-header-selected { + background: #ffe48d; +} +.accordion .accordion-header-selected .panel-title { + color: #000000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/calendar.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/calendar.css new file mode 100644 index 0000000..6334627 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/calendar.css @@ -0,0 +1,197 @@ +.calendar { + border-width: 1px; + border-style: solid; + padding: 1px; + overflow: hidden; +} +.calendar table { + table-layout: fixed; + border-collapse: separate; + font-size: 12px; + width: 100%; + height: 100%; +} +.calendar table td, +.calendar table th { + font-size: 12px; +} +.calendar-noborder { + border: 0; +} +.calendar-header { + position: relative; + height: 22px; +} +.calendar-title { + text-align: center; + height: 22px; +} +.calendar-title span { + position: relative; + display: inline-block; + top: 2px; + padding: 0 3px; + height: 18px; + line-height: 18px; + font-size: 12px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth, +.calendar-nextmonth, +.calendar-prevyear, +.calendar-nextyear { + position: absolute; + top: 50%; + margin-top: -7px; + width: 14px; + height: 14px; + cursor: pointer; + font-size: 1px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth { + left: 20px; + background: url('images/calendar_arrows.png') no-repeat -18px -2px; +} +.calendar-nextmonth { + right: 20px; + background: url('images/calendar_arrows.png') no-repeat -34px -2px; +} +.calendar-prevyear { + left: 3px; + background: url('images/calendar_arrows.png') no-repeat -1px -2px; +} +.calendar-nextyear { + right: 3px; + background: url('images/calendar_arrows.png') no-repeat -49px -2px; +} +.calendar-body { + position: relative; +} +.calendar-body th, +.calendar-body td { + text-align: center; +} +.calendar-day { + border: 0; + padding: 1px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-other-month { + opacity: 0.3; + filter: alpha(opacity=30); +} +.calendar-disabled { + opacity: 0.6; + filter: alpha(opacity=60); + cursor: default; +} +.calendar-menu { + position: absolute; + top: 0; + left: 0; + width: 180px; + height: 150px; + padding: 5px; + font-size: 12px; + display: none; + overflow: hidden; +} +.calendar-menu-year-inner { + text-align: center; + padding-bottom: 5px; +} +.calendar-menu-year { + width: 40px; + text-align: center; + border-width: 1px; + border-style: solid; + margin: 0; + padding: 2px; + font-weight: bold; + font-size: 12px; +} +.calendar-menu-prev, +.calendar-menu-next { + display: inline-block; + width: 21px; + height: 21px; + vertical-align: top; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-menu-prev { + margin-right: 10px; + background: url('images/calendar_arrows.png') no-repeat 2px 2px; +} +.calendar-menu-next { + margin-left: 10px; + background: url('images/calendar_arrows.png') no-repeat -45px 2px; +} +.calendar-menu-month { + text-align: center; + cursor: pointer; + font-weight: bold; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-body th, +.calendar-menu-month { + color: #4d4d4d; +} +.calendar-day { + color: #000000; +} +.calendar-sunday { + color: #CC2222; +} +.calendar-saturday { + color: #00ee00; +} +.calendar-today { + color: #0000ff; +} +.calendar-menu-year { + border-color: #95B8E7; +} +.calendar { + border-color: #95B8E7; +} +.calendar-header { + background: #E0ECFF; +} +.calendar-body, +.calendar-menu { + background: #ffffff; +} +.calendar-body th { + background: #F4F4F4; + padding: 2px 0; +} +.calendar-hover, +.calendar-nav-hover, +.calendar-menu-hover { + background-color: #eaf2ff; + color: #000000; +} +.calendar-hover { + border: 1px solid #b7d2ff; + padding: 0; +} +.calendar-selected { + background-color: #ffe48d; + color: #000000; + border: 1px solid #ffab3f; + padding: 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/combo.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/combo.css new file mode 100644 index 0000000..a4937aa --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/combo.css @@ -0,0 +1,60 @@ +.combo { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.combo .combo-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0px 2px; + vertical-align: baseline; +} +.combo-arrow { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.combo-arrow-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.combo-panel { + overflow: auto; +} +.combo-arrow { + background: url('images/combo_arrow.png') no-repeat center center; +} +.combo-panel { + background-color: #ffffff; +} +.combo { + border-color: #95B8E7; + background-color: #fff; +} +.combo-arrow { + background-color: #E0ECFF; +} +.combo-arrow-hover { + background-color: #eaf2ff; +} +.combo-arrow:hover { + background-color: #eaf2ff; +} +.combo .textbox-icon-disabled:hover { + cursor: default; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/combobox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/combobox.css new file mode 100644 index 0000000..72eb423 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/combobox.css @@ -0,0 +1,24 @@ +.combobox-item, +.combobox-group { + font-size: 12px; + padding: 3px; + padding-right: 0px; +} +.combobox-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.combobox-gitem { + padding-left: 10px; +} +.combobox-group { + font-weight: bold; +} +.combobox-item-hover { + background-color: #eaf2ff; + color: #000000; +} +.combobox-item-selected { + background-color: #ffe48d; + color: #000000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/datagrid.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/datagrid.css new file mode 100644 index 0000000..9c351d9 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/datagrid.css @@ -0,0 +1,276 @@ +.datagrid .panel-body { + overflow: hidden; + position: relative; +} +.datagrid-view { + position: relative; + overflow: hidden; +} +.datagrid-view1, +.datagrid-view2 { + position: absolute; + overflow: hidden; + top: 0; +} +.datagrid-view1 { + left: 0; +} +.datagrid-view2 { + right: 0; +} +.datagrid-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0.3; + filter: alpha(opacity=30); + display: none; +} +.datagrid-mask-msg { + position: absolute; + top: 50%; + margin-top: -20px; + padding: 10px 5px 10px 30px; + width: auto; + height: 16px; + border-width: 2px; + border-style: solid; + display: none; +} +.datagrid-sort-icon { + padding: 0; + display: none; +} +.datagrid-toolbar { + height: auto; + padding: 1px 2px; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.datagrid .datagrid-pager { + display: block; + margin: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.datagrid .datagrid-pager-top { + border-width: 0 0 1px 0; +} +.datagrid-header { + overflow: hidden; + cursor: default; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-header-inner { + float: left; + width: 10000px; +} +.datagrid-header-row, +.datagrid-row { + height: 25px; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-width: 0 1px 1px 0; + border-style: dotted; + margin: 0; + padding: 0; +} +.datagrid-cell, +.datagrid-cell-group, +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + margin: 0; + padding: 0 4px; + white-space: nowrap; + word-wrap: normal; + overflow: hidden; + height: 18px; + line-height: 18px; + font-size: 12px; +} +.datagrid-header .datagrid-cell { + height: auto; +} +.datagrid-header .datagrid-cell span { + font-size: 12px; +} +.datagrid-cell-group { + text-align: center; + text-overflow: ellipsis; +} +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + width: 30px; + text-align: center; + margin: 0; + padding: 0; +} +.datagrid-body { + margin: 0; + padding: 0; + overflow: auto; + zoom: 1; +} +.datagrid-view1 .datagrid-body-inner { + padding-bottom: 20px; +} +.datagrid-view1 .datagrid-body { + overflow: hidden; +} +.datagrid-footer { + overflow: hidden; +} +.datagrid-footer-inner { + border-width: 1px 0 0 0; + border-style: solid; + width: 10000px; + float: left; +} +.datagrid-row-editing .datagrid-cell { + height: auto; +} +.datagrid-header-check, +.datagrid-cell-check { + padding: 0; + width: 27px; + height: 18px; + font-size: 1px; + text-align: center; + overflow: hidden; +} +.datagrid-header-check input, +.datagrid-cell-check input { + margin: 0; + padding: 0; + width: 15px; + height: 18px; +} +.datagrid-resize-proxy { + position: absolute; + width: 1px; + height: 10000px; + top: 0; + cursor: e-resize; + display: none; +} +.datagrid-body .datagrid-editable { + margin: 0; + padding: 0; +} +.datagrid-body .datagrid-editable table { + width: 100%; + height: 100%; +} +.datagrid-body .datagrid-editable td { + border: 0; + margin: 0; + padding: 0; +} +.datagrid-view .datagrid-editable-input { + margin: 0; + padding: 2px 4px; + border: 1px solid #95B8E7; + font-size: 12px; + outline-style: none; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.datagrid-sort .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -64px center; +} +.datagrid-sort-desc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -16px center; +} +.datagrid-sort-asc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat 0px center; +} +.datagrid-row-collapse { + background: url('images/datagrid_icons.png') no-repeat -48px center; +} +.datagrid-row-expand { + background: url('images/datagrid_icons.png') no-repeat -32px center; +} +.datagrid-mask-msg { + background: #ffffff url('images/loading.gif') no-repeat scroll 5px center; +} +.datagrid-header, +.datagrid-td-rownumber { + background-color: #efefef; + background: -webkit-linear-gradient(top,#F9F9F9 0,#efefef 100%); + background: -moz-linear-gradient(top,#F9F9F9 0,#efefef 100%); + background: -o-linear-gradient(top,#F9F9F9 0,#efefef 100%); + background: linear-gradient(to bottom,#F9F9F9 0,#efefef 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#F9F9F9,endColorstr=#efefef,GradientType=0); +} +.datagrid-cell-rownumber { + color: #000000; +} +.datagrid-resize-proxy { + background: #aac5e7; +} +.datagrid-mask { + background: #ccc; +} +.datagrid-mask-msg { + border-color: #95B8E7; +} +.datagrid-toolbar, +.datagrid-pager { + background: #F4F4F4; +} +.datagrid-header, +.datagrid-toolbar, +.datagrid-pager, +.datagrid-footer-inner { + border-color: #dddddd; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-color: #ccc; +} +.datagrid-htable, +.datagrid-btable, +.datagrid-ftable { + color: #000000; + border-collapse: separate; +} +.datagrid-row-alt { + background: #fafafa; +} +.datagrid-row-over, +.datagrid-header td.datagrid-header-over { + background: #eaf2ff; + color: #000000; + cursor: default; +} +.datagrid-row-selected { + background: #ffe48d; + color: #000000; +} +.datagrid-row-editing .textbox, +.datagrid-row-editing .textbox-text { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/datalist.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/datalist.css new file mode 100644 index 0000000..eedd25b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/datalist.css @@ -0,0 +1,95 @@ +.datalist .datagrid-header { + border-width: 0; +} +.datalist .datagrid-group, +.m-list .m-list-group { + height: 25px; + line-height: 25px; + font-weight: bold; + overflow: hidden; + background-color: #efefef; + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ccc; +} +.datalist .datagrid-group-expander { + display: none; +} +.datalist .datagrid-group-title { + padding: 0 4px; +} +.datalist .datagrid-btable { + width: 100%; + table-layout: fixed; +} +.datalist .datagrid-row td { + border-style: solid; + border-left-color: transparent; + border-right-color: transparent; + border-bottom-width: 0; +} +.datalist-lines .datagrid-row td { + border-bottom-width: 1px; +} +.datalist .datagrid-cell, +.m-list li { + width: auto; + height: auto; + padding: 2px 4px; + line-height: 18px; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link, +.m-list li>a { + display: block; + position: relative; + cursor: pointer; + color: #000000; + text-decoration: none; + overflow: hidden; + margin: -2px -4px; + padding: 2px 4px; + padding-right: 16px; + line-height: 18px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link::after, +.m-list li>a::after { + position: absolute; + display: block; + width: 8px; + height: 8px; + content: ''; + right: 6px; + top: 50%; + margin-top: -4px; + border-style: solid; + border-width: 1px 1px 0 0; + -ms-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} +.m-list { + margin: 0; + padding: 0; + list-style: none; +} +.m-list li { + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ccc; +} +.m-list li>a:hover { + background: #eaf2ff; + color: #000000; +} +.m-list .m-list-group { + padding: 0 4px; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/datebox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/datebox.css new file mode 100644 index 0000000..6225a0d --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/datebox.css @@ -0,0 +1,36 @@ +.datebox-calendar-inner { + height: 180px; +} +.datebox-button { + height: 18px; + padding: 2px 5px; + text-align: center; +} +.datebox-button a { + font-size: 12px; + font-weight: bold; + text-decoration: none; + opacity: 0.6; + filter: alpha(opacity=60); +} +.datebox-button a:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.datebox-current, +.datebox-close { + float: left; +} +.datebox-close { + float: right; +} +.datebox .combo-arrow { + background-image: url('images/datebox_arrow.png'); + background-position: center center; +} +.datebox-button { + background-color: #F4F4F4; +} +.datebox-button a { + color: #444; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/dialog.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/dialog.css new file mode 100644 index 0000000..c3510e6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/dialog.css @@ -0,0 +1,32 @@ +.dialog-content { + overflow: auto; +} +.dialog-toolbar { + padding: 2px 5px; +} +.dialog-tool-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.dialog-button { + padding: 5px; + text-align: right; +} +.dialog-button .l-btn { + margin-left: 5px; +} +.dialog-toolbar, +.dialog-button { + background: #F4F4F4; + border-width: 1px; + border-style: solid; +} +.dialog-toolbar { + border-color: #95B8E7 #95B8E7 #dddddd #95B8E7; +} +.dialog-button { + border-color: #dddddd #95B8E7 #95B8E7 #95B8E7; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/easyui.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/easyui.css new file mode 100644 index 0000000..4e21c27 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/easyui.css @@ -0,0 +1,2869 @@ +.panel { + overflow: hidden; + text-align: left; + margin: 0; + border: 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.panel-header, +.panel-body { + border-width: 1px; + border-style: solid; +} +.panel-header { + padding: 5px; + position: relative; +} +.panel-title { + background: url('images/blank.gif') no-repeat; +} +.panel-header-noborder { + border-width: 0 0 1px 0; +} +.panel-body { + overflow: auto; + border-top-width: 0; + padding: 0; +} +.panel-body-noheader { + border-top-width: 1px; +} +.panel-body-noborder { + border-width: 0px; +} +.panel-body-nobottom { + border-bottom-width: 0; +} +.panel-with-icon { + padding-left: 18px; +} +.panel-icon, +.panel-tool { + position: absolute; + top: 50%; + margin-top: -8px; + height: 16px; + overflow: hidden; +} +.panel-icon { + left: 5px; + width: 16px; +} +.panel-tool { + right: 5px; + width: auto; +} +.panel-tool a { + display: inline-block; + width: 16px; + height: 16px; + opacity: 0.6; + filter: alpha(opacity=60); + margin: 0 0 0 2px; + vertical-align: top; +} +.panel-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + background-color: #eaf2ff; + -moz-border-radius: 3px 3px 3px 3px; + -webkit-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; +} +.panel-loading { + padding: 11px 0px 10px 30px; +} +.panel-noscroll { + overflow: hidden; +} +.panel-fit, +.panel-fit body { + height: 100%; + margin: 0; + padding: 0; + border: 0; + overflow: hidden; +} +.panel-loading { + background: url('images/loading.gif') no-repeat 10px 10px; +} +.panel-tool-close { + background: url('images/panel_tools.png') no-repeat -16px 0px; +} +.panel-tool-min { + background: url('images/panel_tools.png') no-repeat 0px 0px; +} +.panel-tool-max { + background: url('images/panel_tools.png') no-repeat 0px -16px; +} +.panel-tool-restore { + background: url('images/panel_tools.png') no-repeat -16px -16px; +} +.panel-tool-collapse { + background: url('images/panel_tools.png') no-repeat -32px 0; +} +.panel-tool-expand { + background: url('images/panel_tools.png') no-repeat -32px -16px; +} +.panel-header, +.panel-body { + border-color: #95B8E7; +} +.panel-header { + background-color: #E0ECFF; + background: -webkit-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); + background: -moz-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); + background: -o-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); + background: linear-gradient(to bottom,#EFF5FF 0,#E0ECFF 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#E0ECFF,GradientType=0); +} +.panel-body { + background-color: #ffffff; + color: #000000; + font-size: 12px; +} +.panel-title { + font-size: 12px; + font-weight: bold; + color: #0E2D5F; + height: 16px; + line-height: 16px; +} +.panel-footer { + border: 1px solid #95B8E7; + overflow: hidden; + background: #F4F4F4; +} +.panel-footer-noborder { + border-width: 1px 0 0 0; +} +.accordion { + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.accordion .accordion-header { + border-width: 0 0 1px; + cursor: pointer; +} +.accordion .accordion-body { + border-width: 0 0 1px; +} +.accordion-noborder { + border-width: 0; +} +.accordion-noborder .accordion-header { + border-width: 0 0 1px; +} +.accordion-noborder .accordion-body { + border-width: 0 0 1px; +} +.accordion-collapse { + background: url('images/accordion_arrows.png') no-repeat 0 0; +} +.accordion-expand { + background: url('images/accordion_arrows.png') no-repeat -16px 0; +} +.accordion { + background: #ffffff; + border-color: #95B8E7; +} +.accordion .accordion-header { + background: #E0ECFF; + filter: none; +} +.accordion .accordion-header-selected { + background: #ffe48d; +} +.accordion .accordion-header-selected .panel-title { + color: #000000; +} +.window { + overflow: hidden; + padding: 5px; + border-width: 1px; + border-style: solid; +} +.window .window-header { + background: transparent; + padding: 0px 0px 6px 0px; +} +.window .window-body { + border-width: 1px; + border-style: solid; + border-top-width: 0px; +} +.window .window-body-noheader { + border-top-width: 1px; +} +.window .panel-body-nobottom { + border-bottom-width: 0; +} +.window .window-header .panel-icon, +.window .window-header .panel-tool { + top: 50%; + margin-top: -11px; +} +.window .window-header .panel-icon { + left: 1px; +} +.window .window-header .panel-tool { + right: 1px; +} +.window .window-header .panel-with-icon { + padding-left: 18px; +} +.window-proxy { + position: absolute; + overflow: hidden; +} +.window-proxy-mask { + position: absolute; + filter: alpha(opacity=5); + opacity: 0.05; +} +.window-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + filter: alpha(opacity=40); + opacity: 0.40; + font-size: 1px; + overflow: hidden; +} +.window, +.window-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.window-shadow { + background: #ccc; + -moz-box-shadow: 2px 2px 3px #cccccc; + -webkit-box-shadow: 2px 2px 3px #cccccc; + box-shadow: 2px 2px 3px #cccccc; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.window, +.window .window-body { + border-color: #95B8E7; +} +.window { + background-color: #E0ECFF; + background: -webkit-linear-gradient(top,#EFF5FF 0,#E0ECFF 20%); + background: -moz-linear-gradient(top,#EFF5FF 0,#E0ECFF 20%); + background: -o-linear-gradient(top,#EFF5FF 0,#E0ECFF 20%); + background: linear-gradient(to bottom,#EFF5FF 0,#E0ECFF 20%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#E0ECFF,GradientType=0); +} +.window-proxy { + border: 1px dashed #95B8E7; +} +.window-proxy-mask, +.window-mask { + background: #ccc; +} +.window .panel-footer { + border: 1px solid #95B8E7; + position: relative; + top: -1px; +} +.dialog-content { + overflow: auto; +} +.dialog-toolbar { + padding: 2px 5px; +} +.dialog-tool-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.dialog-button { + padding: 5px; + text-align: right; +} +.dialog-button .l-btn { + margin-left: 5px; +} +.dialog-toolbar, +.dialog-button { + background: #F4F4F4; + border-width: 1px; + border-style: solid; +} +.dialog-toolbar { + border-color: #95B8E7 #95B8E7 #dddddd #95B8E7; +} +.dialog-button { + border-color: #dddddd #95B8E7 #95B8E7 #95B8E7; +} +.l-btn { + text-decoration: none; + display: inline-block; + overflow: hidden; + margin: 0; + padding: 0; + cursor: pointer; + outline: none; + text-align: center; + vertical-align: middle; + line-height: normal; +} +.l-btn-plain { + border-width: 0; + padding: 1px; +} +.l-btn-left { + display: inline-block; + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + vertical-align: top; +} +.l-btn-text { + display: inline-block; + vertical-align: top; + width: auto; + line-height: 24px; + font-size: 12px; + padding: 0; + margin: 0 4px; +} +.l-btn-icon { + display: inline-block; + width: 16px; + height: 16px; + line-height: 16px; + position: absolute; + top: 50%; + margin-top: -8px; + font-size: 1px; +} +.l-btn span span .l-btn-empty { + display: inline-block; + margin: 0; + width: 16px; + height: 24px; + font-size: 1px; + vertical-align: top; +} +.l-btn span .l-btn-icon-left { + padding: 0 0 0 20px; + background-position: left center; +} +.l-btn span .l-btn-icon-right { + padding: 0 20px 0 0; + background-position: right center; +} +.l-btn-icon-left .l-btn-text { + margin: 0 4px 0 24px; +} +.l-btn-icon-left .l-btn-icon { + left: 4px; +} +.l-btn-icon-right .l-btn-text { + margin: 0 24px 0 4px; +} +.l-btn-icon-right .l-btn-icon { + right: 4px; +} +.l-btn-icon-top .l-btn-text { + margin: 20px 4px 0 4px; +} +.l-btn-icon-top .l-btn-icon { + top: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-icon-bottom .l-btn-text { + margin: 0 4px 20px 4px; +} +.l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-left .l-btn-empty { + margin: 0 4px; + width: 16px; +} +.l-btn-plain:hover { + padding: 0; +} +.l-btn-focus { + outline: #0000FF dotted thin; +} +.l-btn-large .l-btn-text { + line-height: 40px; +} +.l-btn-large .l-btn-icon { + width: 32px; + height: 32px; + line-height: 32px; + margin-top: -16px; +} +.l-btn-large .l-btn-icon-left .l-btn-text { + margin-left: 40px; +} +.l-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.l-btn-large .l-btn-icon-top .l-btn-text { + margin-top: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-top .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-left .l-btn-empty { + margin: 0 4px; + width: 32px; +} +.l-btn { + color: #444; + background: #fafafa; + background-repeat: repeat-x; + border: 1px solid #bbb; + background: -webkit-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -moz-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -o-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: linear-gradient(to bottom,#ffffff 0,#eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#eeeeee,GradientType=0); + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn:hover { + background: #eaf2ff; + color: #000000; + border: 1px solid #b7d2ff; + filter: none; +} +.l-btn-plain { + background: transparent; + border-width: 0; + filter: none; +} +.l-btn-outline { + border-width: 1px; + border-color: #b7d2ff; + padding: 0; +} +.l-btn-plain:hover { + background: #eaf2ff; + color: #000000; + border: 1px solid #b7d2ff; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn-disabled, +.l-btn-disabled:hover { + opacity: 0.5; + cursor: default; + background: #fafafa; + color: #444; + background: -webkit-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -moz-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -o-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: linear-gradient(to bottom,#ffffff 0,#eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#eeeeee,GradientType=0); +} +.l-btn-disabled .l-btn-text, +.l-btn-disabled .l-btn-icon { + filter: alpha(opacity=50); +} +.l-btn-plain-disabled, +.l-btn-plain-disabled:hover { + background: transparent; + filter: alpha(opacity=50); +} +.l-btn-selected, +.l-btn-selected:hover { + background: #ddd; + filter: none; +} +.l-btn-plain-selected, +.l-btn-plain-selected:hover { + background: #ddd; +} +.textbox { + position: relative; + border: 1px solid #95B8E7; + background-color: #fff; + vertical-align: middle; + display: inline-block; + overflow: hidden; + white-space: nowrap; + margin: 0; + padding: 0; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox .textbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 4px; + white-space: normal; + vertical-align: top; + outline-style: none; + resize: none; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox textarea.textbox-text { + white-space: pre-wrap; +} +.textbox .textbox-prompt { + font-size: 12px; + color: #aaa; +} +.textbox .textbox-button, +.textbox .textbox-button:hover { + position: absolute; + top: 0; + padding: 0; + vertical-align: top; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.textbox-button-right, +.textbox-button-right:hover { + border-width: 0 0 0 1px; +} +.textbox-button-left, +.textbox-button-left:hover { + border-width: 0 1px 0 0; +} +.textbox-addon { + position: absolute; + top: 0; +} +.textbox-icon { + display: inline-block; + width: 18px; + height: 20px; + overflow: hidden; + vertical-align: top; + background-position: center center; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); + text-decoration: none; + outline-style: none; +} +.textbox-icon-disabled, +.textbox-icon-readonly { + cursor: default; +} +.textbox-icon:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.textbox-icon-disabled:hover { + opacity: 0.6; + filter: alpha(opacity=60); +} +.textbox-focused { + -moz-box-shadow: 0 0 3px 0 #95B8E7; + -webkit-box-shadow: 0 0 3px 0 #95B8E7; + box-shadow: 0 0 3px 0 #95B8E7; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} +.filebox .textbox-value { + vertical-align: top; + position: absolute; + top: 0; + left: -5000px; +} +.filebox-label { + display: inline-block; + position: absolute; + width: 100%; + height: 100%; + cursor: pointer; + left: 0; + top: 0; + z-index: 10; + background: url('images/blank.gif') no-repeat; +} +.l-btn-disabled .filebox-label { + cursor: default; +} +.combo { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.combo .combo-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0px 2px; + vertical-align: baseline; +} +.combo-arrow { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.combo-arrow-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.combo-panel { + overflow: auto; +} +.combo-arrow { + background: url('images/combo_arrow.png') no-repeat center center; +} +.combo-panel { + background-color: #ffffff; +} +.combo { + border-color: #95B8E7; + background-color: #fff; +} +.combo-arrow { + background-color: #E0ECFF; +} +.combo-arrow-hover { + background-color: #eaf2ff; +} +.combo-arrow:hover { + background-color: #eaf2ff; +} +.combo .textbox-icon-disabled:hover { + cursor: default; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} +.combobox-item, +.combobox-group { + font-size: 12px; + padding: 3px; + padding-right: 0px; +} +.combobox-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.combobox-gitem { + padding-left: 10px; +} +.combobox-group { + font-weight: bold; +} +.combobox-item-hover { + background-color: #eaf2ff; + color: #000000; +} +.combobox-item-selected { + background-color: #ffe48d; + color: #000000; +} +.layout { + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + z-index: 0; +} +.layout-panel { + position: absolute; + overflow: hidden; +} +.layout-body { + min-width: 1px; + min-height: 1px; +} +.layout-panel-east, +.layout-panel-west { + z-index: 2; +} +.layout-panel-north, +.layout-panel-south { + z-index: 3; +} +.layout-expand { + position: absolute; + padding: 0px; + font-size: 1px; + cursor: pointer; + z-index: 1; +} +.layout-expand .panel-header, +.layout-expand .panel-body { + background: transparent; + filter: none; + overflow: hidden; +} +.layout-expand .panel-header { + border-bottom-width: 0px; +} +.layout-expand .panel-body { + position: relative; +} +.layout-expand .panel-body .panel-icon { + margin-top: 0; + top: 0; + left: 50%; + margin-left: -8px; +} +.layout-expand-west .panel-header .panel-icon, +.layout-expand-east .panel-header .panel-icon { + display: none; +} +.layout-expand-title { + position: absolute; + top: 0; + left: 21px; + white-space: nowrap; + word-wrap: normal; + -webkit-transform: rotate(90deg); + -webkit-transform-origin: 0 0; + -moz-transform: rotate(90deg); + -moz-transform-origin: 0 0; + -o-transform: rotate(90deg); + -o-transform-origin: 0 0; + transform: rotate(90deg); + transform-origin: 0 0; +} +.layout-expand-with-icon { + top: 18px; +} +.layout-expand .panel-body-noheader .layout-expand-title, +.layout-expand .panel-body-noheader .panel-icon { + top: 5px; +} +.layout-expand .panel-body-noheader .layout-expand-with-icon { + top: 23px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + position: absolute; + font-size: 1px; + display: none; + z-index: 5; +} +.layout-split-proxy-h { + width: 5px; + cursor: e-resize; +} +.layout-split-proxy-v { + height: 5px; + cursor: n-resize; +} +.layout-mask { + position: absolute; + background: #fafafa; + filter: alpha(opacity=10); + opacity: 0.10; + z-index: 4; +} +.layout-button-up { + background: url('images/layout_arrows.png') no-repeat -16px -16px; +} +.layout-button-down { + background: url('images/layout_arrows.png') no-repeat -16px 0; +} +.layout-button-left { + background: url('images/layout_arrows.png') no-repeat 0 0; +} +.layout-button-right { + background: url('images/layout_arrows.png') no-repeat 0 -16px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + background-color: #aac5e7; +} +.layout-split-north { + border-bottom: 5px solid #E6EEF8; +} +.layout-split-south { + border-top: 5px solid #E6EEF8; +} +.layout-split-east { + border-left: 5px solid #E6EEF8; +} +.layout-split-west { + border-right: 5px solid #E6EEF8; +} +.layout-expand { + background-color: #E0ECFF; +} +.layout-expand-over { + background-color: #E0ECFF; +} +.tabs-container { + overflow: hidden; +} +.tabs-header { + border-width: 1px; + border-style: solid; + border-bottom-width: 0; + position: relative; + padding: 0; + padding-top: 2px; + overflow: hidden; +} +.tabs-scroller-left, +.tabs-scroller-right { + position: absolute; + top: auto; + bottom: 0; + width: 18px; + font-size: 1px; + display: none; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.tabs-scroller-left { + left: 0; +} +.tabs-scroller-right { + right: 0; +} +.tabs-tool { + position: absolute; + bottom: 0; + padding: 1px; + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.tabs-header-plain .tabs-tool { + padding: 0 1px; +} +.tabs-wrap { + position: relative; + left: 0; + overflow: hidden; + width: 100%; + margin: 0; + padding: 0; +} +.tabs-scrolling { + margin-left: 18px; + margin-right: 18px; +} +.tabs-disabled { + opacity: 0.3; + filter: alpha(opacity=30); +} +.tabs { + list-style-type: none; + height: 26px; + margin: 0px; + padding: 0px; + padding-left: 4px; + width: 50000px; + border-style: solid; + border-width: 0 0 1px 0; +} +.tabs li { + float: left; + display: inline-block; + margin: 0 4px -1px 0; + padding: 0; + position: relative; + border: 0; +} +.tabs li a.tabs-inner { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0 10px; + height: 25px; + line-height: 25px; + text-align: center; + white-space: nowrap; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.tabs li.tabs-selected a.tabs-inner { + font-weight: bold; + outline: none; +} +.tabs li.tabs-selected a:hover.tabs-inner { + cursor: default; + pointer: default; +} +.tabs li a.tabs-close, +.tabs-p-tool { + position: absolute; + font-size: 1px; + display: block; + height: 12px; + padding: 0; + top: 50%; + margin-top: -6px; + overflow: hidden; +} +.tabs li a.tabs-close { + width: 12px; + right: 5px; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs-p-tool { + right: 16px; +} +.tabs-p-tool a { + display: inline-block; + font-size: 1px; + width: 12px; + height: 12px; + margin: 0; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs li a:hover.tabs-close, +.tabs-p-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + cursor: hand; + cursor: pointer; +} +.tabs-with-icon { + padding-left: 18px; +} +.tabs-icon { + position: absolute; + width: 16px; + height: 16px; + left: 10px; + top: 50%; + margin-top: -8px; +} +.tabs-title { + font-size: 12px; +} +.tabs-closable { + padding-right: 8px; +} +.tabs-panels { + margin: 0px; + padding: 0px; + border-width: 1px; + border-style: solid; + border-top-width: 0; + overflow: hidden; +} +.tabs-header-bottom { + border-width: 0 1px 1px 1px; + padding: 0 0 2px 0; +} +.tabs-header-bottom .tabs { + border-width: 1px 0 0 0; +} +.tabs-header-bottom .tabs li { + margin: -1px 4px 0 0; +} +.tabs-header-bottom .tabs li a.tabs-inner { + -moz-border-radius: 0 0 5px 5px; + -webkit-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; +} +.tabs-header-bottom .tabs-tool { + top: 0; +} +.tabs-header-bottom .tabs-scroller-left, +.tabs-header-bottom .tabs-scroller-right { + top: 0; + bottom: auto; +} +.tabs-panels-top { + border-width: 1px 1px 0 1px; +} +.tabs-header-left { + float: left; + border-width: 1px 0 1px 1px; + padding: 0; +} +.tabs-header-right { + float: right; + border-width: 1px 1px 1px 0; + padding: 0; +} +.tabs-header-left .tabs-wrap, +.tabs-header-right .tabs-wrap { + height: 100%; +} +.tabs-header-left .tabs { + height: 100%; + padding: 4px 0 0 2px; + border-width: 0 1px 0 0; +} +.tabs-header-right .tabs { + height: 100%; + padding: 4px 2px 0 0; + border-width: 0 0 0 1px; +} +.tabs-header-left .tabs li, +.tabs-header-right .tabs li { + display: block; + width: 100%; + position: relative; +} +.tabs-header-left .tabs li { + left: auto; + right: 0; + margin: 0 -1px 4px 0; + float: right; +} +.tabs-header-right .tabs li { + left: 0; + right: auto; + margin: 0 0 4px -1px; + float: left; +} +.tabs-justified li a.tabs-inner { + padding-left: 0; + padding-right: 0; +} +.tabs-header-left .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.tabs-header-right .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.tabs-panels-right { + float: right; + border-width: 1px 1px 1px 0; +} +.tabs-panels-left { + float: left; + border-width: 1px 0 1px 1px; +} +.tabs-header-noborder, +.tabs-panels-noborder { + border: 0px; +} +.tabs-header-plain { + border: 0px; + background: transparent; +} +.tabs-pill { + padding-bottom: 3px; +} +.tabs-header-bottom .tabs-pill { + padding-top: 3px; + padding-bottom: 0; +} +.tabs-header-left .tabs-pill { + padding-right: 3px; +} +.tabs-header-right .tabs-pill { + padding-left: 3px; +} +.tabs-header .tabs-pill li a.tabs-inner { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tabs-header-narrow, +.tabs-header-narrow .tabs-narrow { + padding: 0; +} +.tabs-narrow li, +.tabs-header-bottom .tabs-narrow li { + margin-left: 0; + margin-right: -1px; +} +.tabs-narrow li.tabs-last, +.tabs-header-bottom .tabs-narrow li.tabs-last { + margin-right: 0; +} +.tabs-header-left .tabs-narrow, +.tabs-header-right .tabs-narrow { + padding-top: 0; +} +.tabs-header-left .tabs-narrow li { + margin-bottom: -1px; + margin-right: -1px; +} +.tabs-header-left .tabs-narrow li.tabs-last, +.tabs-header-right .tabs-narrow li.tabs-last { + margin-bottom: 0; +} +.tabs-header-right .tabs-narrow li { + margin-bottom: -1px; + margin-left: -1px; +} +.tabs-scroller-left { + background: #E0ECFF url('images/tabs_icons.png') no-repeat 1px center; +} +.tabs-scroller-right { + background: #E0ECFF url('images/tabs_icons.png') no-repeat -15px center; +} +.tabs li a.tabs-close { + background: url('images/tabs_icons.png') no-repeat -34px center; +} +.tabs li a.tabs-inner:hover { + background: #eaf2ff; + color: #000000; + filter: none; +} +.tabs li.tabs-selected a.tabs-inner { + background-color: #ffffff; + color: #0E2D5F; + background: -webkit-linear-gradient(top,#EFF5FF 0,#ffffff 100%); + background: -moz-linear-gradient(top,#EFF5FF 0,#ffffff 100%); + background: -o-linear-gradient(top,#EFF5FF 0,#ffffff 100%); + background: linear-gradient(to bottom,#EFF5FF 0,#ffffff 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#ffffff,GradientType=0); +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(top,#ffffff 0,#EFF5FF 100%); + background: -moz-linear-gradient(top,#ffffff 0,#EFF5FF 100%); + background: -o-linear-gradient(top,#ffffff 0,#EFF5FF 100%); + background: linear-gradient(to bottom,#ffffff 0,#EFF5FF 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#EFF5FF,GradientType=0); +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#EFF5FF 0,#ffffff 100%); + background: -moz-linear-gradient(left,#EFF5FF 0,#ffffff 100%); + background: -o-linear-gradient(left,#EFF5FF 0,#ffffff 100%); + background: linear-gradient(to right,#EFF5FF 0,#ffffff 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#ffffff,GradientType=1); +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#ffffff 0,#EFF5FF 100%); + background: -moz-linear-gradient(left,#ffffff 0,#EFF5FF 100%); + background: -o-linear-gradient(left,#ffffff 0,#EFF5FF 100%); + background: linear-gradient(to right,#ffffff 0,#EFF5FF 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#EFF5FF,GradientType=1); +} +.tabs li a.tabs-inner { + color: #0E2D5F; + background-color: #E0ECFF; + background: -webkit-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); + background: -moz-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); + background: -o-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); + background: linear-gradient(to bottom,#EFF5FF 0,#E0ECFF 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#E0ECFF,GradientType=0); +} +.tabs-header, +.tabs-tool { + background-color: #E0ECFF; +} +.tabs-header-plain { + background: transparent; +} +.tabs-header, +.tabs-scroller-left, +.tabs-scroller-right, +.tabs-tool, +.tabs, +.tabs-panels, +.tabs li a.tabs-inner, +.tabs li.tabs-selected a.tabs-inner, +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner, +.tabs-header-left .tabs li.tabs-selected a.tabs-inner, +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-color: #95B8E7; +} +.tabs-p-tool a:hover, +.tabs li a:hover.tabs-close, +.tabs-scroller-over { + background-color: #eaf2ff; +} +.tabs li.tabs-selected a.tabs-inner { + border-bottom: 1px solid #ffffff; +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + border-top: 1px solid #ffffff; +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + border-right: 1px solid #ffffff; +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-left: 1px solid #ffffff; +} +.tabs-header .tabs-pill li.tabs-selected a.tabs-inner { + background: #ffe48d; + color: #000000; + filter: none; + border-color: #95B8E7; +} +.datagrid .panel-body { + overflow: hidden; + position: relative; +} +.datagrid-view { + position: relative; + overflow: hidden; +} +.datagrid-view1, +.datagrid-view2 { + position: absolute; + overflow: hidden; + top: 0; +} +.datagrid-view1 { + left: 0; +} +.datagrid-view2 { + right: 0; +} +.datagrid-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0.3; + filter: alpha(opacity=30); + display: none; +} +.datagrid-mask-msg { + position: absolute; + top: 50%; + margin-top: -20px; + padding: 10px 5px 10px 30px; + width: auto; + height: 16px; + border-width: 2px; + border-style: solid; + display: none; +} +.datagrid-sort-icon { + padding: 0; + display: none; +} +.datagrid-toolbar { + height: auto; + padding: 1px 2px; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.datagrid .datagrid-pager { + display: block; + margin: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.datagrid .datagrid-pager-top { + border-width: 0 0 1px 0; +} +.datagrid-header { + overflow: hidden; + cursor: default; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-header-inner { + float: left; + width: 10000px; +} +.datagrid-header-row, +.datagrid-row { + height: 25px; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-width: 0 1px 1px 0; + border-style: dotted; + margin: 0; + padding: 0; +} +.datagrid-cell, +.datagrid-cell-group, +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + margin: 0; + padding: 0 4px; + white-space: nowrap; + word-wrap: normal; + overflow: hidden; + height: 18px; + line-height: 18px; + font-size: 12px; +} +.datagrid-header .datagrid-cell { + height: auto; +} +.datagrid-header .datagrid-cell span { + font-size: 12px; +} +.datagrid-cell-group { + text-align: center; + text-overflow: ellipsis; +} +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + width: 30px; + text-align: center; + margin: 0; + padding: 0; +} +.datagrid-body { + margin: 0; + padding: 0; + overflow: auto; + zoom: 1; +} +.datagrid-view1 .datagrid-body-inner { + padding-bottom: 20px; +} +.datagrid-view1 .datagrid-body { + overflow: hidden; +} +.datagrid-footer { + overflow: hidden; +} +.datagrid-footer-inner { + border-width: 1px 0 0 0; + border-style: solid; + width: 10000px; + float: left; +} +.datagrid-row-editing .datagrid-cell { + height: auto; +} +.datagrid-header-check, +.datagrid-cell-check { + padding: 0; + width: 27px; + height: 18px; + font-size: 1px; + text-align: center; + overflow: hidden; +} +.datagrid-header-check input, +.datagrid-cell-check input { + margin: 0; + padding: 0; + width: 15px; + height: 18px; +} +.datagrid-resize-proxy { + position: absolute; + width: 1px; + height: 10000px; + top: 0; + cursor: e-resize; + display: none; +} +.datagrid-body .datagrid-editable { + margin: 0; + padding: 0; +} +.datagrid-body .datagrid-editable table { + width: 100%; + height: 100%; +} +.datagrid-body .datagrid-editable td { + border: 0; + margin: 0; + padding: 0; +} +.datagrid-view .datagrid-editable-input { + margin: 0; + padding: 2px 4px; + border: 1px solid #95B8E7; + font-size: 12px; + outline-style: none; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.datagrid-sort .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -64px center; +} +.datagrid-sort-desc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -16px center; +} +.datagrid-sort-asc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat 0px center; +} +.datagrid-row-collapse { + background: url('images/datagrid_icons.png') no-repeat -48px center; +} +.datagrid-row-expand { + background: url('images/datagrid_icons.png') no-repeat -32px center; +} +.datagrid-mask-msg { + background: #ffffff url('images/loading.gif') no-repeat scroll 5px center; +} +.datagrid-header, +.datagrid-td-rownumber { + background-color: #efefef; + background: -webkit-linear-gradient(top,#F9F9F9 0,#efefef 100%); + background: -moz-linear-gradient(top,#F9F9F9 0,#efefef 100%); + background: -o-linear-gradient(top,#F9F9F9 0,#efefef 100%); + background: linear-gradient(to bottom,#F9F9F9 0,#efefef 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#F9F9F9,endColorstr=#efefef,GradientType=0); +} +.datagrid-cell-rownumber { + color: #000000; +} +.datagrid-resize-proxy { + background: #aac5e7; +} +.datagrid-mask { + background: #ccc; +} +.datagrid-mask-msg { + border-color: #95B8E7; +} +.datagrid-toolbar, +.datagrid-pager { + background: #F4F4F4; +} +.datagrid-header, +.datagrid-toolbar, +.datagrid-pager, +.datagrid-footer-inner { + border-color: #dddddd; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-color: #ccc; +} +.datagrid-htable, +.datagrid-btable, +.datagrid-ftable { + color: #000000; + border-collapse: separate; +} +.datagrid-row-alt { + background: #fafafa; +} +.datagrid-row-over, +.datagrid-header td.datagrid-header-over { + background: #eaf2ff; + color: #000000; + cursor: default; +} +.datagrid-row-selected { + background: #ffe48d; + color: #000000; +} +.datagrid-row-editing .textbox, +.datagrid-row-editing .textbox-text { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.propertygrid .datagrid-view1 .datagrid-body td { + padding-bottom: 1px; + border-width: 0 1px 0 0; +} +.propertygrid .datagrid-group { + height: 21px; + overflow: hidden; + border-width: 0 0 1px 0; + border-style: solid; +} +.propertygrid .datagrid-group span { + font-weight: bold; +} +.propertygrid .datagrid-view1 .datagrid-body td { + border-color: #dddddd; +} +.propertygrid .datagrid-view1 .datagrid-group { + border-color: #E0ECFF; +} +.propertygrid .datagrid-view2 .datagrid-group { + border-color: #dddddd; +} +.propertygrid .datagrid-group, +.propertygrid .datagrid-view1 .datagrid-body, +.propertygrid .datagrid-view1 .datagrid-row-over, +.propertygrid .datagrid-view1 .datagrid-row-selected { + background: #E0ECFF; +} +.datalist .datagrid-header { + border-width: 0; +} +.datalist .datagrid-group, +.m-list .m-list-group { + height: 25px; + line-height: 25px; + font-weight: bold; + overflow: hidden; + background-color: #efefef; + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ccc; +} +.datalist .datagrid-group-expander { + display: none; +} +.datalist .datagrid-group-title { + padding: 0 4px; +} +.datalist .datagrid-btable { + width: 100%; + table-layout: fixed; +} +.datalist .datagrid-row td { + border-style: solid; + border-left-color: transparent; + border-right-color: transparent; + border-bottom-width: 0; +} +.datalist-lines .datagrid-row td { + border-bottom-width: 1px; +} +.datalist .datagrid-cell, +.m-list li { + width: auto; + height: auto; + padding: 2px 4px; + line-height: 18px; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link, +.m-list li>a { + display: block; + position: relative; + cursor: pointer; + color: #000000; + text-decoration: none; + overflow: hidden; + margin: -2px -4px; + padding: 2px 4px; + padding-right: 16px; + line-height: 18px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link::after, +.m-list li>a::after { + position: absolute; + display: block; + width: 8px; + height: 8px; + content: ''; + right: 6px; + top: 50%; + margin-top: -4px; + border-style: solid; + border-width: 1px 1px 0 0; + -ms-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} +.m-list { + margin: 0; + padding: 0; + list-style: none; +} +.m-list li { + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ccc; +} +.m-list li>a:hover { + background: #eaf2ff; + color: #000000; +} +.m-list .m-list-group { + padding: 0 4px; +} +.pagination { + zoom: 1; +} +.pagination table { + float: left; + height: 30px; +} +.pagination td { + border: 0; +} +.pagination-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 3px 1px; +} +.pagination .pagination-num { + border-width: 1px; + border-style: solid; + margin: 0 2px; + padding: 2px; + width: 2em; + height: auto; +} +.pagination-page-list { + margin: 0px 6px; + padding: 1px 2px; + width: auto; + height: auto; + border-width: 1px; + border-style: solid; +} +.pagination-info { + float: right; + margin: 0 6px 0 0; + padding: 0; + height: 30px; + line-height: 30px; + font-size: 12px; +} +.pagination span { + font-size: 12px; +} +.pagination-link .l-btn-text { + width: 24px; + text-align: center; + margin: 0; +} +.pagination-first { + background: url('images/pagination_icons.png') no-repeat 0 center; +} +.pagination-prev { + background: url('images/pagination_icons.png') no-repeat -16px center; +} +.pagination-next { + background: url('images/pagination_icons.png') no-repeat -32px center; +} +.pagination-last { + background: url('images/pagination_icons.png') no-repeat -48px center; +} +.pagination-load { + background: url('images/pagination_icons.png') no-repeat -64px center; +} +.pagination-loading { + background: url('images/loading.gif') no-repeat center center; +} +.pagination-page-list, +.pagination .pagination-num { + border-color: #95B8E7; +} +.calendar { + border-width: 1px; + border-style: solid; + padding: 1px; + overflow: hidden; +} +.calendar table { + table-layout: fixed; + border-collapse: separate; + font-size: 12px; + width: 100%; + height: 100%; +} +.calendar table td, +.calendar table th { + font-size: 12px; +} +.calendar-noborder { + border: 0; +} +.calendar-header { + position: relative; + height: 22px; +} +.calendar-title { + text-align: center; + height: 22px; +} +.calendar-title span { + position: relative; + display: inline-block; + top: 2px; + padding: 0 3px; + height: 18px; + line-height: 18px; + font-size: 12px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth, +.calendar-nextmonth, +.calendar-prevyear, +.calendar-nextyear { + position: absolute; + top: 50%; + margin-top: -7px; + width: 14px; + height: 14px; + cursor: pointer; + font-size: 1px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth { + left: 20px; + background: url('images/calendar_arrows.png') no-repeat -18px -2px; +} +.calendar-nextmonth { + right: 20px; + background: url('images/calendar_arrows.png') no-repeat -34px -2px; +} +.calendar-prevyear { + left: 3px; + background: url('images/calendar_arrows.png') no-repeat -1px -2px; +} +.calendar-nextyear { + right: 3px; + background: url('images/calendar_arrows.png') no-repeat -49px -2px; +} +.calendar-body { + position: relative; +} +.calendar-body th, +.calendar-body td { + text-align: center; +} +.calendar-day { + border: 0; + padding: 1px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-other-month { + opacity: 0.3; + filter: alpha(opacity=30); +} +.calendar-disabled { + opacity: 0.6; + filter: alpha(opacity=60); + cursor: default; +} +.calendar-menu { + position: absolute; + top: 0; + left: 0; + width: 180px; + height: 150px; + padding: 5px; + font-size: 12px; + display: none; + overflow: hidden; +} +.calendar-menu-year-inner { + text-align: center; + padding-bottom: 5px; +} +.calendar-menu-year { + width: 40px; + text-align: center; + border-width: 1px; + border-style: solid; + margin: 0; + padding: 2px; + font-weight: bold; + font-size: 12px; +} +.calendar-menu-prev, +.calendar-menu-next { + display: inline-block; + width: 21px; + height: 21px; + vertical-align: top; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-menu-prev { + margin-right: 10px; + background: url('images/calendar_arrows.png') no-repeat 2px 2px; +} +.calendar-menu-next { + margin-left: 10px; + background: url('images/calendar_arrows.png') no-repeat -45px 2px; +} +.calendar-menu-month { + text-align: center; + cursor: pointer; + font-weight: bold; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-body th, +.calendar-menu-month { + color: #4d4d4d; +} +.calendar-day { + color: #000000; +} +.calendar-sunday { + color: #CC2222; +} +.calendar-saturday { + color: #00ee00; +} +.calendar-today { + color: #0000ff; +} +.calendar-menu-year { + border-color: #95B8E7; +} +.calendar { + border-color: #95B8E7; +} +.calendar-header { + background: #E0ECFF; +} +.calendar-body, +.calendar-menu { + background: #ffffff; +} +.calendar-body th { + background: #F4F4F4; + padding: 2px 0; +} +.calendar-hover, +.calendar-nav-hover, +.calendar-menu-hover { + background-color: #eaf2ff; + color: #000000; +} +.calendar-hover { + border: 1px solid #b7d2ff; + padding: 0; +} +.calendar-selected { + background-color: #ffe48d; + color: #000000; + border: 1px solid #ffab3f; + padding: 0; +} +.datebox-calendar-inner { + height: 180px; +} +.datebox-button { + height: 18px; + padding: 2px 5px; + text-align: center; +} +.datebox-button a { + font-size: 12px; + font-weight: bold; + text-decoration: none; + opacity: 0.6; + filter: alpha(opacity=60); +} +.datebox-button a:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.datebox-current, +.datebox-close { + float: left; +} +.datebox-close { + float: right; +} +.datebox .combo-arrow { + background-image: url('images/datebox_arrow.png'); + background-position: center center; +} +.datebox-button { + background-color: #F4F4F4; +} +.datebox-button a { + color: #444; +} +.numberbox { + border: 1px solid #95B8E7; + margin: 0; + padding: 0 2px; + vertical-align: middle; +} +.textbox { + padding: 0; +} +.spinner { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.spinner .spinner-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0 2px; + vertical-align: baseline; +} +.spinner-arrow { + background-color: #E0ECFF; + display: inline-block; + overflow: hidden; + vertical-align: top; + margin: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + width: 18px; +} +.spinner-arrow-up, +.spinner-arrow-down { + opacity: 0.6; + filter: alpha(opacity=60); + display: block; + font-size: 1px; + width: 18px; + height: 10px; + width: 100%; + height: 50%; + color: #444; + outline-style: none; +} +.spinner-arrow-hover { + background-color: #eaf2ff; + opacity: 1.0; + filter: alpha(opacity=100); +} +.spinner-arrow-up:hover, +.spinner-arrow-down:hover { + opacity: 1.0; + filter: alpha(opacity=100); + background-color: #eaf2ff; +} +.textbox-icon-disabled .spinner-arrow-up:hover, +.textbox-icon-disabled .spinner-arrow-down:hover { + opacity: 0.6; + filter: alpha(opacity=60); + background-color: #E0ECFF; + cursor: default; +} +.spinner .textbox-icon-disabled { + opacity: 0.6; + filter: alpha(opacity=60); +} +.spinner-arrow-up { + background: url('images/spinner_arrows.png') no-repeat 1px center; +} +.spinner-arrow-down { + background: url('images/spinner_arrows.png') no-repeat -15px center; +} +.spinner { + border-color: #95B8E7; +} +.progressbar { + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + overflow: hidden; + position: relative; +} +.progressbar-text { + text-align: center; + position: absolute; +} +.progressbar-value { + position: relative; + overflow: hidden; + width: 0; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.progressbar { + border-color: #95B8E7; +} +.progressbar-text { + color: #000000; + font-size: 12px; +} +.progressbar-value .progressbar-text { + background-color: #ffe48d; + color: #000000; +} +.searchbox { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.searchbox .searchbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 0 2px; + vertical-align: top; +} +.searchbox .searchbox-prompt { + font-size: 12px; + color: #ccc; +} +.searchbox-button { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.searchbox-button-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.searchbox .l-btn-plain { + border: 0; + padding: 0; + vertical-align: top; + opacity: 0.6; + filter: alpha(opacity=60); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .l-btn-plain:hover { + border: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox a.m-btn-plain-active { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .m-btn-active { + border-width: 0 1px 0 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .textbox-button-right { + border-width: 0 0 0 1px; +} +.searchbox .textbox-button-left { + border-width: 0 1px 0 0; +} +.searchbox-button { + background: url('images/searchbox_button.png') no-repeat center center; +} +.searchbox { + border-color: #95B8E7; + background-color: #fff; +} +.searchbox .l-btn-plain { + background: #E0ECFF; +} +.searchbox .l-btn-plain-disabled, +.searchbox .l-btn-plain-disabled:hover { + opacity: 0.5; + filter: alpha(opacity=50); +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} +.slider-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.slider-h { + height: 22px; +} +.slider-v { + width: 22px; +} +.slider-inner { + position: relative; + height: 6px; + top: 7px; + border-width: 1px; + border-style: solid; + border-radius: 5px; +} +.slider-handle { + position: absolute; + display: block; + outline: none; + width: 20px; + height: 20px; + top: 50%; + margin-top: -10px; + margin-left: -10px; +} +.slider-tip { + position: absolute; + display: inline-block; + line-height: 12px; + font-size: 12px; + white-space: nowrap; + top: -22px; +} +.slider-rule { + position: relative; + top: 15px; +} +.slider-rule span { + position: absolute; + display: inline-block; + font-size: 0; + height: 5px; + border-width: 0 0 0 1px; + border-style: solid; +} +.slider-rulelabel { + position: relative; + top: 20px; +} +.slider-rulelabel span { + position: absolute; + display: inline-block; + font-size: 12px; +} +.slider-v .slider-inner { + width: 6px; + left: 7px; + top: 0; + float: left; +} +.slider-v .slider-handle { + left: 50%; + margin-top: -10px; +} +.slider-v .slider-tip { + left: -10px; + margin-top: -6px; +} +.slider-v .slider-rule { + float: left; + top: 0; + left: 16px; +} +.slider-v .slider-rule span { + width: 5px; + height: 'auto'; + border-left: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.slider-v .slider-rulelabel { + float: left; + top: 0; + left: 23px; +} +.slider-handle { + background: url('images/slider_handle.png') no-repeat; +} +.slider-inner { + border-color: #95B8E7; + background: #E0ECFF; +} +.slider-rule span { + border-color: #95B8E7; +} +.slider-rulelabel span { + color: #000000; +} +.menu { + position: absolute; + margin: 0; + padding: 2px; + border-width: 1px; + border-style: solid; + overflow: hidden; +} +.menu-inline { + position: relative; +} +.menu-item { + position: relative; + margin: 0; + padding: 0; + overflow: hidden; + white-space: nowrap; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.menu-text { + height: 20px; + line-height: 20px; + float: left; + padding-left: 28px; +} +.menu-icon { + position: absolute; + width: 16px; + height: 16px; + left: 2px; + top: 50%; + margin-top: -8px; +} +.menu-rightarrow { + position: absolute; + width: 16px; + height: 16px; + right: 0; + top: 50%; + margin-top: -8px; +} +.menu-line { + position: absolute; + left: 26px; + top: 0; + height: 2000px; + font-size: 1px; +} +.menu-sep { + margin: 3px 0px 3px 25px; + font-size: 1px; +} +.menu-noline .menu-line { + display: none; +} +.menu-noline .menu-sep { + margin-left: 0; + margin-right: 0; +} +.menu-active { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.menu-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default; +} +.menu-text, +.menu-text span { + font-size: 12px; +} +.menu-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + background: #ccc; + -moz-box-shadow: 2px 2px 3px #cccccc; + -webkit-box-shadow: 2px 2px 3px #cccccc; + box-shadow: 2px 2px 3px #cccccc; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.menu-rightarrow { + background: url('images/menu_arrows.png') no-repeat -32px center; +} +.menu-line { + border-left: 1px solid #ccc; + border-right: 1px solid #fff; +} +.menu-sep { + border-top: 1px solid #ccc; + border-bottom: 1px solid #fff; +} +.menu { + background-color: #fafafa; + border-color: #ddd; + color: #444; +} +.menu-content { + background: #ffffff; +} +.menu-item { + border-color: transparent; + _border-color: #fafafa; +} +.menu-active { + border-color: #b7d2ff; + color: #000000; + background: #eaf2ff; +} +.menu-active-disabled { + border-color: transparent; + background: transparent; + color: #444; +} +.m-btn-downarrow, +.s-btn-downarrow { + display: inline-block; + position: absolute; + width: 16px; + height: 16px; + font-size: 1px; + right: 0; + top: 50%; + margin-top: -8px; +} +.m-btn-active, +.s-btn-active { + background: #eaf2ff; + color: #000000; + border: 1px solid #b7d2ff; + filter: none; +} +.m-btn-plain-active, +.s-btn-plain-active { + background: transparent; + padding: 0; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.m-btn .l-btn-left .l-btn-text { + margin-right: 20px; +} +.m-btn .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.m-btn .l-btn-icon-right .l-btn-icon { + right: 20px; +} +.m-btn .l-btn-icon-top .l-btn-text { + margin-right: 4px; + margin-bottom: 14px; +} +.m-btn .l-btn-icon-bottom .l-btn-text { + margin-right: 4px; + margin-bottom: 34px; +} +.m-btn .l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 20px; +} +.m-btn .l-btn-icon-top .m-btn-downarrow, +.m-btn .l-btn-icon-bottom .m-btn-downarrow { + top: auto; + bottom: 0px; + left: 50%; + margin-left: -8px; +} +.m-btn-line { + display: inline-block; + position: absolute; + font-size: 1px; + display: none; +} +.m-btn .l-btn-left .m-btn-line { + right: 0; + width: 16px; + height: 500px; + border-style: solid; + border-color: #aac5e7; + border-width: 0 0 0 1px; +} +.m-btn .l-btn-icon-top .m-btn-line, +.m-btn .l-btn-icon-bottom .m-btn-line { + left: 0; + bottom: 0; + width: 500px; + height: 16px; + border-width: 1px 0 0 0; +} +.m-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 56px; +} +.m-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 50px; +} +.m-btn-downarrow, +.s-btn-downarrow { + background: url('images/menu_arrows.png') no-repeat 0 center; +} +.m-btn-plain-active, +.s-btn-plain-active { + border-color: #b7d2ff; + background-color: #eaf2ff; + color: #000000; +} +.s-btn:hover .m-btn-line, +.s-btn-active .m-btn-line, +.s-btn-plain-active .m-btn-line { + display: inline-block; +} +.l-btn:hover .s-btn-downarrow, +.s-btn-active .s-btn-downarrow, +.s-btn-plain-active .s-btn-downarrow { + border-style: solid; + border-color: #aac5e7; + border-width: 0 0 0 1px; +} +.messager-body { + padding: 10px; + overflow: auto; +} +.messager-button { + text-align: center; + padding: 5px; +} +.messager-button .l-btn { + width: 70px; +} +.messager-icon { + float: left; + width: 32px; + height: 32px; + margin: 0 10px 10px 0; +} +.messager-error { + background: url('images/messager_icons.png') no-repeat scroll -64px 0; +} +.messager-info { + background: url('images/messager_icons.png') no-repeat scroll 0 0; +} +.messager-question { + background: url('images/messager_icons.png') no-repeat scroll -32px 0; +} +.messager-warning { + background: url('images/messager_icons.png') no-repeat scroll -96px 0; +} +.messager-progress { + padding: 10px; +} +.messager-p-msg { + margin-bottom: 5px; +} +.messager-body .messager-input { + width: 100%; + padding: 1px 0; + border: 1px solid #95B8E7; +} +.tree { + margin: 0; + padding: 0; + list-style-type: none; +} +.tree li { + white-space: nowrap; +} +.tree li ul { + list-style-type: none; + margin: 0; + padding: 0; +} +.tree-node { + height: 18px; + white-space: nowrap; + cursor: pointer; +} +.tree-hit { + cursor: pointer; +} +.tree-expanded, +.tree-collapsed, +.tree-folder, +.tree-file, +.tree-checkbox, +.tree-indent { + display: inline-block; + width: 16px; + height: 18px; + vertical-align: top; + overflow: hidden; +} +.tree-expanded { + background: url('images/tree_icons.png') no-repeat -18px 0px; +} +.tree-expanded-hover { + background: url('images/tree_icons.png') no-repeat -50px 0px; +} +.tree-collapsed { + background: url('images/tree_icons.png') no-repeat 0px 0px; +} +.tree-collapsed-hover { + background: url('images/tree_icons.png') no-repeat -32px 0px; +} +.tree-lines .tree-expanded, +.tree-lines .tree-root-first .tree-expanded { + background: url('images/tree_icons.png') no-repeat -144px 0; +} +.tree-lines .tree-collapsed, +.tree-lines .tree-root-first .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -128px 0; +} +.tree-lines .tree-node-last .tree-expanded, +.tree-lines .tree-root-one .tree-expanded { + background: url('images/tree_icons.png') no-repeat -80px 0; +} +.tree-lines .tree-node-last .tree-collapsed, +.tree-lines .tree-root-one .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -64px 0; +} +.tree-line { + background: url('images/tree_icons.png') no-repeat -176px 0; +} +.tree-join { + background: url('images/tree_icons.png') no-repeat -192px 0; +} +.tree-joinbottom { + background: url('images/tree_icons.png') no-repeat -160px 0; +} +.tree-folder { + background: url('images/tree_icons.png') no-repeat -208px 0; +} +.tree-folder-open { + background: url('images/tree_icons.png') no-repeat -224px 0; +} +.tree-file { + background: url('images/tree_icons.png') no-repeat -240px 0; +} +.tree-loading { + background: url('images/loading.gif') no-repeat center center; +} +.tree-checkbox0 { + background: url('images/tree_icons.png') no-repeat -208px -18px; +} +.tree-checkbox1 { + background: url('images/tree_icons.png') no-repeat -224px -18px; +} +.tree-checkbox2 { + background: url('images/tree_icons.png') no-repeat -240px -18px; +} +.tree-title { + font-size: 12px; + display: inline-block; + text-decoration: none; + vertical-align: top; + white-space: nowrap; + padding: 0 2px; + height: 18px; + line-height: 18px; +} +.tree-node-proxy { + font-size: 12px; + line-height: 20px; + padding: 0 2px 0 20px; + border-width: 1px; + border-style: solid; + z-index: 9900000; +} +.tree-dnd-icon { + display: inline-block; + position: absolute; + width: 16px; + height: 18px; + left: 2px; + top: 50%; + margin-top: -9px; +} +.tree-dnd-yes { + background: url('images/tree_icons.png') no-repeat -256px 0; +} +.tree-dnd-no { + background: url('images/tree_icons.png') no-repeat -256px -18px; +} +.tree-node-top { + border-top: 1px dotted red; +} +.tree-node-bottom { + border-bottom: 1px dotted red; +} +.tree-node-append .tree-title { + border: 1px dotted red; +} +.tree-editor { + border: 1px solid #ccc; + font-size: 12px; + height: 14px !important; + height: 18px; + line-height: 14px; + padding: 1px 2px; + width: 80px; + position: absolute; + top: 0; +} +.tree-node-proxy { + background-color: #ffffff; + color: #000000; + border-color: #95B8E7; +} +.tree-node-hover { + background: #eaf2ff; + color: #000000; +} +.tree-node-selected { + background: #ffe48d; + color: #000000; +} +.tree-node-hidden { + display: none; +} +.validatebox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; + color: #000; +} +.tooltip { + position: absolute; + display: none; + z-index: 9900000; + outline: none; + opacity: 1; + filter: alpha(opacity=100); + padding: 5px; + border-width: 1px; + border-style: solid; + border-radius: 5px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tooltip-content { + font-size: 12px; +} +.tooltip-arrow-outer, +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + line-height: 0; + font-size: 0; + border-style: solid; + border-width: 6px; + border-color: transparent; + _border-color: tomato; + _filter: chroma(color=tomato); +} +.tooltip-arrow { + display: none \9; +} +.tooltip-right .tooltip-arrow-outer { + left: 0; + top: 50%; + margin: -6px 0 0 -13px; +} +.tooltip-right .tooltip-arrow { + left: 0; + top: 50%; + margin: -6px 0 0 -12px; +} +.tooltip-left .tooltip-arrow-outer { + right: 0; + top: 50%; + margin: -6px -13px 0 0; +} +.tooltip-left .tooltip-arrow { + right: 0; + top: 50%; + margin: -6px -12px 0 0; +} +.tooltip-top .tooltip-arrow-outer { + bottom: 0; + left: 50%; + margin: 0 0 -13px -6px; +} +.tooltip-top .tooltip-arrow { + bottom: 0; + left: 50%; + margin: 0 0 -12px -6px; +} +.tooltip-bottom .tooltip-arrow-outer { + top: 0; + left: 50%; + margin: -13px 0 0 -6px; +} +.tooltip-bottom .tooltip-arrow { + top: 0; + left: 50%; + margin: -12px 0 0 -6px; +} +.tooltip { + background-color: #ffffff; + border-color: #95B8E7; + color: #000000; +} +.tooltip-right .tooltip-arrow-outer { + border-right-color: #95B8E7; +} +.tooltip-right .tooltip-arrow { + border-right-color: #ffffff; +} +.tooltip-left .tooltip-arrow-outer { + border-left-color: #95B8E7; +} +.tooltip-left .tooltip-arrow { + border-left-color: #ffffff; +} +.tooltip-top .tooltip-arrow-outer { + border-top-color: #95B8E7; +} +.tooltip-top .tooltip-arrow { + border-top-color: #ffffff; +} +.tooltip-bottom .tooltip-arrow-outer { + border-bottom-color: #95B8E7; +} +.tooltip-bottom .tooltip-arrow { + border-bottom-color: #ffffff; +} +.switchbutton { + text-decoration: none; + display: inline-block; + overflow: hidden; + vertical-align: middle; + margin: 0; + padding: 0; + cursor: pointer; + background: #bbb; + border: 1px solid #bbb; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-inner { + display: inline-block; + overflow: hidden; + position: relative; + top: -1px; + left: -1px; +} +.switchbutton-on, +.switchbutton-off, +.switchbutton-handle { + display: inline-block; + text-align: center; + height: 100%; + float: left; + font-size: 12px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-on { + background: #ffe48d; + color: #000000; +} +.switchbutton-off { + background-color: #ffffff; + color: #000000; +} +.switchbutton-on, +.switchbutton-reversed .switchbutton-off { + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.switchbutton-off, +.switchbutton-reversed .switchbutton-on { + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.switchbutton-handle { + position: absolute; + top: 0; + left: 50%; + background-color: #ffffff; + color: #000000; + border: 1px solid #bbb; + -moz-box-shadow: 0 0 3px 0 #bbb; + -webkit-box-shadow: 0 0 3px 0 #bbb; + box-shadow: 0 0 3px 0 #bbb; +} +.switchbutton-value { + position: absolute; + top: 0; + left: -5000px; +} +.switchbutton-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.switchbutton-disabled, +.switchbutton-readonly { + cursor: default; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/filebox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/filebox.css new file mode 100644 index 0000000..c6bac66 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/filebox.css @@ -0,0 +1,20 @@ +.filebox .textbox-value { + vertical-align: top; + position: absolute; + top: 0; + left: -5000px; +} +.filebox-label { + display: inline-block; + position: absolute; + width: 100%; + height: 100%; + cursor: pointer; + left: 0; + top: 0; + z-index: 10; + background: url('images/blank.gif') no-repeat; +} +.l-btn-disabled .filebox-label { + cursor: default; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/accordion_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/accordion_arrows.png new file mode 100644 index 0000000..720835f Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/accordion_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/blank.gif b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/blank.gif new file mode 100644 index 0000000..1d11fa9 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/blank.gif differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/calendar_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/calendar_arrows.png new file mode 100644 index 0000000..430c4ad Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/calendar_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/combo_arrow.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/combo_arrow.png new file mode 100644 index 0000000..2e59fb9 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/combo_arrow.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/datagrid_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/datagrid_icons.png new file mode 100644 index 0000000..762d0ce Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/datagrid_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/datebox_arrow.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/datebox_arrow.png new file mode 100644 index 0000000..783c833 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/datebox_arrow.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/layout_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/layout_arrows.png new file mode 100644 index 0000000..6f41654 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/layout_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/linkbutton_bg.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/linkbutton_bg.png new file mode 100644 index 0000000..fc66bd2 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/linkbutton_bg.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/loading.gif b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/loading.gif new file mode 100644 index 0000000..68f01d0 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/loading.gif differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/menu_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/menu_arrows.png new file mode 100644 index 0000000..b986842 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/menu_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/messager_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/messager_icons.png new file mode 100644 index 0000000..62c18c1 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/messager_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/pagination_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/pagination_icons.png new file mode 100644 index 0000000..616f0bd Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/pagination_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/panel_tools.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/panel_tools.png new file mode 100644 index 0000000..19ecc94 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/panel_tools.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/searchbox_button.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/searchbox_button.png new file mode 100644 index 0000000..6dd1931 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/searchbox_button.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/slider_handle.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/slider_handle.png new file mode 100644 index 0000000..b9802ba Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/slider_handle.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/spinner_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/spinner_arrows.png new file mode 100644 index 0000000..b68592d Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/spinner_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/tabs_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/tabs_icons.png new file mode 100644 index 0000000..4d29966 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/tabs_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/tree_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/tree_icons.png new file mode 100644 index 0000000..e9be4f3 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/tree_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/validatebox_warning.png b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/validatebox_warning.png new file mode 100644 index 0000000..2b3d4f0 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/default/images/validatebox_warning.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/layout.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/layout.css new file mode 100644 index 0000000..3c1bad9 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/layout.css @@ -0,0 +1,133 @@ +.layout { + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + z-index: 0; +} +.layout-panel { + position: absolute; + overflow: hidden; +} +.layout-body { + min-width: 1px; + min-height: 1px; +} +.layout-panel-east, +.layout-panel-west { + z-index: 2; +} +.layout-panel-north, +.layout-panel-south { + z-index: 3; +} +.layout-expand { + position: absolute; + padding: 0px; + font-size: 1px; + cursor: pointer; + z-index: 1; +} +.layout-expand .panel-header, +.layout-expand .panel-body { + background: transparent; + filter: none; + overflow: hidden; +} +.layout-expand .panel-header { + border-bottom-width: 0px; +} +.layout-expand .panel-body { + position: relative; +} +.layout-expand .panel-body .panel-icon { + margin-top: 0; + top: 0; + left: 50%; + margin-left: -8px; +} +.layout-expand-west .panel-header .panel-icon, +.layout-expand-east .panel-header .panel-icon { + display: none; +} +.layout-expand-title { + position: absolute; + top: 0; + left: 21px; + white-space: nowrap; + word-wrap: normal; + -webkit-transform: rotate(90deg); + -webkit-transform-origin: 0 0; + -moz-transform: rotate(90deg); + -moz-transform-origin: 0 0; + -o-transform: rotate(90deg); + -o-transform-origin: 0 0; + transform: rotate(90deg); + transform-origin: 0 0; +} +.layout-expand-with-icon { + top: 18px; +} +.layout-expand .panel-body-noheader .layout-expand-title, +.layout-expand .panel-body-noheader .panel-icon { + top: 5px; +} +.layout-expand .panel-body-noheader .layout-expand-with-icon { + top: 23px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + position: absolute; + font-size: 1px; + display: none; + z-index: 5; +} +.layout-split-proxy-h { + width: 5px; + cursor: e-resize; +} +.layout-split-proxy-v { + height: 5px; + cursor: n-resize; +} +.layout-mask { + position: absolute; + background: #fafafa; + filter: alpha(opacity=10); + opacity: 0.10; + z-index: 4; +} +.layout-button-up { + background: url('images/layout_arrows.png') no-repeat -16px -16px; +} +.layout-button-down { + background: url('images/layout_arrows.png') no-repeat -16px 0; +} +.layout-button-left { + background: url('images/layout_arrows.png') no-repeat 0 0; +} +.layout-button-right { + background: url('images/layout_arrows.png') no-repeat 0 -16px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + background-color: #aac5e7; +} +.layout-split-north { + border-bottom: 5px solid #E6EEF8; +} +.layout-split-south { + border-top: 5px solid #E6EEF8; +} +.layout-split-east { + border-left: 5px solid #E6EEF8; +} +.layout-split-west { + border-right: 5px solid #E6EEF8; +} +.layout-expand { + background-color: #E0ECFF; +} +.layout-expand-over { + background-color: #E0ECFF; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/linkbutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/linkbutton.css new file mode 100644 index 0000000..a3e2122 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/linkbutton.css @@ -0,0 +1,203 @@ +.l-btn { + text-decoration: none; + display: inline-block; + overflow: hidden; + margin: 0; + padding: 0; + cursor: pointer; + outline: none; + text-align: center; + vertical-align: middle; + line-height: normal; +} +.l-btn-plain { + border-width: 0; + padding: 1px; +} +.l-btn-left { + display: inline-block; + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + vertical-align: top; +} +.l-btn-text { + display: inline-block; + vertical-align: top; + width: auto; + line-height: 24px; + font-size: 12px; + padding: 0; + margin: 0 4px; +} +.l-btn-icon { + display: inline-block; + width: 16px; + height: 16px; + line-height: 16px; + position: absolute; + top: 50%; + margin-top: -8px; + font-size: 1px; +} +.l-btn span span .l-btn-empty { + display: inline-block; + margin: 0; + width: 16px; + height: 24px; + font-size: 1px; + vertical-align: top; +} +.l-btn span .l-btn-icon-left { + padding: 0 0 0 20px; + background-position: left center; +} +.l-btn span .l-btn-icon-right { + padding: 0 20px 0 0; + background-position: right center; +} +.l-btn-icon-left .l-btn-text { + margin: 0 4px 0 24px; +} +.l-btn-icon-left .l-btn-icon { + left: 4px; +} +.l-btn-icon-right .l-btn-text { + margin: 0 24px 0 4px; +} +.l-btn-icon-right .l-btn-icon { + right: 4px; +} +.l-btn-icon-top .l-btn-text { + margin: 20px 4px 0 4px; +} +.l-btn-icon-top .l-btn-icon { + top: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-icon-bottom .l-btn-text { + margin: 0 4px 20px 4px; +} +.l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-left .l-btn-empty { + margin: 0 4px; + width: 16px; +} +.l-btn-plain:hover { + padding: 0; +} +.l-btn-focus { + outline: #0000FF dotted thin; +} +.l-btn-large .l-btn-text { + line-height: 40px; +} +.l-btn-large .l-btn-icon { + width: 32px; + height: 32px; + line-height: 32px; + margin-top: -16px; +} +.l-btn-large .l-btn-icon-left .l-btn-text { + margin-left: 40px; +} +.l-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.l-btn-large .l-btn-icon-top .l-btn-text { + margin-top: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-top .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-left .l-btn-empty { + margin: 0 4px; + width: 32px; +} +.l-btn { + color: #444; + background: #fafafa; + background-repeat: repeat-x; + border: 1px solid #bbb; + background: -webkit-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -moz-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -o-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: linear-gradient(to bottom,#ffffff 0,#eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#eeeeee,GradientType=0); + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn:hover { + background: #eaf2ff; + color: #000000; + border: 1px solid #b7d2ff; + filter: none; +} +.l-btn-plain { + background: transparent; + border-width: 0; + filter: none; +} +.l-btn-outline { + border-width: 1px; + border-color: #b7d2ff; + padding: 0; +} +.l-btn-plain:hover { + background: #eaf2ff; + color: #000000; + border: 1px solid #b7d2ff; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn-disabled, +.l-btn-disabled:hover { + opacity: 0.5; + cursor: default; + background: #fafafa; + color: #444; + background: -webkit-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -moz-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -o-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: linear-gradient(to bottom,#ffffff 0,#eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#eeeeee,GradientType=0); +} +.l-btn-disabled .l-btn-text, +.l-btn-disabled .l-btn-icon { + filter: alpha(opacity=50); +} +.l-btn-plain-disabled, +.l-btn-plain-disabled:hover { + background: transparent; + filter: alpha(opacity=50); +} +.l-btn-selected, +.l-btn-selected:hover { + background: #ddd; + filter: none; +} +.l-btn-plain-selected, +.l-btn-plain-selected:hover { + background: #ddd; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/menu.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/menu.css new file mode 100644 index 0000000..552e25c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/menu.css @@ -0,0 +1,119 @@ +.menu { + position: absolute; + margin: 0; + padding: 2px; + border-width: 1px; + border-style: solid; + overflow: hidden; +} +.menu-inline { + position: relative; +} +.menu-item { + position: relative; + margin: 0; + padding: 0; + overflow: hidden; + white-space: nowrap; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.menu-text { + height: 20px; + line-height: 20px; + float: left; + padding-left: 28px; +} +.menu-icon { + position: absolute; + width: 16px; + height: 16px; + left: 2px; + top: 50%; + margin-top: -8px; +} +.menu-rightarrow { + position: absolute; + width: 16px; + height: 16px; + right: 0; + top: 50%; + margin-top: -8px; +} +.menu-line { + position: absolute; + left: 26px; + top: 0; + height: 2000px; + font-size: 1px; +} +.menu-sep { + margin: 3px 0px 3px 25px; + font-size: 1px; +} +.menu-noline .menu-line { + display: none; +} +.menu-noline .menu-sep { + margin-left: 0; + margin-right: 0; +} +.menu-active { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.menu-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default; +} +.menu-text, +.menu-text span { + font-size: 12px; +} +.menu-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + background: #ccc; + -moz-box-shadow: 2px 2px 3px #cccccc; + -webkit-box-shadow: 2px 2px 3px #cccccc; + box-shadow: 2px 2px 3px #cccccc; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.menu-rightarrow { + background: url('images/menu_arrows.png') no-repeat -32px center; +} +.menu-line { + border-left: 1px solid #ccc; + border-right: 1px solid #fff; +} +.menu-sep { + border-top: 1px solid #ccc; + border-bottom: 1px solid #fff; +} +.menu { + background-color: #fafafa; + border-color: #ddd; + color: #444; +} +.menu-content { + background: #ffffff; +} +.menu-item { + border-color: transparent; + _border-color: #fafafa; +} +.menu-active { + border-color: #b7d2ff; + color: #000000; + background: #eaf2ff; +} +.menu-active-disabled { + border-color: transparent; + background: transparent; + color: #444; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/menubutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/menubutton.css new file mode 100644 index 0000000..3445bd5 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/menubutton.css @@ -0,0 +1,94 @@ +.m-btn-downarrow, +.s-btn-downarrow { + display: inline-block; + position: absolute; + width: 16px; + height: 16px; + font-size: 1px; + right: 0; + top: 50%; + margin-top: -8px; +} +.m-btn-active, +.s-btn-active { + background: #eaf2ff; + color: #000000; + border: 1px solid #b7d2ff; + filter: none; +} +.m-btn-plain-active, +.s-btn-plain-active { + background: transparent; + padding: 0; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.m-btn .l-btn-left .l-btn-text { + margin-right: 20px; +} +.m-btn .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.m-btn .l-btn-icon-right .l-btn-icon { + right: 20px; +} +.m-btn .l-btn-icon-top .l-btn-text { + margin-right: 4px; + margin-bottom: 14px; +} +.m-btn .l-btn-icon-bottom .l-btn-text { + margin-right: 4px; + margin-bottom: 34px; +} +.m-btn .l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 20px; +} +.m-btn .l-btn-icon-top .m-btn-downarrow, +.m-btn .l-btn-icon-bottom .m-btn-downarrow { + top: auto; + bottom: 0px; + left: 50%; + margin-left: -8px; +} +.m-btn-line { + display: inline-block; + position: absolute; + font-size: 1px; + display: none; +} +.m-btn .l-btn-left .m-btn-line { + right: 0; + width: 16px; + height: 500px; + border-style: solid; + border-color: #aac5e7; + border-width: 0 0 0 1px; +} +.m-btn .l-btn-icon-top .m-btn-line, +.m-btn .l-btn-icon-bottom .m-btn-line { + left: 0; + bottom: 0; + width: 500px; + height: 16px; + border-width: 1px 0 0 0; +} +.m-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 56px; +} +.m-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 50px; +} +.m-btn-downarrow, +.s-btn-downarrow { + background: url('images/menu_arrows.png') no-repeat 0 center; +} +.m-btn-plain-active, +.s-btn-plain-active { + border-color: #b7d2ff; + background-color: #eaf2ff; + color: #000000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/messager.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/messager.css new file mode 100644 index 0000000..c4f3068 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/messager.css @@ -0,0 +1,40 @@ +.messager-body { + padding: 10px; + overflow: auto; +} +.messager-button { + text-align: center; + padding: 5px; +} +.messager-button .l-btn { + width: 70px; +} +.messager-icon { + float: left; + width: 32px; + height: 32px; + margin: 0 10px 10px 0; +} +.messager-error { + background: url('images/messager_icons.png') no-repeat scroll -64px 0; +} +.messager-info { + background: url('images/messager_icons.png') no-repeat scroll 0 0; +} +.messager-question { + background: url('images/messager_icons.png') no-repeat scroll -32px 0; +} +.messager-warning { + background: url('images/messager_icons.png') no-repeat scroll -96px 0; +} +.messager-progress { + padding: 10px; +} +.messager-p-msg { + margin-bottom: 5px; +} +.messager-body .messager-input { + width: 100%; + padding: 1px 0; + border: 1px solid #95B8E7; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/numberbox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/numberbox.css new file mode 100644 index 0000000..03c7ea2 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/numberbox.css @@ -0,0 +1,9 @@ +.numberbox { + border: 1px solid #95B8E7; + margin: 0; + padding: 0 2px; + vertical-align: middle; +} +.textbox { + padding: 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/pagination.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/pagination.css new file mode 100644 index 0000000..1f8783c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/pagination.css @@ -0,0 +1,71 @@ +.pagination { + zoom: 1; +} +.pagination table { + float: left; + height: 30px; +} +.pagination td { + border: 0; +} +.pagination-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 3px 1px; +} +.pagination .pagination-num { + border-width: 1px; + border-style: solid; + margin: 0 2px; + padding: 2px; + width: 2em; + height: auto; +} +.pagination-page-list { + margin: 0px 6px; + padding: 1px 2px; + width: auto; + height: auto; + border-width: 1px; + border-style: solid; +} +.pagination-info { + float: right; + margin: 0 6px 0 0; + padding: 0; + height: 30px; + line-height: 30px; + font-size: 12px; +} +.pagination span { + font-size: 12px; +} +.pagination-link .l-btn-text { + width: 24px; + text-align: center; + margin: 0; +} +.pagination-first { + background: url('images/pagination_icons.png') no-repeat 0 center; +} +.pagination-prev { + background: url('images/pagination_icons.png') no-repeat -16px center; +} +.pagination-next { + background: url('images/pagination_icons.png') no-repeat -32px center; +} +.pagination-last { + background: url('images/pagination_icons.png') no-repeat -48px center; +} +.pagination-load { + background: url('images/pagination_icons.png') no-repeat -64px center; +} +.pagination-loading { + background: url('images/loading.gif') no-repeat center center; +} +.pagination-page-list, +.pagination .pagination-num { + border-color: #95B8E7; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/panel.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/panel.css new file mode 100644 index 0000000..c32f3a0 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/panel.css @@ -0,0 +1,142 @@ +.panel { + overflow: hidden; + text-align: left; + margin: 0; + border: 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.panel-header, +.panel-body { + border-width: 1px; + border-style: solid; +} +.panel-header { + padding: 5px; + position: relative; +} +.panel-title { + background: url('images/blank.gif') no-repeat; +} +.panel-header-noborder { + border-width: 0 0 1px 0; +} +.panel-body { + overflow: auto; + border-top-width: 0; + padding: 0; +} +.panel-body-noheader { + border-top-width: 1px; +} +.panel-body-noborder { + border-width: 0px; +} +.panel-body-nobottom { + border-bottom-width: 0; +} +.panel-with-icon { + padding-left: 18px; +} +.panel-icon, +.panel-tool { + position: absolute; + top: 50%; + margin-top: -8px; + height: 16px; + overflow: hidden; +} +.panel-icon { + left: 5px; + width: 16px; +} +.panel-tool { + right: 5px; + width: auto; +} +.panel-tool a { + display: inline-block; + width: 16px; + height: 16px; + opacity: 0.6; + filter: alpha(opacity=60); + margin: 0 0 0 2px; + vertical-align: top; +} +.panel-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + background-color: #eaf2ff; + -moz-border-radius: 3px 3px 3px 3px; + -webkit-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; +} +.panel-loading { + padding: 11px 0px 10px 30px; +} +.panel-noscroll { + overflow: hidden; +} +.panel-fit, +.panel-fit body { + height: 100%; + margin: 0; + padding: 0; + border: 0; + overflow: hidden; +} +.panel-loading { + background: url('images/loading.gif') no-repeat 10px 10px; +} +.panel-tool-close { + background: url('images/panel_tools.png') no-repeat -16px 0px; +} +.panel-tool-min { + background: url('images/panel_tools.png') no-repeat 0px 0px; +} +.panel-tool-max { + background: url('images/panel_tools.png') no-repeat 0px -16px; +} +.panel-tool-restore { + background: url('images/panel_tools.png') no-repeat -16px -16px; +} +.panel-tool-collapse { + background: url('images/panel_tools.png') no-repeat -32px 0; +} +.panel-tool-expand { + background: url('images/panel_tools.png') no-repeat -32px -16px; +} +.panel-header, +.panel-body { + border-color: #95B8E7; +} +.panel-header { + background-color: #E0ECFF; + background: -webkit-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); + background: -moz-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); + background: -o-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); + background: linear-gradient(to bottom,#EFF5FF 0,#E0ECFF 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#E0ECFF,GradientType=0); +} +.panel-body { + background-color: #ffffff; + color: #000000; + font-size: 12px; +} +.panel-title { + font-size: 12px; + font-weight: bold; + color: #0E2D5F; + height: 16px; + line-height: 16px; +} +.panel-footer { + border: 1px solid #95B8E7; + overflow: hidden; + background: #F4F4F4; +} +.panel-footer-noborder { + border-width: 1px 0 0 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/progressbar.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/progressbar.css new file mode 100644 index 0000000..e4d3003 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/progressbar.css @@ -0,0 +1,32 @@ +.progressbar { + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + overflow: hidden; + position: relative; +} +.progressbar-text { + text-align: center; + position: absolute; +} +.progressbar-value { + position: relative; + overflow: hidden; + width: 0; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.progressbar { + border-color: #95B8E7; +} +.progressbar-text { + color: #000000; + font-size: 12px; +} +.progressbar-value .progressbar-text { + background-color: #ffe48d; + color: #000000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/propertygrid.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/propertygrid.css new file mode 100644 index 0000000..5f5fbb3 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/propertygrid.css @@ -0,0 +1,28 @@ +.propertygrid .datagrid-view1 .datagrid-body td { + padding-bottom: 1px; + border-width: 0 1px 0 0; +} +.propertygrid .datagrid-group { + height: 21px; + overflow: hidden; + border-width: 0 0 1px 0; + border-style: solid; +} +.propertygrid .datagrid-group span { + font-weight: bold; +} +.propertygrid .datagrid-view1 .datagrid-body td { + border-color: #dddddd; +} +.propertygrid .datagrid-view1 .datagrid-group { + border-color: #E0ECFF; +} +.propertygrid .datagrid-view2 .datagrid-group { + border-color: #dddddd; +} +.propertygrid .datagrid-group, +.propertygrid .datagrid-view1 .datagrid-body, +.propertygrid .datagrid-view1 .datagrid-row-over, +.propertygrid .datagrid-view1 .datagrid-row-selected { + background: #E0ECFF; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/searchbox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/searchbox.css new file mode 100644 index 0000000..5f5e011 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/searchbox.css @@ -0,0 +1,90 @@ +.searchbox { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.searchbox .searchbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 0 2px; + vertical-align: top; +} +.searchbox .searchbox-prompt { + font-size: 12px; + color: #ccc; +} +.searchbox-button { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.searchbox-button-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.searchbox .l-btn-plain { + border: 0; + padding: 0; + vertical-align: top; + opacity: 0.6; + filter: alpha(opacity=60); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .l-btn-plain:hover { + border: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox a.m-btn-plain-active { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .m-btn-active { + border-width: 0 1px 0 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .textbox-button-right { + border-width: 0 0 0 1px; +} +.searchbox .textbox-button-left { + border-width: 0 1px 0 0; +} +.searchbox-button { + background: url('images/searchbox_button.png') no-repeat center center; +} +.searchbox { + border-color: #95B8E7; + background-color: #fff; +} +.searchbox .l-btn-plain { + background: #E0ECFF; +} +.searchbox .l-btn-plain-disabled, +.searchbox .l-btn-plain-disabled:hover { + opacity: 0.5; + filter: alpha(opacity=50); +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/slider.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/slider.css new file mode 100644 index 0000000..f51f986 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/slider.css @@ -0,0 +1,101 @@ +.slider-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.slider-h { + height: 22px; +} +.slider-v { + width: 22px; +} +.slider-inner { + position: relative; + height: 6px; + top: 7px; + border-width: 1px; + border-style: solid; + border-radius: 5px; +} +.slider-handle { + position: absolute; + display: block; + outline: none; + width: 20px; + height: 20px; + top: 50%; + margin-top: -10px; + margin-left: -10px; +} +.slider-tip { + position: absolute; + display: inline-block; + line-height: 12px; + font-size: 12px; + white-space: nowrap; + top: -22px; +} +.slider-rule { + position: relative; + top: 15px; +} +.slider-rule span { + position: absolute; + display: inline-block; + font-size: 0; + height: 5px; + border-width: 0 0 0 1px; + border-style: solid; +} +.slider-rulelabel { + position: relative; + top: 20px; +} +.slider-rulelabel span { + position: absolute; + display: inline-block; + font-size: 12px; +} +.slider-v .slider-inner { + width: 6px; + left: 7px; + top: 0; + float: left; +} +.slider-v .slider-handle { + left: 50%; + margin-top: -10px; +} +.slider-v .slider-tip { + left: -10px; + margin-top: -6px; +} +.slider-v .slider-rule { + float: left; + top: 0; + left: 16px; +} +.slider-v .slider-rule span { + width: 5px; + height: 'auto'; + border-left: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.slider-v .slider-rulelabel { + float: left; + top: 0; + left: 23px; +} +.slider-handle { + background: url('images/slider_handle.png') no-repeat; +} +.slider-inner { + border-color: #95B8E7; + background: #E0ECFF; +} +.slider-rule span { + border-color: #95B8E7; +} +.slider-rulelabel span { + color: #000000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/spinner.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/spinner.css new file mode 100644 index 0000000..757e017 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/spinner.css @@ -0,0 +1,72 @@ +.spinner { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.spinner .spinner-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0 2px; + vertical-align: baseline; +} +.spinner-arrow { + background-color: #E0ECFF; + display: inline-block; + overflow: hidden; + vertical-align: top; + margin: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + width: 18px; +} +.spinner-arrow-up, +.spinner-arrow-down { + opacity: 0.6; + filter: alpha(opacity=60); + display: block; + font-size: 1px; + width: 18px; + height: 10px; + width: 100%; + height: 50%; + color: #444; + outline-style: none; +} +.spinner-arrow-hover { + background-color: #eaf2ff; + opacity: 1.0; + filter: alpha(opacity=100); +} +.spinner-arrow-up:hover, +.spinner-arrow-down:hover { + opacity: 1.0; + filter: alpha(opacity=100); + background-color: #eaf2ff; +} +.textbox-icon-disabled .spinner-arrow-up:hover, +.textbox-icon-disabled .spinner-arrow-down:hover { + opacity: 0.6; + filter: alpha(opacity=60); + background-color: #E0ECFF; + cursor: default; +} +.spinner .textbox-icon-disabled { + opacity: 0.6; + filter: alpha(opacity=60); +} +.spinner-arrow-up { + background: url('images/spinner_arrows.png') no-repeat 1px center; +} +.spinner-arrow-down { + background: url('images/spinner_arrows.png') no-repeat -15px center; +} +.spinner { + border-color: #95B8E7; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/splitbutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/splitbutton.css new file mode 100644 index 0000000..86d6da5 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/splitbutton.css @@ -0,0 +1,12 @@ +.s-btn:hover .m-btn-line, +.s-btn-active .m-btn-line, +.s-btn-plain-active .m-btn-line { + display: inline-block; +} +.l-btn:hover .s-btn-downarrow, +.s-btn-active .s-btn-downarrow, +.s-btn-plain-active .s-btn-downarrow { + border-style: solid; + border-color: #aac5e7; + border-width: 0 0 0 1px; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/switchbutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/switchbutton.css new file mode 100644 index 0000000..20818ab --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/switchbutton.css @@ -0,0 +1,77 @@ +.switchbutton { + text-decoration: none; + display: inline-block; + overflow: hidden; + vertical-align: middle; + margin: 0; + padding: 0; + cursor: pointer; + background: #bbb; + border: 1px solid #bbb; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-inner { + display: inline-block; + overflow: hidden; + position: relative; + top: -1px; + left: -1px; +} +.switchbutton-on, +.switchbutton-off, +.switchbutton-handle { + display: inline-block; + text-align: center; + height: 100%; + float: left; + font-size: 12px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-on { + background: #ffe48d; + color: #000000; +} +.switchbutton-off { + background-color: #ffffff; + color: #000000; +} +.switchbutton-on, +.switchbutton-reversed .switchbutton-off { + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.switchbutton-off, +.switchbutton-reversed .switchbutton-on { + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.switchbutton-handle { + position: absolute; + top: 0; + left: 50%; + background-color: #ffffff; + color: #000000; + border: 1px solid #bbb; + -moz-box-shadow: 0 0 3px 0 #bbb; + -webkit-box-shadow: 0 0 3px 0 #bbb; + box-shadow: 0 0 3px 0 #bbb; +} +.switchbutton-value { + position: absolute; + top: 0; + left: -5000px; +} +.switchbutton-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.switchbutton-disabled, +.switchbutton-readonly { + cursor: default; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/tabs.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/tabs.css new file mode 100644 index 0000000..d5d84e8 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/tabs.css @@ -0,0 +1,413 @@ +.tabs-container { + overflow: hidden; +} +.tabs-header { + border-width: 1px; + border-style: solid; + border-bottom-width: 0; + position: relative; + padding: 0; + padding-top: 2px; + overflow: hidden; +} +.tabs-scroller-left, +.tabs-scroller-right { + position: absolute; + top: auto; + bottom: 0; + width: 18px; + font-size: 1px; + display: none; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.tabs-scroller-left { + left: 0; +} +.tabs-scroller-right { + right: 0; +} +.tabs-tool { + position: absolute; + bottom: 0; + padding: 1px; + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.tabs-header-plain .tabs-tool { + padding: 0 1px; +} +.tabs-wrap { + position: relative; + left: 0; + overflow: hidden; + width: 100%; + margin: 0; + padding: 0; +} +.tabs-scrolling { + margin-left: 18px; + margin-right: 18px; +} +.tabs-disabled { + opacity: 0.3; + filter: alpha(opacity=30); +} +.tabs { + list-style-type: none; + height: 26px; + margin: 0px; + padding: 0px; + padding-left: 4px; + width: 50000px; + border-style: solid; + border-width: 0 0 1px 0; +} +.tabs li { + float: left; + display: inline-block; + margin: 0 4px -1px 0; + padding: 0; + position: relative; + border: 0; +} +.tabs li a.tabs-inner { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0 10px; + height: 25px; + line-height: 25px; + text-align: center; + white-space: nowrap; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.tabs li.tabs-selected a.tabs-inner { + font-weight: bold; + outline: none; +} +.tabs li.tabs-selected a:hover.tabs-inner { + cursor: default; + pointer: default; +} +.tabs li a.tabs-close, +.tabs-p-tool { + position: absolute; + font-size: 1px; + display: block; + height: 12px; + padding: 0; + top: 50%; + margin-top: -6px; + overflow: hidden; +} +.tabs li a.tabs-close { + width: 12px; + right: 5px; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs-p-tool { + right: 16px; +} +.tabs-p-tool a { + display: inline-block; + font-size: 1px; + width: 12px; + height: 12px; + margin: 0; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs li a:hover.tabs-close, +.tabs-p-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + cursor: hand; + cursor: pointer; +} +.tabs-with-icon { + padding-left: 18px; +} +.tabs-icon { + position: absolute; + width: 16px; + height: 16px; + left: 10px; + top: 50%; + margin-top: -8px; +} +.tabs-title { + font-size: 12px; +} +.tabs-closable { + padding-right: 8px; +} +.tabs-panels { + margin: 0px; + padding: 0px; + border-width: 1px; + border-style: solid; + border-top-width: 0; + overflow: hidden; +} +.tabs-header-bottom { + border-width: 0 1px 1px 1px; + padding: 0 0 2px 0; +} +.tabs-header-bottom .tabs { + border-width: 1px 0 0 0; +} +.tabs-header-bottom .tabs li { + margin: -1px 4px 0 0; +} +.tabs-header-bottom .tabs li a.tabs-inner { + -moz-border-radius: 0 0 5px 5px; + -webkit-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; +} +.tabs-header-bottom .tabs-tool { + top: 0; +} +.tabs-header-bottom .tabs-scroller-left, +.tabs-header-bottom .tabs-scroller-right { + top: 0; + bottom: auto; +} +.tabs-panels-top { + border-width: 1px 1px 0 1px; +} +.tabs-header-left { + float: left; + border-width: 1px 0 1px 1px; + padding: 0; +} +.tabs-header-right { + float: right; + border-width: 1px 1px 1px 0; + padding: 0; +} +.tabs-header-left .tabs-wrap, +.tabs-header-right .tabs-wrap { + height: 100%; +} +.tabs-header-left .tabs { + height: 100%; + padding: 4px 0 0 2px; + border-width: 0 1px 0 0; +} +.tabs-header-right .tabs { + height: 100%; + padding: 4px 2px 0 0; + border-width: 0 0 0 1px; +} +.tabs-header-left .tabs li, +.tabs-header-right .tabs li { + display: block; + width: 100%; + position: relative; +} +.tabs-header-left .tabs li { + left: auto; + right: 0; + margin: 0 -1px 4px 0; + float: right; +} +.tabs-header-right .tabs li { + left: 0; + right: auto; + margin: 0 0 4px -1px; + float: left; +} +.tabs-justified li a.tabs-inner { + padding-left: 0; + padding-right: 0; +} +.tabs-header-left .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.tabs-header-right .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.tabs-panels-right { + float: right; + border-width: 1px 1px 1px 0; +} +.tabs-panels-left { + float: left; + border-width: 1px 0 1px 1px; +} +.tabs-header-noborder, +.tabs-panels-noborder { + border: 0px; +} +.tabs-header-plain { + border: 0px; + background: transparent; +} +.tabs-pill { + padding-bottom: 3px; +} +.tabs-header-bottom .tabs-pill { + padding-top: 3px; + padding-bottom: 0; +} +.tabs-header-left .tabs-pill { + padding-right: 3px; +} +.tabs-header-right .tabs-pill { + padding-left: 3px; +} +.tabs-header .tabs-pill li a.tabs-inner { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tabs-header-narrow, +.tabs-header-narrow .tabs-narrow { + padding: 0; +} +.tabs-narrow li, +.tabs-header-bottom .tabs-narrow li { + margin-left: 0; + margin-right: -1px; +} +.tabs-narrow li.tabs-last, +.tabs-header-bottom .tabs-narrow li.tabs-last { + margin-right: 0; +} +.tabs-header-left .tabs-narrow, +.tabs-header-right .tabs-narrow { + padding-top: 0; +} +.tabs-header-left .tabs-narrow li { + margin-bottom: -1px; + margin-right: -1px; +} +.tabs-header-left .tabs-narrow li.tabs-last, +.tabs-header-right .tabs-narrow li.tabs-last { + margin-bottom: 0; +} +.tabs-header-right .tabs-narrow li { + margin-bottom: -1px; + margin-left: -1px; +} +.tabs-scroller-left { + background: #E0ECFF url('images/tabs_icons.png') no-repeat 1px center; +} +.tabs-scroller-right { + background: #E0ECFF url('images/tabs_icons.png') no-repeat -15px center; +} +.tabs li a.tabs-close { + background: url('images/tabs_icons.png') no-repeat -34px center; +} +.tabs li a.tabs-inner:hover { + background: #eaf2ff; + color: #000000; + filter: none; +} +.tabs li.tabs-selected a.tabs-inner { + background-color: #ffffff; + color: #0E2D5F; + background: -webkit-linear-gradient(top,#EFF5FF 0,#ffffff 100%); + background: -moz-linear-gradient(top,#EFF5FF 0,#ffffff 100%); + background: -o-linear-gradient(top,#EFF5FF 0,#ffffff 100%); + background: linear-gradient(to bottom,#EFF5FF 0,#ffffff 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#ffffff,GradientType=0); +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(top,#ffffff 0,#EFF5FF 100%); + background: -moz-linear-gradient(top,#ffffff 0,#EFF5FF 100%); + background: -o-linear-gradient(top,#ffffff 0,#EFF5FF 100%); + background: linear-gradient(to bottom,#ffffff 0,#EFF5FF 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#EFF5FF,GradientType=0); +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#EFF5FF 0,#ffffff 100%); + background: -moz-linear-gradient(left,#EFF5FF 0,#ffffff 100%); + background: -o-linear-gradient(left,#EFF5FF 0,#ffffff 100%); + background: linear-gradient(to right,#EFF5FF 0,#ffffff 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#ffffff,GradientType=1); +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#ffffff 0,#EFF5FF 100%); + background: -moz-linear-gradient(left,#ffffff 0,#EFF5FF 100%); + background: -o-linear-gradient(left,#ffffff 0,#EFF5FF 100%); + background: linear-gradient(to right,#ffffff 0,#EFF5FF 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#EFF5FF,GradientType=1); +} +.tabs li a.tabs-inner { + color: #0E2D5F; + background-color: #E0ECFF; + background: -webkit-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); + background: -moz-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); + background: -o-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); + background: linear-gradient(to bottom,#EFF5FF 0,#E0ECFF 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#E0ECFF,GradientType=0); +} +.tabs-header, +.tabs-tool { + background-color: #E0ECFF; +} +.tabs-header-plain { + background: transparent; +} +.tabs-header, +.tabs-scroller-left, +.tabs-scroller-right, +.tabs-tool, +.tabs, +.tabs-panels, +.tabs li a.tabs-inner, +.tabs li.tabs-selected a.tabs-inner, +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner, +.tabs-header-left .tabs li.tabs-selected a.tabs-inner, +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-color: #95B8E7; +} +.tabs-p-tool a:hover, +.tabs li a:hover.tabs-close, +.tabs-scroller-over { + background-color: #eaf2ff; +} +.tabs li.tabs-selected a.tabs-inner { + border-bottom: 1px solid #ffffff; +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + border-top: 1px solid #ffffff; +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + border-right: 1px solid #ffffff; +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-left: 1px solid #ffffff; +} +.tabs-header .tabs-pill li.tabs-selected a.tabs-inner { + background: #ffe48d; + color: #000000; + filter: none; + border-color: #95B8E7; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/textbox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/textbox.css new file mode 100644 index 0000000..3ee9bed --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/textbox.css @@ -0,0 +1,90 @@ +.textbox { + position: relative; + border: 1px solid #95B8E7; + background-color: #fff; + vertical-align: middle; + display: inline-block; + overflow: hidden; + white-space: nowrap; + margin: 0; + padding: 0; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox .textbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 4px; + white-space: normal; + vertical-align: top; + outline-style: none; + resize: none; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox textarea.textbox-text { + white-space: pre-wrap; +} +.textbox .textbox-prompt { + font-size: 12px; + color: #aaa; +} +.textbox .textbox-button, +.textbox .textbox-button:hover { + position: absolute; + top: 0; + padding: 0; + vertical-align: top; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.textbox-button-right, +.textbox-button-right:hover { + border-width: 0 0 0 1px; +} +.textbox-button-left, +.textbox-button-left:hover { + border-width: 0 1px 0 0; +} +.textbox-addon { + position: absolute; + top: 0; +} +.textbox-icon { + display: inline-block; + width: 18px; + height: 20px; + overflow: hidden; + vertical-align: top; + background-position: center center; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); + text-decoration: none; + outline-style: none; +} +.textbox-icon-disabled, +.textbox-icon-readonly { + cursor: default; +} +.textbox-icon:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.textbox-icon-disabled:hover { + opacity: 0.6; + filter: alpha(opacity=60); +} +.textbox-focused { + -moz-box-shadow: 0 0 3px 0 #95B8E7; + -webkit-box-shadow: 0 0 3px 0 #95B8E7; + box-shadow: 0 0 3px 0 #95B8E7; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/tooltip.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/tooltip.css new file mode 100644 index 0000000..9294d9d --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/tooltip.css @@ -0,0 +1,103 @@ +.tooltip { + position: absolute; + display: none; + z-index: 9900000; + outline: none; + opacity: 1; + filter: alpha(opacity=100); + padding: 5px; + border-width: 1px; + border-style: solid; + border-radius: 5px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tooltip-content { + font-size: 12px; +} +.tooltip-arrow-outer, +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + line-height: 0; + font-size: 0; + border-style: solid; + border-width: 6px; + border-color: transparent; + _border-color: tomato; + _filter: chroma(color=tomato); +} +.tooltip-arrow { + display: none \9; +} +.tooltip-right .tooltip-arrow-outer { + left: 0; + top: 50%; + margin: -6px 0 0 -13px; +} +.tooltip-right .tooltip-arrow { + left: 0; + top: 50%; + margin: -6px 0 0 -12px; +} +.tooltip-left .tooltip-arrow-outer { + right: 0; + top: 50%; + margin: -6px -13px 0 0; +} +.tooltip-left .tooltip-arrow { + right: 0; + top: 50%; + margin: -6px -12px 0 0; +} +.tooltip-top .tooltip-arrow-outer { + bottom: 0; + left: 50%; + margin: 0 0 -13px -6px; +} +.tooltip-top .tooltip-arrow { + bottom: 0; + left: 50%; + margin: 0 0 -12px -6px; +} +.tooltip-bottom .tooltip-arrow-outer { + top: 0; + left: 50%; + margin: -13px 0 0 -6px; +} +.tooltip-bottom .tooltip-arrow { + top: 0; + left: 50%; + margin: -12px 0 0 -6px; +} +.tooltip { + background-color: #ffffff; + border-color: #95B8E7; + color: #000000; +} +.tooltip-right .tooltip-arrow-outer { + border-right-color: #95B8E7; +} +.tooltip-right .tooltip-arrow { + border-right-color: #ffffff; +} +.tooltip-left .tooltip-arrow-outer { + border-left-color: #95B8E7; +} +.tooltip-left .tooltip-arrow { + border-left-color: #ffffff; +} +.tooltip-top .tooltip-arrow-outer { + border-top-color: #95B8E7; +} +.tooltip-top .tooltip-arrow { + border-top-color: #ffffff; +} +.tooltip-bottom .tooltip-arrow-outer { + border-bottom-color: #95B8E7; +} +.tooltip-bottom .tooltip-arrow { + border-bottom-color: #ffffff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/tree.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/tree.css new file mode 100644 index 0000000..a22075b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/tree.css @@ -0,0 +1,160 @@ +.tree { + margin: 0; + padding: 0; + list-style-type: none; +} +.tree li { + white-space: nowrap; +} +.tree li ul { + list-style-type: none; + margin: 0; + padding: 0; +} +.tree-node { + height: 18px; + white-space: nowrap; + cursor: pointer; +} +.tree-hit { + cursor: pointer; +} +.tree-expanded, +.tree-collapsed, +.tree-folder, +.tree-file, +.tree-checkbox, +.tree-indent { + display: inline-block; + width: 16px; + height: 18px; + vertical-align: top; + overflow: hidden; +} +.tree-expanded { + background: url('images/tree_icons.png') no-repeat -18px 0px; +} +.tree-expanded-hover { + background: url('images/tree_icons.png') no-repeat -50px 0px; +} +.tree-collapsed { + background: url('images/tree_icons.png') no-repeat 0px 0px; +} +.tree-collapsed-hover { + background: url('images/tree_icons.png') no-repeat -32px 0px; +} +.tree-lines .tree-expanded, +.tree-lines .tree-root-first .tree-expanded { + background: url('images/tree_icons.png') no-repeat -144px 0; +} +.tree-lines .tree-collapsed, +.tree-lines .tree-root-first .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -128px 0; +} +.tree-lines .tree-node-last .tree-expanded, +.tree-lines .tree-root-one .tree-expanded { + background: url('images/tree_icons.png') no-repeat -80px 0; +} +.tree-lines .tree-node-last .tree-collapsed, +.tree-lines .tree-root-one .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -64px 0; +} +.tree-line { + background: url('images/tree_icons.png') no-repeat -176px 0; +} +.tree-join { + background: url('images/tree_icons.png') no-repeat -192px 0; +} +.tree-joinbottom { + background: url('images/tree_icons.png') no-repeat -160px 0; +} +.tree-folder { + background: url('images/tree_icons.png') no-repeat -208px 0; +} +.tree-folder-open { + background: url('images/tree_icons.png') no-repeat -224px 0; +} +.tree-file { + background: url('images/tree_icons.png') no-repeat -240px 0; +} +.tree-loading { + background: url('images/loading.gif') no-repeat center center; +} +.tree-checkbox0 { + background: url('images/tree_icons.png') no-repeat -208px -18px; +} +.tree-checkbox1 { + background: url('images/tree_icons.png') no-repeat -224px -18px; +} +.tree-checkbox2 { + background: url('images/tree_icons.png') no-repeat -240px -18px; +} +.tree-title { + font-size: 12px; + display: inline-block; + text-decoration: none; + vertical-align: top; + white-space: nowrap; + padding: 0 2px; + height: 18px; + line-height: 18px; +} +.tree-node-proxy { + font-size: 12px; + line-height: 20px; + padding: 0 2px 0 20px; + border-width: 1px; + border-style: solid; + z-index: 9900000; +} +.tree-dnd-icon { + display: inline-block; + position: absolute; + width: 16px; + height: 18px; + left: 2px; + top: 50%; + margin-top: -9px; +} +.tree-dnd-yes { + background: url('images/tree_icons.png') no-repeat -256px 0; +} +.tree-dnd-no { + background: url('images/tree_icons.png') no-repeat -256px -18px; +} +.tree-node-top { + border-top: 1px dotted red; +} +.tree-node-bottom { + border-bottom: 1px dotted red; +} +.tree-node-append .tree-title { + border: 1px dotted red; +} +.tree-editor { + border: 1px solid #ccc; + font-size: 12px; + height: 14px !important; + height: 18px; + line-height: 14px; + padding: 1px 2px; + width: 80px; + position: absolute; + top: 0; +} +.tree-node-proxy { + background-color: #ffffff; + color: #000000; + border-color: #95B8E7; +} +.tree-node-hover { + background: #eaf2ff; + color: #000000; +} +.tree-node-selected { + background: #ffe48d; + color: #000000; +} +.tree-node-hidden { + display: none; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/validatebox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/validatebox.css new file mode 100644 index 0000000..1fc3ad6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/validatebox.css @@ -0,0 +1,5 @@ +.validatebox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; + color: #000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/default/window.css b/src/main/webapp/jquery-easyui-1.4.4/themes/default/window.css new file mode 100644 index 0000000..06f77db --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/default/window.css @@ -0,0 +1,94 @@ +.window { + overflow: hidden; + padding: 5px; + border-width: 1px; + border-style: solid; +} +.window .window-header { + background: transparent; + padding: 0px 0px 6px 0px; +} +.window .window-body { + border-width: 1px; + border-style: solid; + border-top-width: 0px; +} +.window .window-body-noheader { + border-top-width: 1px; +} +.window .panel-body-nobottom { + border-bottom-width: 0; +} +.window .window-header .panel-icon, +.window .window-header .panel-tool { + top: 50%; + margin-top: -11px; +} +.window .window-header .panel-icon { + left: 1px; +} +.window .window-header .panel-tool { + right: 1px; +} +.window .window-header .panel-with-icon { + padding-left: 18px; +} +.window-proxy { + position: absolute; + overflow: hidden; +} +.window-proxy-mask { + position: absolute; + filter: alpha(opacity=5); + opacity: 0.05; +} +.window-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + filter: alpha(opacity=40); + opacity: 0.40; + font-size: 1px; + overflow: hidden; +} +.window, +.window-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.window-shadow { + background: #ccc; + -moz-box-shadow: 2px 2px 3px #cccccc; + -webkit-box-shadow: 2px 2px 3px #cccccc; + box-shadow: 2px 2px 3px #cccccc; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.window, +.window .window-body { + border-color: #95B8E7; +} +.window { + background-color: #E0ECFF; + background: -webkit-linear-gradient(top,#EFF5FF 0,#E0ECFF 20%); + background: -moz-linear-gradient(top,#EFF5FF 0,#E0ECFF 20%); + background: -o-linear-gradient(top,#EFF5FF 0,#E0ECFF 20%); + background: linear-gradient(to bottom,#EFF5FF 0,#E0ECFF 20%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#E0ECFF,GradientType=0); +} +.window-proxy { + border: 1px dashed #95B8E7; +} +.window-proxy-mask, +.window-mask { + background: #ccc; +} +.window .panel-footer { + border: 1px solid #95B8E7; + position: relative; + top: -1px; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/accordion.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/accordion.css new file mode 100644 index 0000000..3cb451b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/accordion.css @@ -0,0 +1,41 @@ +.accordion { + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.accordion .accordion-header { + border-width: 0 0 1px; + cursor: pointer; +} +.accordion .accordion-body { + border-width: 0 0 1px; +} +.accordion-noborder { + border-width: 0; +} +.accordion-noborder .accordion-header { + border-width: 0 0 1px; +} +.accordion-noborder .accordion-body { + border-width: 0 0 1px; +} +.accordion-collapse { + background: url('images/accordion_arrows.png') no-repeat 0 0; +} +.accordion-expand { + background: url('images/accordion_arrows.png') no-repeat -16px 0; +} +.accordion { + background: #ffffff; + border-color: #D3D3D3; +} +.accordion .accordion-header { + background: #f3f3f3; + filter: none; +} +.accordion .accordion-header-selected { + background: #0092DC; +} +.accordion .accordion-header-selected .panel-title { + color: #fff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/calendar.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/calendar.css new file mode 100644 index 0000000..335310d --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/calendar.css @@ -0,0 +1,197 @@ +.calendar { + border-width: 1px; + border-style: solid; + padding: 1px; + overflow: hidden; +} +.calendar table { + table-layout: fixed; + border-collapse: separate; + font-size: 12px; + width: 100%; + height: 100%; +} +.calendar table td, +.calendar table th { + font-size: 12px; +} +.calendar-noborder { + border: 0; +} +.calendar-header { + position: relative; + height: 22px; +} +.calendar-title { + text-align: center; + height: 22px; +} +.calendar-title span { + position: relative; + display: inline-block; + top: 2px; + padding: 0 3px; + height: 18px; + line-height: 18px; + font-size: 12px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth, +.calendar-nextmonth, +.calendar-prevyear, +.calendar-nextyear { + position: absolute; + top: 50%; + margin-top: -7px; + width: 14px; + height: 14px; + cursor: pointer; + font-size: 1px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth { + left: 20px; + background: url('images/calendar_arrows.png') no-repeat -18px -2px; +} +.calendar-nextmonth { + right: 20px; + background: url('images/calendar_arrows.png') no-repeat -34px -2px; +} +.calendar-prevyear { + left: 3px; + background: url('images/calendar_arrows.png') no-repeat -1px -2px; +} +.calendar-nextyear { + right: 3px; + background: url('images/calendar_arrows.png') no-repeat -49px -2px; +} +.calendar-body { + position: relative; +} +.calendar-body th, +.calendar-body td { + text-align: center; +} +.calendar-day { + border: 0; + padding: 1px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-other-month { + opacity: 0.3; + filter: alpha(opacity=30); +} +.calendar-disabled { + opacity: 0.6; + filter: alpha(opacity=60); + cursor: default; +} +.calendar-menu { + position: absolute; + top: 0; + left: 0; + width: 180px; + height: 150px; + padding: 5px; + font-size: 12px; + display: none; + overflow: hidden; +} +.calendar-menu-year-inner { + text-align: center; + padding-bottom: 5px; +} +.calendar-menu-year { + width: 40px; + text-align: center; + border-width: 1px; + border-style: solid; + margin: 0; + padding: 2px; + font-weight: bold; + font-size: 12px; +} +.calendar-menu-prev, +.calendar-menu-next { + display: inline-block; + width: 21px; + height: 21px; + vertical-align: top; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-menu-prev { + margin-right: 10px; + background: url('images/calendar_arrows.png') no-repeat 2px 2px; +} +.calendar-menu-next { + margin-left: 10px; + background: url('images/calendar_arrows.png') no-repeat -45px 2px; +} +.calendar-menu-month { + text-align: center; + cursor: pointer; + font-weight: bold; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-body th, +.calendar-menu-month { + color: #4d4d4d; +} +.calendar-day { + color: #000000; +} +.calendar-sunday { + color: #CC2222; +} +.calendar-saturday { + color: #00ee00; +} +.calendar-today { + color: #0000ff; +} +.calendar-menu-year { + border-color: #D3D3D3; +} +.calendar { + border-color: #D3D3D3; +} +.calendar-header { + background: #f3f3f3; +} +.calendar-body, +.calendar-menu { + background: #ffffff; +} +.calendar-body th { + background: #fafafa; + padding: 2px 0; +} +.calendar-hover, +.calendar-nav-hover, +.calendar-menu-hover { + background-color: #e2e2e2; + color: #000000; +} +.calendar-hover { + border: 1px solid #ccc; + padding: 0; +} +.calendar-selected { + background-color: #0092DC; + color: #fff; + border: 1px solid #0070a9; + padding: 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/combo.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/combo.css new file mode 100644 index 0000000..3c76f2c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/combo.css @@ -0,0 +1,60 @@ +.combo { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.combo .combo-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0px 2px; + vertical-align: baseline; +} +.combo-arrow { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.combo-arrow-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.combo-panel { + overflow: auto; +} +.combo-arrow { + background: url('images/combo_arrow.png') no-repeat center center; +} +.combo-panel { + background-color: #ffffff; +} +.combo { + border-color: #D3D3D3; + background-color: #fff; +} +.combo-arrow { + background-color: #f3f3f3; +} +.combo-arrow-hover { + background-color: #e2e2e2; +} +.combo-arrow:hover { + background-color: #e2e2e2; +} +.combo .textbox-icon-disabled:hover { + cursor: default; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/combobox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/combobox.css new file mode 100644 index 0000000..68b6262 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/combobox.css @@ -0,0 +1,24 @@ +.combobox-item, +.combobox-group { + font-size: 12px; + padding: 3px; + padding-right: 0px; +} +.combobox-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.combobox-gitem { + padding-left: 10px; +} +.combobox-group { + font-weight: bold; +} +.combobox-item-hover { + background-color: #e2e2e2; + color: #000000; +} +.combobox-item-selected { + background-color: #0092DC; + color: #fff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/datagrid.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/datagrid.css new file mode 100644 index 0000000..9d86b31 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/datagrid.css @@ -0,0 +1,276 @@ +.datagrid .panel-body { + overflow: hidden; + position: relative; +} +.datagrid-view { + position: relative; + overflow: hidden; +} +.datagrid-view1, +.datagrid-view2 { + position: absolute; + overflow: hidden; + top: 0; +} +.datagrid-view1 { + left: 0; +} +.datagrid-view2 { + right: 0; +} +.datagrid-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0.3; + filter: alpha(opacity=30); + display: none; +} +.datagrid-mask-msg { + position: absolute; + top: 50%; + margin-top: -20px; + padding: 10px 5px 10px 30px; + width: auto; + height: 16px; + border-width: 2px; + border-style: solid; + display: none; +} +.datagrid-sort-icon { + padding: 0; + display: none; +} +.datagrid-toolbar { + height: auto; + padding: 1px 2px; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.datagrid .datagrid-pager { + display: block; + margin: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.datagrid .datagrid-pager-top { + border-width: 0 0 1px 0; +} +.datagrid-header { + overflow: hidden; + cursor: default; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-header-inner { + float: left; + width: 10000px; +} +.datagrid-header-row, +.datagrid-row { + height: 25px; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-width: 0 1px 1px 0; + border-style: dotted; + margin: 0; + padding: 0; +} +.datagrid-cell, +.datagrid-cell-group, +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + margin: 0; + padding: 0 4px; + white-space: nowrap; + word-wrap: normal; + overflow: hidden; + height: 18px; + line-height: 18px; + font-size: 12px; +} +.datagrid-header .datagrid-cell { + height: auto; +} +.datagrid-header .datagrid-cell span { + font-size: 12px; +} +.datagrid-cell-group { + text-align: center; + text-overflow: ellipsis; +} +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + width: 30px; + text-align: center; + margin: 0; + padding: 0; +} +.datagrid-body { + margin: 0; + padding: 0; + overflow: auto; + zoom: 1; +} +.datagrid-view1 .datagrid-body-inner { + padding-bottom: 20px; +} +.datagrid-view1 .datagrid-body { + overflow: hidden; +} +.datagrid-footer { + overflow: hidden; +} +.datagrid-footer-inner { + border-width: 1px 0 0 0; + border-style: solid; + width: 10000px; + float: left; +} +.datagrid-row-editing .datagrid-cell { + height: auto; +} +.datagrid-header-check, +.datagrid-cell-check { + padding: 0; + width: 27px; + height: 18px; + font-size: 1px; + text-align: center; + overflow: hidden; +} +.datagrid-header-check input, +.datagrid-cell-check input { + margin: 0; + padding: 0; + width: 15px; + height: 18px; +} +.datagrid-resize-proxy { + position: absolute; + width: 1px; + height: 10000px; + top: 0; + cursor: e-resize; + display: none; +} +.datagrid-body .datagrid-editable { + margin: 0; + padding: 0; +} +.datagrid-body .datagrid-editable table { + width: 100%; + height: 100%; +} +.datagrid-body .datagrid-editable td { + border: 0; + margin: 0; + padding: 0; +} +.datagrid-view .datagrid-editable-input { + margin: 0; + padding: 2px 4px; + border: 1px solid #D3D3D3; + font-size: 12px; + outline-style: none; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.datagrid-sort .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -64px center; +} +.datagrid-sort-desc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -16px center; +} +.datagrid-sort-asc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat 0px center; +} +.datagrid-row-collapse { + background: url('images/datagrid_icons.png') no-repeat -48px center; +} +.datagrid-row-expand { + background: url('images/datagrid_icons.png') no-repeat -32px center; +} +.datagrid-mask-msg { + background: #ffffff url('images/loading.gif') no-repeat scroll 5px center; +} +.datagrid-header, +.datagrid-td-rownumber { + background-color: #fafafa; + background: -webkit-linear-gradient(top,#fdfdfd 0,#f5f5f5 100%); + background: -moz-linear-gradient(top,#fdfdfd 0,#f5f5f5 100%); + background: -o-linear-gradient(top,#fdfdfd 0,#f5f5f5 100%); + background: linear-gradient(to bottom,#fdfdfd 0,#f5f5f5 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#fdfdfd,endColorstr=#f5f5f5,GradientType=0); +} +.datagrid-cell-rownumber { + color: #000000; +} +.datagrid-resize-proxy { + background: #bfbfbf; +} +.datagrid-mask { + background: #ccc; +} +.datagrid-mask-msg { + border-color: #D3D3D3; +} +.datagrid-toolbar, +.datagrid-pager { + background: #fafafa; +} +.datagrid-header, +.datagrid-toolbar, +.datagrid-pager, +.datagrid-footer-inner { + border-color: #ddd; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-color: #ccc; +} +.datagrid-htable, +.datagrid-btable, +.datagrid-ftable { + color: #000000; + border-collapse: separate; +} +.datagrid-row-alt { + background: #fafafa; +} +.datagrid-row-over, +.datagrid-header td.datagrid-header-over { + background: #e2e2e2; + color: #000000; + cursor: default; +} +.datagrid-row-selected { + background: #0092DC; + color: #fff; +} +.datagrid-row-editing .textbox, +.datagrid-row-editing .textbox-text { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/datalist.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/datalist.css new file mode 100644 index 0000000..de149ef --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/datalist.css @@ -0,0 +1,95 @@ +.datalist .datagrid-header { + border-width: 0; +} +.datalist .datagrid-group, +.m-list .m-list-group { + height: 25px; + line-height: 25px; + font-weight: bold; + overflow: hidden; + background-color: #fafafa; + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ccc; +} +.datalist .datagrid-group-expander { + display: none; +} +.datalist .datagrid-group-title { + padding: 0 4px; +} +.datalist .datagrid-btable { + width: 100%; + table-layout: fixed; +} +.datalist .datagrid-row td { + border-style: solid; + border-left-color: transparent; + border-right-color: transparent; + border-bottom-width: 0; +} +.datalist-lines .datagrid-row td { + border-bottom-width: 1px; +} +.datalist .datagrid-cell, +.m-list li { + width: auto; + height: auto; + padding: 2px 4px; + line-height: 18px; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link, +.m-list li>a { + display: block; + position: relative; + cursor: pointer; + color: #000000; + text-decoration: none; + overflow: hidden; + margin: -2px -4px; + padding: 2px 4px; + padding-right: 16px; + line-height: 18px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link::after, +.m-list li>a::after { + position: absolute; + display: block; + width: 8px; + height: 8px; + content: ''; + right: 6px; + top: 50%; + margin-top: -4px; + border-style: solid; + border-width: 1px 1px 0 0; + -ms-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} +.m-list { + margin: 0; + padding: 0; + list-style: none; +} +.m-list li { + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ccc; +} +.m-list li>a:hover { + background: #e2e2e2; + color: #000000; +} +.m-list .m-list-group { + padding: 0 4px; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/datebox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/datebox.css new file mode 100644 index 0000000..8c41350 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/datebox.css @@ -0,0 +1,36 @@ +.datebox-calendar-inner { + height: 180px; +} +.datebox-button { + height: 18px; + padding: 2px 5px; + text-align: center; +} +.datebox-button a { + font-size: 12px; + font-weight: bold; + text-decoration: none; + opacity: 0.6; + filter: alpha(opacity=60); +} +.datebox-button a:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.datebox-current, +.datebox-close { + float: left; +} +.datebox-close { + float: right; +} +.datebox .combo-arrow { + background-image: url('images/datebox_arrow.png'); + background-position: center center; +} +.datebox-button { + background-color: #fafafa; +} +.datebox-button a { + color: #444; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/dialog.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/dialog.css new file mode 100644 index 0000000..b1ff52f --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/dialog.css @@ -0,0 +1,32 @@ +.dialog-content { + overflow: auto; +} +.dialog-toolbar { + padding: 2px 5px; +} +.dialog-tool-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.dialog-button { + padding: 5px; + text-align: right; +} +.dialog-button .l-btn { + margin-left: 5px; +} +.dialog-toolbar, +.dialog-button { + background: #fafafa; + border-width: 1px; + border-style: solid; +} +.dialog-toolbar { + border-color: #D3D3D3 #D3D3D3 #ddd #D3D3D3; +} +.dialog-button { + border-color: #ddd #D3D3D3 #D3D3D3 #D3D3D3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/easyui.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/easyui.css new file mode 100644 index 0000000..400a24a --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/easyui.css @@ -0,0 +1,2869 @@ +.panel { + overflow: hidden; + text-align: left; + margin: 0; + border: 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.panel-header, +.panel-body { + border-width: 1px; + border-style: solid; +} +.panel-header { + padding: 5px; + position: relative; +} +.panel-title { + background: url('images/blank.gif') no-repeat; +} +.panel-header-noborder { + border-width: 0 0 1px 0; +} +.panel-body { + overflow: auto; + border-top-width: 0; + padding: 0; +} +.panel-body-noheader { + border-top-width: 1px; +} +.panel-body-noborder { + border-width: 0px; +} +.panel-body-nobottom { + border-bottom-width: 0; +} +.panel-with-icon { + padding-left: 18px; +} +.panel-icon, +.panel-tool { + position: absolute; + top: 50%; + margin-top: -8px; + height: 16px; + overflow: hidden; +} +.panel-icon { + left: 5px; + width: 16px; +} +.panel-tool { + right: 5px; + width: auto; +} +.panel-tool a { + display: inline-block; + width: 16px; + height: 16px; + opacity: 0.6; + filter: alpha(opacity=60); + margin: 0 0 0 2px; + vertical-align: top; +} +.panel-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + background-color: #e2e2e2; + -moz-border-radius: 3px 3px 3px 3px; + -webkit-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; +} +.panel-loading { + padding: 11px 0px 10px 30px; +} +.panel-noscroll { + overflow: hidden; +} +.panel-fit, +.panel-fit body { + height: 100%; + margin: 0; + padding: 0; + border: 0; + overflow: hidden; +} +.panel-loading { + background: url('images/loading.gif') no-repeat 10px 10px; +} +.panel-tool-close { + background: url('images/panel_tools.png') no-repeat -16px 0px; +} +.panel-tool-min { + background: url('images/panel_tools.png') no-repeat 0px 0px; +} +.panel-tool-max { + background: url('images/panel_tools.png') no-repeat 0px -16px; +} +.panel-tool-restore { + background: url('images/panel_tools.png') no-repeat -16px -16px; +} +.panel-tool-collapse { + background: url('images/panel_tools.png') no-repeat -32px 0; +} +.panel-tool-expand { + background: url('images/panel_tools.png') no-repeat -32px -16px; +} +.panel-header, +.panel-body { + border-color: #D3D3D3; +} +.panel-header { + background-color: #f3f3f3; + background: -webkit-linear-gradient(top,#F8F8F8 0,#eeeeee 100%); + background: -moz-linear-gradient(top,#F8F8F8 0,#eeeeee 100%); + background: -o-linear-gradient(top,#F8F8F8 0,#eeeeee 100%); + background: linear-gradient(to bottom,#F8F8F8 0,#eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#F8F8F8,endColorstr=#eeeeee,GradientType=0); +} +.panel-body { + background-color: #ffffff; + color: #000000; + font-size: 12px; +} +.panel-title { + font-size: 12px; + font-weight: bold; + color: #575765; + height: 16px; + line-height: 16px; +} +.panel-footer { + border: 1px solid #D3D3D3; + overflow: hidden; + background: #fafafa; +} +.panel-footer-noborder { + border-width: 1px 0 0 0; +} +.accordion { + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.accordion .accordion-header { + border-width: 0 0 1px; + cursor: pointer; +} +.accordion .accordion-body { + border-width: 0 0 1px; +} +.accordion-noborder { + border-width: 0; +} +.accordion-noborder .accordion-header { + border-width: 0 0 1px; +} +.accordion-noborder .accordion-body { + border-width: 0 0 1px; +} +.accordion-collapse { + background: url('images/accordion_arrows.png') no-repeat 0 0; +} +.accordion-expand { + background: url('images/accordion_arrows.png') no-repeat -16px 0; +} +.accordion { + background: #ffffff; + border-color: #D3D3D3; +} +.accordion .accordion-header { + background: #f3f3f3; + filter: none; +} +.accordion .accordion-header-selected { + background: #0092DC; +} +.accordion .accordion-header-selected .panel-title { + color: #fff; +} +.window { + overflow: hidden; + padding: 5px; + border-width: 1px; + border-style: solid; +} +.window .window-header { + background: transparent; + padding: 0px 0px 6px 0px; +} +.window .window-body { + border-width: 1px; + border-style: solid; + border-top-width: 0px; +} +.window .window-body-noheader { + border-top-width: 1px; +} +.window .panel-body-nobottom { + border-bottom-width: 0; +} +.window .window-header .panel-icon, +.window .window-header .panel-tool { + top: 50%; + margin-top: -11px; +} +.window .window-header .panel-icon { + left: 1px; +} +.window .window-header .panel-tool { + right: 1px; +} +.window .window-header .panel-with-icon { + padding-left: 18px; +} +.window-proxy { + position: absolute; + overflow: hidden; +} +.window-proxy-mask { + position: absolute; + filter: alpha(opacity=5); + opacity: 0.05; +} +.window-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + filter: alpha(opacity=40); + opacity: 0.40; + font-size: 1px; + overflow: hidden; +} +.window, +.window-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.window-shadow { + background: #ccc; + -moz-box-shadow: 2px 2px 3px #cccccc; + -webkit-box-shadow: 2px 2px 3px #cccccc; + box-shadow: 2px 2px 3px #cccccc; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.window, +.window .window-body { + border-color: #D3D3D3; +} +.window { + background-color: #f3f3f3; + background: -webkit-linear-gradient(top,#F8F8F8 0,#eeeeee 20%); + background: -moz-linear-gradient(top,#F8F8F8 0,#eeeeee 20%); + background: -o-linear-gradient(top,#F8F8F8 0,#eeeeee 20%); + background: linear-gradient(to bottom,#F8F8F8 0,#eeeeee 20%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#F8F8F8,endColorstr=#eeeeee,GradientType=0); +} +.window-proxy { + border: 1px dashed #D3D3D3; +} +.window-proxy-mask, +.window-mask { + background: #ccc; +} +.window .panel-footer { + border: 1px solid #D3D3D3; + position: relative; + top: -1px; +} +.dialog-content { + overflow: auto; +} +.dialog-toolbar { + padding: 2px 5px; +} +.dialog-tool-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.dialog-button { + padding: 5px; + text-align: right; +} +.dialog-button .l-btn { + margin-left: 5px; +} +.dialog-toolbar, +.dialog-button { + background: #fafafa; + border-width: 1px; + border-style: solid; +} +.dialog-toolbar { + border-color: #D3D3D3 #D3D3D3 #ddd #D3D3D3; +} +.dialog-button { + border-color: #ddd #D3D3D3 #D3D3D3 #D3D3D3; +} +.l-btn { + text-decoration: none; + display: inline-block; + overflow: hidden; + margin: 0; + padding: 0; + cursor: pointer; + outline: none; + text-align: center; + vertical-align: middle; + line-height: normal; +} +.l-btn-plain { + border-width: 0; + padding: 1px; +} +.l-btn-left { + display: inline-block; + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + vertical-align: top; +} +.l-btn-text { + display: inline-block; + vertical-align: top; + width: auto; + line-height: 24px; + font-size: 12px; + padding: 0; + margin: 0 4px; +} +.l-btn-icon { + display: inline-block; + width: 16px; + height: 16px; + line-height: 16px; + position: absolute; + top: 50%; + margin-top: -8px; + font-size: 1px; +} +.l-btn span span .l-btn-empty { + display: inline-block; + margin: 0; + width: 16px; + height: 24px; + font-size: 1px; + vertical-align: top; +} +.l-btn span .l-btn-icon-left { + padding: 0 0 0 20px; + background-position: left center; +} +.l-btn span .l-btn-icon-right { + padding: 0 20px 0 0; + background-position: right center; +} +.l-btn-icon-left .l-btn-text { + margin: 0 4px 0 24px; +} +.l-btn-icon-left .l-btn-icon { + left: 4px; +} +.l-btn-icon-right .l-btn-text { + margin: 0 24px 0 4px; +} +.l-btn-icon-right .l-btn-icon { + right: 4px; +} +.l-btn-icon-top .l-btn-text { + margin: 20px 4px 0 4px; +} +.l-btn-icon-top .l-btn-icon { + top: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-icon-bottom .l-btn-text { + margin: 0 4px 20px 4px; +} +.l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-left .l-btn-empty { + margin: 0 4px; + width: 16px; +} +.l-btn-plain:hover { + padding: 0; +} +.l-btn-focus { + outline: #0000FF dotted thin; +} +.l-btn-large .l-btn-text { + line-height: 40px; +} +.l-btn-large .l-btn-icon { + width: 32px; + height: 32px; + line-height: 32px; + margin-top: -16px; +} +.l-btn-large .l-btn-icon-left .l-btn-text { + margin-left: 40px; +} +.l-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.l-btn-large .l-btn-icon-top .l-btn-text { + margin-top: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-top .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-left .l-btn-empty { + margin: 0 4px; + width: 32px; +} +.l-btn { + color: #444; + background: #fafafa; + background-repeat: repeat-x; + border: 1px solid #bbb; + background: -webkit-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -moz-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -o-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: linear-gradient(to bottom,#ffffff 0,#eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#eeeeee,GradientType=0); + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn:hover { + background: #e2e2e2; + color: #000000; + border: 1px solid #ccc; + filter: none; +} +.l-btn-plain { + background: transparent; + border-width: 0; + filter: none; +} +.l-btn-outline { + border-width: 1px; + border-color: #ccc; + padding: 0; +} +.l-btn-plain:hover { + background: #e2e2e2; + color: #000000; + border: 1px solid #ccc; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn-disabled, +.l-btn-disabled:hover { + opacity: 0.5; + cursor: default; + background: #fafafa; + color: #444; + background: -webkit-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -moz-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -o-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: linear-gradient(to bottom,#ffffff 0,#eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#eeeeee,GradientType=0); +} +.l-btn-disabled .l-btn-text, +.l-btn-disabled .l-btn-icon { + filter: alpha(opacity=50); +} +.l-btn-plain-disabled, +.l-btn-plain-disabled:hover { + background: transparent; + filter: alpha(opacity=50); +} +.l-btn-selected, +.l-btn-selected:hover { + background: #ddd; + filter: none; +} +.l-btn-plain-selected, +.l-btn-plain-selected:hover { + background: #ddd; +} +.textbox { + position: relative; + border: 1px solid #D3D3D3; + background-color: #fff; + vertical-align: middle; + display: inline-block; + overflow: hidden; + white-space: nowrap; + margin: 0; + padding: 0; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox .textbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 4px; + white-space: normal; + vertical-align: top; + outline-style: none; + resize: none; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox textarea.textbox-text { + white-space: pre-wrap; +} +.textbox .textbox-prompt { + font-size: 12px; + color: #aaa; +} +.textbox .textbox-button, +.textbox .textbox-button:hover { + position: absolute; + top: 0; + padding: 0; + vertical-align: top; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.textbox-button-right, +.textbox-button-right:hover { + border-width: 0 0 0 1px; +} +.textbox-button-left, +.textbox-button-left:hover { + border-width: 0 1px 0 0; +} +.textbox-addon { + position: absolute; + top: 0; +} +.textbox-icon { + display: inline-block; + width: 18px; + height: 20px; + overflow: hidden; + vertical-align: top; + background-position: center center; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); + text-decoration: none; + outline-style: none; +} +.textbox-icon-disabled, +.textbox-icon-readonly { + cursor: default; +} +.textbox-icon:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.textbox-icon-disabled:hover { + opacity: 0.6; + filter: alpha(opacity=60); +} +.textbox-focused { + -moz-box-shadow: 0 0 3px 0 #D3D3D3; + -webkit-box-shadow: 0 0 3px 0 #D3D3D3; + box-shadow: 0 0 3px 0 #D3D3D3; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} +.filebox .textbox-value { + vertical-align: top; + position: absolute; + top: 0; + left: -5000px; +} +.filebox-label { + display: inline-block; + position: absolute; + width: 100%; + height: 100%; + cursor: pointer; + left: 0; + top: 0; + z-index: 10; + background: url('images/blank.gif') no-repeat; +} +.l-btn-disabled .filebox-label { + cursor: default; +} +.combo { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.combo .combo-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0px 2px; + vertical-align: baseline; +} +.combo-arrow { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.combo-arrow-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.combo-panel { + overflow: auto; +} +.combo-arrow { + background: url('images/combo_arrow.png') no-repeat center center; +} +.combo-panel { + background-color: #ffffff; +} +.combo { + border-color: #D3D3D3; + background-color: #fff; +} +.combo-arrow { + background-color: #f3f3f3; +} +.combo-arrow-hover { + background-color: #e2e2e2; +} +.combo-arrow:hover { + background-color: #e2e2e2; +} +.combo .textbox-icon-disabled:hover { + cursor: default; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} +.combobox-item, +.combobox-group { + font-size: 12px; + padding: 3px; + padding-right: 0px; +} +.combobox-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.combobox-gitem { + padding-left: 10px; +} +.combobox-group { + font-weight: bold; +} +.combobox-item-hover { + background-color: #e2e2e2; + color: #000000; +} +.combobox-item-selected { + background-color: #0092DC; + color: #fff; +} +.layout { + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + z-index: 0; +} +.layout-panel { + position: absolute; + overflow: hidden; +} +.layout-body { + min-width: 1px; + min-height: 1px; +} +.layout-panel-east, +.layout-panel-west { + z-index: 2; +} +.layout-panel-north, +.layout-panel-south { + z-index: 3; +} +.layout-expand { + position: absolute; + padding: 0px; + font-size: 1px; + cursor: pointer; + z-index: 1; +} +.layout-expand .panel-header, +.layout-expand .panel-body { + background: transparent; + filter: none; + overflow: hidden; +} +.layout-expand .panel-header { + border-bottom-width: 0px; +} +.layout-expand .panel-body { + position: relative; +} +.layout-expand .panel-body .panel-icon { + margin-top: 0; + top: 0; + left: 50%; + margin-left: -8px; +} +.layout-expand-west .panel-header .panel-icon, +.layout-expand-east .panel-header .panel-icon { + display: none; +} +.layout-expand-title { + position: absolute; + top: 0; + left: 21px; + white-space: nowrap; + word-wrap: normal; + -webkit-transform: rotate(90deg); + -webkit-transform-origin: 0 0; + -moz-transform: rotate(90deg); + -moz-transform-origin: 0 0; + -o-transform: rotate(90deg); + -o-transform-origin: 0 0; + transform: rotate(90deg); + transform-origin: 0 0; +} +.layout-expand-with-icon { + top: 18px; +} +.layout-expand .panel-body-noheader .layout-expand-title, +.layout-expand .panel-body-noheader .panel-icon { + top: 5px; +} +.layout-expand .panel-body-noheader .layout-expand-with-icon { + top: 23px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + position: absolute; + font-size: 1px; + display: none; + z-index: 5; +} +.layout-split-proxy-h { + width: 5px; + cursor: e-resize; +} +.layout-split-proxy-v { + height: 5px; + cursor: n-resize; +} +.layout-mask { + position: absolute; + background: #fafafa; + filter: alpha(opacity=10); + opacity: 0.10; + z-index: 4; +} +.layout-button-up { + background: url('images/layout_arrows.png') no-repeat -16px -16px; +} +.layout-button-down { + background: url('images/layout_arrows.png') no-repeat -16px 0; +} +.layout-button-left { + background: url('images/layout_arrows.png') no-repeat 0 0; +} +.layout-button-right { + background: url('images/layout_arrows.png') no-repeat 0 -16px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + background-color: #bfbfbf; +} +.layout-split-north { + border-bottom: 5px solid #efefef; +} +.layout-split-south { + border-top: 5px solid #efefef; +} +.layout-split-east { + border-left: 5px solid #efefef; +} +.layout-split-west { + border-right: 5px solid #efefef; +} +.layout-expand { + background-color: #f3f3f3; +} +.layout-expand-over { + background-color: #f3f3f3; +} +.tabs-container { + overflow: hidden; +} +.tabs-header { + border-width: 1px; + border-style: solid; + border-bottom-width: 0; + position: relative; + padding: 0; + padding-top: 2px; + overflow: hidden; +} +.tabs-scroller-left, +.tabs-scroller-right { + position: absolute; + top: auto; + bottom: 0; + width: 18px; + font-size: 1px; + display: none; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.tabs-scroller-left { + left: 0; +} +.tabs-scroller-right { + right: 0; +} +.tabs-tool { + position: absolute; + bottom: 0; + padding: 1px; + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.tabs-header-plain .tabs-tool { + padding: 0 1px; +} +.tabs-wrap { + position: relative; + left: 0; + overflow: hidden; + width: 100%; + margin: 0; + padding: 0; +} +.tabs-scrolling { + margin-left: 18px; + margin-right: 18px; +} +.tabs-disabled { + opacity: 0.3; + filter: alpha(opacity=30); +} +.tabs { + list-style-type: none; + height: 26px; + margin: 0px; + padding: 0px; + padding-left: 4px; + width: 50000px; + border-style: solid; + border-width: 0 0 1px 0; +} +.tabs li { + float: left; + display: inline-block; + margin: 0 4px -1px 0; + padding: 0; + position: relative; + border: 0; +} +.tabs li a.tabs-inner { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0 10px; + height: 25px; + line-height: 25px; + text-align: center; + white-space: nowrap; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.tabs li.tabs-selected a.tabs-inner { + font-weight: bold; + outline: none; +} +.tabs li.tabs-selected a:hover.tabs-inner { + cursor: default; + pointer: default; +} +.tabs li a.tabs-close, +.tabs-p-tool { + position: absolute; + font-size: 1px; + display: block; + height: 12px; + padding: 0; + top: 50%; + margin-top: -6px; + overflow: hidden; +} +.tabs li a.tabs-close { + width: 12px; + right: 5px; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs-p-tool { + right: 16px; +} +.tabs-p-tool a { + display: inline-block; + font-size: 1px; + width: 12px; + height: 12px; + margin: 0; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs li a:hover.tabs-close, +.tabs-p-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + cursor: hand; + cursor: pointer; +} +.tabs-with-icon { + padding-left: 18px; +} +.tabs-icon { + position: absolute; + width: 16px; + height: 16px; + left: 10px; + top: 50%; + margin-top: -8px; +} +.tabs-title { + font-size: 12px; +} +.tabs-closable { + padding-right: 8px; +} +.tabs-panels { + margin: 0px; + padding: 0px; + border-width: 1px; + border-style: solid; + border-top-width: 0; + overflow: hidden; +} +.tabs-header-bottom { + border-width: 0 1px 1px 1px; + padding: 0 0 2px 0; +} +.tabs-header-bottom .tabs { + border-width: 1px 0 0 0; +} +.tabs-header-bottom .tabs li { + margin: -1px 4px 0 0; +} +.tabs-header-bottom .tabs li a.tabs-inner { + -moz-border-radius: 0 0 5px 5px; + -webkit-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; +} +.tabs-header-bottom .tabs-tool { + top: 0; +} +.tabs-header-bottom .tabs-scroller-left, +.tabs-header-bottom .tabs-scroller-right { + top: 0; + bottom: auto; +} +.tabs-panels-top { + border-width: 1px 1px 0 1px; +} +.tabs-header-left { + float: left; + border-width: 1px 0 1px 1px; + padding: 0; +} +.tabs-header-right { + float: right; + border-width: 1px 1px 1px 0; + padding: 0; +} +.tabs-header-left .tabs-wrap, +.tabs-header-right .tabs-wrap { + height: 100%; +} +.tabs-header-left .tabs { + height: 100%; + padding: 4px 0 0 2px; + border-width: 0 1px 0 0; +} +.tabs-header-right .tabs { + height: 100%; + padding: 4px 2px 0 0; + border-width: 0 0 0 1px; +} +.tabs-header-left .tabs li, +.tabs-header-right .tabs li { + display: block; + width: 100%; + position: relative; +} +.tabs-header-left .tabs li { + left: auto; + right: 0; + margin: 0 -1px 4px 0; + float: right; +} +.tabs-header-right .tabs li { + left: 0; + right: auto; + margin: 0 0 4px -1px; + float: left; +} +.tabs-justified li a.tabs-inner { + padding-left: 0; + padding-right: 0; +} +.tabs-header-left .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.tabs-header-right .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.tabs-panels-right { + float: right; + border-width: 1px 1px 1px 0; +} +.tabs-panels-left { + float: left; + border-width: 1px 0 1px 1px; +} +.tabs-header-noborder, +.tabs-panels-noborder { + border: 0px; +} +.tabs-header-plain { + border: 0px; + background: transparent; +} +.tabs-pill { + padding-bottom: 3px; +} +.tabs-header-bottom .tabs-pill { + padding-top: 3px; + padding-bottom: 0; +} +.tabs-header-left .tabs-pill { + padding-right: 3px; +} +.tabs-header-right .tabs-pill { + padding-left: 3px; +} +.tabs-header .tabs-pill li a.tabs-inner { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tabs-header-narrow, +.tabs-header-narrow .tabs-narrow { + padding: 0; +} +.tabs-narrow li, +.tabs-header-bottom .tabs-narrow li { + margin-left: 0; + margin-right: -1px; +} +.tabs-narrow li.tabs-last, +.tabs-header-bottom .tabs-narrow li.tabs-last { + margin-right: 0; +} +.tabs-header-left .tabs-narrow, +.tabs-header-right .tabs-narrow { + padding-top: 0; +} +.tabs-header-left .tabs-narrow li { + margin-bottom: -1px; + margin-right: -1px; +} +.tabs-header-left .tabs-narrow li.tabs-last, +.tabs-header-right .tabs-narrow li.tabs-last { + margin-bottom: 0; +} +.tabs-header-right .tabs-narrow li { + margin-bottom: -1px; + margin-left: -1px; +} +.tabs-scroller-left { + background: #f3f3f3 url('images/tabs_icons.png') no-repeat 1px center; +} +.tabs-scroller-right { + background: #f3f3f3 url('images/tabs_icons.png') no-repeat -15px center; +} +.tabs li a.tabs-close { + background: url('images/tabs_icons.png') no-repeat -34px center; +} +.tabs li a.tabs-inner:hover { + background: #e2e2e2; + color: #000000; + filter: none; +} +.tabs li.tabs-selected a.tabs-inner { + background-color: #ffffff; + color: #575765; + background: -webkit-linear-gradient(top,#F8F8F8 0,#ffffff 100%); + background: -moz-linear-gradient(top,#F8F8F8 0,#ffffff 100%); + background: -o-linear-gradient(top,#F8F8F8 0,#ffffff 100%); + background: linear-gradient(to bottom,#F8F8F8 0,#ffffff 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#F8F8F8,endColorstr=#ffffff,GradientType=0); +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(top,#ffffff 0,#F8F8F8 100%); + background: -moz-linear-gradient(top,#ffffff 0,#F8F8F8 100%); + background: -o-linear-gradient(top,#ffffff 0,#F8F8F8 100%); + background: linear-gradient(to bottom,#ffffff 0,#F8F8F8 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#F8F8F8,GradientType=0); +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#F8F8F8 0,#ffffff 100%); + background: -moz-linear-gradient(left,#F8F8F8 0,#ffffff 100%); + background: -o-linear-gradient(left,#F8F8F8 0,#ffffff 100%); + background: linear-gradient(to right,#F8F8F8 0,#ffffff 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#F8F8F8,endColorstr=#ffffff,GradientType=1); +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#ffffff 0,#F8F8F8 100%); + background: -moz-linear-gradient(left,#ffffff 0,#F8F8F8 100%); + background: -o-linear-gradient(left,#ffffff 0,#F8F8F8 100%); + background: linear-gradient(to right,#ffffff 0,#F8F8F8 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#F8F8F8,GradientType=1); +} +.tabs li a.tabs-inner { + color: #575765; + background-color: #f3f3f3; + background: -webkit-linear-gradient(top,#F8F8F8 0,#eeeeee 100%); + background: -moz-linear-gradient(top,#F8F8F8 0,#eeeeee 100%); + background: -o-linear-gradient(top,#F8F8F8 0,#eeeeee 100%); + background: linear-gradient(to bottom,#F8F8F8 0,#eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#F8F8F8,endColorstr=#eeeeee,GradientType=0); +} +.tabs-header, +.tabs-tool { + background-color: #f3f3f3; +} +.tabs-header-plain { + background: transparent; +} +.tabs-header, +.tabs-scroller-left, +.tabs-scroller-right, +.tabs-tool, +.tabs, +.tabs-panels, +.tabs li a.tabs-inner, +.tabs li.tabs-selected a.tabs-inner, +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner, +.tabs-header-left .tabs li.tabs-selected a.tabs-inner, +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-color: #D3D3D3; +} +.tabs-p-tool a:hover, +.tabs li a:hover.tabs-close, +.tabs-scroller-over { + background-color: #e2e2e2; +} +.tabs li.tabs-selected a.tabs-inner { + border-bottom: 1px solid #ffffff; +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + border-top: 1px solid #ffffff; +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + border-right: 1px solid #ffffff; +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-left: 1px solid #ffffff; +} +.tabs-header .tabs-pill li.tabs-selected a.tabs-inner { + background: #0092DC; + color: #fff; + filter: none; + border-color: #D3D3D3; +} +.datagrid .panel-body { + overflow: hidden; + position: relative; +} +.datagrid-view { + position: relative; + overflow: hidden; +} +.datagrid-view1, +.datagrid-view2 { + position: absolute; + overflow: hidden; + top: 0; +} +.datagrid-view1 { + left: 0; +} +.datagrid-view2 { + right: 0; +} +.datagrid-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0.3; + filter: alpha(opacity=30); + display: none; +} +.datagrid-mask-msg { + position: absolute; + top: 50%; + margin-top: -20px; + padding: 10px 5px 10px 30px; + width: auto; + height: 16px; + border-width: 2px; + border-style: solid; + display: none; +} +.datagrid-sort-icon { + padding: 0; + display: none; +} +.datagrid-toolbar { + height: auto; + padding: 1px 2px; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.datagrid .datagrid-pager { + display: block; + margin: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.datagrid .datagrid-pager-top { + border-width: 0 0 1px 0; +} +.datagrid-header { + overflow: hidden; + cursor: default; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-header-inner { + float: left; + width: 10000px; +} +.datagrid-header-row, +.datagrid-row { + height: 25px; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-width: 0 1px 1px 0; + border-style: dotted; + margin: 0; + padding: 0; +} +.datagrid-cell, +.datagrid-cell-group, +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + margin: 0; + padding: 0 4px; + white-space: nowrap; + word-wrap: normal; + overflow: hidden; + height: 18px; + line-height: 18px; + font-size: 12px; +} +.datagrid-header .datagrid-cell { + height: auto; +} +.datagrid-header .datagrid-cell span { + font-size: 12px; +} +.datagrid-cell-group { + text-align: center; + text-overflow: ellipsis; +} +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + width: 30px; + text-align: center; + margin: 0; + padding: 0; +} +.datagrid-body { + margin: 0; + padding: 0; + overflow: auto; + zoom: 1; +} +.datagrid-view1 .datagrid-body-inner { + padding-bottom: 20px; +} +.datagrid-view1 .datagrid-body { + overflow: hidden; +} +.datagrid-footer { + overflow: hidden; +} +.datagrid-footer-inner { + border-width: 1px 0 0 0; + border-style: solid; + width: 10000px; + float: left; +} +.datagrid-row-editing .datagrid-cell { + height: auto; +} +.datagrid-header-check, +.datagrid-cell-check { + padding: 0; + width: 27px; + height: 18px; + font-size: 1px; + text-align: center; + overflow: hidden; +} +.datagrid-header-check input, +.datagrid-cell-check input { + margin: 0; + padding: 0; + width: 15px; + height: 18px; +} +.datagrid-resize-proxy { + position: absolute; + width: 1px; + height: 10000px; + top: 0; + cursor: e-resize; + display: none; +} +.datagrid-body .datagrid-editable { + margin: 0; + padding: 0; +} +.datagrid-body .datagrid-editable table { + width: 100%; + height: 100%; +} +.datagrid-body .datagrid-editable td { + border: 0; + margin: 0; + padding: 0; +} +.datagrid-view .datagrid-editable-input { + margin: 0; + padding: 2px 4px; + border: 1px solid #D3D3D3; + font-size: 12px; + outline-style: none; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.datagrid-sort .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -64px center; +} +.datagrid-sort-desc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -16px center; +} +.datagrid-sort-asc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat 0px center; +} +.datagrid-row-collapse { + background: url('images/datagrid_icons.png') no-repeat -48px center; +} +.datagrid-row-expand { + background: url('images/datagrid_icons.png') no-repeat -32px center; +} +.datagrid-mask-msg { + background: #ffffff url('images/loading.gif') no-repeat scroll 5px center; +} +.datagrid-header, +.datagrid-td-rownumber { + background-color: #fafafa; + background: -webkit-linear-gradient(top,#fdfdfd 0,#f5f5f5 100%); + background: -moz-linear-gradient(top,#fdfdfd 0,#f5f5f5 100%); + background: -o-linear-gradient(top,#fdfdfd 0,#f5f5f5 100%); + background: linear-gradient(to bottom,#fdfdfd 0,#f5f5f5 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#fdfdfd,endColorstr=#f5f5f5,GradientType=0); +} +.datagrid-cell-rownumber { + color: #000000; +} +.datagrid-resize-proxy { + background: #bfbfbf; +} +.datagrid-mask { + background: #ccc; +} +.datagrid-mask-msg { + border-color: #D3D3D3; +} +.datagrid-toolbar, +.datagrid-pager { + background: #fafafa; +} +.datagrid-header, +.datagrid-toolbar, +.datagrid-pager, +.datagrid-footer-inner { + border-color: #ddd; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-color: #ccc; +} +.datagrid-htable, +.datagrid-btable, +.datagrid-ftable { + color: #000000; + border-collapse: separate; +} +.datagrid-row-alt { + background: #fafafa; +} +.datagrid-row-over, +.datagrid-header td.datagrid-header-over { + background: #e2e2e2; + color: #000000; + cursor: default; +} +.datagrid-row-selected { + background: #0092DC; + color: #fff; +} +.datagrid-row-editing .textbox, +.datagrid-row-editing .textbox-text { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.propertygrid .datagrid-view1 .datagrid-body td { + padding-bottom: 1px; + border-width: 0 1px 0 0; +} +.propertygrid .datagrid-group { + height: 21px; + overflow: hidden; + border-width: 0 0 1px 0; + border-style: solid; +} +.propertygrid .datagrid-group span { + font-weight: bold; +} +.propertygrid .datagrid-view1 .datagrid-body td { + border-color: #ddd; +} +.propertygrid .datagrid-view1 .datagrid-group { + border-color: #f3f3f3; +} +.propertygrid .datagrid-view2 .datagrid-group { + border-color: #ddd; +} +.propertygrid .datagrid-group, +.propertygrid .datagrid-view1 .datagrid-body, +.propertygrid .datagrid-view1 .datagrid-row-over, +.propertygrid .datagrid-view1 .datagrid-row-selected { + background: #f3f3f3; +} +.datalist .datagrid-header { + border-width: 0; +} +.datalist .datagrid-group, +.m-list .m-list-group { + height: 25px; + line-height: 25px; + font-weight: bold; + overflow: hidden; + background-color: #fafafa; + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ccc; +} +.datalist .datagrid-group-expander { + display: none; +} +.datalist .datagrid-group-title { + padding: 0 4px; +} +.datalist .datagrid-btable { + width: 100%; + table-layout: fixed; +} +.datalist .datagrid-row td { + border-style: solid; + border-left-color: transparent; + border-right-color: transparent; + border-bottom-width: 0; +} +.datalist-lines .datagrid-row td { + border-bottom-width: 1px; +} +.datalist .datagrid-cell, +.m-list li { + width: auto; + height: auto; + padding: 2px 4px; + line-height: 18px; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link, +.m-list li>a { + display: block; + position: relative; + cursor: pointer; + color: #000000; + text-decoration: none; + overflow: hidden; + margin: -2px -4px; + padding: 2px 4px; + padding-right: 16px; + line-height: 18px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link::after, +.m-list li>a::after { + position: absolute; + display: block; + width: 8px; + height: 8px; + content: ''; + right: 6px; + top: 50%; + margin-top: -4px; + border-style: solid; + border-width: 1px 1px 0 0; + -ms-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} +.m-list { + margin: 0; + padding: 0; + list-style: none; +} +.m-list li { + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ccc; +} +.m-list li>a:hover { + background: #e2e2e2; + color: #000000; +} +.m-list .m-list-group { + padding: 0 4px; +} +.pagination { + zoom: 1; +} +.pagination table { + float: left; + height: 30px; +} +.pagination td { + border: 0; +} +.pagination-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 3px 1px; +} +.pagination .pagination-num { + border-width: 1px; + border-style: solid; + margin: 0 2px; + padding: 2px; + width: 2em; + height: auto; +} +.pagination-page-list { + margin: 0px 6px; + padding: 1px 2px; + width: auto; + height: auto; + border-width: 1px; + border-style: solid; +} +.pagination-info { + float: right; + margin: 0 6px 0 0; + padding: 0; + height: 30px; + line-height: 30px; + font-size: 12px; +} +.pagination span { + font-size: 12px; +} +.pagination-link .l-btn-text { + width: 24px; + text-align: center; + margin: 0; +} +.pagination-first { + background: url('images/pagination_icons.png') no-repeat 0 center; +} +.pagination-prev { + background: url('images/pagination_icons.png') no-repeat -16px center; +} +.pagination-next { + background: url('images/pagination_icons.png') no-repeat -32px center; +} +.pagination-last { + background: url('images/pagination_icons.png') no-repeat -48px center; +} +.pagination-load { + background: url('images/pagination_icons.png') no-repeat -64px center; +} +.pagination-loading { + background: url('images/loading.gif') no-repeat center center; +} +.pagination-page-list, +.pagination .pagination-num { + border-color: #D3D3D3; +} +.calendar { + border-width: 1px; + border-style: solid; + padding: 1px; + overflow: hidden; +} +.calendar table { + table-layout: fixed; + border-collapse: separate; + font-size: 12px; + width: 100%; + height: 100%; +} +.calendar table td, +.calendar table th { + font-size: 12px; +} +.calendar-noborder { + border: 0; +} +.calendar-header { + position: relative; + height: 22px; +} +.calendar-title { + text-align: center; + height: 22px; +} +.calendar-title span { + position: relative; + display: inline-block; + top: 2px; + padding: 0 3px; + height: 18px; + line-height: 18px; + font-size: 12px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth, +.calendar-nextmonth, +.calendar-prevyear, +.calendar-nextyear { + position: absolute; + top: 50%; + margin-top: -7px; + width: 14px; + height: 14px; + cursor: pointer; + font-size: 1px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-prevmonth { + left: 20px; + background: url('images/calendar_arrows.png') no-repeat -18px -2px; +} +.calendar-nextmonth { + right: 20px; + background: url('images/calendar_arrows.png') no-repeat -34px -2px; +} +.calendar-prevyear { + left: 3px; + background: url('images/calendar_arrows.png') no-repeat -1px -2px; +} +.calendar-nextyear { + right: 3px; + background: url('images/calendar_arrows.png') no-repeat -49px -2px; +} +.calendar-body { + position: relative; +} +.calendar-body th, +.calendar-body td { + text-align: center; +} +.calendar-day { + border: 0; + padding: 1px; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-other-month { + opacity: 0.3; + filter: alpha(opacity=30); +} +.calendar-disabled { + opacity: 0.6; + filter: alpha(opacity=60); + cursor: default; +} +.calendar-menu { + position: absolute; + top: 0; + left: 0; + width: 180px; + height: 150px; + padding: 5px; + font-size: 12px; + display: none; + overflow: hidden; +} +.calendar-menu-year-inner { + text-align: center; + padding-bottom: 5px; +} +.calendar-menu-year { + width: 40px; + text-align: center; + border-width: 1px; + border-style: solid; + margin: 0; + padding: 2px; + font-weight: bold; + font-size: 12px; +} +.calendar-menu-prev, +.calendar-menu-next { + display: inline-block; + width: 21px; + height: 21px; + vertical-align: top; + cursor: pointer; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-menu-prev { + margin-right: 10px; + background: url('images/calendar_arrows.png') no-repeat 2px 2px; +} +.calendar-menu-next { + margin-left: 10px; + background: url('images/calendar_arrows.png') no-repeat -45px 2px; +} +.calendar-menu-month { + text-align: center; + cursor: pointer; + font-weight: bold; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.calendar-body th, +.calendar-menu-month { + color: #4d4d4d; +} +.calendar-day { + color: #000000; +} +.calendar-sunday { + color: #CC2222; +} +.calendar-saturday { + color: #00ee00; +} +.calendar-today { + color: #0000ff; +} +.calendar-menu-year { + border-color: #D3D3D3; +} +.calendar { + border-color: #D3D3D3; +} +.calendar-header { + background: #f3f3f3; +} +.calendar-body, +.calendar-menu { + background: #ffffff; +} +.calendar-body th { + background: #fafafa; + padding: 2px 0; +} +.calendar-hover, +.calendar-nav-hover, +.calendar-menu-hover { + background-color: #e2e2e2; + color: #000000; +} +.calendar-hover { + border: 1px solid #ccc; + padding: 0; +} +.calendar-selected { + background-color: #0092DC; + color: #fff; + border: 1px solid #0070a9; + padding: 0; +} +.datebox-calendar-inner { + height: 180px; +} +.datebox-button { + height: 18px; + padding: 2px 5px; + text-align: center; +} +.datebox-button a { + font-size: 12px; + font-weight: bold; + text-decoration: none; + opacity: 0.6; + filter: alpha(opacity=60); +} +.datebox-button a:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.datebox-current, +.datebox-close { + float: left; +} +.datebox-close { + float: right; +} +.datebox .combo-arrow { + background-image: url('images/datebox_arrow.png'); + background-position: center center; +} +.datebox-button { + background-color: #fafafa; +} +.datebox-button a { + color: #444; +} +.numberbox { + border: 1px solid #D3D3D3; + margin: 0; + padding: 0 2px; + vertical-align: middle; +} +.textbox { + padding: 0; +} +.spinner { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.spinner .spinner-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0 2px; + vertical-align: baseline; +} +.spinner-arrow { + background-color: #f3f3f3; + display: inline-block; + overflow: hidden; + vertical-align: top; + margin: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + width: 18px; +} +.spinner-arrow-up, +.spinner-arrow-down { + opacity: 0.6; + filter: alpha(opacity=60); + display: block; + font-size: 1px; + width: 18px; + height: 10px; + width: 100%; + height: 50%; + color: #444; + outline-style: none; +} +.spinner-arrow-hover { + background-color: #e2e2e2; + opacity: 1.0; + filter: alpha(opacity=100); +} +.spinner-arrow-up:hover, +.spinner-arrow-down:hover { + opacity: 1.0; + filter: alpha(opacity=100); + background-color: #e2e2e2; +} +.textbox-icon-disabled .spinner-arrow-up:hover, +.textbox-icon-disabled .spinner-arrow-down:hover { + opacity: 0.6; + filter: alpha(opacity=60); + background-color: #f3f3f3; + cursor: default; +} +.spinner .textbox-icon-disabled { + opacity: 0.6; + filter: alpha(opacity=60); +} +.spinner-arrow-up { + background: url('images/spinner_arrows.png') no-repeat 1px center; +} +.spinner-arrow-down { + background: url('images/spinner_arrows.png') no-repeat -15px center; +} +.spinner { + border-color: #D3D3D3; +} +.progressbar { + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + overflow: hidden; + position: relative; +} +.progressbar-text { + text-align: center; + position: absolute; +} +.progressbar-value { + position: relative; + overflow: hidden; + width: 0; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.progressbar { + border-color: #D3D3D3; +} +.progressbar-text { + color: #000000; + font-size: 12px; +} +.progressbar-value .progressbar-text { + background-color: #0092DC; + color: #fff; +} +.searchbox { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.searchbox .searchbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 0 2px; + vertical-align: top; +} +.searchbox .searchbox-prompt { + font-size: 12px; + color: #ccc; +} +.searchbox-button { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.searchbox-button-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.searchbox .l-btn-plain { + border: 0; + padding: 0; + vertical-align: top; + opacity: 0.6; + filter: alpha(opacity=60); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .l-btn-plain:hover { + border: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox a.m-btn-plain-active { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .m-btn-active { + border-width: 0 1px 0 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .textbox-button-right { + border-width: 0 0 0 1px; +} +.searchbox .textbox-button-left { + border-width: 0 1px 0 0; +} +.searchbox-button { + background: url('images/searchbox_button.png') no-repeat center center; +} +.searchbox { + border-color: #D3D3D3; + background-color: #fff; +} +.searchbox .l-btn-plain { + background: #f3f3f3; +} +.searchbox .l-btn-plain-disabled, +.searchbox .l-btn-plain-disabled:hover { + opacity: 0.5; + filter: alpha(opacity=50); +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} +.slider-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.slider-h { + height: 22px; +} +.slider-v { + width: 22px; +} +.slider-inner { + position: relative; + height: 6px; + top: 7px; + border-width: 1px; + border-style: solid; + border-radius: 5px; +} +.slider-handle { + position: absolute; + display: block; + outline: none; + width: 20px; + height: 20px; + top: 50%; + margin-top: -10px; + margin-left: -10px; +} +.slider-tip { + position: absolute; + display: inline-block; + line-height: 12px; + font-size: 12px; + white-space: nowrap; + top: -22px; +} +.slider-rule { + position: relative; + top: 15px; +} +.slider-rule span { + position: absolute; + display: inline-block; + font-size: 0; + height: 5px; + border-width: 0 0 0 1px; + border-style: solid; +} +.slider-rulelabel { + position: relative; + top: 20px; +} +.slider-rulelabel span { + position: absolute; + display: inline-block; + font-size: 12px; +} +.slider-v .slider-inner { + width: 6px; + left: 7px; + top: 0; + float: left; +} +.slider-v .slider-handle { + left: 50%; + margin-top: -10px; +} +.slider-v .slider-tip { + left: -10px; + margin-top: -6px; +} +.slider-v .slider-rule { + float: left; + top: 0; + left: 16px; +} +.slider-v .slider-rule span { + width: 5px; + height: 'auto'; + border-left: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.slider-v .slider-rulelabel { + float: left; + top: 0; + left: 23px; +} +.slider-handle { + background: url('images/slider_handle.png') no-repeat; +} +.slider-inner { + border-color: #D3D3D3; + background: #f3f3f3; +} +.slider-rule span { + border-color: #D3D3D3; +} +.slider-rulelabel span { + color: #000000; +} +.menu { + position: absolute; + margin: 0; + padding: 2px; + border-width: 1px; + border-style: solid; + overflow: hidden; +} +.menu-inline { + position: relative; +} +.menu-item { + position: relative; + margin: 0; + padding: 0; + overflow: hidden; + white-space: nowrap; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.menu-text { + height: 20px; + line-height: 20px; + float: left; + padding-left: 28px; +} +.menu-icon { + position: absolute; + width: 16px; + height: 16px; + left: 2px; + top: 50%; + margin-top: -8px; +} +.menu-rightarrow { + position: absolute; + width: 16px; + height: 16px; + right: 0; + top: 50%; + margin-top: -8px; +} +.menu-line { + position: absolute; + left: 26px; + top: 0; + height: 2000px; + font-size: 1px; +} +.menu-sep { + margin: 3px 0px 3px 25px; + font-size: 1px; +} +.menu-noline .menu-line { + display: none; +} +.menu-noline .menu-sep { + margin-left: 0; + margin-right: 0; +} +.menu-active { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.menu-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default; +} +.menu-text, +.menu-text span { + font-size: 12px; +} +.menu-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + background: #ccc; + -moz-box-shadow: 2px 2px 3px #cccccc; + -webkit-box-shadow: 2px 2px 3px #cccccc; + box-shadow: 2px 2px 3px #cccccc; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.menu-rightarrow { + background: url('images/menu_arrows.png') no-repeat -32px center; +} +.menu-line { + border-left: 1px solid #ccc; + border-right: 1px solid #fff; +} +.menu-sep { + border-top: 1px solid #ccc; + border-bottom: 1px solid #fff; +} +.menu { + background-color: #f3f3f3; + border-color: #D3D3D3; + color: #444; +} +.menu-content { + background: #ffffff; +} +.menu-item { + border-color: transparent; + _border-color: #f3f3f3; +} +.menu-active { + border-color: #ccc; + color: #000000; + background: #e2e2e2; +} +.menu-active-disabled { + border-color: transparent; + background: transparent; + color: #444; +} +.m-btn-downarrow, +.s-btn-downarrow { + display: inline-block; + position: absolute; + width: 16px; + height: 16px; + font-size: 1px; + right: 0; + top: 50%; + margin-top: -8px; +} +.m-btn-active, +.s-btn-active { + background: #e2e2e2; + color: #000000; + border: 1px solid #ccc; + filter: none; +} +.m-btn-plain-active, +.s-btn-plain-active { + background: transparent; + padding: 0; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.m-btn .l-btn-left .l-btn-text { + margin-right: 20px; +} +.m-btn .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.m-btn .l-btn-icon-right .l-btn-icon { + right: 20px; +} +.m-btn .l-btn-icon-top .l-btn-text { + margin-right: 4px; + margin-bottom: 14px; +} +.m-btn .l-btn-icon-bottom .l-btn-text { + margin-right: 4px; + margin-bottom: 34px; +} +.m-btn .l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 20px; +} +.m-btn .l-btn-icon-top .m-btn-downarrow, +.m-btn .l-btn-icon-bottom .m-btn-downarrow { + top: auto; + bottom: 0px; + left: 50%; + margin-left: -8px; +} +.m-btn-line { + display: inline-block; + position: absolute; + font-size: 1px; + display: none; +} +.m-btn .l-btn-left .m-btn-line { + right: 0; + width: 16px; + height: 500px; + border-style: solid; + border-color: #bfbfbf; + border-width: 0 0 0 1px; +} +.m-btn .l-btn-icon-top .m-btn-line, +.m-btn .l-btn-icon-bottom .m-btn-line { + left: 0; + bottom: 0; + width: 500px; + height: 16px; + border-width: 1px 0 0 0; +} +.m-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 56px; +} +.m-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 50px; +} +.m-btn-downarrow, +.s-btn-downarrow { + background: url('images/menu_arrows.png') no-repeat 0 center; +} +.m-btn-plain-active, +.s-btn-plain-active { + border-color: #ccc; + background-color: #e2e2e2; + color: #000000; +} +.s-btn:hover .m-btn-line, +.s-btn-active .m-btn-line, +.s-btn-plain-active .m-btn-line { + display: inline-block; +} +.l-btn:hover .s-btn-downarrow, +.s-btn-active .s-btn-downarrow, +.s-btn-plain-active .s-btn-downarrow { + border-style: solid; + border-color: #bfbfbf; + border-width: 0 0 0 1px; +} +.messager-body { + padding: 10px; + overflow: auto; +} +.messager-button { + text-align: center; + padding: 5px; +} +.messager-button .l-btn { + width: 70px; +} +.messager-icon { + float: left; + width: 32px; + height: 32px; + margin: 0 10px 10px 0; +} +.messager-error { + background: url('images/messager_icons.png') no-repeat scroll -64px 0; +} +.messager-info { + background: url('images/messager_icons.png') no-repeat scroll 0 0; +} +.messager-question { + background: url('images/messager_icons.png') no-repeat scroll -32px 0; +} +.messager-warning { + background: url('images/messager_icons.png') no-repeat scroll -96px 0; +} +.messager-progress { + padding: 10px; +} +.messager-p-msg { + margin-bottom: 5px; +} +.messager-body .messager-input { + width: 100%; + padding: 1px 0; + border: 1px solid #D3D3D3; +} +.tree { + margin: 0; + padding: 0; + list-style-type: none; +} +.tree li { + white-space: nowrap; +} +.tree li ul { + list-style-type: none; + margin: 0; + padding: 0; +} +.tree-node { + height: 18px; + white-space: nowrap; + cursor: pointer; +} +.tree-hit { + cursor: pointer; +} +.tree-expanded, +.tree-collapsed, +.tree-folder, +.tree-file, +.tree-checkbox, +.tree-indent { + display: inline-block; + width: 16px; + height: 18px; + vertical-align: top; + overflow: hidden; +} +.tree-expanded { + background: url('images/tree_icons.png') no-repeat -18px 0px; +} +.tree-expanded-hover { + background: url('images/tree_icons.png') no-repeat -50px 0px; +} +.tree-collapsed { + background: url('images/tree_icons.png') no-repeat 0px 0px; +} +.tree-collapsed-hover { + background: url('images/tree_icons.png') no-repeat -32px 0px; +} +.tree-lines .tree-expanded, +.tree-lines .tree-root-first .tree-expanded { + background: url('images/tree_icons.png') no-repeat -144px 0; +} +.tree-lines .tree-collapsed, +.tree-lines .tree-root-first .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -128px 0; +} +.tree-lines .tree-node-last .tree-expanded, +.tree-lines .tree-root-one .tree-expanded { + background: url('images/tree_icons.png') no-repeat -80px 0; +} +.tree-lines .tree-node-last .tree-collapsed, +.tree-lines .tree-root-one .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -64px 0; +} +.tree-line { + background: url('images/tree_icons.png') no-repeat -176px 0; +} +.tree-join { + background: url('images/tree_icons.png') no-repeat -192px 0; +} +.tree-joinbottom { + background: url('images/tree_icons.png') no-repeat -160px 0; +} +.tree-folder { + background: url('images/tree_icons.png') no-repeat -208px 0; +} +.tree-folder-open { + background: url('images/tree_icons.png') no-repeat -224px 0; +} +.tree-file { + background: url('images/tree_icons.png') no-repeat -240px 0; +} +.tree-loading { + background: url('images/loading.gif') no-repeat center center; +} +.tree-checkbox0 { + background: url('images/tree_icons.png') no-repeat -208px -18px; +} +.tree-checkbox1 { + background: url('images/tree_icons.png') no-repeat -224px -18px; +} +.tree-checkbox2 { + background: url('images/tree_icons.png') no-repeat -240px -18px; +} +.tree-title { + font-size: 12px; + display: inline-block; + text-decoration: none; + vertical-align: top; + white-space: nowrap; + padding: 0 2px; + height: 18px; + line-height: 18px; +} +.tree-node-proxy { + font-size: 12px; + line-height: 20px; + padding: 0 2px 0 20px; + border-width: 1px; + border-style: solid; + z-index: 9900000; +} +.tree-dnd-icon { + display: inline-block; + position: absolute; + width: 16px; + height: 18px; + left: 2px; + top: 50%; + margin-top: -9px; +} +.tree-dnd-yes { + background: url('images/tree_icons.png') no-repeat -256px 0; +} +.tree-dnd-no { + background: url('images/tree_icons.png') no-repeat -256px -18px; +} +.tree-node-top { + border-top: 1px dotted red; +} +.tree-node-bottom { + border-bottom: 1px dotted red; +} +.tree-node-append .tree-title { + border: 1px dotted red; +} +.tree-editor { + border: 1px solid #ccc; + font-size: 12px; + height: 14px !important; + height: 18px; + line-height: 14px; + padding: 1px 2px; + width: 80px; + position: absolute; + top: 0; +} +.tree-node-proxy { + background-color: #ffffff; + color: #000000; + border-color: #D3D3D3; +} +.tree-node-hover { + background: #e2e2e2; + color: #000000; +} +.tree-node-selected { + background: #0092DC; + color: #fff; +} +.tree-node-hidden { + display: none; +} +.validatebox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; + color: #000; +} +.tooltip { + position: absolute; + display: none; + z-index: 9900000; + outline: none; + opacity: 1; + filter: alpha(opacity=100); + padding: 5px; + border-width: 1px; + border-style: solid; + border-radius: 5px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tooltip-content { + font-size: 12px; +} +.tooltip-arrow-outer, +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + line-height: 0; + font-size: 0; + border-style: solid; + border-width: 6px; + border-color: transparent; + _border-color: tomato; + _filter: chroma(color=tomato); +} +.tooltip-arrow { + display: none \9; +} +.tooltip-right .tooltip-arrow-outer { + left: 0; + top: 50%; + margin: -6px 0 0 -13px; +} +.tooltip-right .tooltip-arrow { + left: 0; + top: 50%; + margin: -6px 0 0 -12px; +} +.tooltip-left .tooltip-arrow-outer { + right: 0; + top: 50%; + margin: -6px -13px 0 0; +} +.tooltip-left .tooltip-arrow { + right: 0; + top: 50%; + margin: -6px -12px 0 0; +} +.tooltip-top .tooltip-arrow-outer { + bottom: 0; + left: 50%; + margin: 0 0 -13px -6px; +} +.tooltip-top .tooltip-arrow { + bottom: 0; + left: 50%; + margin: 0 0 -12px -6px; +} +.tooltip-bottom .tooltip-arrow-outer { + top: 0; + left: 50%; + margin: -13px 0 0 -6px; +} +.tooltip-bottom .tooltip-arrow { + top: 0; + left: 50%; + margin: -12px 0 0 -6px; +} +.tooltip { + background-color: #ffffff; + border-color: #D3D3D3; + color: #000000; +} +.tooltip-right .tooltip-arrow-outer { + border-right-color: #D3D3D3; +} +.tooltip-right .tooltip-arrow { + border-right-color: #ffffff; +} +.tooltip-left .tooltip-arrow-outer { + border-left-color: #D3D3D3; +} +.tooltip-left .tooltip-arrow { + border-left-color: #ffffff; +} +.tooltip-top .tooltip-arrow-outer { + border-top-color: #D3D3D3; +} +.tooltip-top .tooltip-arrow { + border-top-color: #ffffff; +} +.tooltip-bottom .tooltip-arrow-outer { + border-bottom-color: #D3D3D3; +} +.tooltip-bottom .tooltip-arrow { + border-bottom-color: #ffffff; +} +.switchbutton { + text-decoration: none; + display: inline-block; + overflow: hidden; + vertical-align: middle; + margin: 0; + padding: 0; + cursor: pointer; + background: #bbb; + border: 1px solid #bbb; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-inner { + display: inline-block; + overflow: hidden; + position: relative; + top: -1px; + left: -1px; +} +.switchbutton-on, +.switchbutton-off, +.switchbutton-handle { + display: inline-block; + text-align: center; + height: 100%; + float: left; + font-size: 12px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-on { + background: #0092DC; + color: #fff; +} +.switchbutton-off { + background-color: #ffffff; + color: #000000; +} +.switchbutton-on, +.switchbutton-reversed .switchbutton-off { + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.switchbutton-off, +.switchbutton-reversed .switchbutton-on { + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.switchbutton-handle { + position: absolute; + top: 0; + left: 50%; + background-color: #ffffff; + color: #000000; + border: 1px solid #bbb; + -moz-box-shadow: 0 0 3px 0 #bbb; + -webkit-box-shadow: 0 0 3px 0 #bbb; + box-shadow: 0 0 3px 0 #bbb; +} +.switchbutton-value { + position: absolute; + top: 0; + left: -5000px; +} +.switchbutton-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.switchbutton-disabled, +.switchbutton-readonly { + cursor: default; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/filebox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/filebox.css new file mode 100644 index 0000000..c6bac66 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/filebox.css @@ -0,0 +1,20 @@ +.filebox .textbox-value { + vertical-align: top; + position: absolute; + top: 0; + left: -5000px; +} +.filebox-label { + display: inline-block; + position: absolute; + width: 100%; + height: 100%; + cursor: pointer; + left: 0; + top: 0; + z-index: 10; + background: url('images/blank.gif') no-repeat; +} +.l-btn-disabled .filebox-label { + cursor: default; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/accordion_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/accordion_arrows.png new file mode 100644 index 0000000..a0b8769 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/accordion_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/blank.gif b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/blank.gif new file mode 100644 index 0000000..1d11fa9 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/blank.gif differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/calendar_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/calendar_arrows.png new file mode 100644 index 0000000..430c4ad Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/calendar_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/combo_arrow.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/combo_arrow.png new file mode 100644 index 0000000..04f4ba0 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/combo_arrow.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/datagrid_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/datagrid_icons.png new file mode 100644 index 0000000..66b8343 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/datagrid_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/datebox_arrow.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/datebox_arrow.png new file mode 100644 index 0000000..783c833 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/datebox_arrow.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/layout_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/layout_arrows.png new file mode 100644 index 0000000..bf7929f Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/layout_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/linkbutton_bg.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/linkbutton_bg.png new file mode 100644 index 0000000..fc66bd2 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/linkbutton_bg.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/loading.gif b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/loading.gif new file mode 100644 index 0000000..68f01d0 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/loading.gif differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/menu_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/menu_arrows.png new file mode 100644 index 0000000..b986842 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/menu_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/messager_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/messager_icons.png new file mode 100644 index 0000000..62c18c1 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/messager_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/pagination_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/pagination_icons.png new file mode 100644 index 0000000..e0f1b07 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/pagination_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/panel_tools.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/panel_tools.png new file mode 100644 index 0000000..f33f8c9 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/panel_tools.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/searchbox_button.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/searchbox_button.png new file mode 100644 index 0000000..6dd1931 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/searchbox_button.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/slider_handle.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/slider_handle.png new file mode 100644 index 0000000..b9802ba Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/slider_handle.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/spinner_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/spinner_arrows.png new file mode 100644 index 0000000..dba62bb Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/spinner_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/tabs_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/tabs_icons.png new file mode 100644 index 0000000..dfa10f7 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/tabs_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/tree_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/tree_icons.png new file mode 100644 index 0000000..e9be4f3 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/tree_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/validatebox_warning.png b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/validatebox_warning.png new file mode 100644 index 0000000..2b3d4f0 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/images/validatebox_warning.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/layout.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/layout.css new file mode 100644 index 0000000..da363ce --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/layout.css @@ -0,0 +1,133 @@ +.layout { + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + z-index: 0; +} +.layout-panel { + position: absolute; + overflow: hidden; +} +.layout-body { + min-width: 1px; + min-height: 1px; +} +.layout-panel-east, +.layout-panel-west { + z-index: 2; +} +.layout-panel-north, +.layout-panel-south { + z-index: 3; +} +.layout-expand { + position: absolute; + padding: 0px; + font-size: 1px; + cursor: pointer; + z-index: 1; +} +.layout-expand .panel-header, +.layout-expand .panel-body { + background: transparent; + filter: none; + overflow: hidden; +} +.layout-expand .panel-header { + border-bottom-width: 0px; +} +.layout-expand .panel-body { + position: relative; +} +.layout-expand .panel-body .panel-icon { + margin-top: 0; + top: 0; + left: 50%; + margin-left: -8px; +} +.layout-expand-west .panel-header .panel-icon, +.layout-expand-east .panel-header .panel-icon { + display: none; +} +.layout-expand-title { + position: absolute; + top: 0; + left: 21px; + white-space: nowrap; + word-wrap: normal; + -webkit-transform: rotate(90deg); + -webkit-transform-origin: 0 0; + -moz-transform: rotate(90deg); + -moz-transform-origin: 0 0; + -o-transform: rotate(90deg); + -o-transform-origin: 0 0; + transform: rotate(90deg); + transform-origin: 0 0; +} +.layout-expand-with-icon { + top: 18px; +} +.layout-expand .panel-body-noheader .layout-expand-title, +.layout-expand .panel-body-noheader .panel-icon { + top: 5px; +} +.layout-expand .panel-body-noheader .layout-expand-with-icon { + top: 23px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + position: absolute; + font-size: 1px; + display: none; + z-index: 5; +} +.layout-split-proxy-h { + width: 5px; + cursor: e-resize; +} +.layout-split-proxy-v { + height: 5px; + cursor: n-resize; +} +.layout-mask { + position: absolute; + background: #fafafa; + filter: alpha(opacity=10); + opacity: 0.10; + z-index: 4; +} +.layout-button-up { + background: url('images/layout_arrows.png') no-repeat -16px -16px; +} +.layout-button-down { + background: url('images/layout_arrows.png') no-repeat -16px 0; +} +.layout-button-left { + background: url('images/layout_arrows.png') no-repeat 0 0; +} +.layout-button-right { + background: url('images/layout_arrows.png') no-repeat 0 -16px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + background-color: #bfbfbf; +} +.layout-split-north { + border-bottom: 5px solid #efefef; +} +.layout-split-south { + border-top: 5px solid #efefef; +} +.layout-split-east { + border-left: 5px solid #efefef; +} +.layout-split-west { + border-right: 5px solid #efefef; +} +.layout-expand { + background-color: #f3f3f3; +} +.layout-expand-over { + background-color: #f3f3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/linkbutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/linkbutton.css new file mode 100644 index 0000000..53280e6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/linkbutton.css @@ -0,0 +1,203 @@ +.l-btn { + text-decoration: none; + display: inline-block; + overflow: hidden; + margin: 0; + padding: 0; + cursor: pointer; + outline: none; + text-align: center; + vertical-align: middle; + line-height: normal; +} +.l-btn-plain { + border-width: 0; + padding: 1px; +} +.l-btn-left { + display: inline-block; + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + vertical-align: top; +} +.l-btn-text { + display: inline-block; + vertical-align: top; + width: auto; + line-height: 24px; + font-size: 12px; + padding: 0; + margin: 0 4px; +} +.l-btn-icon { + display: inline-block; + width: 16px; + height: 16px; + line-height: 16px; + position: absolute; + top: 50%; + margin-top: -8px; + font-size: 1px; +} +.l-btn span span .l-btn-empty { + display: inline-block; + margin: 0; + width: 16px; + height: 24px; + font-size: 1px; + vertical-align: top; +} +.l-btn span .l-btn-icon-left { + padding: 0 0 0 20px; + background-position: left center; +} +.l-btn span .l-btn-icon-right { + padding: 0 20px 0 0; + background-position: right center; +} +.l-btn-icon-left .l-btn-text { + margin: 0 4px 0 24px; +} +.l-btn-icon-left .l-btn-icon { + left: 4px; +} +.l-btn-icon-right .l-btn-text { + margin: 0 24px 0 4px; +} +.l-btn-icon-right .l-btn-icon { + right: 4px; +} +.l-btn-icon-top .l-btn-text { + margin: 20px 4px 0 4px; +} +.l-btn-icon-top .l-btn-icon { + top: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-icon-bottom .l-btn-text { + margin: 0 4px 20px 4px; +} +.l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-left .l-btn-empty { + margin: 0 4px; + width: 16px; +} +.l-btn-plain:hover { + padding: 0; +} +.l-btn-focus { + outline: #0000FF dotted thin; +} +.l-btn-large .l-btn-text { + line-height: 40px; +} +.l-btn-large .l-btn-icon { + width: 32px; + height: 32px; + line-height: 32px; + margin-top: -16px; +} +.l-btn-large .l-btn-icon-left .l-btn-text { + margin-left: 40px; +} +.l-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.l-btn-large .l-btn-icon-top .l-btn-text { + margin-top: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-top .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-left .l-btn-empty { + margin: 0 4px; + width: 32px; +} +.l-btn { + color: #444; + background: #fafafa; + background-repeat: repeat-x; + border: 1px solid #bbb; + background: -webkit-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -moz-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -o-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: linear-gradient(to bottom,#ffffff 0,#eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#eeeeee,GradientType=0); + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn:hover { + background: #e2e2e2; + color: #000000; + border: 1px solid #ccc; + filter: none; +} +.l-btn-plain { + background: transparent; + border-width: 0; + filter: none; +} +.l-btn-outline { + border-width: 1px; + border-color: #ccc; + padding: 0; +} +.l-btn-plain:hover { + background: #e2e2e2; + color: #000000; + border: 1px solid #ccc; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.l-btn-disabled, +.l-btn-disabled:hover { + opacity: 0.5; + cursor: default; + background: #fafafa; + color: #444; + background: -webkit-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -moz-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: -o-linear-gradient(top,#ffffff 0,#eeeeee 100%); + background: linear-gradient(to bottom,#ffffff 0,#eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#eeeeee,GradientType=0); +} +.l-btn-disabled .l-btn-text, +.l-btn-disabled .l-btn-icon { + filter: alpha(opacity=50); +} +.l-btn-plain-disabled, +.l-btn-plain-disabled:hover { + background: transparent; + filter: alpha(opacity=50); +} +.l-btn-selected, +.l-btn-selected:hover { + background: #ddd; + filter: none; +} +.l-btn-plain-selected, +.l-btn-plain-selected:hover { + background: #ddd; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/menu.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/menu.css new file mode 100644 index 0000000..72ca080 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/menu.css @@ -0,0 +1,119 @@ +.menu { + position: absolute; + margin: 0; + padding: 2px; + border-width: 1px; + border-style: solid; + overflow: hidden; +} +.menu-inline { + position: relative; +} +.menu-item { + position: relative; + margin: 0; + padding: 0; + overflow: hidden; + white-space: nowrap; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.menu-text { + height: 20px; + line-height: 20px; + float: left; + padding-left: 28px; +} +.menu-icon { + position: absolute; + width: 16px; + height: 16px; + left: 2px; + top: 50%; + margin-top: -8px; +} +.menu-rightarrow { + position: absolute; + width: 16px; + height: 16px; + right: 0; + top: 50%; + margin-top: -8px; +} +.menu-line { + position: absolute; + left: 26px; + top: 0; + height: 2000px; + font-size: 1px; +} +.menu-sep { + margin: 3px 0px 3px 25px; + font-size: 1px; +} +.menu-noline .menu-line { + display: none; +} +.menu-noline .menu-sep { + margin-left: 0; + margin-right: 0; +} +.menu-active { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.menu-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default; +} +.menu-text, +.menu-text span { + font-size: 12px; +} +.menu-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + background: #ccc; + -moz-box-shadow: 2px 2px 3px #cccccc; + -webkit-box-shadow: 2px 2px 3px #cccccc; + box-shadow: 2px 2px 3px #cccccc; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.menu-rightarrow { + background: url('images/menu_arrows.png') no-repeat -32px center; +} +.menu-line { + border-left: 1px solid #ccc; + border-right: 1px solid #fff; +} +.menu-sep { + border-top: 1px solid #ccc; + border-bottom: 1px solid #fff; +} +.menu { + background-color: #f3f3f3; + border-color: #D3D3D3; + color: #444; +} +.menu-content { + background: #ffffff; +} +.menu-item { + border-color: transparent; + _border-color: #f3f3f3; +} +.menu-active { + border-color: #ccc; + color: #000000; + background: #e2e2e2; +} +.menu-active-disabled { + border-color: transparent; + background: transparent; + color: #444; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/menubutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/menubutton.css new file mode 100644 index 0000000..f5732d5 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/menubutton.css @@ -0,0 +1,94 @@ +.m-btn-downarrow, +.s-btn-downarrow { + display: inline-block; + position: absolute; + width: 16px; + height: 16px; + font-size: 1px; + right: 0; + top: 50%; + margin-top: -8px; +} +.m-btn-active, +.s-btn-active { + background: #e2e2e2; + color: #000000; + border: 1px solid #ccc; + filter: none; +} +.m-btn-plain-active, +.s-btn-plain-active { + background: transparent; + padding: 0; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.m-btn .l-btn-left .l-btn-text { + margin-right: 20px; +} +.m-btn .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.m-btn .l-btn-icon-right .l-btn-icon { + right: 20px; +} +.m-btn .l-btn-icon-top .l-btn-text { + margin-right: 4px; + margin-bottom: 14px; +} +.m-btn .l-btn-icon-bottom .l-btn-text { + margin-right: 4px; + margin-bottom: 34px; +} +.m-btn .l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 20px; +} +.m-btn .l-btn-icon-top .m-btn-downarrow, +.m-btn .l-btn-icon-bottom .m-btn-downarrow { + top: auto; + bottom: 0px; + left: 50%; + margin-left: -8px; +} +.m-btn-line { + display: inline-block; + position: absolute; + font-size: 1px; + display: none; +} +.m-btn .l-btn-left .m-btn-line { + right: 0; + width: 16px; + height: 500px; + border-style: solid; + border-color: #bfbfbf; + border-width: 0 0 0 1px; +} +.m-btn .l-btn-icon-top .m-btn-line, +.m-btn .l-btn-icon-bottom .m-btn-line { + left: 0; + bottom: 0; + width: 500px; + height: 16px; + border-width: 1px 0 0 0; +} +.m-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 56px; +} +.m-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 50px; +} +.m-btn-downarrow, +.s-btn-downarrow { + background: url('images/menu_arrows.png') no-repeat 0 center; +} +.m-btn-plain-active, +.s-btn-plain-active { + border-color: #ccc; + background-color: #e2e2e2; + color: #000000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/messager.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/messager.css new file mode 100644 index 0000000..d4ff888 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/messager.css @@ -0,0 +1,40 @@ +.messager-body { + padding: 10px; + overflow: auto; +} +.messager-button { + text-align: center; + padding: 5px; +} +.messager-button .l-btn { + width: 70px; +} +.messager-icon { + float: left; + width: 32px; + height: 32px; + margin: 0 10px 10px 0; +} +.messager-error { + background: url('images/messager_icons.png') no-repeat scroll -64px 0; +} +.messager-info { + background: url('images/messager_icons.png') no-repeat scroll 0 0; +} +.messager-question { + background: url('images/messager_icons.png') no-repeat scroll -32px 0; +} +.messager-warning { + background: url('images/messager_icons.png') no-repeat scroll -96px 0; +} +.messager-progress { + padding: 10px; +} +.messager-p-msg { + margin-bottom: 5px; +} +.messager-body .messager-input { + width: 100%; + padding: 1px 0; + border: 1px solid #D3D3D3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/numberbox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/numberbox.css new file mode 100644 index 0000000..ef92d17 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/numberbox.css @@ -0,0 +1,9 @@ +.numberbox { + border: 1px solid #D3D3D3; + margin: 0; + padding: 0 2px; + vertical-align: middle; +} +.textbox { + padding: 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/pagination.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/pagination.css new file mode 100644 index 0000000..ac691ed --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/pagination.css @@ -0,0 +1,71 @@ +.pagination { + zoom: 1; +} +.pagination table { + float: left; + height: 30px; +} +.pagination td { + border: 0; +} +.pagination-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ccc; + border-right: 1px solid #fff; + margin: 3px 1px; +} +.pagination .pagination-num { + border-width: 1px; + border-style: solid; + margin: 0 2px; + padding: 2px; + width: 2em; + height: auto; +} +.pagination-page-list { + margin: 0px 6px; + padding: 1px 2px; + width: auto; + height: auto; + border-width: 1px; + border-style: solid; +} +.pagination-info { + float: right; + margin: 0 6px 0 0; + padding: 0; + height: 30px; + line-height: 30px; + font-size: 12px; +} +.pagination span { + font-size: 12px; +} +.pagination-link .l-btn-text { + width: 24px; + text-align: center; + margin: 0; +} +.pagination-first { + background: url('images/pagination_icons.png') no-repeat 0 center; +} +.pagination-prev { + background: url('images/pagination_icons.png') no-repeat -16px center; +} +.pagination-next { + background: url('images/pagination_icons.png') no-repeat -32px center; +} +.pagination-last { + background: url('images/pagination_icons.png') no-repeat -48px center; +} +.pagination-load { + background: url('images/pagination_icons.png') no-repeat -64px center; +} +.pagination-loading { + background: url('images/loading.gif') no-repeat center center; +} +.pagination-page-list, +.pagination .pagination-num { + border-color: #D3D3D3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/panel.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/panel.css new file mode 100644 index 0000000..fa41aaa --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/panel.css @@ -0,0 +1,142 @@ +.panel { + overflow: hidden; + text-align: left; + margin: 0; + border: 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.panel-header, +.panel-body { + border-width: 1px; + border-style: solid; +} +.panel-header { + padding: 5px; + position: relative; +} +.panel-title { + background: url('images/blank.gif') no-repeat; +} +.panel-header-noborder { + border-width: 0 0 1px 0; +} +.panel-body { + overflow: auto; + border-top-width: 0; + padding: 0; +} +.panel-body-noheader { + border-top-width: 1px; +} +.panel-body-noborder { + border-width: 0px; +} +.panel-body-nobottom { + border-bottom-width: 0; +} +.panel-with-icon { + padding-left: 18px; +} +.panel-icon, +.panel-tool { + position: absolute; + top: 50%; + margin-top: -8px; + height: 16px; + overflow: hidden; +} +.panel-icon { + left: 5px; + width: 16px; +} +.panel-tool { + right: 5px; + width: auto; +} +.panel-tool a { + display: inline-block; + width: 16px; + height: 16px; + opacity: 0.6; + filter: alpha(opacity=60); + margin: 0 0 0 2px; + vertical-align: top; +} +.panel-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + background-color: #e2e2e2; + -moz-border-radius: 3px 3px 3px 3px; + -webkit-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; +} +.panel-loading { + padding: 11px 0px 10px 30px; +} +.panel-noscroll { + overflow: hidden; +} +.panel-fit, +.panel-fit body { + height: 100%; + margin: 0; + padding: 0; + border: 0; + overflow: hidden; +} +.panel-loading { + background: url('images/loading.gif') no-repeat 10px 10px; +} +.panel-tool-close { + background: url('images/panel_tools.png') no-repeat -16px 0px; +} +.panel-tool-min { + background: url('images/panel_tools.png') no-repeat 0px 0px; +} +.panel-tool-max { + background: url('images/panel_tools.png') no-repeat 0px -16px; +} +.panel-tool-restore { + background: url('images/panel_tools.png') no-repeat -16px -16px; +} +.panel-tool-collapse { + background: url('images/panel_tools.png') no-repeat -32px 0; +} +.panel-tool-expand { + background: url('images/panel_tools.png') no-repeat -32px -16px; +} +.panel-header, +.panel-body { + border-color: #D3D3D3; +} +.panel-header { + background-color: #f3f3f3; + background: -webkit-linear-gradient(top,#F8F8F8 0,#eeeeee 100%); + background: -moz-linear-gradient(top,#F8F8F8 0,#eeeeee 100%); + background: -o-linear-gradient(top,#F8F8F8 0,#eeeeee 100%); + background: linear-gradient(to bottom,#F8F8F8 0,#eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#F8F8F8,endColorstr=#eeeeee,GradientType=0); +} +.panel-body { + background-color: #ffffff; + color: #000000; + font-size: 12px; +} +.panel-title { + font-size: 12px; + font-weight: bold; + color: #575765; + height: 16px; + line-height: 16px; +} +.panel-footer { + border: 1px solid #D3D3D3; + overflow: hidden; + background: #fafafa; +} +.panel-footer-noborder { + border-width: 1px 0 0 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/progressbar.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/progressbar.css new file mode 100644 index 0000000..93818e3 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/progressbar.css @@ -0,0 +1,32 @@ +.progressbar { + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + overflow: hidden; + position: relative; +} +.progressbar-text { + text-align: center; + position: absolute; +} +.progressbar-value { + position: relative; + overflow: hidden; + width: 0; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.progressbar { + border-color: #D3D3D3; +} +.progressbar-text { + color: #000000; + font-size: 12px; +} +.progressbar-value .progressbar-text { + background-color: #0092DC; + color: #fff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/propertygrid.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/propertygrid.css new file mode 100644 index 0000000..90e4520 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/propertygrid.css @@ -0,0 +1,28 @@ +.propertygrid .datagrid-view1 .datagrid-body td { + padding-bottom: 1px; + border-width: 0 1px 0 0; +} +.propertygrid .datagrid-group { + height: 21px; + overflow: hidden; + border-width: 0 0 1px 0; + border-style: solid; +} +.propertygrid .datagrid-group span { + font-weight: bold; +} +.propertygrid .datagrid-view1 .datagrid-body td { + border-color: #ddd; +} +.propertygrid .datagrid-view1 .datagrid-group { + border-color: #f3f3f3; +} +.propertygrid .datagrid-view2 .datagrid-group { + border-color: #ddd; +} +.propertygrid .datagrid-group, +.propertygrid .datagrid-view1 .datagrid-body, +.propertygrid .datagrid-view1 .datagrid-row-over, +.propertygrid .datagrid-view1 .datagrid-row-selected { + background: #f3f3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/searchbox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/searchbox.css new file mode 100644 index 0000000..ed01d43 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/searchbox.css @@ -0,0 +1,90 @@ +.searchbox { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.searchbox .searchbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 0 2px; + vertical-align: top; +} +.searchbox .searchbox-prompt { + font-size: 12px; + color: #ccc; +} +.searchbox-button { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.searchbox-button-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.searchbox .l-btn-plain { + border: 0; + padding: 0; + vertical-align: top; + opacity: 0.6; + filter: alpha(opacity=60); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .l-btn-plain:hover { + border: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox a.m-btn-plain-active { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .m-btn-active { + border-width: 0 1px 0 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .textbox-button-right { + border-width: 0 0 0 1px; +} +.searchbox .textbox-button-left { + border-width: 0 1px 0 0; +} +.searchbox-button { + background: url('images/searchbox_button.png') no-repeat center center; +} +.searchbox { + border-color: #D3D3D3; + background-color: #fff; +} +.searchbox .l-btn-plain { + background: #f3f3f3; +} +.searchbox .l-btn-plain-disabled, +.searchbox .l-btn-plain-disabled:hover { + opacity: 0.5; + filter: alpha(opacity=50); +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/slider.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/slider.css new file mode 100644 index 0000000..b163812 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/slider.css @@ -0,0 +1,101 @@ +.slider-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.slider-h { + height: 22px; +} +.slider-v { + width: 22px; +} +.slider-inner { + position: relative; + height: 6px; + top: 7px; + border-width: 1px; + border-style: solid; + border-radius: 5px; +} +.slider-handle { + position: absolute; + display: block; + outline: none; + width: 20px; + height: 20px; + top: 50%; + margin-top: -10px; + margin-left: -10px; +} +.slider-tip { + position: absolute; + display: inline-block; + line-height: 12px; + font-size: 12px; + white-space: nowrap; + top: -22px; +} +.slider-rule { + position: relative; + top: 15px; +} +.slider-rule span { + position: absolute; + display: inline-block; + font-size: 0; + height: 5px; + border-width: 0 0 0 1px; + border-style: solid; +} +.slider-rulelabel { + position: relative; + top: 20px; +} +.slider-rulelabel span { + position: absolute; + display: inline-block; + font-size: 12px; +} +.slider-v .slider-inner { + width: 6px; + left: 7px; + top: 0; + float: left; +} +.slider-v .slider-handle { + left: 50%; + margin-top: -10px; +} +.slider-v .slider-tip { + left: -10px; + margin-top: -6px; +} +.slider-v .slider-rule { + float: left; + top: 0; + left: 16px; +} +.slider-v .slider-rule span { + width: 5px; + height: 'auto'; + border-left: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.slider-v .slider-rulelabel { + float: left; + top: 0; + left: 23px; +} +.slider-handle { + background: url('images/slider_handle.png') no-repeat; +} +.slider-inner { + border-color: #D3D3D3; + background: #f3f3f3; +} +.slider-rule span { + border-color: #D3D3D3; +} +.slider-rulelabel span { + color: #000000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/spinner.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/spinner.css new file mode 100644 index 0000000..4d99587 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/spinner.css @@ -0,0 +1,72 @@ +.spinner { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.spinner .spinner-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0 2px; + vertical-align: baseline; +} +.spinner-arrow { + background-color: #f3f3f3; + display: inline-block; + overflow: hidden; + vertical-align: top; + margin: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + width: 18px; +} +.spinner-arrow-up, +.spinner-arrow-down { + opacity: 0.6; + filter: alpha(opacity=60); + display: block; + font-size: 1px; + width: 18px; + height: 10px; + width: 100%; + height: 50%; + color: #444; + outline-style: none; +} +.spinner-arrow-hover { + background-color: #e2e2e2; + opacity: 1.0; + filter: alpha(opacity=100); +} +.spinner-arrow-up:hover, +.spinner-arrow-down:hover { + opacity: 1.0; + filter: alpha(opacity=100); + background-color: #e2e2e2; +} +.textbox-icon-disabled .spinner-arrow-up:hover, +.textbox-icon-disabled .spinner-arrow-down:hover { + opacity: 0.6; + filter: alpha(opacity=60); + background-color: #f3f3f3; + cursor: default; +} +.spinner .textbox-icon-disabled { + opacity: 0.6; + filter: alpha(opacity=60); +} +.spinner-arrow-up { + background: url('images/spinner_arrows.png') no-repeat 1px center; +} +.spinner-arrow-down { + background: url('images/spinner_arrows.png') no-repeat -15px center; +} +.spinner { + border-color: #D3D3D3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/splitbutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/splitbutton.css new file mode 100644 index 0000000..bb2b6da --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/splitbutton.css @@ -0,0 +1,12 @@ +.s-btn:hover .m-btn-line, +.s-btn-active .m-btn-line, +.s-btn-plain-active .m-btn-line { + display: inline-block; +} +.l-btn:hover .s-btn-downarrow, +.s-btn-active .s-btn-downarrow, +.s-btn-plain-active .s-btn-downarrow { + border-style: solid; + border-color: #bfbfbf; + border-width: 0 0 0 1px; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/switchbutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/switchbutton.css new file mode 100644 index 0000000..a33305c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/switchbutton.css @@ -0,0 +1,77 @@ +.switchbutton { + text-decoration: none; + display: inline-block; + overflow: hidden; + vertical-align: middle; + margin: 0; + padding: 0; + cursor: pointer; + background: #bbb; + border: 1px solid #bbb; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-inner { + display: inline-block; + overflow: hidden; + position: relative; + top: -1px; + left: -1px; +} +.switchbutton-on, +.switchbutton-off, +.switchbutton-handle { + display: inline-block; + text-align: center; + height: 100%; + float: left; + font-size: 12px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.switchbutton-on { + background: #0092DC; + color: #fff; +} +.switchbutton-off { + background-color: #ffffff; + color: #000000; +} +.switchbutton-on, +.switchbutton-reversed .switchbutton-off { + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.switchbutton-off, +.switchbutton-reversed .switchbutton-on { + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.switchbutton-handle { + position: absolute; + top: 0; + left: 50%; + background-color: #ffffff; + color: #000000; + border: 1px solid #bbb; + -moz-box-shadow: 0 0 3px 0 #bbb; + -webkit-box-shadow: 0 0 3px 0 #bbb; + box-shadow: 0 0 3px 0 #bbb; +} +.switchbutton-value { + position: absolute; + top: 0; + left: -5000px; +} +.switchbutton-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.switchbutton-disabled, +.switchbutton-readonly { + cursor: default; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/tabs.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/tabs.css new file mode 100644 index 0000000..bbdd989 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/tabs.css @@ -0,0 +1,413 @@ +.tabs-container { + overflow: hidden; +} +.tabs-header { + border-width: 1px; + border-style: solid; + border-bottom-width: 0; + position: relative; + padding: 0; + padding-top: 2px; + overflow: hidden; +} +.tabs-scroller-left, +.tabs-scroller-right { + position: absolute; + top: auto; + bottom: 0; + width: 18px; + font-size: 1px; + display: none; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.tabs-scroller-left { + left: 0; +} +.tabs-scroller-right { + right: 0; +} +.tabs-tool { + position: absolute; + bottom: 0; + padding: 1px; + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.tabs-header-plain .tabs-tool { + padding: 0 1px; +} +.tabs-wrap { + position: relative; + left: 0; + overflow: hidden; + width: 100%; + margin: 0; + padding: 0; +} +.tabs-scrolling { + margin-left: 18px; + margin-right: 18px; +} +.tabs-disabled { + opacity: 0.3; + filter: alpha(opacity=30); +} +.tabs { + list-style-type: none; + height: 26px; + margin: 0px; + padding: 0px; + padding-left: 4px; + width: 50000px; + border-style: solid; + border-width: 0 0 1px 0; +} +.tabs li { + float: left; + display: inline-block; + margin: 0 4px -1px 0; + padding: 0; + position: relative; + border: 0; +} +.tabs li a.tabs-inner { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0 10px; + height: 25px; + line-height: 25px; + text-align: center; + white-space: nowrap; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.tabs li.tabs-selected a.tabs-inner { + font-weight: bold; + outline: none; +} +.tabs li.tabs-selected a:hover.tabs-inner { + cursor: default; + pointer: default; +} +.tabs li a.tabs-close, +.tabs-p-tool { + position: absolute; + font-size: 1px; + display: block; + height: 12px; + padding: 0; + top: 50%; + margin-top: -6px; + overflow: hidden; +} +.tabs li a.tabs-close { + width: 12px; + right: 5px; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs-p-tool { + right: 16px; +} +.tabs-p-tool a { + display: inline-block; + font-size: 1px; + width: 12px; + height: 12px; + margin: 0; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs li a:hover.tabs-close, +.tabs-p-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + cursor: hand; + cursor: pointer; +} +.tabs-with-icon { + padding-left: 18px; +} +.tabs-icon { + position: absolute; + width: 16px; + height: 16px; + left: 10px; + top: 50%; + margin-top: -8px; +} +.tabs-title { + font-size: 12px; +} +.tabs-closable { + padding-right: 8px; +} +.tabs-panels { + margin: 0px; + padding: 0px; + border-width: 1px; + border-style: solid; + border-top-width: 0; + overflow: hidden; +} +.tabs-header-bottom { + border-width: 0 1px 1px 1px; + padding: 0 0 2px 0; +} +.tabs-header-bottom .tabs { + border-width: 1px 0 0 0; +} +.tabs-header-bottom .tabs li { + margin: -1px 4px 0 0; +} +.tabs-header-bottom .tabs li a.tabs-inner { + -moz-border-radius: 0 0 5px 5px; + -webkit-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; +} +.tabs-header-bottom .tabs-tool { + top: 0; +} +.tabs-header-bottom .tabs-scroller-left, +.tabs-header-bottom .tabs-scroller-right { + top: 0; + bottom: auto; +} +.tabs-panels-top { + border-width: 1px 1px 0 1px; +} +.tabs-header-left { + float: left; + border-width: 1px 0 1px 1px; + padding: 0; +} +.tabs-header-right { + float: right; + border-width: 1px 1px 1px 0; + padding: 0; +} +.tabs-header-left .tabs-wrap, +.tabs-header-right .tabs-wrap { + height: 100%; +} +.tabs-header-left .tabs { + height: 100%; + padding: 4px 0 0 2px; + border-width: 0 1px 0 0; +} +.tabs-header-right .tabs { + height: 100%; + padding: 4px 2px 0 0; + border-width: 0 0 0 1px; +} +.tabs-header-left .tabs li, +.tabs-header-right .tabs li { + display: block; + width: 100%; + position: relative; +} +.tabs-header-left .tabs li { + left: auto; + right: 0; + margin: 0 -1px 4px 0; + float: right; +} +.tabs-header-right .tabs li { + left: 0; + right: auto; + margin: 0 0 4px -1px; + float: left; +} +.tabs-justified li a.tabs-inner { + padding-left: 0; + padding-right: 0; +} +.tabs-header-left .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 5px 0 0 5px; + -webkit-border-radius: 5px 0 0 5px; + border-radius: 5px 0 0 5px; +} +.tabs-header-right .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 0 5px 5px 0; + -webkit-border-radius: 0 5px 5px 0; + border-radius: 0 5px 5px 0; +} +.tabs-panels-right { + float: right; + border-width: 1px 1px 1px 0; +} +.tabs-panels-left { + float: left; + border-width: 1px 0 1px 1px; +} +.tabs-header-noborder, +.tabs-panels-noborder { + border: 0px; +} +.tabs-header-plain { + border: 0px; + background: transparent; +} +.tabs-pill { + padding-bottom: 3px; +} +.tabs-header-bottom .tabs-pill { + padding-top: 3px; + padding-bottom: 0; +} +.tabs-header-left .tabs-pill { + padding-right: 3px; +} +.tabs-header-right .tabs-pill { + padding-left: 3px; +} +.tabs-header .tabs-pill li a.tabs-inner { + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tabs-header-narrow, +.tabs-header-narrow .tabs-narrow { + padding: 0; +} +.tabs-narrow li, +.tabs-header-bottom .tabs-narrow li { + margin-left: 0; + margin-right: -1px; +} +.tabs-narrow li.tabs-last, +.tabs-header-bottom .tabs-narrow li.tabs-last { + margin-right: 0; +} +.tabs-header-left .tabs-narrow, +.tabs-header-right .tabs-narrow { + padding-top: 0; +} +.tabs-header-left .tabs-narrow li { + margin-bottom: -1px; + margin-right: -1px; +} +.tabs-header-left .tabs-narrow li.tabs-last, +.tabs-header-right .tabs-narrow li.tabs-last { + margin-bottom: 0; +} +.tabs-header-right .tabs-narrow li { + margin-bottom: -1px; + margin-left: -1px; +} +.tabs-scroller-left { + background: #f3f3f3 url('images/tabs_icons.png') no-repeat 1px center; +} +.tabs-scroller-right { + background: #f3f3f3 url('images/tabs_icons.png') no-repeat -15px center; +} +.tabs li a.tabs-close { + background: url('images/tabs_icons.png') no-repeat -34px center; +} +.tabs li a.tabs-inner:hover { + background: #e2e2e2; + color: #000000; + filter: none; +} +.tabs li.tabs-selected a.tabs-inner { + background-color: #ffffff; + color: #575765; + background: -webkit-linear-gradient(top,#F8F8F8 0,#ffffff 100%); + background: -moz-linear-gradient(top,#F8F8F8 0,#ffffff 100%); + background: -o-linear-gradient(top,#F8F8F8 0,#ffffff 100%); + background: linear-gradient(to bottom,#F8F8F8 0,#ffffff 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#F8F8F8,endColorstr=#ffffff,GradientType=0); +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(top,#ffffff 0,#F8F8F8 100%); + background: -moz-linear-gradient(top,#ffffff 0,#F8F8F8 100%); + background: -o-linear-gradient(top,#ffffff 0,#F8F8F8 100%); + background: linear-gradient(to bottom,#ffffff 0,#F8F8F8 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#F8F8F8,GradientType=0); +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#F8F8F8 0,#ffffff 100%); + background: -moz-linear-gradient(left,#F8F8F8 0,#ffffff 100%); + background: -o-linear-gradient(left,#F8F8F8 0,#ffffff 100%); + background: linear-gradient(to right,#F8F8F8 0,#ffffff 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#F8F8F8,endColorstr=#ffffff,GradientType=1); +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + background: -webkit-linear-gradient(left,#ffffff 0,#F8F8F8 100%); + background: -moz-linear-gradient(left,#ffffff 0,#F8F8F8 100%); + background: -o-linear-gradient(left,#ffffff 0,#F8F8F8 100%); + background: linear-gradient(to right,#ffffff 0,#F8F8F8 100%); + background-repeat: repeat-y; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#F8F8F8,GradientType=1); +} +.tabs li a.tabs-inner { + color: #575765; + background-color: #f3f3f3; + background: -webkit-linear-gradient(top,#F8F8F8 0,#eeeeee 100%); + background: -moz-linear-gradient(top,#F8F8F8 0,#eeeeee 100%); + background: -o-linear-gradient(top,#F8F8F8 0,#eeeeee 100%); + background: linear-gradient(to bottom,#F8F8F8 0,#eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#F8F8F8,endColorstr=#eeeeee,GradientType=0); +} +.tabs-header, +.tabs-tool { + background-color: #f3f3f3; +} +.tabs-header-plain { + background: transparent; +} +.tabs-header, +.tabs-scroller-left, +.tabs-scroller-right, +.tabs-tool, +.tabs, +.tabs-panels, +.tabs li a.tabs-inner, +.tabs li.tabs-selected a.tabs-inner, +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner, +.tabs-header-left .tabs li.tabs-selected a.tabs-inner, +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-color: #D3D3D3; +} +.tabs-p-tool a:hover, +.tabs li a:hover.tabs-close, +.tabs-scroller-over { + background-color: #e2e2e2; +} +.tabs li.tabs-selected a.tabs-inner { + border-bottom: 1px solid #ffffff; +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + border-top: 1px solid #ffffff; +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + border-right: 1px solid #ffffff; +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-left: 1px solid #ffffff; +} +.tabs-header .tabs-pill li.tabs-selected a.tabs-inner { + background: #0092DC; + color: #fff; + filter: none; + border-color: #D3D3D3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/textbox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/textbox.css new file mode 100644 index 0000000..2e9735d --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/textbox.css @@ -0,0 +1,90 @@ +.textbox { + position: relative; + border: 1px solid #D3D3D3; + background-color: #fff; + vertical-align: middle; + display: inline-block; + overflow: hidden; + white-space: nowrap; + margin: 0; + padding: 0; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox .textbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 4px; + white-space: normal; + vertical-align: top; + outline-style: none; + resize: none; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.textbox textarea.textbox-text { + white-space: pre-wrap; +} +.textbox .textbox-prompt { + font-size: 12px; + color: #aaa; +} +.textbox .textbox-button, +.textbox .textbox-button:hover { + position: absolute; + top: 0; + padding: 0; + vertical-align: top; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.textbox-button-right, +.textbox-button-right:hover { + border-width: 0 0 0 1px; +} +.textbox-button-left, +.textbox-button-left:hover { + border-width: 0 1px 0 0; +} +.textbox-addon { + position: absolute; + top: 0; +} +.textbox-icon { + display: inline-block; + width: 18px; + height: 20px; + overflow: hidden; + vertical-align: top; + background-position: center center; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); + text-decoration: none; + outline-style: none; +} +.textbox-icon-disabled, +.textbox-icon-readonly { + cursor: default; +} +.textbox-icon:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.textbox-icon-disabled:hover { + opacity: 0.6; + filter: alpha(opacity=60); +} +.textbox-focused { + -moz-box-shadow: 0 0 3px 0 #D3D3D3; + -webkit-box-shadow: 0 0 3px 0 #D3D3D3; + box-shadow: 0 0 3px 0 #D3D3D3; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/tooltip.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/tooltip.css new file mode 100644 index 0000000..e2ba0c5 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/tooltip.css @@ -0,0 +1,103 @@ +.tooltip { + position: absolute; + display: none; + z-index: 9900000; + outline: none; + opacity: 1; + filter: alpha(opacity=100); + padding: 5px; + border-width: 1px; + border-style: solid; + border-radius: 5px; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.tooltip-content { + font-size: 12px; +} +.tooltip-arrow-outer, +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + line-height: 0; + font-size: 0; + border-style: solid; + border-width: 6px; + border-color: transparent; + _border-color: tomato; + _filter: chroma(color=tomato); +} +.tooltip-arrow { + display: none \9; +} +.tooltip-right .tooltip-arrow-outer { + left: 0; + top: 50%; + margin: -6px 0 0 -13px; +} +.tooltip-right .tooltip-arrow { + left: 0; + top: 50%; + margin: -6px 0 0 -12px; +} +.tooltip-left .tooltip-arrow-outer { + right: 0; + top: 50%; + margin: -6px -13px 0 0; +} +.tooltip-left .tooltip-arrow { + right: 0; + top: 50%; + margin: -6px -12px 0 0; +} +.tooltip-top .tooltip-arrow-outer { + bottom: 0; + left: 50%; + margin: 0 0 -13px -6px; +} +.tooltip-top .tooltip-arrow { + bottom: 0; + left: 50%; + margin: 0 0 -12px -6px; +} +.tooltip-bottom .tooltip-arrow-outer { + top: 0; + left: 50%; + margin: -13px 0 0 -6px; +} +.tooltip-bottom .tooltip-arrow { + top: 0; + left: 50%; + margin: -12px 0 0 -6px; +} +.tooltip { + background-color: #ffffff; + border-color: #D3D3D3; + color: #000000; +} +.tooltip-right .tooltip-arrow-outer { + border-right-color: #D3D3D3; +} +.tooltip-right .tooltip-arrow { + border-right-color: #ffffff; +} +.tooltip-left .tooltip-arrow-outer { + border-left-color: #D3D3D3; +} +.tooltip-left .tooltip-arrow { + border-left-color: #ffffff; +} +.tooltip-top .tooltip-arrow-outer { + border-top-color: #D3D3D3; +} +.tooltip-top .tooltip-arrow { + border-top-color: #ffffff; +} +.tooltip-bottom .tooltip-arrow-outer { + border-bottom-color: #D3D3D3; +} +.tooltip-bottom .tooltip-arrow { + border-bottom-color: #ffffff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/tree.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/tree.css new file mode 100644 index 0000000..832a8f9 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/tree.css @@ -0,0 +1,160 @@ +.tree { + margin: 0; + padding: 0; + list-style-type: none; +} +.tree li { + white-space: nowrap; +} +.tree li ul { + list-style-type: none; + margin: 0; + padding: 0; +} +.tree-node { + height: 18px; + white-space: nowrap; + cursor: pointer; +} +.tree-hit { + cursor: pointer; +} +.tree-expanded, +.tree-collapsed, +.tree-folder, +.tree-file, +.tree-checkbox, +.tree-indent { + display: inline-block; + width: 16px; + height: 18px; + vertical-align: top; + overflow: hidden; +} +.tree-expanded { + background: url('images/tree_icons.png') no-repeat -18px 0px; +} +.tree-expanded-hover { + background: url('images/tree_icons.png') no-repeat -50px 0px; +} +.tree-collapsed { + background: url('images/tree_icons.png') no-repeat 0px 0px; +} +.tree-collapsed-hover { + background: url('images/tree_icons.png') no-repeat -32px 0px; +} +.tree-lines .tree-expanded, +.tree-lines .tree-root-first .tree-expanded { + background: url('images/tree_icons.png') no-repeat -144px 0; +} +.tree-lines .tree-collapsed, +.tree-lines .tree-root-first .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -128px 0; +} +.tree-lines .tree-node-last .tree-expanded, +.tree-lines .tree-root-one .tree-expanded { + background: url('images/tree_icons.png') no-repeat -80px 0; +} +.tree-lines .tree-node-last .tree-collapsed, +.tree-lines .tree-root-one .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -64px 0; +} +.tree-line { + background: url('images/tree_icons.png') no-repeat -176px 0; +} +.tree-join { + background: url('images/tree_icons.png') no-repeat -192px 0; +} +.tree-joinbottom { + background: url('images/tree_icons.png') no-repeat -160px 0; +} +.tree-folder { + background: url('images/tree_icons.png') no-repeat -208px 0; +} +.tree-folder-open { + background: url('images/tree_icons.png') no-repeat -224px 0; +} +.tree-file { + background: url('images/tree_icons.png') no-repeat -240px 0; +} +.tree-loading { + background: url('images/loading.gif') no-repeat center center; +} +.tree-checkbox0 { + background: url('images/tree_icons.png') no-repeat -208px -18px; +} +.tree-checkbox1 { + background: url('images/tree_icons.png') no-repeat -224px -18px; +} +.tree-checkbox2 { + background: url('images/tree_icons.png') no-repeat -240px -18px; +} +.tree-title { + font-size: 12px; + display: inline-block; + text-decoration: none; + vertical-align: top; + white-space: nowrap; + padding: 0 2px; + height: 18px; + line-height: 18px; +} +.tree-node-proxy { + font-size: 12px; + line-height: 20px; + padding: 0 2px 0 20px; + border-width: 1px; + border-style: solid; + z-index: 9900000; +} +.tree-dnd-icon { + display: inline-block; + position: absolute; + width: 16px; + height: 18px; + left: 2px; + top: 50%; + margin-top: -9px; +} +.tree-dnd-yes { + background: url('images/tree_icons.png') no-repeat -256px 0; +} +.tree-dnd-no { + background: url('images/tree_icons.png') no-repeat -256px -18px; +} +.tree-node-top { + border-top: 1px dotted red; +} +.tree-node-bottom { + border-bottom: 1px dotted red; +} +.tree-node-append .tree-title { + border: 1px dotted red; +} +.tree-editor { + border: 1px solid #ccc; + font-size: 12px; + height: 14px !important; + height: 18px; + line-height: 14px; + padding: 1px 2px; + width: 80px; + position: absolute; + top: 0; +} +.tree-node-proxy { + background-color: #ffffff; + color: #000000; + border-color: #D3D3D3; +} +.tree-node-hover { + background: #e2e2e2; + color: #000000; +} +.tree-node-selected { + background: #0092DC; + color: #fff; +} +.tree-node-hidden { + display: none; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/validatebox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/validatebox.css new file mode 100644 index 0000000..1fc3ad6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/validatebox.css @@ -0,0 +1,5 @@ +.validatebox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; + color: #000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/gray/window.css b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/window.css new file mode 100644 index 0000000..dfe8954 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/gray/window.css @@ -0,0 +1,94 @@ +.window { + overflow: hidden; + padding: 5px; + border-width: 1px; + border-style: solid; +} +.window .window-header { + background: transparent; + padding: 0px 0px 6px 0px; +} +.window .window-body { + border-width: 1px; + border-style: solid; + border-top-width: 0px; +} +.window .window-body-noheader { + border-top-width: 1px; +} +.window .panel-body-nobottom { + border-bottom-width: 0; +} +.window .window-header .panel-icon, +.window .window-header .panel-tool { + top: 50%; + margin-top: -11px; +} +.window .window-header .panel-icon { + left: 1px; +} +.window .window-header .panel-tool { + right: 1px; +} +.window .window-header .panel-with-icon { + padding-left: 18px; +} +.window-proxy { + position: absolute; + overflow: hidden; +} +.window-proxy-mask { + position: absolute; + filter: alpha(opacity=5); + opacity: 0.05; +} +.window-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + filter: alpha(opacity=40); + opacity: 0.40; + font-size: 1px; + overflow: hidden; +} +.window, +.window-shadow { + position: absolute; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.window-shadow { + background: #ccc; + -moz-box-shadow: 2px 2px 3px #cccccc; + -webkit-box-shadow: 2px 2px 3px #cccccc; + box-shadow: 2px 2px 3px #cccccc; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.window, +.window .window-body { + border-color: #D3D3D3; +} +.window { + background-color: #f3f3f3; + background: -webkit-linear-gradient(top,#F8F8F8 0,#eeeeee 20%); + background: -moz-linear-gradient(top,#F8F8F8 0,#eeeeee 20%); + background: -o-linear-gradient(top,#F8F8F8 0,#eeeeee 20%); + background: linear-gradient(to bottom,#F8F8F8 0,#eeeeee 20%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#F8F8F8,endColorstr=#eeeeee,GradientType=0); +} +.window-proxy { + border: 1px dashed #D3D3D3; +} +.window-proxy-mask, +.window-mask { + background: #ccc; +} +.window .panel-footer { + border: 1px solid #D3D3D3; + position: relative; + top: -1px; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icon.css b/src/main/webapp/jquery-easyui-1.4.4/themes/icon.css new file mode 100644 index 0000000..50d4f1b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/icon.css @@ -0,0 +1,96 @@ +.icon-blank{ + background:url('icons/blank.gif') no-repeat center center; +} +.icon-add{ + background:url('icons/edit_add.png') no-repeat center center; +} +.icon-edit{ + background:url('icons/pencil.png') no-repeat center center; +} +.icon-clear{ + background:url('icons/clear.png') no-repeat center center; +} +.icon-remove{ + background:url('icons/edit_remove.png') no-repeat center center; +} +.icon-save{ + background:url('icons/filesave.png') no-repeat center center; +} +.icon-cut{ + background:url('icons/cut.png') no-repeat center center; +} +.icon-ok{ + background:url('icons/ok.png') no-repeat center center; +} +.icon-no{ + background:url('icons/no.png') no-repeat center center; +} +.icon-cancel{ + background:url('icons/cancel.png') no-repeat center center; +} +.icon-reload{ + background:url('icons/reload.png') no-repeat center center; +} +.icon-search{ + background:url('icons/search.png') no-repeat center center; +} +.icon-print{ + background:url('icons/print.png') no-repeat center center; +} +.icon-help{ + background:url('icons/help.png') no-repeat center center; +} +.icon-undo{ + background:url('icons/undo.png') no-repeat center center; +} +.icon-redo{ + background:url('icons/redo.png') no-repeat center center; +} +.icon-back{ + background:url('icons/back.png') no-repeat center center; +} +.icon-sum{ + background:url('icons/sum.png') no-repeat center center; +} +.icon-tip{ + background:url('icons/tip.png') no-repeat center center; +} +.icon-filter{ + background:url('icons/filter.png') no-repeat center center; +} +.icon-man{ + background:url('icons/man.png') no-repeat center center; +} +.icon-lock{ + background:url('icons/lock.png') no-repeat center center; +} +.icon-more{ + background:url('icons/more.png') no-repeat center center; +} + + +.icon-mini-add{ + background:url('icons/mini_add.png') no-repeat center center; +} +.icon-mini-edit{ + background:url('icons/mini_edit.png') no-repeat center center; +} +.icon-mini-refresh{ + background:url('icons/mini_refresh.png') no-repeat center center; +} + +.icon-large-picture{ + background:url('icons/large_picture.png') no-repeat center center; +} +.icon-large-clipart{ + background:url('icons/large_clipart.png') no-repeat center center; +} +.icon-large-shapes{ + background:url('icons/large_shapes.png') no-repeat center center; +} +.icon-large-smartart{ + background:url('icons/large_smartart.png') no-repeat center center; +} +.icon-large-chart{ + background:url('icons/large_chart.png') no-repeat center center; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/back.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/back.png new file mode 100644 index 0000000..3fe8b17 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/back.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/blank.gif b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/blank.gif new file mode 100644 index 0000000..1d11fa9 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/blank.gif differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/cancel.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/cancel.png new file mode 100644 index 0000000..a432b49 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/cancel.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/clear.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/clear.png new file mode 100644 index 0000000..74b9af9 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/clear.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/cut.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/cut.png new file mode 100644 index 0000000..21fdb4d Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/cut.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/edit_add.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/edit_add.png new file mode 100644 index 0000000..e948508 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/edit_add.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/edit_remove.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/edit_remove.png new file mode 100644 index 0000000..d555d92 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/edit_remove.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/filesave.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/filesave.png new file mode 100644 index 0000000..fd0048d Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/filesave.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/filter.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/filter.png new file mode 100644 index 0000000..1fedf7a Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/filter.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/help.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/help.png new file mode 100644 index 0000000..28a0f9e Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/help.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/large_chart.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/large_chart.png new file mode 100644 index 0000000..527608e Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/large_chart.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/large_clipart.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/large_clipart.png new file mode 100644 index 0000000..9c9c440 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/large_clipart.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/large_picture.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/large_picture.png new file mode 100644 index 0000000..a005b0c Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/large_picture.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/large_shapes.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/large_shapes.png new file mode 100644 index 0000000..90a0dca Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/large_shapes.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/large_smartart.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/large_smartart.png new file mode 100644 index 0000000..b47da08 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/large_smartart.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/lock.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/lock.png new file mode 100644 index 0000000..15bd643 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/lock.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/man.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/man.png new file mode 100644 index 0000000..a8cafcb Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/man.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/mini_add.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/mini_add.png new file mode 100644 index 0000000..fd82b92 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/mini_add.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/mini_edit.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/mini_edit.png new file mode 100644 index 0000000..db9221a Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/mini_edit.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/mini_refresh.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/mini_refresh.png new file mode 100644 index 0000000..6cdd016 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/mini_refresh.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/more.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/more.png new file mode 100644 index 0000000..94922a2 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/more.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/no.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/no.png new file mode 100644 index 0000000..37a7c74 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/no.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/ok.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/ok.png new file mode 100644 index 0000000..5b0f6a6 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/ok.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/pencil.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/pencil.png new file mode 100644 index 0000000..5b8cc89 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/pencil.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/print.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/print.png new file mode 100644 index 0000000..fdf67a1 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/print.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/redo.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/redo.png new file mode 100644 index 0000000..f1e45cf Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/redo.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/reload.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/reload.png new file mode 100644 index 0000000..f51cab8 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/reload.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/search.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/search.png new file mode 100644 index 0000000..6dd1931 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/search.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/sum.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/sum.png new file mode 100644 index 0000000..fd7b32e Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/sum.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/tip.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/tip.png new file mode 100644 index 0000000..845e110 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/tip.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/icons/undo.png b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/undo.png new file mode 100644 index 0000000..6129fa0 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/icons/undo.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/accordion.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/accordion.css new file mode 100644 index 0000000..31d6079 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/accordion.css @@ -0,0 +1,41 @@ +.accordion { + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.accordion .accordion-header { + border-width: 0 0 1px; + cursor: pointer; +} +.accordion .accordion-body { + border-width: 0 0 1px; +} +.accordion-noborder { + border-width: 0; +} +.accordion-noborder .accordion-header { + border-width: 0 0 1px; +} +.accordion-noborder .accordion-body { + border-width: 0 0 1px; +} +.accordion-collapse { + background: url('images/accordion_arrows.png') no-repeat 0 0; +} +.accordion-expand { + background: url('images/accordion_arrows.png') no-repeat -16px 0; +} +.accordion { + background: #fff; + border-color: #ddd; +} +.accordion .accordion-header { + background: #ffffff; + filter: none; +} +.accordion .accordion-header-selected { + background: #CCE6FF; +} +.accordion .accordion-header-selected .panel-title { + color: #000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/calendar.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/calendar.css new file mode 100644 index 0000000..6af24ac --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/calendar.css @@ -0,0 +1,197 @@ +.calendar { + border-width: 1px; + border-style: solid; + padding: 1px; + overflow: hidden; +} +.calendar table { + table-layout: fixed; + border-collapse: separate; + font-size: 12px; + width: 100%; + height: 100%; +} +.calendar table td, +.calendar table th { + font-size: 12px; +} +.calendar-noborder { + border: 0; +} +.calendar-header { + position: relative; + height: 22px; +} +.calendar-title { + text-align: center; + height: 22px; +} +.calendar-title span { + position: relative; + display: inline-block; + top: 2px; + padding: 0 3px; + height: 18px; + line-height: 18px; + font-size: 12px; + cursor: pointer; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.calendar-prevmonth, +.calendar-nextmonth, +.calendar-prevyear, +.calendar-nextyear { + position: absolute; + top: 50%; + margin-top: -7px; + width: 14px; + height: 14px; + cursor: pointer; + font-size: 1px; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.calendar-prevmonth { + left: 20px; + background: url('images/calendar_arrows.png') no-repeat -18px -2px; +} +.calendar-nextmonth { + right: 20px; + background: url('images/calendar_arrows.png') no-repeat -34px -2px; +} +.calendar-prevyear { + left: 3px; + background: url('images/calendar_arrows.png') no-repeat -1px -2px; +} +.calendar-nextyear { + right: 3px; + background: url('images/calendar_arrows.png') no-repeat -49px -2px; +} +.calendar-body { + position: relative; +} +.calendar-body th, +.calendar-body td { + text-align: center; +} +.calendar-day { + border: 0; + padding: 1px; + cursor: pointer; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.calendar-other-month { + opacity: 0.3; + filter: alpha(opacity=30); +} +.calendar-disabled { + opacity: 0.6; + filter: alpha(opacity=60); + cursor: default; +} +.calendar-menu { + position: absolute; + top: 0; + left: 0; + width: 180px; + height: 150px; + padding: 5px; + font-size: 12px; + display: none; + overflow: hidden; +} +.calendar-menu-year-inner { + text-align: center; + padding-bottom: 5px; +} +.calendar-menu-year { + width: 40px; + text-align: center; + border-width: 1px; + border-style: solid; + margin: 0; + padding: 2px; + font-weight: bold; + font-size: 12px; +} +.calendar-menu-prev, +.calendar-menu-next { + display: inline-block; + width: 21px; + height: 21px; + vertical-align: top; + cursor: pointer; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.calendar-menu-prev { + margin-right: 10px; + background: url('images/calendar_arrows.png') no-repeat 2px 2px; +} +.calendar-menu-next { + margin-left: 10px; + background: url('images/calendar_arrows.png') no-repeat -45px 2px; +} +.calendar-menu-month { + text-align: center; + cursor: pointer; + font-weight: bold; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.calendar-body th, +.calendar-menu-month { + color: #919191; +} +.calendar-day { + color: #444; +} +.calendar-sunday { + color: #CC2222; +} +.calendar-saturday { + color: #00ee00; +} +.calendar-today { + color: #0000ff; +} +.calendar-menu-year { + border-color: #ddd; +} +.calendar { + border-color: #ddd; +} +.calendar-header { + background: #ffffff; +} +.calendar-body, +.calendar-menu { + background: #fff; +} +.calendar-body th { + background: #fff; + padding: 2px 0; +} +.calendar-hover, +.calendar-nav-hover, +.calendar-menu-hover { + background-color: #E6E6E6; + color: #444; +} +.calendar-hover { + border: 1px solid #ddd; + padding: 0; +} +.calendar-selected { + background-color: #CCE6FF; + color: #000; + border: 1px solid #99cdff; + padding: 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/combo.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/combo.css new file mode 100644 index 0000000..39fac28 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/combo.css @@ -0,0 +1,60 @@ +.combo { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.combo .combo-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0px 2px; + vertical-align: baseline; +} +.combo-arrow { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.combo-arrow-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.combo-panel { + overflow: auto; +} +.combo-arrow { + background: url('images/combo_arrow.png') no-repeat center center; +} +.combo-panel { + background-color: #fff; +} +.combo { + border-color: #ddd; + background-color: #fff; +} +.combo-arrow { + background-color: #ffffff; +} +.combo-arrow-hover { + background-color: #E6E6E6; +} +.combo-arrow:hover { + background-color: #E6E6E6; +} +.combo .textbox-icon-disabled:hover { + cursor: default; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/combobox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/combobox.css new file mode 100644 index 0000000..0e058b1 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/combobox.css @@ -0,0 +1,24 @@ +.combobox-item, +.combobox-group { + font-size: 12px; + padding: 3px; + padding-right: 0px; +} +.combobox-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.combobox-gitem { + padding-left: 10px; +} +.combobox-group { + font-weight: bold; +} +.combobox-item-hover { + background-color: #E6E6E6; + color: #444; +} +.combobox-item-selected { + background-color: #CCE6FF; + color: #000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/datagrid.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/datagrid.css new file mode 100644 index 0000000..cb8dcc2 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/datagrid.css @@ -0,0 +1,270 @@ +.datagrid .panel-body { + overflow: hidden; + position: relative; +} +.datagrid-view { + position: relative; + overflow: hidden; +} +.datagrid-view1, +.datagrid-view2 { + position: absolute; + overflow: hidden; + top: 0; +} +.datagrid-view1 { + left: 0; +} +.datagrid-view2 { + right: 0; +} +.datagrid-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0.3; + filter: alpha(opacity=30); + display: none; +} +.datagrid-mask-msg { + position: absolute; + top: 50%; + margin-top: -20px; + padding: 10px 5px 10px 30px; + width: auto; + height: 16px; + border-width: 2px; + border-style: solid; + display: none; +} +.datagrid-sort-icon { + padding: 0; + display: none; +} +.datagrid-toolbar { + height: auto; + padding: 1px 2px; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ddd; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.datagrid .datagrid-pager { + display: block; + margin: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.datagrid .datagrid-pager-top { + border-width: 0 0 1px 0; +} +.datagrid-header { + overflow: hidden; + cursor: default; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-header-inner { + float: left; + width: 10000px; +} +.datagrid-header-row, +.datagrid-row { + height: 25px; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-width: 0 1px 1px 0; + border-style: dotted; + margin: 0; + padding: 0; +} +.datagrid-cell, +.datagrid-cell-group, +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + margin: 0; + padding: 0 4px; + white-space: nowrap; + word-wrap: normal; + overflow: hidden; + height: 18px; + line-height: 18px; + font-size: 12px; +} +.datagrid-header .datagrid-cell { + height: auto; +} +.datagrid-header .datagrid-cell span { + font-size: 12px; +} +.datagrid-cell-group { + text-align: center; + text-overflow: ellipsis; +} +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + width: 30px; + text-align: center; + margin: 0; + padding: 0; +} +.datagrid-body { + margin: 0; + padding: 0; + overflow: auto; + zoom: 1; +} +.datagrid-view1 .datagrid-body-inner { + padding-bottom: 20px; +} +.datagrid-view1 .datagrid-body { + overflow: hidden; +} +.datagrid-footer { + overflow: hidden; +} +.datagrid-footer-inner { + border-width: 1px 0 0 0; + border-style: solid; + width: 10000px; + float: left; +} +.datagrid-row-editing .datagrid-cell { + height: auto; +} +.datagrid-header-check, +.datagrid-cell-check { + padding: 0; + width: 27px; + height: 18px; + font-size: 1px; + text-align: center; + overflow: hidden; +} +.datagrid-header-check input, +.datagrid-cell-check input { + margin: 0; + padding: 0; + width: 15px; + height: 18px; +} +.datagrid-resize-proxy { + position: absolute; + width: 1px; + height: 10000px; + top: 0; + cursor: e-resize; + display: none; +} +.datagrid-body .datagrid-editable { + margin: 0; + padding: 0; +} +.datagrid-body .datagrid-editable table { + width: 100%; + height: 100%; +} +.datagrid-body .datagrid-editable td { + border: 0; + margin: 0; + padding: 0; +} +.datagrid-view .datagrid-editable-input { + margin: 0; + padding: 2px 4px; + border: 1px solid #ddd; + font-size: 12px; + outline-style: none; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.datagrid-sort .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -64px center; +} +.datagrid-sort-desc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -16px center; +} +.datagrid-sort-asc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat 0px center; +} +.datagrid-row-collapse { + background: url('images/datagrid_icons.png') no-repeat -48px center; +} +.datagrid-row-expand { + background: url('images/datagrid_icons.png') no-repeat -32px center; +} +.datagrid-mask-msg { + background: #fff url('images/loading.gif') no-repeat scroll 5px center; +} +.datagrid-header, +.datagrid-td-rownumber { + background-color: #ffffff; +} +.datagrid-cell-rownumber { + color: #444; +} +.datagrid-resize-proxy { + background: #b3b3b3; +} +.datagrid-mask { + background: #eee; +} +.datagrid-mask-msg { + border-color: #ddd; +} +.datagrid-toolbar, +.datagrid-pager { + background: #fff; +} +.datagrid-header, +.datagrid-toolbar, +.datagrid-pager, +.datagrid-footer-inner { + border-color: #ddd; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-color: #ddd; +} +.datagrid-htable, +.datagrid-btable, +.datagrid-ftable { + color: #444; + border-collapse: separate; +} +.datagrid-row-alt { + background: #f5f5f5; +} +.datagrid-row-over, +.datagrid-header td.datagrid-header-over { + background: #E6E6E6; + color: #444; + cursor: default; +} +.datagrid-row-selected { + background: #CCE6FF; + color: #000; +} +.datagrid-row-editing .textbox, +.datagrid-row-editing .textbox-text { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/datalist.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/datalist.css new file mode 100644 index 0000000..8a7f949 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/datalist.css @@ -0,0 +1,95 @@ +.datalist .datagrid-header { + border-width: 0; +} +.datalist .datagrid-group, +.m-list .m-list-group { + height: 25px; + line-height: 25px; + font-weight: bold; + overflow: hidden; + background-color: #ffffff; + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ddd; +} +.datalist .datagrid-group-expander { + display: none; +} +.datalist .datagrid-group-title { + padding: 0 4px; +} +.datalist .datagrid-btable { + width: 100%; + table-layout: fixed; +} +.datalist .datagrid-row td { + border-style: solid; + border-left-color: transparent; + border-right-color: transparent; + border-bottom-width: 0; +} +.datalist-lines .datagrid-row td { + border-bottom-width: 1px; +} +.datalist .datagrid-cell, +.m-list li { + width: auto; + height: auto; + padding: 2px 4px; + line-height: 18px; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link, +.m-list li>a { + display: block; + position: relative; + cursor: pointer; + color: #444; + text-decoration: none; + overflow: hidden; + margin: -2px -4px; + padding: 2px 4px; + padding-right: 16px; + line-height: 18px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link::after, +.m-list li>a::after { + position: absolute; + display: block; + width: 8px; + height: 8px; + content: ''; + right: 6px; + top: 50%; + margin-top: -4px; + border-style: solid; + border-width: 1px 1px 0 0; + -ms-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} +.m-list { + margin: 0; + padding: 0; + list-style: none; +} +.m-list li { + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ddd; +} +.m-list li>a:hover { + background: #E6E6E6; + color: #444; +} +.m-list .m-list-group { + padding: 0 4px; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/datebox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/datebox.css new file mode 100644 index 0000000..b0f71e2 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/datebox.css @@ -0,0 +1,36 @@ +.datebox-calendar-inner { + height: 180px; +} +.datebox-button { + height: 18px; + padding: 2px 5px; + text-align: center; +} +.datebox-button a { + font-size: 12px; + font-weight: bold; + text-decoration: none; + opacity: 0.6; + filter: alpha(opacity=60); +} +.datebox-button a:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.datebox-current, +.datebox-close { + float: left; +} +.datebox-close { + float: right; +} +.datebox .combo-arrow { + background-image: url('images/datebox_arrow.png'); + background-position: center center; +} +.datebox-button { + background-color: #fff; +} +.datebox-button a { + color: #777; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/dialog.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/dialog.css new file mode 100644 index 0000000..ea1a9e8 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/dialog.css @@ -0,0 +1,32 @@ +.dialog-content { + overflow: auto; +} +.dialog-toolbar { + padding: 2px 5px; +} +.dialog-tool-separator { + float: left; + height: 24px; + border-left: 1px solid #ddd; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.dialog-button { + padding: 5px; + text-align: right; +} +.dialog-button .l-btn { + margin-left: 5px; +} +.dialog-toolbar, +.dialog-button { + background: #fff; + border-width: 1px; + border-style: solid; +} +.dialog-toolbar { + border-color: #ddd #ddd #ddd #ddd; +} +.dialog-button { + border-color: #ddd #ddd #ddd #ddd; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/easyui.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/easyui.css new file mode 100644 index 0000000..83d5c41 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/easyui.css @@ -0,0 +1,2815 @@ +.panel { + overflow: hidden; + text-align: left; + margin: 0; + border: 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.panel-header, +.panel-body { + border-width: 1px; + border-style: solid; +} +.panel-header { + padding: 5px; + position: relative; +} +.panel-title { + background: url('images/blank.gif') no-repeat; +} +.panel-header-noborder { + border-width: 0 0 1px 0; +} +.panel-body { + overflow: auto; + border-top-width: 0; + padding: 0; +} +.panel-body-noheader { + border-top-width: 1px; +} +.panel-body-noborder { + border-width: 0px; +} +.panel-body-nobottom { + border-bottom-width: 0; +} +.panel-with-icon { + padding-left: 18px; +} +.panel-icon, +.panel-tool { + position: absolute; + top: 50%; + margin-top: -8px; + height: 16px; + overflow: hidden; +} +.panel-icon { + left: 5px; + width: 16px; +} +.panel-tool { + right: 5px; + width: auto; +} +.panel-tool a { + display: inline-block; + width: 16px; + height: 16px; + opacity: 0.6; + filter: alpha(opacity=60); + margin: 0 0 0 2px; + vertical-align: top; +} +.panel-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + background-color: #E6E6E6; + -moz-border-radius: -2px -2px -2px -2px; + -webkit-border-radius: -2px -2px -2px -2px; + border-radius: -2px -2px -2px -2px; +} +.panel-loading { + padding: 11px 0px 10px 30px; +} +.panel-noscroll { + overflow: hidden; +} +.panel-fit, +.panel-fit body { + height: 100%; + margin: 0; + padding: 0; + border: 0; + overflow: hidden; +} +.panel-loading { + background: url('images/loading.gif') no-repeat 10px 10px; +} +.panel-tool-close { + background: url('images/panel_tools.png') no-repeat -16px 0px; +} +.panel-tool-min { + background: url('images/panel_tools.png') no-repeat 0px 0px; +} +.panel-tool-max { + background: url('images/panel_tools.png') no-repeat 0px -16px; +} +.panel-tool-restore { + background: url('images/panel_tools.png') no-repeat -16px -16px; +} +.panel-tool-collapse { + background: url('images/panel_tools.png') no-repeat -32px 0; +} +.panel-tool-expand { + background: url('images/panel_tools.png') no-repeat -32px -16px; +} +.panel-header, +.panel-body { + border-color: #ddd; +} +.panel-header { + background-color: #ffffff; +} +.panel-body { + background-color: #fff; + color: #444; + font-size: 12px; +} +.panel-title { + font-size: 12px; + font-weight: bold; + color: #777; + height: 16px; + line-height: 16px; +} +.panel-footer { + border: 1px solid #ddd; + overflow: hidden; + background: #fff; +} +.panel-footer-noborder { + border-width: 1px 0 0 0; +} +.accordion { + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.accordion .accordion-header { + border-width: 0 0 1px; + cursor: pointer; +} +.accordion .accordion-body { + border-width: 0 0 1px; +} +.accordion-noborder { + border-width: 0; +} +.accordion-noborder .accordion-header { + border-width: 0 0 1px; +} +.accordion-noborder .accordion-body { + border-width: 0 0 1px; +} +.accordion-collapse { + background: url('images/accordion_arrows.png') no-repeat 0 0; +} +.accordion-expand { + background: url('images/accordion_arrows.png') no-repeat -16px 0; +} +.accordion { + background: #fff; + border-color: #ddd; +} +.accordion .accordion-header { + background: #ffffff; + filter: none; +} +.accordion .accordion-header-selected { + background: #CCE6FF; +} +.accordion .accordion-header-selected .panel-title { + color: #000; +} +.window { + overflow: hidden; + padding: 5px; + border-width: 1px; + border-style: solid; +} +.window .window-header { + background: transparent; + padding: 0px 0px 6px 0px; +} +.window .window-body { + border-width: 1px; + border-style: solid; + border-top-width: 0px; +} +.window .window-body-noheader { + border-top-width: 1px; +} +.window .panel-body-nobottom { + border-bottom-width: 0; +} +.window .window-header .panel-icon, +.window .window-header .panel-tool { + top: 50%; + margin-top: -11px; +} +.window .window-header .panel-icon { + left: 1px; +} +.window .window-header .panel-tool { + right: 1px; +} +.window .window-header .panel-with-icon { + padding-left: 18px; +} +.window-proxy { + position: absolute; + overflow: hidden; +} +.window-proxy-mask { + position: absolute; + filter: alpha(opacity=5); + opacity: 0.05; +} +.window-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + filter: alpha(opacity=40); + opacity: 0.40; + font-size: 1px; + overflow: hidden; +} +.window, +.window-shadow { + position: absolute; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.window-shadow { + background: #eee; + -moz-box-shadow: 2px 2px 3px #ededed; + -webkit-box-shadow: 2px 2px 3px #ededed; + box-shadow: 2px 2px 3px #ededed; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.window, +.window .window-body { + border-color: #ddd; +} +.window { + background-color: #ffffff; +} +.window-proxy { + border: 1px dashed #ddd; +} +.window-proxy-mask, +.window-mask { + background: #eee; +} +.window .panel-footer { + border: 1px solid #ddd; + position: relative; + top: -1px; +} +.dialog-content { + overflow: auto; +} +.dialog-toolbar { + padding: 2px 5px; +} +.dialog-tool-separator { + float: left; + height: 24px; + border-left: 1px solid #ddd; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.dialog-button { + padding: 5px; + text-align: right; +} +.dialog-button .l-btn { + margin-left: 5px; +} +.dialog-toolbar, +.dialog-button { + background: #fff; + border-width: 1px; + border-style: solid; +} +.dialog-toolbar { + border-color: #ddd #ddd #ddd #ddd; +} +.dialog-button { + border-color: #ddd #ddd #ddd #ddd; +} +.l-btn { + text-decoration: none; + display: inline-block; + overflow: hidden; + margin: 0; + padding: 0; + cursor: pointer; + outline: none; + text-align: center; + vertical-align: middle; + line-height: normal; +} +.l-btn-plain { + border-width: 0; + padding: 1px; +} +.l-btn-left { + display: inline-block; + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + vertical-align: top; +} +.l-btn-text { + display: inline-block; + vertical-align: top; + width: auto; + line-height: 24px; + font-size: 12px; + padding: 0; + margin: 0 4px; +} +.l-btn-icon { + display: inline-block; + width: 16px; + height: 16px; + line-height: 16px; + position: absolute; + top: 50%; + margin-top: -8px; + font-size: 1px; +} +.l-btn span span .l-btn-empty { + display: inline-block; + margin: 0; + width: 16px; + height: 24px; + font-size: 1px; + vertical-align: top; +} +.l-btn span .l-btn-icon-left { + padding: 0 0 0 20px; + background-position: left center; +} +.l-btn span .l-btn-icon-right { + padding: 0 20px 0 0; + background-position: right center; +} +.l-btn-icon-left .l-btn-text { + margin: 0 4px 0 24px; +} +.l-btn-icon-left .l-btn-icon { + left: 4px; +} +.l-btn-icon-right .l-btn-text { + margin: 0 24px 0 4px; +} +.l-btn-icon-right .l-btn-icon { + right: 4px; +} +.l-btn-icon-top .l-btn-text { + margin: 20px 4px 0 4px; +} +.l-btn-icon-top .l-btn-icon { + top: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-icon-bottom .l-btn-text { + margin: 0 4px 20px 4px; +} +.l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-left .l-btn-empty { + margin: 0 4px; + width: 16px; +} +.l-btn-plain:hover { + padding: 0; +} +.l-btn-focus { + outline: #0000FF dotted thin; +} +.l-btn-large .l-btn-text { + line-height: 40px; +} +.l-btn-large .l-btn-icon { + width: 32px; + height: 32px; + line-height: 32px; + margin-top: -16px; +} +.l-btn-large .l-btn-icon-left .l-btn-text { + margin-left: 40px; +} +.l-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.l-btn-large .l-btn-icon-top .l-btn-text { + margin-top: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-top .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-left .l-btn-empty { + margin: 0 4px; + width: 32px; +} +.l-btn { + color: #777; + background: #ffffff; + background-repeat: repeat-x; + border: 1px solid #dddddd; + background: -webkit-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -moz-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -o-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: linear-gradient(to bottom,#ffffff 0,#ffffff 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#ffffff,GradientType=0); + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.l-btn:hover { + background: #E6E6E6; + color: #444; + border: 1px solid #ddd; + filter: none; +} +.l-btn-plain { + background: transparent; + border-width: 0; + filter: none; +} +.l-btn-outline { + border-width: 1px; + border-color: #ddd; + padding: 0; +} +.l-btn-plain:hover { + background: #E6E6E6; + color: #444; + border: 1px solid #ddd; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.l-btn-disabled, +.l-btn-disabled:hover { + opacity: 0.5; + cursor: default; + background: #ffffff; + color: #777; + background: -webkit-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -moz-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -o-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: linear-gradient(to bottom,#ffffff 0,#ffffff 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#ffffff,GradientType=0); +} +.l-btn-disabled .l-btn-text, +.l-btn-disabled .l-btn-icon { + filter: alpha(opacity=50); +} +.l-btn-plain-disabled, +.l-btn-plain-disabled:hover { + background: transparent; + filter: alpha(opacity=50); +} +.l-btn-selected, +.l-btn-selected:hover { + background: #ddd; + filter: none; +} +.l-btn-plain-selected, +.l-btn-plain-selected:hover { + background: #ddd; +} +.textbox { + position: relative; + border: 1px solid #ddd; + background-color: #fff; + vertical-align: middle; + display: inline-block; + overflow: hidden; + white-space: nowrap; + margin: 0; + padding: 0; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.textbox .textbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 4px; + white-space: normal; + vertical-align: top; + outline-style: none; + resize: none; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.textbox textarea.textbox-text { + white-space: pre-wrap; +} +.textbox .textbox-prompt { + font-size: 12px; + color: #aaa; +} +.textbox .textbox-button, +.textbox .textbox-button:hover { + position: absolute; + top: 0; + padding: 0; + vertical-align: top; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.textbox-button-right, +.textbox-button-right:hover { + border-width: 0 0 0 1px; +} +.textbox-button-left, +.textbox-button-left:hover { + border-width: 0 1px 0 0; +} +.textbox-addon { + position: absolute; + top: 0; +} +.textbox-icon { + display: inline-block; + width: 18px; + height: 20px; + overflow: hidden; + vertical-align: top; + background-position: center center; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); + text-decoration: none; + outline-style: none; +} +.textbox-icon-disabled, +.textbox-icon-readonly { + cursor: default; +} +.textbox-icon:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.textbox-icon-disabled:hover { + opacity: 0.6; + filter: alpha(opacity=60); +} +.textbox-focused { + -moz-box-shadow: 0 0 3px 0 #ddd; + -webkit-box-shadow: 0 0 3px 0 #ddd; + box-shadow: 0 0 3px 0 #ddd; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} +.filebox .textbox-value { + vertical-align: top; + position: absolute; + top: 0; + left: -5000px; +} +.filebox-label { + display: inline-block; + position: absolute; + width: 100%; + height: 100%; + cursor: pointer; + left: 0; + top: 0; + z-index: 10; + background: url('images/blank.gif') no-repeat; +} +.l-btn-disabled .filebox-label { + cursor: default; +} +.combo { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.combo .combo-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0px 2px; + vertical-align: baseline; +} +.combo-arrow { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.combo-arrow-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.combo-panel { + overflow: auto; +} +.combo-arrow { + background: url('images/combo_arrow.png') no-repeat center center; +} +.combo-panel { + background-color: #fff; +} +.combo { + border-color: #ddd; + background-color: #fff; +} +.combo-arrow { + background-color: #ffffff; +} +.combo-arrow-hover { + background-color: #E6E6E6; +} +.combo-arrow:hover { + background-color: #E6E6E6; +} +.combo .textbox-icon-disabled:hover { + cursor: default; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} +.combobox-item, +.combobox-group { + font-size: 12px; + padding: 3px; + padding-right: 0px; +} +.combobox-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.combobox-gitem { + padding-left: 10px; +} +.combobox-group { + font-weight: bold; +} +.combobox-item-hover { + background-color: #E6E6E6; + color: #444; +} +.combobox-item-selected { + background-color: #CCE6FF; + color: #000; +} +.layout { + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + z-index: 0; +} +.layout-panel { + position: absolute; + overflow: hidden; +} +.layout-body { + min-width: 1px; + min-height: 1px; +} +.layout-panel-east, +.layout-panel-west { + z-index: 2; +} +.layout-panel-north, +.layout-panel-south { + z-index: 3; +} +.layout-expand { + position: absolute; + padding: 0px; + font-size: 1px; + cursor: pointer; + z-index: 1; +} +.layout-expand .panel-header, +.layout-expand .panel-body { + background: transparent; + filter: none; + overflow: hidden; +} +.layout-expand .panel-header { + border-bottom-width: 0px; +} +.layout-expand .panel-body { + position: relative; +} +.layout-expand .panel-body .panel-icon { + margin-top: 0; + top: 0; + left: 50%; + margin-left: -8px; +} +.layout-expand-west .panel-header .panel-icon, +.layout-expand-east .panel-header .panel-icon { + display: none; +} +.layout-expand-title { + position: absolute; + top: 0; + left: 21px; + white-space: nowrap; + word-wrap: normal; + -webkit-transform: rotate(90deg); + -webkit-transform-origin: 0 0; + -moz-transform: rotate(90deg); + -moz-transform-origin: 0 0; + -o-transform: rotate(90deg); + -o-transform-origin: 0 0; + transform: rotate(90deg); + transform-origin: 0 0; +} +.layout-expand-with-icon { + top: 18px; +} +.layout-expand .panel-body-noheader .layout-expand-title, +.layout-expand .panel-body-noheader .panel-icon { + top: 5px; +} +.layout-expand .panel-body-noheader .layout-expand-with-icon { + top: 23px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + position: absolute; + font-size: 1px; + display: none; + z-index: 5; +} +.layout-split-proxy-h { + width: 5px; + cursor: e-resize; +} +.layout-split-proxy-v { + height: 5px; + cursor: n-resize; +} +.layout-mask { + position: absolute; + background: #fafafa; + filter: alpha(opacity=10); + opacity: 0.10; + z-index: 4; +} +.layout-button-up { + background: url('images/layout_arrows.png') no-repeat -16px -16px; +} +.layout-button-down { + background: url('images/layout_arrows.png') no-repeat -16px 0; +} +.layout-button-left { + background: url('images/layout_arrows.png') no-repeat 0 0; +} +.layout-button-right { + background: url('images/layout_arrows.png') no-repeat 0 -16px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + background-color: #b3b3b3; +} +.layout-split-north { + border-bottom: 5px solid #fff; +} +.layout-split-south { + border-top: 5px solid #fff; +} +.layout-split-east { + border-left: 5px solid #fff; +} +.layout-split-west { + border-right: 5px solid #fff; +} +.layout-expand { + background-color: #ffffff; +} +.layout-expand-over { + background-color: #ffffff; +} +.tabs-container { + overflow: hidden; +} +.tabs-header { + border-width: 1px; + border-style: solid; + border-bottom-width: 0; + position: relative; + padding: 0; + padding-top: 2px; + overflow: hidden; +} +.tabs-scroller-left, +.tabs-scroller-right { + position: absolute; + top: auto; + bottom: 0; + width: 18px; + font-size: 1px; + display: none; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.tabs-scroller-left { + left: 0; +} +.tabs-scroller-right { + right: 0; +} +.tabs-tool { + position: absolute; + bottom: 0; + padding: 1px; + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.tabs-header-plain .tabs-tool { + padding: 0 1px; +} +.tabs-wrap { + position: relative; + left: 0; + overflow: hidden; + width: 100%; + margin: 0; + padding: 0; +} +.tabs-scrolling { + margin-left: 18px; + margin-right: 18px; +} +.tabs-disabled { + opacity: 0.3; + filter: alpha(opacity=30); +} +.tabs { + list-style-type: none; + height: 26px; + margin: 0px; + padding: 0px; + padding-left: 4px; + width: 50000px; + border-style: solid; + border-width: 0 0 1px 0; +} +.tabs li { + float: left; + display: inline-block; + margin: 0 4px -1px 0; + padding: 0; + position: relative; + border: 0; +} +.tabs li a.tabs-inner { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0 10px; + height: 25px; + line-height: 25px; + text-align: center; + white-space: nowrap; + border-width: 1px; + border-style: solid; + -moz-border-radius: 0px 0px 0 0; + -webkit-border-radius: 0px 0px 0 0; + border-radius: 0px 0px 0 0; +} +.tabs li.tabs-selected a.tabs-inner { + font-weight: bold; + outline: none; +} +.tabs li.tabs-selected a:hover.tabs-inner { + cursor: default; + pointer: default; +} +.tabs li a.tabs-close, +.tabs-p-tool { + position: absolute; + font-size: 1px; + display: block; + height: 12px; + padding: 0; + top: 50%; + margin-top: -6px; + overflow: hidden; +} +.tabs li a.tabs-close { + width: 12px; + right: 5px; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs-p-tool { + right: 16px; +} +.tabs-p-tool a { + display: inline-block; + font-size: 1px; + width: 12px; + height: 12px; + margin: 0; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs li a:hover.tabs-close, +.tabs-p-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + cursor: hand; + cursor: pointer; +} +.tabs-with-icon { + padding-left: 18px; +} +.tabs-icon { + position: absolute; + width: 16px; + height: 16px; + left: 10px; + top: 50%; + margin-top: -8px; +} +.tabs-title { + font-size: 12px; +} +.tabs-closable { + padding-right: 8px; +} +.tabs-panels { + margin: 0px; + padding: 0px; + border-width: 1px; + border-style: solid; + border-top-width: 0; + overflow: hidden; +} +.tabs-header-bottom { + border-width: 0 1px 1px 1px; + padding: 0 0 2px 0; +} +.tabs-header-bottom .tabs { + border-width: 1px 0 0 0; +} +.tabs-header-bottom .tabs li { + margin: -1px 4px 0 0; +} +.tabs-header-bottom .tabs li a.tabs-inner { + -moz-border-radius: 0 0 0px 0px; + -webkit-border-radius: 0 0 0px 0px; + border-radius: 0 0 0px 0px; +} +.tabs-header-bottom .tabs-tool { + top: 0; +} +.tabs-header-bottom .tabs-scroller-left, +.tabs-header-bottom .tabs-scroller-right { + top: 0; + bottom: auto; +} +.tabs-panels-top { + border-width: 1px 1px 0 1px; +} +.tabs-header-left { + float: left; + border-width: 1px 0 1px 1px; + padding: 0; +} +.tabs-header-right { + float: right; + border-width: 1px 1px 1px 0; + padding: 0; +} +.tabs-header-left .tabs-wrap, +.tabs-header-right .tabs-wrap { + height: 100%; +} +.tabs-header-left .tabs { + height: 100%; + padding: 4px 0 0 2px; + border-width: 0 1px 0 0; +} +.tabs-header-right .tabs { + height: 100%; + padding: 4px 2px 0 0; + border-width: 0 0 0 1px; +} +.tabs-header-left .tabs li, +.tabs-header-right .tabs li { + display: block; + width: 100%; + position: relative; +} +.tabs-header-left .tabs li { + left: auto; + right: 0; + margin: 0 -1px 4px 0; + float: right; +} +.tabs-header-right .tabs li { + left: 0; + right: auto; + margin: 0 0 4px -1px; + float: left; +} +.tabs-justified li a.tabs-inner { + padding-left: 0; + padding-right: 0; +} +.tabs-header-left .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 0px 0 0 0px; + -webkit-border-radius: 0px 0 0 0px; + border-radius: 0px 0 0 0px; +} +.tabs-header-right .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 0 0px 0px 0; + -webkit-border-radius: 0 0px 0px 0; + border-radius: 0 0px 0px 0; +} +.tabs-panels-right { + float: right; + border-width: 1px 1px 1px 0; +} +.tabs-panels-left { + float: left; + border-width: 1px 0 1px 1px; +} +.tabs-header-noborder, +.tabs-panels-noborder { + border: 0px; +} +.tabs-header-plain { + border: 0px; + background: transparent; +} +.tabs-pill { + padding-bottom: 3px; +} +.tabs-header-bottom .tabs-pill { + padding-top: 3px; + padding-bottom: 0; +} +.tabs-header-left .tabs-pill { + padding-right: 3px; +} +.tabs-header-right .tabs-pill { + padding-left: 3px; +} +.tabs-header .tabs-pill li a.tabs-inner { + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.tabs-header-narrow, +.tabs-header-narrow .tabs-narrow { + padding: 0; +} +.tabs-narrow li, +.tabs-header-bottom .tabs-narrow li { + margin-left: 0; + margin-right: -1px; +} +.tabs-narrow li.tabs-last, +.tabs-header-bottom .tabs-narrow li.tabs-last { + margin-right: 0; +} +.tabs-header-left .tabs-narrow, +.tabs-header-right .tabs-narrow { + padding-top: 0; +} +.tabs-header-left .tabs-narrow li { + margin-bottom: -1px; + margin-right: -1px; +} +.tabs-header-left .tabs-narrow li.tabs-last, +.tabs-header-right .tabs-narrow li.tabs-last { + margin-bottom: 0; +} +.tabs-header-right .tabs-narrow li { + margin-bottom: -1px; + margin-left: -1px; +} +.tabs-scroller-left { + background: #ffffff url('images/tabs_icons.png') no-repeat 1px center; +} +.tabs-scroller-right { + background: #ffffff url('images/tabs_icons.png') no-repeat -15px center; +} +.tabs li a.tabs-close { + background: url('images/tabs_icons.png') no-repeat -34px center; +} +.tabs li a.tabs-inner:hover { + background: #E6E6E6; + color: #444; + filter: none; +} +.tabs li.tabs-selected a.tabs-inner { + background-color: #fff; + color: #777; +} +.tabs li a.tabs-inner { + color: #777; + background-color: #ffffff; +} +.tabs-header, +.tabs-tool { + background-color: #ffffff; +} +.tabs-header-plain { + background: transparent; +} +.tabs-header, +.tabs-scroller-left, +.tabs-scroller-right, +.tabs-tool, +.tabs, +.tabs-panels, +.tabs li a.tabs-inner, +.tabs li.tabs-selected a.tabs-inner, +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner, +.tabs-header-left .tabs li.tabs-selected a.tabs-inner, +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-color: #ddd; +} +.tabs-p-tool a:hover, +.tabs li a:hover.tabs-close, +.tabs-scroller-over { + background-color: #E6E6E6; +} +.tabs li.tabs-selected a.tabs-inner { + border-bottom: 1px solid #fff; +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + border-top: 1px solid #fff; +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + border-right: 1px solid #fff; +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-left: 1px solid #fff; +} +.tabs-header .tabs-pill li.tabs-selected a.tabs-inner { + background: #CCE6FF; + color: #000; + filter: none; + border-color: #ddd; +} +.datagrid .panel-body { + overflow: hidden; + position: relative; +} +.datagrid-view { + position: relative; + overflow: hidden; +} +.datagrid-view1, +.datagrid-view2 { + position: absolute; + overflow: hidden; + top: 0; +} +.datagrid-view1 { + left: 0; +} +.datagrid-view2 { + right: 0; +} +.datagrid-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0.3; + filter: alpha(opacity=30); + display: none; +} +.datagrid-mask-msg { + position: absolute; + top: 50%; + margin-top: -20px; + padding: 10px 5px 10px 30px; + width: auto; + height: 16px; + border-width: 2px; + border-style: solid; + display: none; +} +.datagrid-sort-icon { + padding: 0; + display: none; +} +.datagrid-toolbar { + height: auto; + padding: 1px 2px; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ddd; + border-right: 1px solid #fff; + margin: 2px 1px; +} +.datagrid .datagrid-pager { + display: block; + margin: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.datagrid .datagrid-pager-top { + border-width: 0 0 1px 0; +} +.datagrid-header { + overflow: hidden; + cursor: default; + border-width: 0 0 1px 0; + border-style: solid; +} +.datagrid-header-inner { + float: left; + width: 10000px; +} +.datagrid-header-row, +.datagrid-row { + height: 25px; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-width: 0 1px 1px 0; + border-style: dotted; + margin: 0; + padding: 0; +} +.datagrid-cell, +.datagrid-cell-group, +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + margin: 0; + padding: 0 4px; + white-space: nowrap; + word-wrap: normal; + overflow: hidden; + height: 18px; + line-height: 18px; + font-size: 12px; +} +.datagrid-header .datagrid-cell { + height: auto; +} +.datagrid-header .datagrid-cell span { + font-size: 12px; +} +.datagrid-cell-group { + text-align: center; + text-overflow: ellipsis; +} +.datagrid-header-rownumber, +.datagrid-cell-rownumber { + width: 30px; + text-align: center; + margin: 0; + padding: 0; +} +.datagrid-body { + margin: 0; + padding: 0; + overflow: auto; + zoom: 1; +} +.datagrid-view1 .datagrid-body-inner { + padding-bottom: 20px; +} +.datagrid-view1 .datagrid-body { + overflow: hidden; +} +.datagrid-footer { + overflow: hidden; +} +.datagrid-footer-inner { + border-width: 1px 0 0 0; + border-style: solid; + width: 10000px; + float: left; +} +.datagrid-row-editing .datagrid-cell { + height: auto; +} +.datagrid-header-check, +.datagrid-cell-check { + padding: 0; + width: 27px; + height: 18px; + font-size: 1px; + text-align: center; + overflow: hidden; +} +.datagrid-header-check input, +.datagrid-cell-check input { + margin: 0; + padding: 0; + width: 15px; + height: 18px; +} +.datagrid-resize-proxy { + position: absolute; + width: 1px; + height: 10000px; + top: 0; + cursor: e-resize; + display: none; +} +.datagrid-body .datagrid-editable { + margin: 0; + padding: 0; +} +.datagrid-body .datagrid-editable table { + width: 100%; + height: 100%; +} +.datagrid-body .datagrid-editable td { + border: 0; + margin: 0; + padding: 0; +} +.datagrid-view .datagrid-editable-input { + margin: 0; + padding: 2px 4px; + border: 1px solid #ddd; + font-size: 12px; + outline-style: none; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.datagrid-sort .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -64px center; +} +.datagrid-sort-desc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat -16px center; +} +.datagrid-sort-asc .datagrid-sort-icon { + display: inline; + padding: 0 13px 0 0; + background: url('images/datagrid_icons.png') no-repeat 0px center; +} +.datagrid-row-collapse { + background: url('images/datagrid_icons.png') no-repeat -48px center; +} +.datagrid-row-expand { + background: url('images/datagrid_icons.png') no-repeat -32px center; +} +.datagrid-mask-msg { + background: #fff url('images/loading.gif') no-repeat scroll 5px center; +} +.datagrid-header, +.datagrid-td-rownumber { + background-color: #ffffff; +} +.datagrid-cell-rownumber { + color: #444; +} +.datagrid-resize-proxy { + background: #b3b3b3; +} +.datagrid-mask { + background: #eee; +} +.datagrid-mask-msg { + border-color: #ddd; +} +.datagrid-toolbar, +.datagrid-pager { + background: #fff; +} +.datagrid-header, +.datagrid-toolbar, +.datagrid-pager, +.datagrid-footer-inner { + border-color: #ddd; +} +.datagrid-header td, +.datagrid-body td, +.datagrid-footer td { + border-color: #ddd; +} +.datagrid-htable, +.datagrid-btable, +.datagrid-ftable { + color: #444; + border-collapse: separate; +} +.datagrid-row-alt { + background: #f5f5f5; +} +.datagrid-row-over, +.datagrid-header td.datagrid-header-over { + background: #E6E6E6; + color: #444; + cursor: default; +} +.datagrid-row-selected { + background: #CCE6FF; + color: #000; +} +.datagrid-row-editing .textbox, +.datagrid-row-editing .textbox-text { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.propertygrid .datagrid-view1 .datagrid-body td { + padding-bottom: 1px; + border-width: 0 1px 0 0; +} +.propertygrid .datagrid-group { + height: 21px; + overflow: hidden; + border-width: 0 0 1px 0; + border-style: solid; +} +.propertygrid .datagrid-group span { + font-weight: bold; +} +.propertygrid .datagrid-view1 .datagrid-body td { + border-color: #ddd; +} +.propertygrid .datagrid-view1 .datagrid-group { + border-color: #ffffff; +} +.propertygrid .datagrid-view2 .datagrid-group { + border-color: #ddd; +} +.propertygrid .datagrid-group, +.propertygrid .datagrid-view1 .datagrid-body, +.propertygrid .datagrid-view1 .datagrid-row-over, +.propertygrid .datagrid-view1 .datagrid-row-selected { + background: #ffffff; +} +.datalist .datagrid-header { + border-width: 0; +} +.datalist .datagrid-group, +.m-list .m-list-group { + height: 25px; + line-height: 25px; + font-weight: bold; + overflow: hidden; + background-color: #ffffff; + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ddd; +} +.datalist .datagrid-group-expander { + display: none; +} +.datalist .datagrid-group-title { + padding: 0 4px; +} +.datalist .datagrid-btable { + width: 100%; + table-layout: fixed; +} +.datalist .datagrid-row td { + border-style: solid; + border-left-color: transparent; + border-right-color: transparent; + border-bottom-width: 0; +} +.datalist-lines .datagrid-row td { + border-bottom-width: 1px; +} +.datalist .datagrid-cell, +.m-list li { + width: auto; + height: auto; + padding: 2px 4px; + line-height: 18px; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link, +.m-list li>a { + display: block; + position: relative; + cursor: pointer; + color: #444; + text-decoration: none; + overflow: hidden; + margin: -2px -4px; + padding: 2px 4px; + padding-right: 16px; + line-height: 18px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.datalist-link::after, +.m-list li>a::after { + position: absolute; + display: block; + width: 8px; + height: 8px; + content: ''; + right: 6px; + top: 50%; + margin-top: -4px; + border-style: solid; + border-width: 1px 1px 0 0; + -ms-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} +.m-list { + margin: 0; + padding: 0; + list-style: none; +} +.m-list li { + border-style: solid; + border-width: 0 0 1px 0; + border-color: #ddd; +} +.m-list li>a:hover { + background: #E6E6E6; + color: #444; +} +.m-list .m-list-group { + padding: 0 4px; +} +.pagination { + zoom: 1; +} +.pagination table { + float: left; + height: 30px; +} +.pagination td { + border: 0; +} +.pagination-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ddd; + border-right: 1px solid #fff; + margin: 3px 1px; +} +.pagination .pagination-num { + border-width: 1px; + border-style: solid; + margin: 0 2px; + padding: 2px; + width: 2em; + height: auto; +} +.pagination-page-list { + margin: 0px 6px; + padding: 1px 2px; + width: auto; + height: auto; + border-width: 1px; + border-style: solid; +} +.pagination-info { + float: right; + margin: 0 6px 0 0; + padding: 0; + height: 30px; + line-height: 30px; + font-size: 12px; +} +.pagination span { + font-size: 12px; +} +.pagination-link .l-btn-text { + width: 24px; + text-align: center; + margin: 0; +} +.pagination-first { + background: url('images/pagination_icons.png') no-repeat 0 center; +} +.pagination-prev { + background: url('images/pagination_icons.png') no-repeat -16px center; +} +.pagination-next { + background: url('images/pagination_icons.png') no-repeat -32px center; +} +.pagination-last { + background: url('images/pagination_icons.png') no-repeat -48px center; +} +.pagination-load { + background: url('images/pagination_icons.png') no-repeat -64px center; +} +.pagination-loading { + background: url('images/loading.gif') no-repeat center center; +} +.pagination-page-list, +.pagination .pagination-num { + border-color: #ddd; +} +.calendar { + border-width: 1px; + border-style: solid; + padding: 1px; + overflow: hidden; +} +.calendar table { + table-layout: fixed; + border-collapse: separate; + font-size: 12px; + width: 100%; + height: 100%; +} +.calendar table td, +.calendar table th { + font-size: 12px; +} +.calendar-noborder { + border: 0; +} +.calendar-header { + position: relative; + height: 22px; +} +.calendar-title { + text-align: center; + height: 22px; +} +.calendar-title span { + position: relative; + display: inline-block; + top: 2px; + padding: 0 3px; + height: 18px; + line-height: 18px; + font-size: 12px; + cursor: pointer; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.calendar-prevmonth, +.calendar-nextmonth, +.calendar-prevyear, +.calendar-nextyear { + position: absolute; + top: 50%; + margin-top: -7px; + width: 14px; + height: 14px; + cursor: pointer; + font-size: 1px; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.calendar-prevmonth { + left: 20px; + background: url('images/calendar_arrows.png') no-repeat -18px -2px; +} +.calendar-nextmonth { + right: 20px; + background: url('images/calendar_arrows.png') no-repeat -34px -2px; +} +.calendar-prevyear { + left: 3px; + background: url('images/calendar_arrows.png') no-repeat -1px -2px; +} +.calendar-nextyear { + right: 3px; + background: url('images/calendar_arrows.png') no-repeat -49px -2px; +} +.calendar-body { + position: relative; +} +.calendar-body th, +.calendar-body td { + text-align: center; +} +.calendar-day { + border: 0; + padding: 1px; + cursor: pointer; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.calendar-other-month { + opacity: 0.3; + filter: alpha(opacity=30); +} +.calendar-disabled { + opacity: 0.6; + filter: alpha(opacity=60); + cursor: default; +} +.calendar-menu { + position: absolute; + top: 0; + left: 0; + width: 180px; + height: 150px; + padding: 5px; + font-size: 12px; + display: none; + overflow: hidden; +} +.calendar-menu-year-inner { + text-align: center; + padding-bottom: 5px; +} +.calendar-menu-year { + width: 40px; + text-align: center; + border-width: 1px; + border-style: solid; + margin: 0; + padding: 2px; + font-weight: bold; + font-size: 12px; +} +.calendar-menu-prev, +.calendar-menu-next { + display: inline-block; + width: 21px; + height: 21px; + vertical-align: top; + cursor: pointer; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.calendar-menu-prev { + margin-right: 10px; + background: url('images/calendar_arrows.png') no-repeat 2px 2px; +} +.calendar-menu-next { + margin-left: 10px; + background: url('images/calendar_arrows.png') no-repeat -45px 2px; +} +.calendar-menu-month { + text-align: center; + cursor: pointer; + font-weight: bold; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.calendar-body th, +.calendar-menu-month { + color: #919191; +} +.calendar-day { + color: #444; +} +.calendar-sunday { + color: #CC2222; +} +.calendar-saturday { + color: #00ee00; +} +.calendar-today { + color: #0000ff; +} +.calendar-menu-year { + border-color: #ddd; +} +.calendar { + border-color: #ddd; +} +.calendar-header { + background: #ffffff; +} +.calendar-body, +.calendar-menu { + background: #fff; +} +.calendar-body th { + background: #fff; + padding: 2px 0; +} +.calendar-hover, +.calendar-nav-hover, +.calendar-menu-hover { + background-color: #E6E6E6; + color: #444; +} +.calendar-hover { + border: 1px solid #ddd; + padding: 0; +} +.calendar-selected { + background-color: #CCE6FF; + color: #000; + border: 1px solid #99cdff; + padding: 0; +} +.datebox-calendar-inner { + height: 180px; +} +.datebox-button { + height: 18px; + padding: 2px 5px; + text-align: center; +} +.datebox-button a { + font-size: 12px; + font-weight: bold; + text-decoration: none; + opacity: 0.6; + filter: alpha(opacity=60); +} +.datebox-button a:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.datebox-current, +.datebox-close { + float: left; +} +.datebox-close { + float: right; +} +.datebox .combo-arrow { + background-image: url('images/datebox_arrow.png'); + background-position: center center; +} +.datebox-button { + background-color: #fff; +} +.datebox-button a { + color: #777; +} +.numberbox { + border: 1px solid #ddd; + margin: 0; + padding: 0 2px; + vertical-align: middle; +} +.textbox { + padding: 0; +} +.spinner { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.spinner .spinner-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0 2px; + vertical-align: baseline; +} +.spinner-arrow { + background-color: #ffffff; + display: inline-block; + overflow: hidden; + vertical-align: top; + margin: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + width: 18px; +} +.spinner-arrow-up, +.spinner-arrow-down { + opacity: 0.6; + filter: alpha(opacity=60); + display: block; + font-size: 1px; + width: 18px; + height: 10px; + width: 100%; + height: 50%; + color: #777; + outline-style: none; +} +.spinner-arrow-hover { + background-color: #E6E6E6; + opacity: 1.0; + filter: alpha(opacity=100); +} +.spinner-arrow-up:hover, +.spinner-arrow-down:hover { + opacity: 1.0; + filter: alpha(opacity=100); + background-color: #E6E6E6; +} +.textbox-icon-disabled .spinner-arrow-up:hover, +.textbox-icon-disabled .spinner-arrow-down:hover { + opacity: 0.6; + filter: alpha(opacity=60); + background-color: #ffffff; + cursor: default; +} +.spinner .textbox-icon-disabled { + opacity: 0.6; + filter: alpha(opacity=60); +} +.spinner-arrow-up { + background: url('images/spinner_arrows.png') no-repeat 1px center; +} +.spinner-arrow-down { + background: url('images/spinner_arrows.png') no-repeat -15px center; +} +.spinner { + border-color: #ddd; +} +.progressbar { + border-width: 1px; + border-style: solid; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; + overflow: hidden; + position: relative; +} +.progressbar-text { + text-align: center; + position: absolute; +} +.progressbar-value { + position: relative; + overflow: hidden; + width: 0; + -moz-border-radius: 0px 0 0 0px; + -webkit-border-radius: 0px 0 0 0px; + border-radius: 0px 0 0 0px; +} +.progressbar { + border-color: #ddd; +} +.progressbar-text { + color: #444; + font-size: 12px; +} +.progressbar-value .progressbar-text { + background-color: #CCE6FF; + color: #000; +} +.searchbox { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.searchbox .searchbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 0 2px; + vertical-align: top; +} +.searchbox .searchbox-prompt { + font-size: 12px; + color: #ccc; +} +.searchbox-button { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.searchbox-button-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.searchbox .l-btn-plain { + border: 0; + padding: 0; + vertical-align: top; + opacity: 0.6; + filter: alpha(opacity=60); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .l-btn-plain:hover { + border: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox a.m-btn-plain-active { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .m-btn-active { + border-width: 0 1px 0 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .textbox-button-right { + border-width: 0 0 0 1px; +} +.searchbox .textbox-button-left { + border-width: 0 1px 0 0; +} +.searchbox-button { + background: url('images/searchbox_button.png') no-repeat center center; +} +.searchbox { + border-color: #ddd; + background-color: #fff; +} +.searchbox .l-btn-plain { + background: #ffffff; +} +.searchbox .l-btn-plain-disabled, +.searchbox .l-btn-plain-disabled:hover { + opacity: 0.5; + filter: alpha(opacity=50); +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} +.slider-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.slider-h { + height: 22px; +} +.slider-v { + width: 22px; +} +.slider-inner { + position: relative; + height: 6px; + top: 7px; + border-width: 1px; + border-style: solid; + border-radius: 0px; +} +.slider-handle { + position: absolute; + display: block; + outline: none; + width: 20px; + height: 20px; + top: 50%; + margin-top: -10px; + margin-left: -10px; +} +.slider-tip { + position: absolute; + display: inline-block; + line-height: 12px; + font-size: 12px; + white-space: nowrap; + top: -22px; +} +.slider-rule { + position: relative; + top: 15px; +} +.slider-rule span { + position: absolute; + display: inline-block; + font-size: 0; + height: 5px; + border-width: 0 0 0 1px; + border-style: solid; +} +.slider-rulelabel { + position: relative; + top: 20px; +} +.slider-rulelabel span { + position: absolute; + display: inline-block; + font-size: 12px; +} +.slider-v .slider-inner { + width: 6px; + left: 7px; + top: 0; + float: left; +} +.slider-v .slider-handle { + left: 50%; + margin-top: -10px; +} +.slider-v .slider-tip { + left: -10px; + margin-top: -6px; +} +.slider-v .slider-rule { + float: left; + top: 0; + left: 16px; +} +.slider-v .slider-rule span { + width: 5px; + height: 'auto'; + border-left: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.slider-v .slider-rulelabel { + float: left; + top: 0; + left: 23px; +} +.slider-handle { + background: url('images/slider_handle.png') no-repeat; +} +.slider-inner { + border-color: #ddd; + background: #ffffff; +} +.slider-rule span { + border-color: #ddd; +} +.slider-rulelabel span { + color: #444; +} +.menu { + position: absolute; + margin: 0; + padding: 2px; + border-width: 1px; + border-style: solid; + overflow: hidden; +} +.menu-inline { + position: relative; +} +.menu-item { + position: relative; + margin: 0; + padding: 0; + overflow: hidden; + white-space: nowrap; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.menu-text { + height: 20px; + line-height: 20px; + float: left; + padding-left: 28px; +} +.menu-icon { + position: absolute; + width: 16px; + height: 16px; + left: 2px; + top: 50%; + margin-top: -8px; +} +.menu-rightarrow { + position: absolute; + width: 16px; + height: 16px; + right: 0; + top: 50%; + margin-top: -8px; +} +.menu-line { + position: absolute; + left: 26px; + top: 0; + height: 2000px; + font-size: 1px; +} +.menu-sep { + margin: 3px 0px 3px 25px; + font-size: 1px; +} +.menu-noline .menu-line { + display: none; +} +.menu-noline .menu-sep { + margin-left: 0; + margin-right: 0; +} +.menu-active { + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.menu-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default; +} +.menu-text, +.menu-text span { + font-size: 12px; +} +.menu-shadow { + position: absolute; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; + background: #eee; + -moz-box-shadow: 2px 2px 3px #ededed; + -webkit-box-shadow: 2px 2px 3px #ededed; + box-shadow: 2px 2px 3px #ededed; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.menu-rightarrow { + background: url('images/menu_arrows.png') no-repeat -32px center; +} +.menu-line { + border-left: 1px solid #ddd; + border-right: 1px solid #fff; +} +.menu-sep { + border-top: 1px solid #ddd; + border-bottom: 1px solid #fff; +} +.menu { + background-color: #ffffff; + border-color: #ddd; + color: #444; +} +.menu-content { + background: #fff; +} +.menu-item { + border-color: transparent; + _border-color: #ffffff; +} +.menu-active { + border-color: #ddd; + color: #444; + background: #E6E6E6; +} +.menu-active-disabled { + border-color: transparent; + background: transparent; + color: #444; +} +.m-btn-downarrow, +.s-btn-downarrow { + display: inline-block; + position: absolute; + width: 16px; + height: 16px; + font-size: 1px; + right: 0; + top: 50%; + margin-top: -8px; +} +.m-btn-active, +.s-btn-active { + background: #E6E6E6; + color: #444; + border: 1px solid #ddd; + filter: none; +} +.m-btn-plain-active, +.s-btn-plain-active { + background: transparent; + padding: 0; + border-width: 1px; + border-style: solid; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.m-btn .l-btn-left .l-btn-text { + margin-right: 20px; +} +.m-btn .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.m-btn .l-btn-icon-right .l-btn-icon { + right: 20px; +} +.m-btn .l-btn-icon-top .l-btn-text { + margin-right: 4px; + margin-bottom: 14px; +} +.m-btn .l-btn-icon-bottom .l-btn-text { + margin-right: 4px; + margin-bottom: 34px; +} +.m-btn .l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 20px; +} +.m-btn .l-btn-icon-top .m-btn-downarrow, +.m-btn .l-btn-icon-bottom .m-btn-downarrow { + top: auto; + bottom: 0px; + left: 50%; + margin-left: -8px; +} +.m-btn-line { + display: inline-block; + position: absolute; + font-size: 1px; + display: none; +} +.m-btn .l-btn-left .m-btn-line { + right: 0; + width: 16px; + height: 500px; + border-style: solid; + border-color: #b3b3b3; + border-width: 0 0 0 1px; +} +.m-btn .l-btn-icon-top .m-btn-line, +.m-btn .l-btn-icon-bottom .m-btn-line { + left: 0; + bottom: 0; + width: 500px; + height: 16px; + border-width: 1px 0 0 0; +} +.m-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 56px; +} +.m-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 50px; +} +.m-btn-downarrow, +.s-btn-downarrow { + background: url('images/menu_arrows.png') no-repeat 0 center; +} +.m-btn-plain-active, +.s-btn-plain-active { + border-color: #ddd; + background-color: #E6E6E6; + color: #444; +} +.s-btn:hover .m-btn-line, +.s-btn-active .m-btn-line, +.s-btn-plain-active .m-btn-line { + display: inline-block; +} +.l-btn:hover .s-btn-downarrow, +.s-btn-active .s-btn-downarrow, +.s-btn-plain-active .s-btn-downarrow { + border-style: solid; + border-color: #b3b3b3; + border-width: 0 0 0 1px; +} +.messager-body { + padding: 10px; + overflow: auto; +} +.messager-button { + text-align: center; + padding: 5px; +} +.messager-button .l-btn { + width: 70px; +} +.messager-icon { + float: left; + width: 32px; + height: 32px; + margin: 0 10px 10px 0; +} +.messager-error { + background: url('images/messager_icons.png') no-repeat scroll -64px 0; +} +.messager-info { + background: url('images/messager_icons.png') no-repeat scroll 0 0; +} +.messager-question { + background: url('images/messager_icons.png') no-repeat scroll -32px 0; +} +.messager-warning { + background: url('images/messager_icons.png') no-repeat scroll -96px 0; +} +.messager-progress { + padding: 10px; +} +.messager-p-msg { + margin-bottom: 5px; +} +.messager-body .messager-input { + width: 100%; + padding: 1px 0; + border: 1px solid #ddd; +} +.tree { + margin: 0; + padding: 0; + list-style-type: none; +} +.tree li { + white-space: nowrap; +} +.tree li ul { + list-style-type: none; + margin: 0; + padding: 0; +} +.tree-node { + height: 18px; + white-space: nowrap; + cursor: pointer; +} +.tree-hit { + cursor: pointer; +} +.tree-expanded, +.tree-collapsed, +.tree-folder, +.tree-file, +.tree-checkbox, +.tree-indent { + display: inline-block; + width: 16px; + height: 18px; + vertical-align: top; + overflow: hidden; +} +.tree-expanded { + background: url('images/tree_icons.png') no-repeat -18px 0px; +} +.tree-expanded-hover { + background: url('images/tree_icons.png') no-repeat -50px 0px; +} +.tree-collapsed { + background: url('images/tree_icons.png') no-repeat 0px 0px; +} +.tree-collapsed-hover { + background: url('images/tree_icons.png') no-repeat -32px 0px; +} +.tree-lines .tree-expanded, +.tree-lines .tree-root-first .tree-expanded { + background: url('images/tree_icons.png') no-repeat -144px 0; +} +.tree-lines .tree-collapsed, +.tree-lines .tree-root-first .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -128px 0; +} +.tree-lines .tree-node-last .tree-expanded, +.tree-lines .tree-root-one .tree-expanded { + background: url('images/tree_icons.png') no-repeat -80px 0; +} +.tree-lines .tree-node-last .tree-collapsed, +.tree-lines .tree-root-one .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -64px 0; +} +.tree-line { + background: url('images/tree_icons.png') no-repeat -176px 0; +} +.tree-join { + background: url('images/tree_icons.png') no-repeat -192px 0; +} +.tree-joinbottom { + background: url('images/tree_icons.png') no-repeat -160px 0; +} +.tree-folder { + background: url('images/tree_icons.png') no-repeat -208px 0; +} +.tree-folder-open { + background: url('images/tree_icons.png') no-repeat -224px 0; +} +.tree-file { + background: url('images/tree_icons.png') no-repeat -240px 0; +} +.tree-loading { + background: url('images/loading.gif') no-repeat center center; +} +.tree-checkbox0 { + background: url('images/tree_icons.png') no-repeat -208px -18px; +} +.tree-checkbox1 { + background: url('images/tree_icons.png') no-repeat -224px -18px; +} +.tree-checkbox2 { + background: url('images/tree_icons.png') no-repeat -240px -18px; +} +.tree-title { + font-size: 12px; + display: inline-block; + text-decoration: none; + vertical-align: top; + white-space: nowrap; + padding: 0 2px; + height: 18px; + line-height: 18px; +} +.tree-node-proxy { + font-size: 12px; + line-height: 20px; + padding: 0 2px 0 20px; + border-width: 1px; + border-style: solid; + z-index: 9900000; +} +.tree-dnd-icon { + display: inline-block; + position: absolute; + width: 16px; + height: 18px; + left: 2px; + top: 50%; + margin-top: -9px; +} +.tree-dnd-yes { + background: url('images/tree_icons.png') no-repeat -256px 0; +} +.tree-dnd-no { + background: url('images/tree_icons.png') no-repeat -256px -18px; +} +.tree-node-top { + border-top: 1px dotted red; +} +.tree-node-bottom { + border-bottom: 1px dotted red; +} +.tree-node-append .tree-title { + border: 1px dotted red; +} +.tree-editor { + border: 1px solid #ccc; + font-size: 12px; + height: 14px !important; + height: 18px; + line-height: 14px; + padding: 1px 2px; + width: 80px; + position: absolute; + top: 0; +} +.tree-node-proxy { + background-color: #fff; + color: #444; + border-color: #ddd; +} +.tree-node-hover { + background: #E6E6E6; + color: #444; +} +.tree-node-selected { + background: #CCE6FF; + color: #000; +} +.tree-node-hidden { + display: none; +} +.validatebox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; + color: #000; +} +.tooltip { + position: absolute; + display: none; + z-index: 9900000; + outline: none; + opacity: 1; + filter: alpha(opacity=100); + padding: 5px; + border-width: 1px; + border-style: solid; + border-radius: 5px; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.tooltip-content { + font-size: 12px; +} +.tooltip-arrow-outer, +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + line-height: 0; + font-size: 0; + border-style: solid; + border-width: 6px; + border-color: transparent; + _border-color: tomato; + _filter: chroma(color=tomato); +} +.tooltip-arrow { + display: none \9; +} +.tooltip-right .tooltip-arrow-outer { + left: 0; + top: 50%; + margin: -6px 0 0 -13px; +} +.tooltip-right .tooltip-arrow { + left: 0; + top: 50%; + margin: -6px 0 0 -12px; +} +.tooltip-left .tooltip-arrow-outer { + right: 0; + top: 50%; + margin: -6px -13px 0 0; +} +.tooltip-left .tooltip-arrow { + right: 0; + top: 50%; + margin: -6px -12px 0 0; +} +.tooltip-top .tooltip-arrow-outer { + bottom: 0; + left: 50%; + margin: 0 0 -13px -6px; +} +.tooltip-top .tooltip-arrow { + bottom: 0; + left: 50%; + margin: 0 0 -12px -6px; +} +.tooltip-bottom .tooltip-arrow-outer { + top: 0; + left: 50%; + margin: -13px 0 0 -6px; +} +.tooltip-bottom .tooltip-arrow { + top: 0; + left: 50%; + margin: -12px 0 0 -6px; +} +.tooltip { + background-color: #fff; + border-color: #ddd; + color: #444; +} +.tooltip-right .tooltip-arrow-outer { + border-right-color: #ddd; +} +.tooltip-right .tooltip-arrow { + border-right-color: #fff; +} +.tooltip-left .tooltip-arrow-outer { + border-left-color: #ddd; +} +.tooltip-left .tooltip-arrow { + border-left-color: #fff; +} +.tooltip-top .tooltip-arrow-outer { + border-top-color: #ddd; +} +.tooltip-top .tooltip-arrow { + border-top-color: #fff; +} +.tooltip-bottom .tooltip-arrow-outer { + border-bottom-color: #ddd; +} +.tooltip-bottom .tooltip-arrow { + border-bottom-color: #fff; +} +.switchbutton { + text-decoration: none; + display: inline-block; + overflow: hidden; + vertical-align: middle; + margin: 0; + padding: 0; + cursor: pointer; + background: #dddddd; + border: 1px solid #dddddd; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.switchbutton-inner { + display: inline-block; + overflow: hidden; + position: relative; + top: -1px; + left: -1px; +} +.switchbutton-on, +.switchbutton-off, +.switchbutton-handle { + display: inline-block; + text-align: center; + height: 100%; + float: left; + font-size: 12px; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.switchbutton-on { + background: #CCE6FF; + color: #000; +} +.switchbutton-off { + background-color: #fff; + color: #444; +} +.switchbutton-on, +.switchbutton-reversed .switchbutton-off { + -moz-border-radius: 0px 0 0 0px; + -webkit-border-radius: 0px 0 0 0px; + border-radius: 0px 0 0 0px; +} +.switchbutton-off, +.switchbutton-reversed .switchbutton-on { + -moz-border-radius: 0 0px 0px 0; + -webkit-border-radius: 0 0px 0px 0; + border-radius: 0 0px 0px 0; +} +.switchbutton-handle { + position: absolute; + top: 0; + left: 50%; + background-color: #fff; + color: #444; + border: 1px solid #dddddd; + -moz-box-shadow: 0 0 3px 0 #dddddd; + -webkit-box-shadow: 0 0 3px 0 #dddddd; + box-shadow: 0 0 3px 0 #dddddd; +} +.switchbutton-value { + position: absolute; + top: 0; + left: -5000px; +} +.switchbutton-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.switchbutton-disabled, +.switchbutton-readonly { + cursor: default; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/filebox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/filebox.css new file mode 100644 index 0000000..c6bac66 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/filebox.css @@ -0,0 +1,20 @@ +.filebox .textbox-value { + vertical-align: top; + position: absolute; + top: 0; + left: -5000px; +} +.filebox-label { + display: inline-block; + position: absolute; + width: 100%; + height: 100%; + cursor: pointer; + left: 0; + top: 0; + z-index: 10; + background: url('images/blank.gif') no-repeat; +} +.l-btn-disabled .filebox-label { + cursor: default; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/.gitignore b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/.gitignore new file mode 100644 index 0000000..6358cd4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/.gitignore @@ -0,0 +1 @@ +/desktop.ini diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/accordion_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/accordion_arrows.png new file mode 100644 index 0000000..720835f Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/accordion_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/blank.gif b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/blank.gif new file mode 100644 index 0000000..1d11fa9 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/blank.gif differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/calendar_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/calendar_arrows.png new file mode 100644 index 0000000..430c4ad Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/calendar_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/combo_arrow.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/combo_arrow.png new file mode 100644 index 0000000..2e59fb9 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/combo_arrow.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/datagrid_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/datagrid_icons.png new file mode 100644 index 0000000..762d0ce Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/datagrid_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/datebox_arrow.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/datebox_arrow.png new file mode 100644 index 0000000..783c833 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/datebox_arrow.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/layout_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/layout_arrows.png new file mode 100644 index 0000000..6f41654 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/layout_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/linkbutton_bg.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/linkbutton_bg.png new file mode 100644 index 0000000..fc66bd2 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/linkbutton_bg.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/loading.gif b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/loading.gif new file mode 100644 index 0000000..68f01d0 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/loading.gif differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/menu_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/menu_arrows.png new file mode 100644 index 0000000..b986842 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/menu_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/messager_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/messager_icons.png new file mode 100644 index 0000000..62c18c1 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/messager_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/pagination_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/pagination_icons.png new file mode 100644 index 0000000..616f0bd Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/pagination_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/panel_tools.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/panel_tools.png new file mode 100644 index 0000000..fe682ef Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/panel_tools.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/searchbox_button.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/searchbox_button.png new file mode 100644 index 0000000..6dd1931 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/searchbox_button.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/slider_handle.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/slider_handle.png new file mode 100644 index 0000000..b9802ba Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/slider_handle.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/spinner_arrows.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/spinner_arrows.png new file mode 100644 index 0000000..b68592d Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/spinner_arrows.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/tabs_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/tabs_icons.png new file mode 100644 index 0000000..4d29966 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/tabs_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/tree_icons.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/tree_icons.png new file mode 100644 index 0000000..e9be4f3 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/tree_icons.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/validatebox_warning.png b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/validatebox_warning.png new file mode 100644 index 0000000..2b3d4f0 Binary files /dev/null and b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/images/validatebox_warning.png differ diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/layout.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/layout.css new file mode 100644 index 0000000..8c0bf20 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/layout.css @@ -0,0 +1,133 @@ +.layout { + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + z-index: 0; +} +.layout-panel { + position: absolute; + overflow: hidden; +} +.layout-body { + min-width: 1px; + min-height: 1px; +} +.layout-panel-east, +.layout-panel-west { + z-index: 2; +} +.layout-panel-north, +.layout-panel-south { + z-index: 3; +} +.layout-expand { + position: absolute; + padding: 0px; + font-size: 1px; + cursor: pointer; + z-index: 1; +} +.layout-expand .panel-header, +.layout-expand .panel-body { + background: transparent; + filter: none; + overflow: hidden; +} +.layout-expand .panel-header { + border-bottom-width: 0px; +} +.layout-expand .panel-body { + position: relative; +} +.layout-expand .panel-body .panel-icon { + margin-top: 0; + top: 0; + left: 50%; + margin-left: -8px; +} +.layout-expand-west .panel-header .panel-icon, +.layout-expand-east .panel-header .panel-icon { + display: none; +} +.layout-expand-title { + position: absolute; + top: 0; + left: 21px; + white-space: nowrap; + word-wrap: normal; + -webkit-transform: rotate(90deg); + -webkit-transform-origin: 0 0; + -moz-transform: rotate(90deg); + -moz-transform-origin: 0 0; + -o-transform: rotate(90deg); + -o-transform-origin: 0 0; + transform: rotate(90deg); + transform-origin: 0 0; +} +.layout-expand-with-icon { + top: 18px; +} +.layout-expand .panel-body-noheader .layout-expand-title, +.layout-expand .panel-body-noheader .panel-icon { + top: 5px; +} +.layout-expand .panel-body-noheader .layout-expand-with-icon { + top: 23px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + position: absolute; + font-size: 1px; + display: none; + z-index: 5; +} +.layout-split-proxy-h { + width: 5px; + cursor: e-resize; +} +.layout-split-proxy-v { + height: 5px; + cursor: n-resize; +} +.layout-mask { + position: absolute; + background: #fafafa; + filter: alpha(opacity=10); + opacity: 0.10; + z-index: 4; +} +.layout-button-up { + background: url('images/layout_arrows.png') no-repeat -16px -16px; +} +.layout-button-down { + background: url('images/layout_arrows.png') no-repeat -16px 0; +} +.layout-button-left { + background: url('images/layout_arrows.png') no-repeat 0 0; +} +.layout-button-right { + background: url('images/layout_arrows.png') no-repeat 0 -16px; +} +.layout-split-proxy-h, +.layout-split-proxy-v { + background-color: #b3b3b3; +} +.layout-split-north { + border-bottom: 5px solid #fff; +} +.layout-split-south { + border-top: 5px solid #fff; +} +.layout-split-east { + border-left: 5px solid #fff; +} +.layout-split-west { + border-right: 5px solid #fff; +} +.layout-expand { + background-color: #ffffff; +} +.layout-expand-over { + background-color: #ffffff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/linkbutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/linkbutton.css new file mode 100644 index 0000000..b0c578f --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/linkbutton.css @@ -0,0 +1,203 @@ +.l-btn { + text-decoration: none; + display: inline-block; + overflow: hidden; + margin: 0; + padding: 0; + cursor: pointer; + outline: none; + text-align: center; + vertical-align: middle; + line-height: normal; +} +.l-btn-plain { + border-width: 0; + padding: 1px; +} +.l-btn-left { + display: inline-block; + position: relative; + overflow: hidden; + margin: 0; + padding: 0; + vertical-align: top; +} +.l-btn-text { + display: inline-block; + vertical-align: top; + width: auto; + line-height: 24px; + font-size: 12px; + padding: 0; + margin: 0 4px; +} +.l-btn-icon { + display: inline-block; + width: 16px; + height: 16px; + line-height: 16px; + position: absolute; + top: 50%; + margin-top: -8px; + font-size: 1px; +} +.l-btn span span .l-btn-empty { + display: inline-block; + margin: 0; + width: 16px; + height: 24px; + font-size: 1px; + vertical-align: top; +} +.l-btn span .l-btn-icon-left { + padding: 0 0 0 20px; + background-position: left center; +} +.l-btn span .l-btn-icon-right { + padding: 0 20px 0 0; + background-position: right center; +} +.l-btn-icon-left .l-btn-text { + margin: 0 4px 0 24px; +} +.l-btn-icon-left .l-btn-icon { + left: 4px; +} +.l-btn-icon-right .l-btn-text { + margin: 0 24px 0 4px; +} +.l-btn-icon-right .l-btn-icon { + right: 4px; +} +.l-btn-icon-top .l-btn-text { + margin: 20px 4px 0 4px; +} +.l-btn-icon-top .l-btn-icon { + top: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-icon-bottom .l-btn-text { + margin: 0 4px 20px 4px; +} +.l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 4px; + left: 50%; + margin: 0 0 0 -8px; +} +.l-btn-left .l-btn-empty { + margin: 0 4px; + width: 16px; +} +.l-btn-plain:hover { + padding: 0; +} +.l-btn-focus { + outline: #0000FF dotted thin; +} +.l-btn-large .l-btn-text { + line-height: 40px; +} +.l-btn-large .l-btn-icon { + width: 32px; + height: 32px; + line-height: 32px; + margin-top: -16px; +} +.l-btn-large .l-btn-icon-left .l-btn-text { + margin-left: 40px; +} +.l-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.l-btn-large .l-btn-icon-top .l-btn-text { + margin-top: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-top .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 36px; + line-height: 24px; + min-width: 32px; +} +.l-btn-large .l-btn-icon-bottom .l-btn-icon { + margin: 0 0 0 -16px; +} +.l-btn-large .l-btn-left .l-btn-empty { + margin: 0 4px; + width: 32px; +} +.l-btn { + color: #777; + background: #ffffff; + background-repeat: repeat-x; + border: 1px solid #dddddd; + background: -webkit-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -moz-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -o-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: linear-gradient(to bottom,#ffffff 0,#ffffff 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#ffffff,GradientType=0); + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.l-btn:hover { + background: #E6E6E6; + color: #444; + border: 1px solid #ddd; + filter: none; +} +.l-btn-plain { + background: transparent; + border-width: 0; + filter: none; +} +.l-btn-outline { + border-width: 1px; + border-color: #ddd; + padding: 0; +} +.l-btn-plain:hover { + background: #E6E6E6; + color: #444; + border: 1px solid #ddd; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.l-btn-disabled, +.l-btn-disabled:hover { + opacity: 0.5; + cursor: default; + background: #ffffff; + color: #777; + background: -webkit-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -moz-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: -o-linear-gradient(top,#ffffff 0,#ffffff 100%); + background: linear-gradient(to bottom,#ffffff 0,#ffffff 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#ffffff,GradientType=0); +} +.l-btn-disabled .l-btn-text, +.l-btn-disabled .l-btn-icon { + filter: alpha(opacity=50); +} +.l-btn-plain-disabled, +.l-btn-plain-disabled:hover { + background: transparent; + filter: alpha(opacity=50); +} +.l-btn-selected, +.l-btn-selected:hover { + background: #ddd; + filter: none; +} +.l-btn-plain-selected, +.l-btn-plain-selected:hover { + background: #ddd; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/menu.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/menu.css new file mode 100644 index 0000000..26933a6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/menu.css @@ -0,0 +1,119 @@ +.menu { + position: absolute; + margin: 0; + padding: 2px; + border-width: 1px; + border-style: solid; + overflow: hidden; +} +.menu-inline { + position: relative; +} +.menu-item { + position: relative; + margin: 0; + padding: 0; + overflow: hidden; + white-space: nowrap; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.menu-text { + height: 20px; + line-height: 20px; + float: left; + padding-left: 28px; +} +.menu-icon { + position: absolute; + width: 16px; + height: 16px; + left: 2px; + top: 50%; + margin-top: -8px; +} +.menu-rightarrow { + position: absolute; + width: 16px; + height: 16px; + right: 0; + top: 50%; + margin-top: -8px; +} +.menu-line { + position: absolute; + left: 26px; + top: 0; + height: 2000px; + font-size: 1px; +} +.menu-sep { + margin: 3px 0px 3px 25px; + font-size: 1px; +} +.menu-noline .menu-line { + display: none; +} +.menu-noline .menu-sep { + margin-left: 0; + margin-right: 0; +} +.menu-active { + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.menu-item-disabled { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default; +} +.menu-text, +.menu-text span { + font-size: 12px; +} +.menu-shadow { + position: absolute; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; + background: #eee; + -moz-box-shadow: 2px 2px 3px #ededed; + -webkit-box-shadow: 2px 2px 3px #ededed; + box-shadow: 2px 2px 3px #ededed; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.menu-rightarrow { + background: url('images/menu_arrows.png') no-repeat -32px center; +} +.menu-line { + border-left: 1px solid #ddd; + border-right: 1px solid #fff; +} +.menu-sep { + border-top: 1px solid #ddd; + border-bottom: 1px solid #fff; +} +.menu { + background-color: #ffffff; + border-color: #ddd; + color: #444; +} +.menu-content { + background: #fff; +} +.menu-item { + border-color: transparent; + _border-color: #ffffff; +} +.menu-active { + border-color: #ddd; + color: #444; + background: #E6E6E6; +} +.menu-active-disabled { + border-color: transparent; + background: transparent; + color: #444; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/menubutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/menubutton.css new file mode 100644 index 0000000..8ed294a --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/menubutton.css @@ -0,0 +1,94 @@ +.m-btn-downarrow, +.s-btn-downarrow { + display: inline-block; + position: absolute; + width: 16px; + height: 16px; + font-size: 1px; + right: 0; + top: 50%; + margin-top: -8px; +} +.m-btn-active, +.s-btn-active { + background: #E6E6E6; + color: #444; + border: 1px solid #ddd; + filter: none; +} +.m-btn-plain-active, +.s-btn-plain-active { + background: transparent; + padding: 0; + border-width: 1px; + border-style: solid; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.m-btn .l-btn-left .l-btn-text { + margin-right: 20px; +} +.m-btn .l-btn-icon-right .l-btn-text { + margin-right: 40px; +} +.m-btn .l-btn-icon-right .l-btn-icon { + right: 20px; +} +.m-btn .l-btn-icon-top .l-btn-text { + margin-right: 4px; + margin-bottom: 14px; +} +.m-btn .l-btn-icon-bottom .l-btn-text { + margin-right: 4px; + margin-bottom: 34px; +} +.m-btn .l-btn-icon-bottom .l-btn-icon { + top: auto; + bottom: 20px; +} +.m-btn .l-btn-icon-top .m-btn-downarrow, +.m-btn .l-btn-icon-bottom .m-btn-downarrow { + top: auto; + bottom: 0px; + left: 50%; + margin-left: -8px; +} +.m-btn-line { + display: inline-block; + position: absolute; + font-size: 1px; + display: none; +} +.m-btn .l-btn-left .m-btn-line { + right: 0; + width: 16px; + height: 500px; + border-style: solid; + border-color: #b3b3b3; + border-width: 0 0 0 1px; +} +.m-btn .l-btn-icon-top .m-btn-line, +.m-btn .l-btn-icon-bottom .m-btn-line { + left: 0; + bottom: 0; + width: 500px; + height: 16px; + border-width: 1px 0 0 0; +} +.m-btn-large .l-btn-icon-right .l-btn-text { + margin-right: 56px; +} +.m-btn-large .l-btn-icon-bottom .l-btn-text { + margin-bottom: 50px; +} +.m-btn-downarrow, +.s-btn-downarrow { + background: url('images/menu_arrows.png') no-repeat 0 center; +} +.m-btn-plain-active, +.s-btn-plain-active { + border-color: #ddd; + background-color: #E6E6E6; + color: #444; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/messager.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/messager.css new file mode 100644 index 0000000..8aa1843 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/messager.css @@ -0,0 +1,40 @@ +.messager-body { + padding: 10px; + overflow: auto; +} +.messager-button { + text-align: center; + padding: 5px; +} +.messager-button .l-btn { + width: 70px; +} +.messager-icon { + float: left; + width: 32px; + height: 32px; + margin: 0 10px 10px 0; +} +.messager-error { + background: url('images/messager_icons.png') no-repeat scroll -64px 0; +} +.messager-info { + background: url('images/messager_icons.png') no-repeat scroll 0 0; +} +.messager-question { + background: url('images/messager_icons.png') no-repeat scroll -32px 0; +} +.messager-warning { + background: url('images/messager_icons.png') no-repeat scroll -96px 0; +} +.messager-progress { + padding: 10px; +} +.messager-p-msg { + margin-bottom: 5px; +} +.messager-body .messager-input { + width: 100%; + padding: 1px 0; + border: 1px solid #ddd; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/numberbox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/numberbox.css new file mode 100644 index 0000000..3d5a506 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/numberbox.css @@ -0,0 +1,9 @@ +.numberbox { + border: 1px solid #ddd; + margin: 0; + padding: 0 2px; + vertical-align: middle; +} +.textbox { + padding: 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/pagination.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/pagination.css new file mode 100644 index 0000000..e311067 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/pagination.css @@ -0,0 +1,71 @@ +.pagination { + zoom: 1; +} +.pagination table { + float: left; + height: 30px; +} +.pagination td { + border: 0; +} +.pagination-btn-separator { + float: left; + height: 24px; + border-left: 1px solid #ddd; + border-right: 1px solid #fff; + margin: 3px 1px; +} +.pagination .pagination-num { + border-width: 1px; + border-style: solid; + margin: 0 2px; + padding: 2px; + width: 2em; + height: auto; +} +.pagination-page-list { + margin: 0px 6px; + padding: 1px 2px; + width: auto; + height: auto; + border-width: 1px; + border-style: solid; +} +.pagination-info { + float: right; + margin: 0 6px 0 0; + padding: 0; + height: 30px; + line-height: 30px; + font-size: 12px; +} +.pagination span { + font-size: 12px; +} +.pagination-link .l-btn-text { + width: 24px; + text-align: center; + margin: 0; +} +.pagination-first { + background: url('images/pagination_icons.png') no-repeat 0 center; +} +.pagination-prev { + background: url('images/pagination_icons.png') no-repeat -16px center; +} +.pagination-next { + background: url('images/pagination_icons.png') no-repeat -32px center; +} +.pagination-last { + background: url('images/pagination_icons.png') no-repeat -48px center; +} +.pagination-load { + background: url('images/pagination_icons.png') no-repeat -64px center; +} +.pagination-loading { + background: url('images/loading.gif') no-repeat center center; +} +.pagination-page-list, +.pagination .pagination-num { + border-color: #ddd; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/panel.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/panel.css new file mode 100644 index 0000000..6273ac3 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/panel.css @@ -0,0 +1,136 @@ +.panel { + overflow: hidden; + text-align: left; + margin: 0; + border: 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.panel-header, +.panel-body { + border-width: 1px; + border-style: solid; +} +.panel-header { + padding: 5px; + position: relative; +} +.panel-title { + background: url('images/blank.gif') no-repeat; +} +.panel-header-noborder { + border-width: 0 0 1px 0; +} +.panel-body { + overflow: auto; + border-top-width: 0; + padding: 0; +} +.panel-body-noheader { + border-top-width: 1px; +} +.panel-body-noborder { + border-width: 0px; +} +.panel-body-nobottom { + border-bottom-width: 0; +} +.panel-with-icon { + padding-left: 18px; +} +.panel-icon, +.panel-tool { + position: absolute; + top: 50%; + margin-top: -8px; + height: 16px; + overflow: hidden; +} +.panel-icon { + left: 5px; + width: 16px; +} +.panel-tool { + right: 5px; + width: auto; +} +.panel-tool a { + display: inline-block; + width: 16px; + height: 16px; + opacity: 0.6; + filter: alpha(opacity=60); + margin: 0 0 0 2px; + vertical-align: top; +} +.panel-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + background-color: #E6E6E6; + -moz-border-radius: -2px -2px -2px -2px; + -webkit-border-radius: -2px -2px -2px -2px; + border-radius: -2px -2px -2px -2px; +} +.panel-loading { + padding: 11px 0px 10px 30px; +} +.panel-noscroll { + overflow: hidden; +} +.panel-fit, +.panel-fit body { + height: 100%; + margin: 0; + padding: 0; + border: 0; + overflow: hidden; +} +.panel-loading { + background: url('images/loading.gif') no-repeat 10px 10px; +} +.panel-tool-close { + background: url('images/panel_tools.png') no-repeat -16px 0px; +} +.panel-tool-min { + background: url('images/panel_tools.png') no-repeat 0px 0px; +} +.panel-tool-max { + background: url('images/panel_tools.png') no-repeat 0px -16px; +} +.panel-tool-restore { + background: url('images/panel_tools.png') no-repeat -16px -16px; +} +.panel-tool-collapse { + background: url('images/panel_tools.png') no-repeat -32px 0; +} +.panel-tool-expand { + background: url('images/panel_tools.png') no-repeat -32px -16px; +} +.panel-header, +.panel-body { + border-color: #ddd; +} +.panel-header { + background-color: #ffffff; +} +.panel-body { + background-color: #fff; + color: #444; + font-size: 12px; +} +.panel-title { + font-size: 12px; + font-weight: bold; + color: #777; + height: 16px; + line-height: 16px; +} +.panel-footer { + border: 1px solid #ddd; + overflow: hidden; + background: #fff; +} +.panel-footer-noborder { + border-width: 1px 0 0 0; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/progressbar.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/progressbar.css new file mode 100644 index 0000000..7721f1b --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/progressbar.css @@ -0,0 +1,32 @@ +.progressbar { + border-width: 1px; + border-style: solid; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; + overflow: hidden; + position: relative; +} +.progressbar-text { + text-align: center; + position: absolute; +} +.progressbar-value { + position: relative; + overflow: hidden; + width: 0; + -moz-border-radius: 0px 0 0 0px; + -webkit-border-radius: 0px 0 0 0px; + border-radius: 0px 0 0 0px; +} +.progressbar { + border-color: #ddd; +} +.progressbar-text { + color: #444; + font-size: 12px; +} +.progressbar-value .progressbar-text { + background-color: #CCE6FF; + color: #000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/propertygrid.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/propertygrid.css new file mode 100644 index 0000000..f5ae0c4 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/propertygrid.css @@ -0,0 +1,28 @@ +.propertygrid .datagrid-view1 .datagrid-body td { + padding-bottom: 1px; + border-width: 0 1px 0 0; +} +.propertygrid .datagrid-group { + height: 21px; + overflow: hidden; + border-width: 0 0 1px 0; + border-style: solid; +} +.propertygrid .datagrid-group span { + font-weight: bold; +} +.propertygrid .datagrid-view1 .datagrid-body td { + border-color: #ddd; +} +.propertygrid .datagrid-view1 .datagrid-group { + border-color: #ffffff; +} +.propertygrid .datagrid-view2 .datagrid-group { + border-color: #ddd; +} +.propertygrid .datagrid-group, +.propertygrid .datagrid-view1 .datagrid-body, +.propertygrid .datagrid-view1 .datagrid-row-over, +.propertygrid .datagrid-view1 .datagrid-row-selected { + background: #ffffff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/searchbox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/searchbox.css new file mode 100644 index 0000000..25a4a7e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/searchbox.css @@ -0,0 +1,90 @@ +.searchbox { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.searchbox .searchbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 0 2px; + vertical-align: top; +} +.searchbox .searchbox-prompt { + font-size: 12px; + color: #ccc; +} +.searchbox-button { + width: 18px; + height: 20px; + overflow: hidden; + display: inline-block; + vertical-align: top; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); +} +.searchbox-button-hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.searchbox .l-btn-plain { + border: 0; + padding: 0; + vertical-align: top; + opacity: 0.6; + filter: alpha(opacity=60); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .l-btn-plain:hover { + border: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox a.m-btn-plain-active { + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .m-btn-active { + border-width: 0 1px 0 0; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.searchbox .textbox-button-right { + border-width: 0 0 0 1px; +} +.searchbox .textbox-button-left { + border-width: 0 1px 0 0; +} +.searchbox-button { + background: url('images/searchbox_button.png') no-repeat center center; +} +.searchbox { + border-color: #ddd; + background-color: #fff; +} +.searchbox .l-btn-plain { + background: #ffffff; +} +.searchbox .l-btn-plain-disabled, +.searchbox .l-btn-plain-disabled:hover { + opacity: 0.5; + filter: alpha(opacity=50); +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/slider.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/slider.css new file mode 100644 index 0000000..42ddc17 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/slider.css @@ -0,0 +1,101 @@ +.slider-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.slider-h { + height: 22px; +} +.slider-v { + width: 22px; +} +.slider-inner { + position: relative; + height: 6px; + top: 7px; + border-width: 1px; + border-style: solid; + border-radius: 0px; +} +.slider-handle { + position: absolute; + display: block; + outline: none; + width: 20px; + height: 20px; + top: 50%; + margin-top: -10px; + margin-left: -10px; +} +.slider-tip { + position: absolute; + display: inline-block; + line-height: 12px; + font-size: 12px; + white-space: nowrap; + top: -22px; +} +.slider-rule { + position: relative; + top: 15px; +} +.slider-rule span { + position: absolute; + display: inline-block; + font-size: 0; + height: 5px; + border-width: 0 0 0 1px; + border-style: solid; +} +.slider-rulelabel { + position: relative; + top: 20px; +} +.slider-rulelabel span { + position: absolute; + display: inline-block; + font-size: 12px; +} +.slider-v .slider-inner { + width: 6px; + left: 7px; + top: 0; + float: left; +} +.slider-v .slider-handle { + left: 50%; + margin-top: -10px; +} +.slider-v .slider-tip { + left: -10px; + margin-top: -6px; +} +.slider-v .slider-rule { + float: left; + top: 0; + left: 16px; +} +.slider-v .slider-rule span { + width: 5px; + height: 'auto'; + border-left: 0; + border-width: 1px 0 0 0; + border-style: solid; +} +.slider-v .slider-rulelabel { + float: left; + top: 0; + left: 23px; +} +.slider-handle { + background: url('images/slider_handle.png') no-repeat; +} +.slider-inner { + border-color: #ddd; + background: #ffffff; +} +.slider-rule span { + border-color: #ddd; +} +.slider-rulelabel span { + color: #444; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/spinner.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/spinner.css new file mode 100644 index 0000000..734845e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/spinner.css @@ -0,0 +1,72 @@ +.spinner { + display: inline-block; + white-space: nowrap; + margin: 0; + padding: 0; + border-width: 1px; + border-style: solid; + overflow: hidden; + vertical-align: middle; +} +.spinner .spinner-text { + font-size: 12px; + border: 0px; + margin: 0; + padding: 0 2px; + vertical-align: baseline; +} +.spinner-arrow { + background-color: #ffffff; + display: inline-block; + overflow: hidden; + vertical-align: top; + margin: 0; + padding: 0; + opacity: 1.0; + filter: alpha(opacity=100); + width: 18px; +} +.spinner-arrow-up, +.spinner-arrow-down { + opacity: 0.6; + filter: alpha(opacity=60); + display: block; + font-size: 1px; + width: 18px; + height: 10px; + width: 100%; + height: 50%; + color: #777; + outline-style: none; +} +.spinner-arrow-hover { + background-color: #E6E6E6; + opacity: 1.0; + filter: alpha(opacity=100); +} +.spinner-arrow-up:hover, +.spinner-arrow-down:hover { + opacity: 1.0; + filter: alpha(opacity=100); + background-color: #E6E6E6; +} +.textbox-icon-disabled .spinner-arrow-up:hover, +.textbox-icon-disabled .spinner-arrow-down:hover { + opacity: 0.6; + filter: alpha(opacity=60); + background-color: #ffffff; + cursor: default; +} +.spinner .textbox-icon-disabled { + opacity: 0.6; + filter: alpha(opacity=60); +} +.spinner-arrow-up { + background: url('images/spinner_arrows.png') no-repeat 1px center; +} +.spinner-arrow-down { + background: url('images/spinner_arrows.png') no-repeat -15px center; +} +.spinner { + border-color: #ddd; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/splitbutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/splitbutton.css new file mode 100644 index 0000000..3451138 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/splitbutton.css @@ -0,0 +1,12 @@ +.s-btn:hover .m-btn-line, +.s-btn-active .m-btn-line, +.s-btn-plain-active .m-btn-line { + display: inline-block; +} +.l-btn:hover .s-btn-downarrow, +.s-btn-active .s-btn-downarrow, +.s-btn-plain-active .s-btn-downarrow { + border-style: solid; + border-color: #b3b3b3; + border-width: 0 0 0 1px; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/switchbutton.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/switchbutton.css new file mode 100644 index 0000000..351083e --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/switchbutton.css @@ -0,0 +1,77 @@ +.switchbutton { + text-decoration: none; + display: inline-block; + overflow: hidden; + vertical-align: middle; + margin: 0; + padding: 0; + cursor: pointer; + background: #dddddd; + border: 1px solid #dddddd; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.switchbutton-inner { + display: inline-block; + overflow: hidden; + position: relative; + top: -1px; + left: -1px; +} +.switchbutton-on, +.switchbutton-off, +.switchbutton-handle { + display: inline-block; + text-align: center; + height: 100%; + float: left; + font-size: 12px; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.switchbutton-on { + background: #CCE6FF; + color: #000; +} +.switchbutton-off { + background-color: #fff; + color: #444; +} +.switchbutton-on, +.switchbutton-reversed .switchbutton-off { + -moz-border-radius: 0px 0 0 0px; + -webkit-border-radius: 0px 0 0 0px; + border-radius: 0px 0 0 0px; +} +.switchbutton-off, +.switchbutton-reversed .switchbutton-on { + -moz-border-radius: 0 0px 0px 0; + -webkit-border-radius: 0 0px 0px 0; + border-radius: 0 0px 0px 0; +} +.switchbutton-handle { + position: absolute; + top: 0; + left: 50%; + background-color: #fff; + color: #444; + border: 1px solid #dddddd; + -moz-box-shadow: 0 0 3px 0 #dddddd; + -webkit-box-shadow: 0 0 3px 0 #dddddd; + box-shadow: 0 0 3px 0 #dddddd; +} +.switchbutton-value { + position: absolute; + top: 0; + left: -5000px; +} +.switchbutton-disabled { + opacity: 0.5; + filter: alpha(opacity=50); +} +.switchbutton-disabled, +.switchbutton-readonly { + cursor: default; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/tabs.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/tabs.css new file mode 100644 index 0000000..e42fd50 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/tabs.css @@ -0,0 +1,377 @@ +.tabs-container { + overflow: hidden; +} +.tabs-header { + border-width: 1px; + border-style: solid; + border-bottom-width: 0; + position: relative; + padding: 0; + padding-top: 2px; + overflow: hidden; +} +.tabs-scroller-left, +.tabs-scroller-right { + position: absolute; + top: auto; + bottom: 0; + width: 18px; + font-size: 1px; + display: none; + cursor: pointer; + border-width: 1px; + border-style: solid; +} +.tabs-scroller-left { + left: 0; +} +.tabs-scroller-right { + right: 0; +} +.tabs-tool { + position: absolute; + bottom: 0; + padding: 1px; + overflow: hidden; + border-width: 1px; + border-style: solid; +} +.tabs-header-plain .tabs-tool { + padding: 0 1px; +} +.tabs-wrap { + position: relative; + left: 0; + overflow: hidden; + width: 100%; + margin: 0; + padding: 0; +} +.tabs-scrolling { + margin-left: 18px; + margin-right: 18px; +} +.tabs-disabled { + opacity: 0.3; + filter: alpha(opacity=30); +} +.tabs { + list-style-type: none; + height: 26px; + margin: 0px; + padding: 0px; + padding-left: 4px; + width: 50000px; + border-style: solid; + border-width: 0 0 1px 0; +} +.tabs li { + float: left; + display: inline-block; + margin: 0 4px -1px 0; + padding: 0; + position: relative; + border: 0; +} +.tabs li a.tabs-inner { + display: inline-block; + text-decoration: none; + margin: 0; + padding: 0 10px; + height: 25px; + line-height: 25px; + text-align: center; + white-space: nowrap; + border-width: 1px; + border-style: solid; + -moz-border-radius: 0px 0px 0 0; + -webkit-border-radius: 0px 0px 0 0; + border-radius: 0px 0px 0 0; +} +.tabs li.tabs-selected a.tabs-inner { + font-weight: bold; + outline: none; +} +.tabs li.tabs-selected a:hover.tabs-inner { + cursor: default; + pointer: default; +} +.tabs li a.tabs-close, +.tabs-p-tool { + position: absolute; + font-size: 1px; + display: block; + height: 12px; + padding: 0; + top: 50%; + margin-top: -6px; + overflow: hidden; +} +.tabs li a.tabs-close { + width: 12px; + right: 5px; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs-p-tool { + right: 16px; +} +.tabs-p-tool a { + display: inline-block; + font-size: 1px; + width: 12px; + height: 12px; + margin: 0; + opacity: 0.6; + filter: alpha(opacity=60); +} +.tabs li a:hover.tabs-close, +.tabs-p-tool a:hover { + opacity: 1; + filter: alpha(opacity=100); + cursor: hand; + cursor: pointer; +} +.tabs-with-icon { + padding-left: 18px; +} +.tabs-icon { + position: absolute; + width: 16px; + height: 16px; + left: 10px; + top: 50%; + margin-top: -8px; +} +.tabs-title { + font-size: 12px; +} +.tabs-closable { + padding-right: 8px; +} +.tabs-panels { + margin: 0px; + padding: 0px; + border-width: 1px; + border-style: solid; + border-top-width: 0; + overflow: hidden; +} +.tabs-header-bottom { + border-width: 0 1px 1px 1px; + padding: 0 0 2px 0; +} +.tabs-header-bottom .tabs { + border-width: 1px 0 0 0; +} +.tabs-header-bottom .tabs li { + margin: -1px 4px 0 0; +} +.tabs-header-bottom .tabs li a.tabs-inner { + -moz-border-radius: 0 0 0px 0px; + -webkit-border-radius: 0 0 0px 0px; + border-radius: 0 0 0px 0px; +} +.tabs-header-bottom .tabs-tool { + top: 0; +} +.tabs-header-bottom .tabs-scroller-left, +.tabs-header-bottom .tabs-scroller-right { + top: 0; + bottom: auto; +} +.tabs-panels-top { + border-width: 1px 1px 0 1px; +} +.tabs-header-left { + float: left; + border-width: 1px 0 1px 1px; + padding: 0; +} +.tabs-header-right { + float: right; + border-width: 1px 1px 1px 0; + padding: 0; +} +.tabs-header-left .tabs-wrap, +.tabs-header-right .tabs-wrap { + height: 100%; +} +.tabs-header-left .tabs { + height: 100%; + padding: 4px 0 0 2px; + border-width: 0 1px 0 0; +} +.tabs-header-right .tabs { + height: 100%; + padding: 4px 2px 0 0; + border-width: 0 0 0 1px; +} +.tabs-header-left .tabs li, +.tabs-header-right .tabs li { + display: block; + width: 100%; + position: relative; +} +.tabs-header-left .tabs li { + left: auto; + right: 0; + margin: 0 -1px 4px 0; + float: right; +} +.tabs-header-right .tabs li { + left: 0; + right: auto; + margin: 0 0 4px -1px; + float: left; +} +.tabs-justified li a.tabs-inner { + padding-left: 0; + padding-right: 0; +} +.tabs-header-left .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 0px 0 0 0px; + -webkit-border-radius: 0px 0 0 0px; + border-radius: 0px 0 0 0px; +} +.tabs-header-right .tabs li a.tabs-inner { + display: block; + text-align: left; + padding-left: 10px; + padding-right: 10px; + -moz-border-radius: 0 0px 0px 0; + -webkit-border-radius: 0 0px 0px 0; + border-radius: 0 0px 0px 0; +} +.tabs-panels-right { + float: right; + border-width: 1px 1px 1px 0; +} +.tabs-panels-left { + float: left; + border-width: 1px 0 1px 1px; +} +.tabs-header-noborder, +.tabs-panels-noborder { + border: 0px; +} +.tabs-header-plain { + border: 0px; + background: transparent; +} +.tabs-pill { + padding-bottom: 3px; +} +.tabs-header-bottom .tabs-pill { + padding-top: 3px; + padding-bottom: 0; +} +.tabs-header-left .tabs-pill { + padding-right: 3px; +} +.tabs-header-right .tabs-pill { + padding-left: 3px; +} +.tabs-header .tabs-pill li a.tabs-inner { + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.tabs-header-narrow, +.tabs-header-narrow .tabs-narrow { + padding: 0; +} +.tabs-narrow li, +.tabs-header-bottom .tabs-narrow li { + margin-left: 0; + margin-right: -1px; +} +.tabs-narrow li.tabs-last, +.tabs-header-bottom .tabs-narrow li.tabs-last { + margin-right: 0; +} +.tabs-header-left .tabs-narrow, +.tabs-header-right .tabs-narrow { + padding-top: 0; +} +.tabs-header-left .tabs-narrow li { + margin-bottom: -1px; + margin-right: -1px; +} +.tabs-header-left .tabs-narrow li.tabs-last, +.tabs-header-right .tabs-narrow li.tabs-last { + margin-bottom: 0; +} +.tabs-header-right .tabs-narrow li { + margin-bottom: -1px; + margin-left: -1px; +} +.tabs-scroller-left { + background: #ffffff url('images/tabs_icons.png') no-repeat 1px center; +} +.tabs-scroller-right { + background: #ffffff url('images/tabs_icons.png') no-repeat -15px center; +} +.tabs li a.tabs-close { + background: url('images/tabs_icons.png') no-repeat -34px center; +} +.tabs li a.tabs-inner:hover { + background: #E6E6E6; + color: #444; + filter: none; +} +.tabs li.tabs-selected a.tabs-inner { + background-color: #fff; + color: #777; +} +.tabs li a.tabs-inner { + color: #777; + background-color: #ffffff; +} +.tabs-header, +.tabs-tool { + background-color: #ffffff; +} +.tabs-header-plain { + background: transparent; +} +.tabs-header, +.tabs-scroller-left, +.tabs-scroller-right, +.tabs-tool, +.tabs, +.tabs-panels, +.tabs li a.tabs-inner, +.tabs li.tabs-selected a.tabs-inner, +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner, +.tabs-header-left .tabs li.tabs-selected a.tabs-inner, +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-color: #ddd; +} +.tabs-p-tool a:hover, +.tabs li a:hover.tabs-close, +.tabs-scroller-over { + background-color: #E6E6E6; +} +.tabs li.tabs-selected a.tabs-inner { + border-bottom: 1px solid #fff; +} +.tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { + border-top: 1px solid #fff; +} +.tabs-header-left .tabs li.tabs-selected a.tabs-inner { + border-right: 1px solid #fff; +} +.tabs-header-right .tabs li.tabs-selected a.tabs-inner { + border-left: 1px solid #fff; +} +.tabs-header .tabs-pill li.tabs-selected a.tabs-inner { + background: #CCE6FF; + color: #000; + filter: none; + border-color: #ddd; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/textbox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/textbox.css new file mode 100644 index 0000000..1ae0773 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/textbox.css @@ -0,0 +1,90 @@ +.textbox { + position: relative; + border: 1px solid #ddd; + background-color: #fff; + vertical-align: middle; + display: inline-block; + overflow: hidden; + white-space: nowrap; + margin: 0; + padding: 0; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.textbox .textbox-text { + font-size: 12px; + border: 0; + margin: 0; + padding: 4px; + white-space: normal; + vertical-align: top; + outline-style: none; + resize: none; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.textbox textarea.textbox-text { + white-space: pre-wrap; +} +.textbox .textbox-prompt { + font-size: 12px; + color: #aaa; +} +.textbox .textbox-button, +.textbox .textbox-button:hover { + position: absolute; + top: 0; + padding: 0; + vertical-align: top; + -moz-border-radius: 0 0 0 0; + -webkit-border-radius: 0 0 0 0; + border-radius: 0 0 0 0; +} +.textbox-button-right, +.textbox-button-right:hover { + border-width: 0 0 0 1px; +} +.textbox-button-left, +.textbox-button-left:hover { + border-width: 0 1px 0 0; +} +.textbox-addon { + position: absolute; + top: 0; +} +.textbox-icon { + display: inline-block; + width: 18px; + height: 20px; + overflow: hidden; + vertical-align: top; + background-position: center center; + cursor: pointer; + opacity: 0.6; + filter: alpha(opacity=60); + text-decoration: none; + outline-style: none; +} +.textbox-icon-disabled, +.textbox-icon-readonly { + cursor: default; +} +.textbox-icon:hover { + opacity: 1.0; + filter: alpha(opacity=100); +} +.textbox-icon-disabled:hover { + opacity: 0.6; + filter: alpha(opacity=60); +} +.textbox-focused { + -moz-box-shadow: 0 0 3px 0 #ddd; + -webkit-box-shadow: 0 0 3px 0 #ddd; + box-shadow: 0 0 3px 0 #ddd; +} +.textbox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/tooltip.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/tooltip.css new file mode 100644 index 0000000..b8f955c --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/tooltip.css @@ -0,0 +1,103 @@ +.tooltip { + position: absolute; + display: none; + z-index: 9900000; + outline: none; + opacity: 1; + filter: alpha(opacity=100); + padding: 5px; + border-width: 1px; + border-style: solid; + border-radius: 5px; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.tooltip-content { + font-size: 12px; +} +.tooltip-arrow-outer, +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + line-height: 0; + font-size: 0; + border-style: solid; + border-width: 6px; + border-color: transparent; + _border-color: tomato; + _filter: chroma(color=tomato); +} +.tooltip-arrow { + display: none \9; +} +.tooltip-right .tooltip-arrow-outer { + left: 0; + top: 50%; + margin: -6px 0 0 -13px; +} +.tooltip-right .tooltip-arrow { + left: 0; + top: 50%; + margin: -6px 0 0 -12px; +} +.tooltip-left .tooltip-arrow-outer { + right: 0; + top: 50%; + margin: -6px -13px 0 0; +} +.tooltip-left .tooltip-arrow { + right: 0; + top: 50%; + margin: -6px -12px 0 0; +} +.tooltip-top .tooltip-arrow-outer { + bottom: 0; + left: 50%; + margin: 0 0 -13px -6px; +} +.tooltip-top .tooltip-arrow { + bottom: 0; + left: 50%; + margin: 0 0 -12px -6px; +} +.tooltip-bottom .tooltip-arrow-outer { + top: 0; + left: 50%; + margin: -13px 0 0 -6px; +} +.tooltip-bottom .tooltip-arrow { + top: 0; + left: 50%; + margin: -12px 0 0 -6px; +} +.tooltip { + background-color: #fff; + border-color: #ddd; + color: #444; +} +.tooltip-right .tooltip-arrow-outer { + border-right-color: #ddd; +} +.tooltip-right .tooltip-arrow { + border-right-color: #fff; +} +.tooltip-left .tooltip-arrow-outer { + border-left-color: #ddd; +} +.tooltip-left .tooltip-arrow { + border-left-color: #fff; +} +.tooltip-top .tooltip-arrow-outer { + border-top-color: #ddd; +} +.tooltip-top .tooltip-arrow { + border-top-color: #fff; +} +.tooltip-bottom .tooltip-arrow-outer { + border-bottom-color: #ddd; +} +.tooltip-bottom .tooltip-arrow { + border-bottom-color: #fff; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/tree.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/tree.css new file mode 100644 index 0000000..403ae4a --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/tree.css @@ -0,0 +1,160 @@ +.tree { + margin: 0; + padding: 0; + list-style-type: none; +} +.tree li { + white-space: nowrap; +} +.tree li ul { + list-style-type: none; + margin: 0; + padding: 0; +} +.tree-node { + height: 18px; + white-space: nowrap; + cursor: pointer; +} +.tree-hit { + cursor: pointer; +} +.tree-expanded, +.tree-collapsed, +.tree-folder, +.tree-file, +.tree-checkbox, +.tree-indent { + display: inline-block; + width: 16px; + height: 18px; + vertical-align: top; + overflow: hidden; +} +.tree-expanded { + background: url('images/tree_icons.png') no-repeat -18px 0px; +} +.tree-expanded-hover { + background: url('images/tree_icons.png') no-repeat -50px 0px; +} +.tree-collapsed { + background: url('images/tree_icons.png') no-repeat 0px 0px; +} +.tree-collapsed-hover { + background: url('images/tree_icons.png') no-repeat -32px 0px; +} +.tree-lines .tree-expanded, +.tree-lines .tree-root-first .tree-expanded { + background: url('images/tree_icons.png') no-repeat -144px 0; +} +.tree-lines .tree-collapsed, +.tree-lines .tree-root-first .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -128px 0; +} +.tree-lines .tree-node-last .tree-expanded, +.tree-lines .tree-root-one .tree-expanded { + background: url('images/tree_icons.png') no-repeat -80px 0; +} +.tree-lines .tree-node-last .tree-collapsed, +.tree-lines .tree-root-one .tree-collapsed { + background: url('images/tree_icons.png') no-repeat -64px 0; +} +.tree-line { + background: url('images/tree_icons.png') no-repeat -176px 0; +} +.tree-join { + background: url('images/tree_icons.png') no-repeat -192px 0; +} +.tree-joinbottom { + background: url('images/tree_icons.png') no-repeat -160px 0; +} +.tree-folder { + background: url('images/tree_icons.png') no-repeat -208px 0; +} +.tree-folder-open { + background: url('images/tree_icons.png') no-repeat -224px 0; +} +.tree-file { + background: url('images/tree_icons.png') no-repeat -240px 0; +} +.tree-loading { + background: url('images/loading.gif') no-repeat center center; +} +.tree-checkbox0 { + background: url('images/tree_icons.png') no-repeat -208px -18px; +} +.tree-checkbox1 { + background: url('images/tree_icons.png') no-repeat -224px -18px; +} +.tree-checkbox2 { + background: url('images/tree_icons.png') no-repeat -240px -18px; +} +.tree-title { + font-size: 12px; + display: inline-block; + text-decoration: none; + vertical-align: top; + white-space: nowrap; + padding: 0 2px; + height: 18px; + line-height: 18px; +} +.tree-node-proxy { + font-size: 12px; + line-height: 20px; + padding: 0 2px 0 20px; + border-width: 1px; + border-style: solid; + z-index: 9900000; +} +.tree-dnd-icon { + display: inline-block; + position: absolute; + width: 16px; + height: 18px; + left: 2px; + top: 50%; + margin-top: -9px; +} +.tree-dnd-yes { + background: url('images/tree_icons.png') no-repeat -256px 0; +} +.tree-dnd-no { + background: url('images/tree_icons.png') no-repeat -256px -18px; +} +.tree-node-top { + border-top: 1px dotted red; +} +.tree-node-bottom { + border-bottom: 1px dotted red; +} +.tree-node-append .tree-title { + border: 1px dotted red; +} +.tree-editor { + border: 1px solid #ccc; + font-size: 12px; + height: 14px !important; + height: 18px; + line-height: 14px; + padding: 1px 2px; + width: 80px; + position: absolute; + top: 0; +} +.tree-node-proxy { + background-color: #fff; + color: #444; + border-color: #ddd; +} +.tree-node-hover { + background: #E6E6E6; + color: #444; +} +.tree-node-selected { + background: #CCE6FF; + color: #000; +} +.tree-node-hidden { + display: none; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/validatebox.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/validatebox.css new file mode 100644 index 0000000..1fc3ad6 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/validatebox.css @@ -0,0 +1,5 @@ +.validatebox-invalid { + border-color: #ffa8a8; + background-color: #fff3f3; + color: #000; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/metro/window.css b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/window.css new file mode 100644 index 0000000..de84433 --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/metro/window.css @@ -0,0 +1,88 @@ +.window { + overflow: hidden; + padding: 5px; + border-width: 1px; + border-style: solid; +} +.window .window-header { + background: transparent; + padding: 0px 0px 6px 0px; +} +.window .window-body { + border-width: 1px; + border-style: solid; + border-top-width: 0px; +} +.window .window-body-noheader { + border-top-width: 1px; +} +.window .panel-body-nobottom { + border-bottom-width: 0; +} +.window .window-header .panel-icon, +.window .window-header .panel-tool { + top: 50%; + margin-top: -11px; +} +.window .window-header .panel-icon { + left: 1px; +} +.window .window-header .panel-tool { + right: 1px; +} +.window .window-header .panel-with-icon { + padding-left: 18px; +} +.window-proxy { + position: absolute; + overflow: hidden; +} +.window-proxy-mask { + position: absolute; + filter: alpha(opacity=5); + opacity: 0.05; +} +.window-mask { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + filter: alpha(opacity=40); + opacity: 0.40; + font-size: 1px; + overflow: hidden; +} +.window, +.window-shadow { + position: absolute; + -moz-border-radius: 0px 0px 0px 0px; + -webkit-border-radius: 0px 0px 0px 0px; + border-radius: 0px 0px 0px 0px; +} +.window-shadow { + background: #eee; + -moz-box-shadow: 2px 2px 3px #ededed; + -webkit-box-shadow: 2px 2px 3px #ededed; + box-shadow: 2px 2px 3px #ededed; + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.window, +.window .window-body { + border-color: #ddd; +} +.window { + background-color: #ffffff; +} +.window-proxy { + border: 1px dashed #ddd; +} +.window-proxy-mask, +.window-mask { + background: #eee; +} +.window .panel-footer { + border: 1px solid #ddd; + position: relative; + top: -1px; +} diff --git a/src/main/webapp/jquery-easyui-1.4.4/themes/mobile.css b/src/main/webapp/jquery-easyui-1.4.4/themes/mobile.css new file mode 100644 index 0000000..fd1154a --- /dev/null +++ b/src/main/webapp/jquery-easyui-1.4.4/themes/mobile.css @@ -0,0 +1,377 @@ +.m-toolbar{ + position: relative; + text-align: center; + min-height: 32px; +} +.m-toolbar .m-title{ + line-height: 32px; + font-size: 16px; + font-weight: bold; + text-align: center; +} +.m-left{ + position: absolute; + height: 100%; + vertical-align: middle; + top:0; + left:0; + z-index: 1; +} +.m-right{ + position: absolute; + height: 100%; + vertical-align: middle; + top:0; + right:0; + z-index: 1; +} +.m-left>.l-btn,.m-right>.l-btn, +.m-left>.switchbutton,.m-right>.switchbutton{ + position: relative; + vertical-align: top; + top: 50%; + margin-top: -13px; +} +.m-back::before,.m-next::after{ + position: relative; + display: inline-block; + box-sizing: border-box; + vertical-align: top; + border-style: solid; + -webkit-transform:rotate(45deg); + transform:rotate(45deg); + width: 10px; + height: 10px; + top: 7px; + content: ''; +} +.m-back::before{ + border-width: 0 0 1px 1px; + margin-left: 6px; + margin-right: -6px; +} +.m-next::after{ + border-width: 1px 1px 0 0; + margin-left: -6px; + margin-right: 6px; +} +.m-buttongroup{ + display: inline-block; + margin: 0; + padding: 0; + overflow: hidden; + vertical-align: middle; +} +.m-buttongroup .l-btn{ + float: left; + margin-left: -1px; +} +.m-buttongroup .l-btn:last-child::after{ + content: ''; + clear: both; +} +.m-buttongroup .l-btn:not(:first-child):not(:last-child){ + border-radius: 0; +} +.m-buttongroup .l-btn:first-child{ + border-top-right-radius: 0; + border-bottom-right-radius: 0; + margin-left: 0; +} +.m-buttongroup .l-btn:last-child{ + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.m-buttongroup-justified{ + display: table; + table-layout: fixed; +} +.m-buttongroup-justified .l-btn{ + float: none; + display: table-cell; +} +.m-badge:not(.l-btn), +.l-btn.m-badge::after{ + display: inline-block; + min-width: 10px; + line-height: 1; + font-size: 12px; + text-align: center; + white-space: nowrap; + border-radius: 10px; + padding: 2px 4px; + border-style: solid; + border-width: 0px; + background-color: #d9534f; + color: #fff; + z-index: 99999; +} +.l-btn.m-badge::after, +.l-btn .m-badge{ + position: absolute; + top: -10px; + right: -10px; +} +.tabs-inner .m-badge{ + position: absolute; + top: 1px; + right: -10px; +} +.tabs-inner>.tabs-title>.m-badge{ + top: 0; + right: 0; +} +.tabs-header-bottom .tabs-inner>.tabs-title>.m-badge{ + top: auto; + bottom: 0; + right: 0; +} +.panel-footer .l-btn .l-btn-icon-top .m-badge, +.panel-footer .l-btn .l-btn-icon-bottom .m-badge{ + top: 0; + right: -10px; +} +.l-btn.m-badge::after{ + content: attr(data-badge); +} +.l-btn,.l-btn-left{ + overflow: visible; + position: relative; +} + +.m-in{ + -webkit-animation-timing-function: ease-out; + -webkit-animation-duration: 250ms; +} +.m-out{ + -webkit-animation-timing-function: ease-in; + -webkit-animation-duration: 250ms; +} +.m-slide-left.m-in{ + -webkit-animation-name: slideLeftIn; +} +.m-slide-left.m-out{ + -webkit-animation-name: slideLeftOut; +} +.m-slide-right.m-in{ + -webkit-animation-name: slideRightIn; +} +.m-slide-right.m-out{ + -webkit-animation-name: slideRightOut; +} +.m-slide-up.m-in{ + -webkit-animation-name: slideUpIn; +} +.m-slide-up.m-out{ + -webkit-animation-name: slideUpOut; +} +.m-slide-down.m-in{ + -webkit-animation-name: slideDownIn; +} +.m-slide-down.m-out{ + -webkit-animation-name: slideDownOut; +} + +@-webkit-keyframes slideLeftIn{ + from {-webkit-transform: translateX(100%);} + to {-webkit-transform: translateX(0);} +} +@-webkit-keyframes slideLeftOut{ + from {-webkit-transform: translateX(0);} + to {-webkit-transform: translateX(-100%);} +} +@-webkit-keyframes slideRightIn{ + from {-webkit-transform: translateX(-100%);} + to {-webkit-transform: translateX(0);} +} +@-webkit-keyframes slideRightOut{ + from {-webkit-transform: translateX(0);} + to {-webkit-transform: translateX(100%);} +} +@-webkit-keyframes slideUpIn{ + from {-webkit-transform: translateY(100%);} + to {-webkit-transform: translateY(0);} +} +@-webkit-keyframes slideUpOut{ + from {-webkit-transform: translateY(0);} + to {-webkit-transform: translateY(-100%);} +} +@-webkit-keyframes slideDownIn{ + from {-webkit-transform: translateY(-100%);} + to {-webkit-transform: translateY(0);} +} +@-webkit-keyframes slideDownOut{ + from {-webkit-transform: translateY(0);} + to {-webkit-transform: translateY(100%);} +} + +.m-fade.m-in{ + -webkit-animation-name: fadeIn; +} +.m-fade.m-out{ + -webkit-animation-name: fadeOut; +} + +@-webkit-keyframes fadeIn{ + from {opacity: 0;} + to {opacity: 1} +} +@-webkit-keyframes fadeOut{ + from {opacity: 1;} + to {opacity: 0;} +} + +.m-pop.m-in{ + -webkit-animation-name: popIn; +} +.m-pop.m-out{ + -webkit-animation-name: popOut; +} +@-webkit-keyframes popIn{ + from { + opacity: 0; + -webkit-transform: scale(.2); + } + to { + opacity: 1; + -webkit-transform: scale(1); + } +} +@-webkit-keyframes popOut{ + from { + opacity: 1; + -webkit-transform: scale(1); + } + to { + opacity: 0; + -webkit-transform: scale(0); + } +} + +.navpanel{ + position: absolute; +} + +.calendar-header,.calendar-title{ + height: 30px; +} +.calendar-title span{ + height: 26px; + line-height: 26px +} +.datebox-button{ + height: 24px; +} +.datebox-button a{ + line-height: 24px; + display1: inline-block; +} +.tree-node{ + height:28px; + padding:5px 0; + box-sizing: border-box; +} + +.panel-title{ + height: 26px; + line-height: 26px; +} +.window{ + padding: 5px 0 0 0; +} +.window-shadow{ + -moz-box-shadow: 0 0 30px 0 #D3D3D3; + -webkit-box-shadow: 0 0 30px 0 #D3D3D3; + box-shadow: 0 0 30px 0 #D3D3D3; +} +.window-header .panel-title{ + height: 26px; + line-height: 26px; + text-align: center; +} +.window-header .panel-tool{ + display: none; +} +.window .window-body{ + border: 0; +} +.dialog-button{ + border-color: transparent; + overflow: hidden; +} +.dialog-button .l-btn{ + margin: 0; +} + +.tabs-justified, +.tabs-justified .l-btn, +.tabs-justified li a.tabs-inner, +.tabs-justified li.tabs-selected a.tabs-inner, +.tabs-header-bottom .tabs-justified li.tabs-selected a.tabs-inner, +.tabs-header-bottom .tabs-justified li a.tabs-inner{ + -moz-border-radius:0; + -webkit-border-radius:0; + border-radius:0; +} + +.datagrid-row,.datagrid-header-row{ + height: 35px; +} +.datalist .datagrid-group-title, +.m-list .m-list-group{ + padding: 0 10px; +} +.datalist .datagrid-cell, +.m-list li{ + padding: 10px; +} +.m-list li .m-right{ + right: 10px; +} +.datalist .datalist-link, +.m-list li>a{ + margin: -10px; + padding: 10px; + padding-right: 24px; +} +.m-list li>a .m-right{ + right: 24px; +} +.datalist .datalist-link::after, +.m-list li>a::after{ + right: 12px; +} + +.spinner-arrow-up,.spinner-arrow-down{ + position: relative; + display: inline-block; + width: 50%; + height: 100%; + background: none; + float: right; +} +.spinner-arrow-down{ + float: left; +} +.spinner-arrow-up::after, +.spinner-arrow-down::after{ + position: absolute; + display: inline-block; + box-sizing: border-box; + vertical-align: top; + border-style: solid; + border-width: 2px 2px 0 0; + -webkit-transform:rotate(-45deg); + transform:rotate(-45deg); + width: 10px; + height: 10px; + left: 50%; + top: 50%; + margin-left: -5px; + margin-top: -3px; + content: ''; +} +.spinner-arrow-down::after{ + border-width: 0 0 2px 2px; + margin-top: -8px; +} \ No newline at end of file diff --git a/src/main/webapp/jquery-ui/external/jquery/jquery.js b/src/main/webapp/jquery-ui/external/jquery/jquery.js new file mode 100644 index 0000000..c5c6482 --- /dev/null +++ b/src/main/webapp/jquery-ui/external/jquery/jquery.js @@ -0,0 +1,9789 @@ +/*! + * jQuery JavaScript Library v1.10.2 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-07-03T13:48Z + */ +(function( window, undefined ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +//"use strict"; +var + // The deferred used on DOM ready + readyList, + + // A central reference to the root jQuery(document) + rootjQuery, + + // Support: IE<10 + // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` + core_strundefined = typeof undefined, + + // Use the correct document accordingly with window argument (sandbox) + location = window.location, + document = window.document, + docElem = document.documentElement, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // [[Class]] -> type pairs + class2type = {}, + + // List of deleted data cache ids, so we can reuse them + core_deletedIds = [], + + core_version = "1.10.2", + + // Save a reference to some core methods + core_concat = core_deletedIds.concat, + core_push = core_deletedIds.push, + core_slice = core_deletedIds.slice, + core_indexOf = core_deletedIds.indexOf, + core_toString = class2type.toString, + core_hasOwn = class2type.hasOwnProperty, + core_trim = core_version.trim, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Used for matching numbers + core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + + // Used for splitting on whitespace + core_rnotwhite = /\S+/g, + + // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, + rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }, + + // The ready event handler + completed = function( event ) { + + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { + detach(); + jQuery.ready(); + } + }, + // Clean-up method for dom ready events + detach = function() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: core_version, + + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return core_slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; + }, + + slice: function() { + return this.pushStack( core_slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: core_push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), + + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger("ready").off("ready"); + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + /* jshint eqeqeq: false */ + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + if ( obj == null ) { + return String( obj ); + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ core_toString.call(obj) ] || "object" : + typeof obj; + }, + + isPlainObject: function( obj ) { + var key; + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !core_hasOwn.call(obj, "constructor") && + !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Support: IE<9 + // Handle iteration over inherited properties before own properties. + if ( jQuery.support.ownLast ) { + for ( key in obj ) { + return core_hasOwn.call( obj, key ); + } + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + for ( key in obj ) {} + + return key === undefined || core_hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + // data: string of html + // context (optional): If specified, the fragment will be created in this context, defaults to document + // keepScripts (optional): If true, will include scripts passed in the html string + parseHTML: function( data, context, keepScripts ) { + if ( !data || typeof data !== "string" ) { + return null; + } + if ( typeof context === "boolean" ) { + keepScripts = context; + context = false; + } + context = context || document; + + var parsed = rsingleTag.exec( data ), + scripts = !keepScripts && []; + + // Single tag + if ( parsed ) { + return [ context.createElement( parsed[1] ) ]; + } + + parsed = jQuery.buildFragment( [ data ], context, scripts ); + if ( scripts ) { + jQuery( scripts ).remove(); + } + return jQuery.merge( [], parsed.childNodes ); + }, + + parseJSON: function( data ) { + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + if ( data === null ) { + return data; + } + + if ( typeof data === "string" ) { + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + if ( data ) { + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + } + } + } + + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + if ( !data || typeof data !== "string" ) { + return null; + } + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Use native String.trim function wherever possible + trim: core_trim && !core_trim.call("\uFEFF\xA0") ? + function( text ) { + return text == null ? + "" : + core_trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + core_push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( core_indexOf ) { + return core_indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var l = second.length, + i = first.length, + j = 0; + + if ( typeof l === "number" ) { + for ( ; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var retVal, + ret = [], + i = 0, + length = elems.length; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return core_concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = core_slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: function() { + return ( new Date() ).getTime(); + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations. + // Note: this method belongs to the css module but it's needed here for the support module. + // If support gets modularized, this method should be moved back to the css module. + swap: function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; + } +}); + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + + // If IE event model is used + } else { + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch(e) {} + + if ( top && top.doScroll ) { + (function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch(e) { + return setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise( obj ); +}; + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || type !== "function" && + ( length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj ); +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); +/*! + * Sizzle CSS Selector Engine v1.10.2 + * http://sizzlejs.com/ + * + * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-07-03 + */ +(function( window, undefined ) { + +var i, + support, + cachedruns, + Expr, + getText, + isXML, + compile, + outermostContext, + sortInput, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + hasDuplicate = false, + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + return 0; + }, + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + + // Prefer arguments quoted, + // then not containing pseudos/brackets, + // then attribute selectors/non-parenthetical expressions, + // then anything else + // These preferences are here to reduce the number of selectors + // needing tokenize in the PSEUDO preFilter + pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rsibling = new RegExp( whitespace + "*[+~]" ), + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + // BMP codepoint + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( documentIsHTML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && context.parentNode || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key += " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Detect xml + * @param {Element|Object} elem An element or a document + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var doc = node ? node.ownerDocument || node : preferredDoc, + parent = doc.defaultView; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsHTML = !isXML( doc ); + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent.attachEvent && parent !== parent.top ) { + parent.attachEvent( "onbeforeunload", function() { + setDocument(); + }); + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if getElementsByClassName can be trusted + support.getElementsByClassName = assert(function( div ) { + div.innerHTML = "
                                                            "; + + // Support: Safari<4 + // Catch class over-caching + div.firstChild.className = "i"; + // Support: Opera<10 + // Catch gEBCN failure to find non-leading classes + return div.getElementsByClassName("i").length === 2; + }); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = ""; + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Support: Opera 10-12/IE8 + // ^= $= *= and empty values + // Should not select anything + // Support: Windows 8 Native Apps + // The type attribute is restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "t", "" ); + + if ( div.querySelectorAll("[t^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = docElem.compareDocumentPosition ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); + + if ( compare ) { + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } + + // Not directly comparable, sort on existence of method + return a.compareDocumentPosition ? -1 : 1; + } : + function( a, b ) { + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Parentless nodes are either documents or disconnected + } else if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return doc; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [elem] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val === undefined ? + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null : + val; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[5] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] && match[4] !== undefined ) { + match[2] = match[4]; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( tokens = [] ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var data, cache, outerCache, + dirkey = dirruns + " " + doneName; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { + if ( (data = cache[1]) === true || data === cachedruns ) { + return data === true; + } + } else { + cache = outerCache[ dir ] = [ dirkey ]; + cache[1] = matcher( elem, context, xml ) || cachedruns; + if ( cache[1] === true ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + // A counter to specify which element is currently being matched + var matcherCachedRuns = 0, + bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, expandContext ) { + var elem, j, matcher, + setMatched = [], + matchedCount = 0, + i = "0", + unmatched = seed && [], + outermost = expandContext != null, + contextBackup = outermostContext, + // We must always have either seed elements or context + elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); + + if ( outermost ) { + outermostContext = context !== document && context; + cachedruns = matcherCachedRuns; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + for ( ; (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + cachedruns = ++matcherCachedRuns; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !group ) { + group = tokenize( selector ); + } + i = group.length; + while ( i-- ) { + cached = matcherFromTokens( group[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + } + return cached; +}; + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function select( selector, context, results, seed ) { + var i, tokens, token, type, find, + match = tokenize( selector ); + + if ( !seed ) { + // Try to minimize operations if there is only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + } + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && context.parentNode || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + } + + // Compile and execute a filtering function + // Provide `match` to avoid retokenization if we modified the selector above + compile( selector, match )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) + ); + return results; +} + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome<14 +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = ""; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = ""; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + elem[ name ] === true ? name.toLowerCase() : null; + } + }); +} + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})( window ); +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // First callback to fire (used internally by add and fireWith) + firingStart, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var action = tuple[ 0 ], + fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = core_slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; + if( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); +jQuery.support = (function( support ) { + + var all, a, input, select, fragment, opt, eventName, isSupported, i, + div = document.createElement("div"); + + // Setup + div.setAttribute( "className", "t" ); + div.innerHTML = "
                                                            a"; + + // Finish early in limited (non-browser) environments + all = div.getElementsByTagName("*") || []; + a = div.getElementsByTagName("a")[ 0 ]; + if ( !a || !a.style || !all.length ) { + return support; + } + + // First batch of tests + select = document.createElement("select"); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName("input")[ 0 ]; + + a.style.cssText = "top:1px;float:left;opacity:.5"; + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + support.getSetAttribute = div.className !== "t"; + + // IE strips leading whitespace when .innerHTML is used + support.leadingWhitespace = div.firstChild.nodeType === 3; + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + support.tbody = !div.getElementsByTagName("tbody").length; + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + support.htmlSerialize = !!div.getElementsByTagName("link").length; + + // Get the style information from getAttribute + // (IE uses .cssText instead) + support.style = /top/.test( a.getAttribute("style") ); + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + support.hrefNormalized = a.getAttribute("href") === "/a"; + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + support.opacity = /^0.5/.test( a.style.opacity ); + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + support.cssFloat = !!a.style.cssFloat; + + // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) + support.checkOn = !!input.value; + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + support.optSelected = opt.selected; + + // Tests for enctype support on a form (#6743) + support.enctype = !!document.createElement("form").enctype; + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>"; + + // Will be defined later + support.inlineBlockNeedsLayout = false; + support.shrinkWrapBlocks = false; + support.pixelPosition = false; + support.deleteExpando = true; + support.noCloneEvent = true; + support.reliableMarginRight = true; + support.boxSizingReliable = true; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Support: IE<9 + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + // Check if we can trust getAttribute("value") + input = document.createElement("input"); + input.setAttribute( "value", "" ); + support.input = input.getAttribute( "value" ) === ""; + + // Check if an input maintains its value after becoming a radio + input.value = "t"; + input.setAttribute( "type", "radio" ); + support.radioValue = input.value === "t"; + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "checked", "t" ); + input.setAttribute( "name", "t" ); + + fragment = document.createDocumentFragment(); + fragment.appendChild( input ); + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Opera does not clone events (and typeof div.attachEvent === undefined). + // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() + if ( div.attachEvent ) { + div.attachEvent( "onclick", function() { + support.noCloneEvent = false; + }); + + div.cloneNode( true ).click(); + } + + // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + for ( i in { submit: true, change: true, focusin: true }) { + div.setAttribute( eventName = "on" + i, "t" ); + + support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; + } + + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + // Support: IE<9 + // Iteration over object's inherited properties before its own. + for ( i in jQuery( support ) ) { + break; + } + support.ownLast = i !== "0"; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, marginDiv, tds, + divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement("div"); + container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; + + body.appendChild( container ).appendChild( div ); + + // Support: IE8 + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + div.innerHTML = "
                                                            t
                                                            "; + tds = div.getElementsByTagName("td"); + tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Support: IE8 + // Check if empty table cells still have offsetWidth/Height + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Check box-sizing and margin behavior. + div.innerHTML = ""; + div.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%;"; + + // Workaround failing boxSizing test due to offsetWidth returning wrong value + // with some non-1 values of body zoom, ticket #13543 + jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() { + support.boxSizing = div.offsetWidth === 4; + }); + + // Use window.getComputedStyle because jsdom on node.js will break without it. + if ( window.getComputedStyle ) { + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. (#3333) + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = div.appendChild( document.createElement("div") ); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + + support.reliableMarginRight = + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); + } + + if ( typeof div.style.zoom !== core_strundefined ) { + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.innerHTML = ""; + div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); + + // Support: IE6 + // Check if elements with layout shrink-wrap their children + div.style.display = "block"; + div.innerHTML = "
                                                            "; + div.firstChild.style.width = "5px"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); + + if ( support.inlineBlockNeedsLayout ) { + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); + + // Null elements to avoid leaks in IE + container = div = tds = marginDiv = null; + }); + + // Null elements to avoid leaks in IE + all = select = fragment = opt = a = input = null; + + return support; +})({}); + +var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + rmultiDash = /([A-Z])/g; + +function internalData( elem, name, data, pvt /* Internal Use Only */ ){ + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var ret, thisCache, + internalKey = jQuery.expando, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + // Avoid exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( typeof name === "string" ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } else { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + i = name.length; + while ( i-- ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + /* jshint eqeqeq: false */ + } else if ( jQuery.support.deleteExpando || cache != cache.window ) { + /* jshint eqeqeq: true */ + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } +} + +jQuery.extend({ + cache: {}, + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "applet": true, + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + // Do not set data on non-element because it will not be cleared (#8335). + if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { + return false; + } + + var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; + + // nodes accept data unless otherwise specified; rejection can be conditional + return !noData || noData !== true && elem.getAttribute("classid") === noData; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var attrs, name, + data = null, + i = 0, + elem = this[0]; + + // Special expections of .data basically thwart jQuery.access, + // so implement the relevant behavior ourselves + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attrs = elem.attributes; + for ( ; i < attrs.length; i++ ) { + name = attrs[i].name; + + if ( name.indexOf("data-") === 0 ) { + name = jQuery.camelCase( name.slice(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + return arguments.length > 1 ? + + // Sets one value + this.each(function() { + jQuery.data( this, key, value ); + }) : + + // Gets one value + // Try to fetch any internally stored data first + elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var nodeHook, boolHook, + rclass = /[\t\r\n\f]/g, + rreturn = /\r/g, + rfocusable = /^(?:input|select|textarea|button|object)$/i, + rclickable = /^(?:a|area)$/i, + ruseDefault = /^(?:checked|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + getSetInput = jQuery.support.input; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call( this, j, this.className ) ); + }); + } + + if ( proceed ) { + // The disjunction here is for better compressibility (see removeClass) + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + " " + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + elem.className = jQuery.trim( cur ); + + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = arguments.length === 0 || typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call( this, j, this.className ) ); + }); + } + if ( proceed ) { + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + "" + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + elem.className = value ? jQuery.trim( cur ) : ""; + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value; + + if ( typeof stateVal === "boolean" && type === "string" ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + classNames = value.match( core_rnotwhite ) || []; + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( type === core_strundefined || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // If the element has a class name or if we're passed "false", + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var ret, hooks, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // Use proper attribute retrieval(#6932, #12072) + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + elem.text; + } + }, + select: { + get: function( elem ) { + var value, option, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one" || index < 0, + values = one ? null : [], + max = one ? index + 1 : options.length, + i = index < 0 ? + max : + one ? index : 0; + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // oldIE doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + // Don't return options that are disabled or in a disabled optgroup + ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && + ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) { + optionSet = true; + } + } + + // force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attr: function( elem, name, value ) { + var hooks, ret, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === core_strundefined ) { + return jQuery.prop( elem, name, value ); + } + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + + } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, value + "" ); + return value; + } + + } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var name, propName, + i = 0, + attrNames = value && value.match( core_rnotwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( (name = attrNames[i++]) ) { + propName = jQuery.propFix[ name ] || name; + + // Boolean attributes get special treatment (#10870) + if ( jQuery.expr.match.bool.test( name ) ) { + // Set corresponding property to false + if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + elem[ propName ] = false; + // Support: IE<9 + // Also clear defaultChecked/defaultSelected (if appropriate) + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = + elem[ propName ] = false; + } + + // See #9699 for explanation of this approach (setting first, then removal) + } else { + jQuery.attr( elem, name, "" ); + } + + elem.removeAttribute( getSetAttribute ? name : propName ); + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to default in case type is set after value during creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? + ret : + ( elem[ name ] = value ); + + } else { + return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? + ret : + elem[ name ]; + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + return tabindex ? + parseInt( tabindex, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + -1; + } + } + } +}); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + // IE<8 needs the *property* name + elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); + + // Use defaultChecked and defaultSelected for oldIE + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; + } + + return name; + } +}; +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { + var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr; + + jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? + function( elem, name, isXML ) { + var fn = jQuery.expr.attrHandle[ name ], + ret = isXML ? + undefined : + /* jshint eqeqeq: false */ + (jQuery.expr.attrHandle[ name ] = undefined) != + getter( elem, name, isXML ) ? + + name.toLowerCase() : + null; + jQuery.expr.attrHandle[ name ] = fn; + return ret; + } : + function( elem, name, isXML ) { + return isXML ? + undefined : + elem[ jQuery.camelCase( "default-" + name ) ] ? + name.toLowerCase() : + null; + }; +}); + +// fix oldIE attroperties +if ( !getSetInput || !getSetAttribute ) { + jQuery.attrHooks.value = { + set: function( elem, value, name ) { + if ( jQuery.nodeName( elem, "input" ) ) { + // Does not return so that setAttribute is also used + elem.defaultValue = value; + } else { + // Use nodeHook if defined (#1954); otherwise setAttribute is fine + return nodeHook && nodeHook.set( elem, value, name ); + } + } + }; +} + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = { + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + elem.setAttributeNode( + (ret = elem.ownerDocument.createAttribute( name )) + ); + } + + ret.value = value += ""; + + // Break association with cloned elements by also using setAttribute (#9646) + return name === "value" || value === elem.getAttribute( name ) ? + value : + undefined; + } + }; + jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords = + // Some attributes are constructed with empty-string values when not defined + function( elem, name, isXML ) { + var ret; + return isXML ? + undefined : + (ret = elem.getAttributeNode( name )) && ret.value !== "" ? + ret.value : + null; + }; + jQuery.valHooks.button = { + get: function( elem, name ) { + var ret = elem.getAttributeNode( name ); + return ret && ret.specified ? + ret.value : + undefined; + }, + set: nodeHook.set + }; + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + set: function( elem, value, name ) { + nodeHook.set( elem, value === "" ? false : value, name ); + } + }; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }; + }); +} + + +// Some attributes require a special call on IE +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !jQuery.support.hrefNormalized ) { + // href/src property should get the full normalized URL (#10299/#12915) + jQuery.each([ "href", "src" ], function( i, name ) { + jQuery.propHooks[ name ] = { + get: function( elem ) { + return elem.getAttribute( name, 4 ); + } + }; + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Note: IE uppercases css property names, but if we were to .toLowerCase() + // .cssText, that would destroy case senstitivity in URL's, like in "background" + return elem.style.cssText || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = value + "" ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }; +} + +jQuery.each([ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +}); + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }; + if ( !jQuery.support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + // Support: Webkit + // "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + }; + } +}); +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = core_hasOwn.call( event, "type" ) ? event.type : event, + namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && + jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, ret, handleObj, matched, j, + handlerQueue = [], + args = core_slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var sel, handleObj, matches, i, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + /* jshint eqeqeq: false */ + for ( ; cur != this; cur = cur.parentNode || this ) { + /* jshint eqeqeq: true */ + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Chrome 23+, Safari? + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Even when returnValue equals to undefined Firefox will still show alert + if ( event.result !== undefined ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === core_strundefined ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + if ( !e ) { + return; + } + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "submitBubbles" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "submitBubbles", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "changeBubbles", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var type, origFn; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); +var isSimple = /^.[^:#\[\.,]*$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var i, + ret = [], + self = this, + len = self.length; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector || [], true) ); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector || [], false) ); + }, + + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + ret = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { + // Always skip document fragments + if ( cur.nodeType < 11 && (pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) ) { + + cur = ret.push( cur ); + break; + } + } + } + + return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( jQuery.unique(all) ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + if ( this.length > 1 ) { + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + ret = jQuery.unique( ret ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + } + + return this.pushStack( ret ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + })); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + }); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + }); + + } + + if ( typeof qualifier === "string" ) { + if ( isSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; + }); +} +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
                                                            ", "
                                                            " ], + area: [ 1, "", "" ], + param: [ 1, "", "" ], + thead: [ 1, "", "
                                                            " ], + tr: [ 2, "", "
                                                            " ], + col: [ 2, "", "
                                                            " ], + td: [ 3, "", "
                                                            " ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
                                                            ", "
                                                            " ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +jQuery.fn.extend({ + text: function( value ) { + return jQuery.access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + append: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return jQuery.access( this, function( value ) { + var elem = this[0] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var + // Snapshot the DOM in case .domManip sweeps something relevant into its fragment + args = jQuery.map( this, function( elem ) { + return [ elem.nextSibling, elem.parentNode ]; + }), + i = 0; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + var next = args[ i++ ], + parent = args[ i++ ]; + + if ( parent ) { + // Don't use the snapshot next if it has moved (#13810) + if ( next && next.parentNode !== parent ) { + next = this.nextSibling; + } + jQuery( this ).remove(); + parent.insertBefore( elem, next ); + } + // Allow new content to include elements from the context set + }, true ); + + // Force removal if there was no new content (e.g., from empty arguments) + return i ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback, allowIntersection ) { + + // Flatten any nested arrays + args = core_concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[0], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[0] = value.call( this, index, self.html() ); + } + self.domManip( args, callback, allowIntersection ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( this[i], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Hope ajax is available... + jQuery._evalUrl( node.src ); + } else { + jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return this; + } +}); + +// Support: IE<8 +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[1]; + } else { + elem.removeAttribute("type"); + } + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; (elem = elems[i]) != null; i++ ) { + jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); + } +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone(true); + jQuery( insert[i] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + core_push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + +// Used in buildFragment, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( manipulation_rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; (node = srcElements[i]) != null; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + fixCloneNodeIssues( node, destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; (node = srcElements[i]) != null; i++ ) { + cloneCopyEvent( node, destElements[i] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var j, elem, contains, + tmp, tag, tbody, wrap, + l = elems.length, + + // Ensure a safe fragment + safe = createSafeFragment( context ), + + nodes = [], + i = 0; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || safe.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + + tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; + + // Descend through wrappers to the right content + j = wrap[0]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Manually add leading whitespace removed by IE + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); + } + + // Remove IE's autoinserted from table fragments + if ( !jQuery.support.tbody ) { + + // String was a , *may* have spurious + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare or + wrap[1] === "
                                                            " && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !jQuery.support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = jQuery.support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( typeof elem.removeAttribute !== core_strundefined ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + core_deletedIds.push( id ); + } + } + } + } + }, + + _evalUrl: function( url ) { + return jQuery.ajax({ + url: url, + type: "GET", + dataType: "script", + async: false, + global: false, + "throws": true + }); + } +}); +jQuery.fn.extend({ + wrapAll: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapAll( html.call(this, i) ); + }); + } + + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + + if ( this[0].parentNode ) { + wrap.insertBefore( this[0] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { + elem = elem.firstChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function(i) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + } +}); +var iframe, getStyles, curCSS, + ralpha = /alpha\([^)]*\)/i, + ropacity = /opacity\s*=\s*([^)]*)/, + rposition = /^(top|right|bottom|left)$/, + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rmargin = /^margin/, + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), + rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), + elemdisplay = { BODY: "block" }, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400 + }, + + cssExpand = [ "Top", "Right", "Bottom", "Left" ], + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; + +// return a css property mapped to a potentially vendor prefixed property +function vendorPropName( style, name ) { + + // shortcut for names that are not vendor prefixed + if ( name in style ) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in style ) { + return name; + } + } + + return origName; +} + +function isHidden( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); +} + +function showHide( elements, show ) { + var display, elem, hidden, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + values[ index ] = jQuery._data( elem, "olddisplay" ); + display = elem.style.display; + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); + } + } else { + + if ( !values[ index ] ) { + hidden = isHidden( elem ); + + if ( display && display !== "none" || !hidden ) { + jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); + } + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + +jQuery.fn.extend({ + css: function( name, value ) { + return jQuery.access( this, function( elem, name, value ) { + var len, styles, + map = {}, + i = 0; + + if ( jQuery.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + }, + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each(function() { + if ( isHidden( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + }); + } +}); + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "columnCount": true, + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + style = elem.style; + + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, + // but it would mean to define eight (for every problematic property) identical functions + if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + + // Wrapped to prevent IE from throwing errors when 'invalid' values are provided + // Fixes bug #5509 + try { + style[ name ] = value; + } catch(e) {} + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var num, val, hooks, + origName = jQuery.camelCase( name ); + + // Make sure that we're working with the right name + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + //convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; + } + return val; + } +}); + +// NOTE: we've included the "window" in window.getComputedStyle +// because jsdom on node.js will break without it. +if ( window.getComputedStyle ) { + getStyles = function( elem ) { + return window.getComputedStyle( elem, null ); + }; + + curCSS = function( elem, name, _computed ) { + var width, minWidth, maxWidth, + computed = _computed || getStyles( elem ), + + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, + style = elem.style; + + if ( computed ) { + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; + }; +} else if ( document.documentElement.currentStyle ) { + getStyles = function( elem ) { + return elem.currentStyle; + }; + + curCSS = function( elem, name, _computed ) { + var left, rs, rsLeft, + computed = _computed || getStyles( elem ), + ret = computed ? computed[ name ] : undefined, + style = elem.style; + + // Avoid setting ret to empty string here + // so we don't default to auto + if ( ret == null && style && style[ name ] ) { + ret = style[ name ]; + } + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + // but not position css attributes, as those are proportional to the parent element instead + // and we can't measure the parent instead because it might trigger a "stacking dolls" problem + if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { + + // Remember the original values + left = style.left; + rs = elem.runtimeStyle; + rsLeft = rs && rs.left; + + // Put in the new values to get a computed value out + if ( rsLeft ) { + rs.left = elem.currentStyle.left; + } + style.left = name === "fontSize" ? "1em" : ret; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + if ( rsLeft ) { + rs.left = rsLeft; + } + } + + return ret === "" ? "auto" : ret; + }; +} + +function setPositiveNumber( elem, value, subtract ) { + var matches = rnumsplit.exec( value ); + return matches ? + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { + var i = extra === ( isBorderBox ? "border" : "content" ) ? + // If we already have the right measurement, avoid augmentation + 4 : + // Otherwise initialize for horizontal or vertical properties + name === "width" ? 1 : 0, + + val = 0; + + for ( ; i < 4; i += 2 ) { + // both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + } + + if ( isBorderBox ) { + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // at this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } else { + // at this point, extra isn't content, so add padding + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // at this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with offset property, which is equivalent to the border-box value + var valueIsBorderBox = true, + val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + styles = getStyles( elem ), + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // some non-html elements return undefined for offsetWidth, so check for null/undefined + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 + if ( val <= 0 || val == null ) { + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name, styles ); + if ( val < 0 || val == null ) { + val = elem.style[ name ]; + } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles + ) + ) + "px"; +} + +// Try to determine the default display value of an element +function css_defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + // Use the already-created iframe if possible + iframe = ( iframe || + jQuery("