diff --git a/webapps/META-INF/MANIFEST.MF b/webapps/META-INF/MANIFEST.MF new file mode 100644 index 0000000..1919280 --- /dev/null +++ b/webapps/META-INF/MANIFEST.MF @@ -0,0 +1,6 @@ +Manifest-Version: 1.0 +Archiver-Version: Plexus Archiver +Created-By: Apache Maven +Built-By: USER +Build-Jdk: 1.6.0_25 + diff --git a/webapps/META-INF/context.xml b/webapps/META-INF/context.xml new file mode 100644 index 0000000..adb20ee --- /dev/null +++ b/webapps/META-INF/context.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/webapps/META-INF/maven/kr.co.kihyun/moumi5-war-neis/pom.properties b/webapps/META-INF/maven/kr.co.kihyun/moumi5-war-neis/pom.properties new file mode 100644 index 0000000..ca17b7e --- /dev/null +++ b/webapps/META-INF/maven/kr.co.kihyun/moumi5-war-neis/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Fri May 15 10:24:41 KST 2015 +version=5.3.7-SNAPSHOT +groupId=kr.co.kihyun +artifactId=moumi5-war-neis diff --git a/webapps/META-INF/maven/kr.co.kihyun/moumi5-war-neis/pom.xml b/webapps/META-INF/maven/kr.co.kihyun/moumi5-war-neis/pom.xml new file mode 100644 index 0000000..837902e --- /dev/null +++ b/webapps/META-INF/maven/kr.co.kihyun/moumi5-war-neis/pom.xml @@ -0,0 +1,324 @@ + + + + moumi5-neis + kr.co.kihyun + 5.3.7-SNAPSHOT + + 4.0.0 + moumi5-war-neis + war + moumi5-war-neis + + + + + + + + + + org.apache.axis2 + axis2.eclipse.codegen.plugin + 1.5.1 + + + org.apache.axis2 + axis2.eclipse.service.plugin + 1.5.1 + + + org.codehaus.mojo + selenium-maven-plugin + 1.0.1 + + + start + pre-integration-test + + start-server + + + true + true + true + + + + stop + post-integration-test + + stop-server + + + + + + org.mortbay.jetty + maven-jetty-plugin + ${jetty.version} + + + + ${jetty.port} + 60000 + + + 10 + + / + + 9966 + foo + + + + start-jetty + pre-integration-test + + run + + + 0 + true + + + + stop-jetty + post-integration-test + + stop + + + + + + + + + + org.seleniumhq.selenium.client-drivers + selenium-java-client-driver + 1.0.2 + jar + test + + + org.mortbay.jetty + jetty + ${jetty.version} + jar + test + + + org.mortbay.jetty + jetty-util + ${jetty.version} + jar + test + + + org.mortbay.jetty + jetty-management + ${jetty.version} + jar + test + + + org.mortbay.jetty + jetty-plus + ${jetty.version} + jar + test + + + + + javax.servlet.jsp + jsp-api + 2.1 + jar + provided + + + javax.servlet + servlet-api + 2.5 + jar + provided + + + javax.servlet + jstl + 1.1.2 + jar + compile + + + taglibs + standard + 1.1.2 + jar + compile + + + commons-el + commons-el + 1.0 + jar + compile + + + + + commons-fileupload + commons-fileupload + 1.2 + jar + compile + + + ch.qos.logback + logback-classic + 0.9.22 + compile + + + javax.mail + mail + 1.4 + jar + compile + + + org.apache.ant + ant + 1.8.1 + jar + compile + + + org.jasypt + jasypt + 1.6 + provided + + + net.htmlparser.jericho + jericho-html + 3.1 + + + + jtidy + jtidy + r938 + + + org.apache.poi + poi + 3.7-beta1 + + + org.apache.poi + poi-ooxml + 3.7-beta1 + + + org.apache.poi + poi-scratchpad + 3.7-beta1 + + + org.apache.tika + tika-core + 0.7 + + + org.apache.tika + tika-parsers + 0.7 + + + kr.co.kihyun.jslibs + jquery + 0.1.4 + jar + compile + + + kr.co.kihyun.jslibs + tinymce + 0.1.4 + jar + compile + + + com.truetech + truetech-exchange + 20090701 + jar + compile + + + org.apache.commons + commons-compress + 1.0 + pom + compile + + + com.ibm.icu + icu4j + 3.4.4 + + + kr.co.iniline + swift-common + 1.1.1 + + + kr.co.iniline + swift-sp + nx-1.1 + + + neis + esb + 1.0 + compile + + + neis + eCrossClient + 20110224 + compile + + + ${project.groupId} + moumi5-commons-neis + + 5.3.7-SNAPSHOT + + + ${project.groupId} + moumi5-persistence-neis + + 5.3.7-SNAPSHOT + + + org.apache + xmlsec + 1.4.2 + + + + 6.1.24 + 8989 + firefox + Tomcat60 + + diff --git a/webapps/META-INF/war-tracker b/webapps/META-INF/war-tracker new file mode 100644 index 0000000..e69de29 diff --git a/webapps/WEB-INF/classes/.gitignore b/webapps/WEB-INF/classes/.gitignore new file mode 100644 index 0000000..c2a890f --- /dev/null +++ b/webapps/WEB-INF/classes/.gitignore @@ -0,0 +1,12 @@ +/enhance/ +/handy-pmf.properties +/kr/ +/log4j.xml +/logback.xml +/moumi-pmf.properties +/moumi.properties +/moumi_messages.properties +/moumi_messages_ko_KR.properties +/notx-pmf.properties +/plugin.xml +/sql/ diff --git a/webapps/WEB-INF/classes/META-INF/MANIFEST.MF b/webapps/WEB-INF/classes/META-INF/MANIFEST.MF new file mode 100644 index 0000000..637b8c2 --- /dev/null +++ b/webapps/WEB-INF/classes/META-INF/MANIFEST.MF @@ -0,0 +1,4 @@ +Manifest-Version: 1.0 +Archiver-Version: Plexus Archiver +Created-By: 16.0-b13 (Sun Microsystems Inc.) + diff --git a/webapps/WEB-INF/classes/META-INF/jdoconfig.xml b/webapps/WEB-INF/classes/META-INF/jdoconfig.xml new file mode 100644 index 0000000..72a1dd8 --- /dev/null +++ b/webapps/WEB-INF/classes/META-INF/jdoconfig.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/webapps/WEB-INF/classes/META-INF/persistence.xml b/webapps/WEB-INF/classes/META-INF/persistence.xml new file mode 100644 index 0000000..ad2d94c --- /dev/null +++ b/webapps/WEB-INF/classes/META-INF/persistence.xml @@ -0,0 +1,12 @@ + + + + + kr/co/kihyun/beans/entity/package.jdo + kr/co/kihyun/beans/entity/ecross/package.jdo + kr/go/neis/package.jdo + com/handysoft/beans/entity/package.jdo + + diff --git a/webapps/WEB-INF/classes/SelectSql.class b/webapps/WEB-INF/classes/SelectSql.class new file mode 100644 index 0000000..ca81b5c Binary files /dev/null and b/webapps/WEB-INF/classes/SelectSql.class differ diff --git a/webapps/WEB-INF/classes/com/handysoft/beans/entity/HDept.class b/webapps/WEB-INF/classes/com/handysoft/beans/entity/HDept.class new file mode 100644 index 0000000..df12a96 Binary files /dev/null and b/webapps/WEB-INF/classes/com/handysoft/beans/entity/HDept.class differ diff --git a/webapps/WEB-INF/classes/com/handysoft/beans/entity/HDocUnit.class b/webapps/WEB-INF/classes/com/handysoft/beans/entity/HDocUnit.class new file mode 100644 index 0000000..78c9444 Binary files /dev/null and b/webapps/WEB-INF/classes/com/handysoft/beans/entity/HDocUnit.class differ diff --git a/webapps/WEB-INF/classes/com/handysoft/beans/entity/HUser.class b/webapps/WEB-INF/classes/com/handysoft/beans/entity/HUser.class new file mode 100644 index 0000000..3a51682 Binary files /dev/null and b/webapps/WEB-INF/classes/com/handysoft/beans/entity/HUser.class differ diff --git a/webapps/WEB-INF/classes/com/handysoft/beans/entity/HUserDept.class b/webapps/WEB-INF/classes/com/handysoft/beans/entity/HUserDept.class new file mode 100644 index 0000000..74c8c64 Binary files /dev/null and b/webapps/WEB-INF/classes/com/handysoft/beans/entity/HUserDept.class differ diff --git a/webapps/WEB-INF/classes/com/handysoft/beans/entity/HUserPart.class b/webapps/WEB-INF/classes/com/handysoft/beans/entity/HUserPart.class new file mode 100644 index 0000000..531e442 Binary files /dev/null and b/webapps/WEB-INF/classes/com/handysoft/beans/entity/HUserPart.class differ diff --git a/webapps/WEB-INF/classes/com/handysoft/beans/entity/HUserUser.class b/webapps/WEB-INF/classes/com/handysoft/beans/entity/HUserUser.class new file mode 100644 index 0000000..ab3bdc4 Binary files /dev/null and b/webapps/WEB-INF/classes/com/handysoft/beans/entity/HUserUser.class differ diff --git a/webapps/WEB-INF/classes/com/handysoft/beans/entity/HandyEntity.class b/webapps/WEB-INF/classes/com/handysoft/beans/entity/HandyEntity.class new file mode 100644 index 0000000..4c69a04 Binary files /dev/null and b/webapps/WEB-INF/classes/com/handysoft/beans/entity/HandyEntity.class differ diff --git a/webapps/WEB-INF/classes/com/handysoft/beans/entity/package.jdo b/webapps/WEB-INF/classes/com/handysoft/beans/entity/package.jdo new file mode 100644 index 0000000..2d17aeb --- /dev/null +++ b/webapps/WEB-INF/classes/com/handysoft/beans/entity/package.jdo @@ -0,0 +1,283 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ssh exchange@192.168.0.39 -p 30022 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/webapps/WEB-INF/classes/ecross-pmf.properties b/webapps/WEB-INF/classes/ecross-pmf.properties new file mode 100644 index 0000000..3afc188 --- /dev/null +++ b/webapps/WEB-INF/classes/ecross-pmf.properties @@ -0,0 +1,85 @@ +### BEGIN BASE INFO + +javax.jdo.PersistenceManagerFactoryClass=org.datanucleus.jdo.JDOPersistenceManagerFactory +datanucleus.storeManagerType=rdbms +datanucleus.PersistenceUnitName=moumiPU +datanucleus.manageRelationshipsChecks=false + +datanucleus.autoCreateSchema=true +datanucleus.autoCreateTables=true +datanucleus.autoCreateColumns=true +datanucleus.autoCreateConstraints=true +datanucleus.validateTables=true +datanucleus.validateColumns=true +datanucleus.validateConstraints=true +#datanucleus.identifier.case=UpperCase +javax.jdo.option.Mapping=oracle +javax.jdo.mapping.Schema=moumi + +datanucleus.TransactionType=RESOURCE_LOCAL +datanucleus.connection.resourceType=RESOURCE_LOCAL +datanucleus.connection.resourceType2=RESOURCE_LOCAL + +### END BASE INFO + + +### BEGIN DATA SOURCE INFO +# You can use JNDI data source or internal connection pool + +### BEGIN JNDI DATA SOURCE INFO +#moumi.jndi.name=java:comp/env/jdbc/MoumiOB +#moumi.jndi.name=jdbc/MoumiOB +#moumi.jndi.name=XA_CMCSED +#javax.jdo.option.ConnectionFactoryName=CMCP +#javax.jdo.option.ConnectionFactory2Name=CMCP +javax.jdo.option.ConnectionFactoryName=java:comp/env/jdbc/MoumiOB +javax.jdo.option.ConnectionFactory2Name=java:comp/env/jdbc/MoumiOB +#javax.jdo.option.ConnectionFactoryName=jdbc/MoumiOB +#javax.jdo.option.ConnectionFactory2Name=jdbc/MoumiOB +### END JNDI DATA SOURCE INFO + +### BEGIN INTERNAL CONNECTION POOL + +#javax.jdo.option.ConnectionDriverName=org.hsqldb.jdbcDriver +#javax.jdo.option.ConnectionURL=jdbc:hsqldb:mem:moumi +#javax.jdo.option.ConnectionUserName=sa +#javax.jdo.option.ConnectionPassword= + +#javax.jdo.option.ConnectionDriverName=com.mysql.jdbc.Driver +#javax.jdo.option.ConnectionURL=jdbc:mysql://localhost:3306/moumijdo +#javax.jdo.option.ConnectionUserName=root +#javax.jdo.option.ConnectionPassword=cm1357 + +#javax.jdo.option.ConnectionDriverName=oracle.jdbc.driver.OracleDriver +#javax.jdo.option.ConnectionURL=jdbc:oracle:thin:@localhost:1521:xe +#javax.jdo.option.ConnectionUserName=moumijdo +#javax.jdo.option.ConnectionPassword=cm1357 + +#javax.jdo.option.ConnectionDriverName=com.ibm.db2.jcc.DB2Driver +#javax.jdo.option.ConnectionURL=jdbc:db2://localhost:50001/CMCKWD:currentSchema=CMCDBMGR; +#javax.jdo.option.ConnectionURL=jdbc:db2://112.136.170.33:45201/CMCSED:currentSchema=CMCDBMGR; +#javax.jdo.option.ConnectionUserName=cmcdbmgr +#javax.jdo.option.ConnectionPassword=cmcdbmgr01 + +### BEGIN DBCP POOL +#datanucleus.ConnectionPoolingType=DBCP +### BEGIN POOLING OF CONNECTIONS +#datanucleus.connectionPool.maxIdle=15 +#datanucleus.connectionPool.minIdle=5 +#datanucleus.connectionPool.maxActive=20 +#datanucleus.connectionPool.maxWait=60 +### END POOLING OF CONNECTIONS +### BEGIN POOLING OF PREPAREDSTATEMENTS +#datanucleus.connectionPool.maxStatements=50 +#datanucleus.connectionPool.testSQL=SELECT 1 FROM dual +#datanucleus.connectionPool.testSQL=SELECT * FROM sysibm.SYSDUMMY1 +#datanucleus.connectionPool.testSQL=SELECT 1 +#datanucleus.connectionPool.timeBetweenEvictionRunsMillis=2400000 +#datanucleus.connectionPool.minEvictableIdleTimeMillis=18000000 +### END POOLING OF PREPAREDSTATEMENTS +### END DBCP POOL + +### END INTERNAL CONNECTION POOL + + +### END DATASOURCE INFO diff --git a/webapps/WEB-INF/conf/axis2.xml b/webapps/WEB-INF/conf/axis2.xml new file mode 100644 index 0000000..a4070ff --- /dev/null +++ b/webapps/WEB-INF/conf/axis2.xml @@ -0,0 +1,528 @@ + + + + + + + true + false + false + true + + + true + /tmp + 4000 + + + + + + + + + + + + + 30000 + + + + false + + + + + + false + + admin + axis2 + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8080 + + + + + + + + + + + + + + > + + + + + + + + + + + + + + HTTP/1.1 + chunked + + + + + + + HTTP/1.1 + chunked + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + + + + multicast + + + apache.axis2.domain + + + apache.axis2.application.domain + + + true + + + 10 + + + 228.0.0.4 + + + 45564 + + + 500 + + + 3000 + + + 127.0.0.1 + + + 127.0.0.1 + + + 4000 + + + true + + + true + + + + + 127.0.0.1 + 4000 + + + 127.0.0.1 + 4001 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/webapps/WEB-INF/config/cert/idp_public.der b/webapps/WEB-INF/config/cert/idp_public.der new file mode 100644 index 0000000..b8afdd3 Binary files /dev/null and b/webapps/WEB-INF/config/cert/idp_public.der differ diff --git a/webapps/WEB-INF/config/cert/sp_private.der b/webapps/WEB-INF/config/cert/sp_private.der new file mode 100644 index 0000000..660a8e7 Binary files /dev/null and b/webapps/WEB-INF/config/cert/sp_private.der differ diff --git a/webapps/WEB-INF/config/cert/sp_public.der b/webapps/WEB-INF/config/cert/sp_public.der new file mode 100644 index 0000000..b8afdd3 Binary files /dev/null and b/webapps/WEB-INF/config/cert/sp_public.der differ diff --git a/webapps/WEB-INF/config/sp_cache.xml b/webapps/WEB-INF/config/sp_cache.xml new file mode 100644 index 0000000..e090a6d --- /dev/null +++ b/webapps/WEB-INF/config/sp_cache.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/webapps/WEB-INF/config/sp_config.xml b/webapps/WEB-INF/config/sp_config.xml new file mode 100644 index 0000000..7e456c2 --- /dev/null +++ b/webapps/WEB-INF/config/sp_config.xml @@ -0,0 +1,76 @@ + +]> + + + SEN_ATS_SP + SEN_ATS_SP + http://ats.sdev.go.kr/SSO + index.jsp + initech/sso/error.jsp + + WEB-INF/config/sp_metadata.xml + + WEB-INF/config/sp_cache.xml + WEB-INF/config/sp_log.xml + /edulog/jeus/logs/neis_dev_ap01/sen002 + + + true + WEB-INF/config/cert/sp_private.der + WEB-INF/config/cert/sp_public.der + iQ9qQdulnF3mM9Kkf7mQAQ== + + 300 + 300 + + + _SEN_ATS_SP_session + ats.sen.go.kr + + + + + + + + + + + + + + + + + + + + + + + + installed + 7581 + + + + + SEN_SSO_IDP + http://sso.sdev.go.kr/SSO + + http://sso.sdev.go.kr/SSO/metadata + metadata/idp_metadata.xml + + + true + WEB-INF/config/cert/idp_public.der + + + + false + false + + + + + diff --git a/webapps/WEB-INF/config/sp_filter_config.xml b/webapps/WEB-INF/config/sp_filter_config.xml new file mode 100644 index 0000000..136c04c --- /dev/null +++ b/webapps/WEB-INF/config/sp_filter_config.xml @@ -0,0 +1,23 @@ + + + + WEB-INF/config/sp_log.xml + + http://ptl.sdev.go.kr/EP/initech/sso/HealthCheckResult.jsp + 3000 + initech/sso/login/appLoginForm.jsp + + + sample.SpSessionCheckPreProcessImpl + sample.SpSessionCheckAfterProcessImpl + + + jpg|gif|png|swf|cab|exe|zip|hwp|xls|doc|ppt|txt|html|htm|js|css|esb + + + /SSO/* + /* + /initech/sso/login/appLoginForm.jsp + /auth_broker.jsp + + diff --git a/webapps/WEB-INF/config/sp_license.lic b/webapps/WEB-INF/config/sp_license.lic new file mode 100644 index 0000000..1df0502 --- /dev/null +++ b/webapps/WEB-INF/config/sp_license.lic @@ -0,0 +1,4 @@ +domain=www.iniline.co.kr +validity=2009-07-16~2011-07-17 +signature=CcA+yA2Qydq4N9ZK1S8RzjWaozo= + diff --git a/webapps/WEB-INF/config/sp_log.xml b/webapps/WEB-INF/config/sp_log.xml new file mode 100644 index 0000000..eb0d0c5 --- /dev/null +++ b/webapps/WEB-INF/config/sp_log.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/webapps/WEB-INF/config/sp_metadata.xml b/webapps/WEB-INF/config/sp_metadata.xml new file mode 100644 index 0000000..fc24fd5 --- /dev/null +++ b/webapps/WEB-INF/config/sp_metadata.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + urn:oasis:names:tc:SAML:2.0:nameid-format:transient + + + + + + + + NAME + ADDRESS + TEL + PHONE + EMAIL + + + + + + + + + \ No newline at end of file diff --git a/webapps/WEB-INF/geronimo-web.xml b/webapps/WEB-INF/geronimo-web.xml new file mode 100644 index 0000000..d37cf9c --- /dev/null +++ b/webapps/WEB-INF/geronimo-web.xml @@ -0,0 +1,18 @@ + + + + + kr.co.kihyun + moumi-ob + 5.1 + car + + + / + diff --git a/webapps/WEB-INF/jeus-web-dd.xml b/webapps/WEB-INF/jeus-web-dd.xml new file mode 100644 index 0000000..1ae04ef --- /dev/null +++ b/webapps/WEB-INF/jeus-web-dd.xml @@ -0,0 +1,14 @@ + + + 0 + 60 + / + true + + false + false + + -1 + false + false + \ No newline at end of file diff --git a/webapps/WEB-INF/lib/activation-1.1.jar b/webapps/WEB-INF/lib/activation-1.1.jar new file mode 100644 index 0000000..53f82a1 Binary files /dev/null and b/webapps/WEB-INF/lib/activation-1.1.jar differ diff --git a/webapps/WEB-INF/lib/ant-1.8.1.jar b/webapps/WEB-INF/lib/ant-1.8.1.jar new file mode 100644 index 0000000..bac289c Binary files /dev/null and b/webapps/WEB-INF/lib/ant-1.8.1.jar differ diff --git a/webapps/WEB-INF/lib/ant-launcher-1.8.1.jar b/webapps/WEB-INF/lib/ant-launcher-1.8.1.jar new file mode 100644 index 0000000..fe48213 Binary files /dev/null and b/webapps/WEB-INF/lib/ant-launcher-1.8.1.jar differ diff --git a/webapps/WEB-INF/lib/aopalliance-1.0.jar b/webapps/WEB-INF/lib/aopalliance-1.0.jar new file mode 100644 index 0000000..578b1a0 Binary files /dev/null and b/webapps/WEB-INF/lib/aopalliance-1.0.jar differ diff --git a/webapps/WEB-INF/lib/asm-3.1.jar b/webapps/WEB-INF/lib/asm-3.1.jar new file mode 100644 index 0000000..8217cae Binary files /dev/null and b/webapps/WEB-INF/lib/asm-3.1.jar differ diff --git a/webapps/WEB-INF/lib/bcmail-jdk15-1.45.jar b/webapps/WEB-INF/lib/bcmail-jdk15-1.45.jar new file mode 100644 index 0000000..f66e9a8 Binary files /dev/null and b/webapps/WEB-INF/lib/bcmail-jdk15-1.45.jar differ diff --git a/webapps/WEB-INF/lib/bcprov-jdk15-1.45.jar b/webapps/WEB-INF/lib/bcprov-jdk15-1.45.jar new file mode 100644 index 0000000..409070b Binary files /dev/null and b/webapps/WEB-INF/lib/bcprov-jdk15-1.45.jar differ diff --git a/webapps/WEB-INF/lib/classworlds-1.1-alpha-2.jar b/webapps/WEB-INF/lib/classworlds-1.1-alpha-2.jar new file mode 100644 index 0000000..1208b48 Binary files /dev/null and b/webapps/WEB-INF/lib/classworlds-1.1-alpha-2.jar differ diff --git a/webapps/WEB-INF/lib/commons-compress-1.0.jar b/webapps/WEB-INF/lib/commons-compress-1.0.jar new file mode 100644 index 0000000..78d832c Binary files /dev/null and b/webapps/WEB-INF/lib/commons-compress-1.0.jar differ diff --git a/webapps/WEB-INF/lib/commons-el-1.0.jar b/webapps/WEB-INF/lib/commons-el-1.0.jar new file mode 100644 index 0000000..608ed79 Binary files /dev/null and b/webapps/WEB-INF/lib/commons-el-1.0.jar differ diff --git a/webapps/WEB-INF/lib/commons-fileupload-1.2.jar b/webapps/WEB-INF/lib/commons-fileupload-1.2.jar new file mode 100644 index 0000000..12539f5 Binary files /dev/null and b/webapps/WEB-INF/lib/commons-fileupload-1.2.jar differ diff --git a/webapps/WEB-INF/lib/commons-io-1.3.jar b/webapps/WEB-INF/lib/commons-io-1.3.jar new file mode 100644 index 0000000..771a671 Binary files /dev/null and b/webapps/WEB-INF/lib/commons-io-1.3.jar differ diff --git a/webapps/WEB-INF/lib/commons-lang-2.1.jar b/webapps/WEB-INF/lib/commons-lang-2.1.jar new file mode 100644 index 0000000..87b80ab Binary files /dev/null and b/webapps/WEB-INF/lib/commons-lang-2.1.jar differ diff --git a/webapps/WEB-INF/lib/commons-logging-1.0.3.jar b/webapps/WEB-INF/lib/commons-logging-1.0.3.jar new file mode 100644 index 0000000..b99c937 Binary files /dev/null and b/webapps/WEB-INF/lib/commons-logging-1.0.3.jar differ diff --git a/webapps/WEB-INF/lib/commons-validator-1.1.4.jar b/webapps/WEB-INF/lib/commons-validator-1.1.4.jar new file mode 100644 index 0000000..bf76e86 Binary files /dev/null and b/webapps/WEB-INF/lib/commons-validator-1.1.4.jar differ diff --git a/webapps/WEB-INF/lib/datanucleus-connectionpool-2.0.3.jar b/webapps/WEB-INF/lib/datanucleus-connectionpool-2.0.3.jar new file mode 100644 index 0000000..86e83e1 Binary files /dev/null and b/webapps/WEB-INF/lib/datanucleus-connectionpool-2.0.3.jar differ diff --git a/webapps/WEB-INF/lib/datanucleus-core-2.2.0-release.jar b/webapps/WEB-INF/lib/datanucleus-core-2.2.0-release.jar new file mode 100644 index 0000000..29c5589 Binary files /dev/null and b/webapps/WEB-INF/lib/datanucleus-core-2.2.0-release.jar differ diff --git a/webapps/WEB-INF/lib/datanucleus-enhancer-2.1.3.jar b/webapps/WEB-INF/lib/datanucleus-enhancer-2.1.3.jar new file mode 100644 index 0000000..ba6c7ee Binary files /dev/null and b/webapps/WEB-INF/lib/datanucleus-enhancer-2.1.3.jar differ diff --git a/webapps/WEB-INF/lib/datanucleus-rdbms-2.2.0-release.jar b/webapps/WEB-INF/lib/datanucleus-rdbms-2.2.0-release.jar new file mode 100644 index 0000000..7dce7a2 Binary files /dev/null and b/webapps/WEB-INF/lib/datanucleus-rdbms-2.2.0-release.jar differ diff --git a/webapps/WEB-INF/lib/dom4j-1.6.1.jar b/webapps/WEB-INF/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000..c8c4dbb Binary files /dev/null and b/webapps/WEB-INF/lib/dom4j-1.6.1.jar differ diff --git a/webapps/WEB-INF/lib/doxia-core-1.0-alpha-4.jar b/webapps/WEB-INF/lib/doxia-core-1.0-alpha-4.jar new file mode 100644 index 0000000..786da50 Binary files /dev/null and b/webapps/WEB-INF/lib/doxia-core-1.0-alpha-4.jar differ diff --git a/webapps/WEB-INF/lib/doxia-sink-api-1.0-alpha-4.jar b/webapps/WEB-INF/lib/doxia-sink-api-1.0-alpha-4.jar new file mode 100644 index 0000000..5b8552a Binary files /dev/null and b/webapps/WEB-INF/lib/doxia-sink-api-1.0-alpha-4.jar differ diff --git a/webapps/WEB-INF/lib/eCrossClient-20110224.jar b/webapps/WEB-INF/lib/eCrossClient-20110224.jar new file mode 100644 index 0000000..47f943b Binary files /dev/null and b/webapps/WEB-INF/lib/eCrossClient-20110224.jar differ diff --git a/webapps/WEB-INF/lib/esb-1.0.jar b/webapps/WEB-INF/lib/esb-1.0.jar new file mode 100644 index 0000000..5272ee8 Binary files /dev/null and b/webapps/WEB-INF/lib/esb-1.0.jar differ diff --git a/webapps/WEB-INF/lib/fontbox-1.1.0.jar b/webapps/WEB-INF/lib/fontbox-1.1.0.jar new file mode 100644 index 0000000..3bc5a76 Binary files /dev/null and b/webapps/WEB-INF/lib/fontbox-1.1.0.jar differ diff --git a/webapps/WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar b/webapps/WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar new file mode 100644 index 0000000..ab1ee3b Binary files /dev/null and b/webapps/WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar differ diff --git a/webapps/WEB-INF/lib/icu4j-3.4.4.jar b/webapps/WEB-INF/lib/icu4j-3.4.4.jar new file mode 100644 index 0000000..f5e8c16 Binary files /dev/null and b/webapps/WEB-INF/lib/icu4j-3.4.4.jar differ diff --git a/webapps/WEB-INF/lib/jdo-api-3.0.jar b/webapps/WEB-INF/lib/jdo-api-3.0.jar new file mode 100644 index 0000000..f1d4a8c Binary files /dev/null and b/webapps/WEB-INF/lib/jdo-api-3.0.jar differ diff --git a/webapps/WEB-INF/lib/jempbox-1.1.0.jar b/webapps/WEB-INF/lib/jempbox-1.1.0.jar new file mode 100644 index 0000000..d2c9a05 Binary files /dev/null and b/webapps/WEB-INF/lib/jempbox-1.1.0.jar differ diff --git a/webapps/WEB-INF/lib/jericho-html-3.1.jar b/webapps/WEB-INF/lib/jericho-html-3.1.jar new file mode 100644 index 0000000..d79b6fd Binary files /dev/null and b/webapps/WEB-INF/lib/jericho-html-3.1.jar differ diff --git a/webapps/WEB-INF/lib/jquery-0.1.4.jar b/webapps/WEB-INF/lib/jquery-0.1.4.jar new file mode 100644 index 0000000..15f35f5 Binary files /dev/null and b/webapps/WEB-INF/lib/jquery-0.1.4.jar differ diff --git a/webapps/WEB-INF/lib/jstl-1.1.2.jar b/webapps/WEB-INF/lib/jstl-1.1.2.jar new file mode 100644 index 0000000..a02abec Binary files /dev/null and b/webapps/WEB-INF/lib/jstl-1.1.2.jar differ diff --git a/webapps/WEB-INF/lib/jtidy-r938.jar b/webapps/WEB-INF/lib/jtidy-r938.jar new file mode 100644 index 0000000..efde902 Binary files /dev/null and b/webapps/WEB-INF/lib/jtidy-r938.jar differ diff --git a/webapps/WEB-INF/lib/log4j-1.2.13.jar b/webapps/WEB-INF/lib/log4j-1.2.13.jar new file mode 100644 index 0000000..dde9972 Binary files /dev/null and b/webapps/WEB-INF/lib/log4j-1.2.13.jar differ diff --git a/webapps/WEB-INF/lib/logback-classic-0.9.22.jar b/webapps/WEB-INF/lib/logback-classic-0.9.22.jar new file mode 100644 index 0000000..d6c3866 Binary files /dev/null and b/webapps/WEB-INF/lib/logback-classic-0.9.22.jar differ diff --git a/webapps/WEB-INF/lib/logback-core-0.9.22.jar b/webapps/WEB-INF/lib/logback-core-0.9.22.jar new file mode 100644 index 0000000..fb10373 Binary files /dev/null and b/webapps/WEB-INF/lib/logback-core-0.9.22.jar differ diff --git a/webapps/WEB-INF/lib/mail-1.4.jar b/webapps/WEB-INF/lib/mail-1.4.jar new file mode 100644 index 0000000..fd4555b Binary files /dev/null and b/webapps/WEB-INF/lib/mail-1.4.jar differ diff --git a/webapps/WEB-INF/lib/maven-archiver-2.2.jar b/webapps/WEB-INF/lib/maven-archiver-2.2.jar new file mode 100644 index 0000000..bf8ae4d Binary files /dev/null and b/webapps/WEB-INF/lib/maven-archiver-2.2.jar differ diff --git a/webapps/WEB-INF/lib/maven-artifact-2.0.jar b/webapps/WEB-INF/lib/maven-artifact-2.0.jar new file mode 100644 index 0000000..700b547 Binary files /dev/null and b/webapps/WEB-INF/lib/maven-artifact-2.0.jar differ diff --git a/webapps/WEB-INF/lib/maven-artifact-manager-2.0.jar b/webapps/WEB-INF/lib/maven-artifact-manager-2.0.jar new file mode 100644 index 0000000..3d4c91a Binary files /dev/null and b/webapps/WEB-INF/lib/maven-artifact-manager-2.0.jar differ diff --git a/webapps/WEB-INF/lib/maven-jar-plugin-2.1.jar b/webapps/WEB-INF/lib/maven-jar-plugin-2.1.jar new file mode 100644 index 0000000..c20d725 Binary files /dev/null and b/webapps/WEB-INF/lib/maven-jar-plugin-2.1.jar differ diff --git a/webapps/WEB-INF/lib/maven-jstools-plugin-0.7.jar b/webapps/WEB-INF/lib/maven-jstools-plugin-0.7.jar new file mode 100644 index 0000000..285aa33 Binary files /dev/null and b/webapps/WEB-INF/lib/maven-jstools-plugin-0.7.jar differ diff --git a/webapps/WEB-INF/lib/maven-model-2.0.jar b/webapps/WEB-INF/lib/maven-model-2.0.jar new file mode 100644 index 0000000..d6820d6 Binary files /dev/null and b/webapps/WEB-INF/lib/maven-model-2.0.jar differ diff --git a/webapps/WEB-INF/lib/maven-plugin-api-2.0.jar b/webapps/WEB-INF/lib/maven-plugin-api-2.0.jar new file mode 100644 index 0000000..5150c16 Binary files /dev/null and b/webapps/WEB-INF/lib/maven-plugin-api-2.0.jar differ diff --git a/webapps/WEB-INF/lib/maven-profile-2.0.jar b/webapps/WEB-INF/lib/maven-profile-2.0.jar new file mode 100644 index 0000000..de4523b Binary files /dev/null and b/webapps/WEB-INF/lib/maven-profile-2.0.jar differ diff --git a/webapps/WEB-INF/lib/maven-project-2.0.jar b/webapps/WEB-INF/lib/maven-project-2.0.jar new file mode 100644 index 0000000..efeb8d4 Binary files /dev/null and b/webapps/WEB-INF/lib/maven-project-2.0.jar differ diff --git a/webapps/WEB-INF/lib/maven-reporting-api-2.0.jar b/webapps/WEB-INF/lib/maven-reporting-api-2.0.jar new file mode 100644 index 0000000..13e3318 Binary files /dev/null and b/webapps/WEB-INF/lib/maven-reporting-api-2.0.jar differ diff --git a/webapps/WEB-INF/lib/maven-reporting-impl-2.0.jar b/webapps/WEB-INF/lib/maven-reporting-impl-2.0.jar new file mode 100644 index 0000000..97852bb Binary files /dev/null and b/webapps/WEB-INF/lib/maven-reporting-impl-2.0.jar differ diff --git a/webapps/WEB-INF/lib/maven-repository-metadata-2.0.jar b/webapps/WEB-INF/lib/maven-repository-metadata-2.0.jar new file mode 100644 index 0000000..9f5e65c Binary files /dev/null and b/webapps/WEB-INF/lib/maven-repository-metadata-2.0.jar differ diff --git a/webapps/WEB-INF/lib/metadata-extractor-2.4.0-beta-1.jar b/webapps/WEB-INF/lib/metadata-extractor-2.4.0-beta-1.jar new file mode 100644 index 0000000..3720d64 Binary files /dev/null and b/webapps/WEB-INF/lib/metadata-extractor-2.4.0-beta-1.jar differ diff --git a/webapps/WEB-INF/lib/oro-2.0.7.jar b/webapps/WEB-INF/lib/oro-2.0.7.jar new file mode 100644 index 0000000..ed6c60a Binary files /dev/null and b/webapps/WEB-INF/lib/oro-2.0.7.jar differ diff --git a/webapps/WEB-INF/lib/pdfbox-1.1.0.jar b/webapps/WEB-INF/lib/pdfbox-1.1.0.jar new file mode 100644 index 0000000..ed19b45 Binary files /dev/null and b/webapps/WEB-INF/lib/pdfbox-1.1.0.jar differ diff --git a/webapps/WEB-INF/lib/plexus-archiver-1.0-alpha-9.jar b/webapps/WEB-INF/lib/plexus-archiver-1.0-alpha-9.jar new file mode 100644 index 0000000..db1c774 Binary files /dev/null and b/webapps/WEB-INF/lib/plexus-archiver-1.0-alpha-9.jar differ diff --git a/webapps/WEB-INF/lib/plexus-container-default-1.0-alpha-8.jar b/webapps/WEB-INF/lib/plexus-container-default-1.0-alpha-8.jar new file mode 100644 index 0000000..5fde81b Binary files /dev/null and b/webapps/WEB-INF/lib/plexus-container-default-1.0-alpha-8.jar differ diff --git a/webapps/WEB-INF/lib/plexus-io-1.0-alpha-1.jar b/webapps/WEB-INF/lib/plexus-io-1.0-alpha-1.jar new file mode 100644 index 0000000..33d7f16 Binary files /dev/null and b/webapps/WEB-INF/lib/plexus-io-1.0-alpha-1.jar differ diff --git a/webapps/WEB-INF/lib/plexus-utils-1.0.4.jar b/webapps/WEB-INF/lib/plexus-utils-1.0.4.jar new file mode 100644 index 0000000..a2013d4 Binary files /dev/null and b/webapps/WEB-INF/lib/plexus-utils-1.0.4.jar differ diff --git a/webapps/WEB-INF/lib/poi-3.7-beta1.jar b/webapps/WEB-INF/lib/poi-3.7-beta1.jar new file mode 100644 index 0000000..4f3cce9 Binary files /dev/null and b/webapps/WEB-INF/lib/poi-3.7-beta1.jar differ diff --git a/webapps/WEB-INF/lib/poi-ooxml-3.7-beta1.jar b/webapps/WEB-INF/lib/poi-ooxml-3.7-beta1.jar new file mode 100644 index 0000000..ea09cb7 Binary files /dev/null and b/webapps/WEB-INF/lib/poi-ooxml-3.7-beta1.jar differ diff --git a/webapps/WEB-INF/lib/poi-ooxml-schemas-3.7-beta1.jar b/webapps/WEB-INF/lib/poi-ooxml-schemas-3.7-beta1.jar new file mode 100644 index 0000000..ecbdadd Binary files /dev/null and b/webapps/WEB-INF/lib/poi-ooxml-schemas-3.7-beta1.jar differ diff --git a/webapps/WEB-INF/lib/poi-scratchpad-3.7-beta1.jar b/webapps/WEB-INF/lib/poi-scratchpad-3.7-beta1.jar new file mode 100644 index 0000000..8f76a70 Binary files /dev/null and b/webapps/WEB-INF/lib/poi-scratchpad-3.7-beta1.jar differ diff --git a/webapps/WEB-INF/lib/slf4j-api-1.6.0.jar b/webapps/WEB-INF/lib/slf4j-api-1.6.0.jar new file mode 100644 index 0000000..914ac34 Binary files /dev/null and b/webapps/WEB-INF/lib/slf4j-api-1.6.0.jar differ diff --git a/webapps/WEB-INF/lib/spring-beans-2.5.6.jar b/webapps/WEB-INF/lib/spring-beans-2.5.6.jar new file mode 100644 index 0000000..3f306b6 Binary files /dev/null and b/webapps/WEB-INF/lib/spring-beans-2.5.6.jar differ diff --git a/webapps/WEB-INF/lib/spring-context-2.5.6.jar b/webapps/WEB-INF/lib/spring-context-2.5.6.jar new file mode 100644 index 0000000..29fabcc Binary files /dev/null and b/webapps/WEB-INF/lib/spring-context-2.5.6.jar differ diff --git a/webapps/WEB-INF/lib/spring-core-2.5.6.jar b/webapps/WEB-INF/lib/spring-core-2.5.6.jar new file mode 100644 index 0000000..aafa336 Binary files /dev/null and b/webapps/WEB-INF/lib/spring-core-2.5.6.jar differ diff --git a/webapps/WEB-INF/lib/spring-jdbc-2.5.6.jar b/webapps/WEB-INF/lib/spring-jdbc-2.5.6.jar new file mode 100644 index 0000000..f480a54 Binary files /dev/null and b/webapps/WEB-INF/lib/spring-jdbc-2.5.6.jar differ diff --git a/webapps/WEB-INF/lib/spring-tx-2.5.6.jar b/webapps/WEB-INF/lib/spring-tx-2.5.6.jar new file mode 100644 index 0000000..1a19297 Binary files /dev/null and b/webapps/WEB-INF/lib/spring-tx-2.5.6.jar differ diff --git a/webapps/WEB-INF/lib/standard-1.1.2.jar b/webapps/WEB-INF/lib/standard-1.1.2.jar new file mode 100644 index 0000000..bc528ac Binary files /dev/null and b/webapps/WEB-INF/lib/standard-1.1.2.jar differ diff --git a/webapps/WEB-INF/lib/stax-api-1.0.1.jar b/webapps/WEB-INF/lib/stax-api-1.0.1.jar new file mode 100644 index 0000000..d9a1665 Binary files /dev/null and b/webapps/WEB-INF/lib/stax-api-1.0.1.jar differ diff --git a/webapps/WEB-INF/lib/swift-common-1.1.1.jar b/webapps/WEB-INF/lib/swift-common-1.1.1.jar new file mode 100644 index 0000000..084eea7 Binary files /dev/null and b/webapps/WEB-INF/lib/swift-common-1.1.1.jar differ diff --git a/webapps/WEB-INF/lib/swift-sp-nx-1.1.jar b/webapps/WEB-INF/lib/swift-sp-nx-1.1.jar new file mode 100644 index 0000000..3255f00 Binary files /dev/null and b/webapps/WEB-INF/lib/swift-sp-nx-1.1.jar differ diff --git a/webapps/WEB-INF/lib/tagsoup-1.2.jar b/webapps/WEB-INF/lib/tagsoup-1.2.jar new file mode 100644 index 0000000..af27803 Binary files /dev/null and b/webapps/WEB-INF/lib/tagsoup-1.2.jar differ diff --git a/webapps/WEB-INF/lib/tika-core-0.7.jar b/webapps/WEB-INF/lib/tika-core-0.7.jar new file mode 100644 index 0000000..7ca7831 Binary files /dev/null and b/webapps/WEB-INF/lib/tika-core-0.7.jar differ diff --git a/webapps/WEB-INF/lib/tika-parsers-0.7.jar b/webapps/WEB-INF/lib/tika-parsers-0.7.jar new file mode 100644 index 0000000..e34be82 Binary files /dev/null and b/webapps/WEB-INF/lib/tika-parsers-0.7.jar differ diff --git a/webapps/WEB-INF/lib/tinymce-0.1.4.jar b/webapps/WEB-INF/lib/tinymce-0.1.4.jar new file mode 100644 index 0000000..69fd290 Binary files /dev/null and b/webapps/WEB-INF/lib/tinymce-0.1.4.jar differ diff --git a/webapps/WEB-INF/lib/transaction-api-1.1.jar b/webapps/WEB-INF/lib/transaction-api-1.1.jar new file mode 100644 index 0000000..7736ec9 Binary files /dev/null and b/webapps/WEB-INF/lib/transaction-api-1.1.jar differ diff --git a/webapps/WEB-INF/lib/truetech-exchange-20090701.jar b/webapps/WEB-INF/lib/truetech-exchange-20090701.jar new file mode 100644 index 0000000..8d428e5 Binary files /dev/null and b/webapps/WEB-INF/lib/truetech-exchange-20090701.jar differ diff --git a/webapps/WEB-INF/lib/wagon-provider-api-1.0-alpha-5.jar b/webapps/WEB-INF/lib/wagon-provider-api-1.0-alpha-5.jar new file mode 100644 index 0000000..ddf2aba Binary files /dev/null and b/webapps/WEB-INF/lib/wagon-provider-api-1.0-alpha-5.jar differ diff --git a/webapps/WEB-INF/lib/xml-apis-1.0.b2.jar b/webapps/WEB-INF/lib/xml-apis-1.0.b2.jar new file mode 100644 index 0000000..ad33a5a Binary files /dev/null and b/webapps/WEB-INF/lib/xml-apis-1.0.b2.jar differ diff --git a/webapps/WEB-INF/lib/xmlbeans-2.3.0.jar b/webapps/WEB-INF/lib/xmlbeans-2.3.0.jar new file mode 100644 index 0000000..ccd8163 Binary files /dev/null and b/webapps/WEB-INF/lib/xmlbeans-2.3.0.jar differ diff --git a/webapps/WEB-INF/lib/xmlsec-1.4.2.jar b/webapps/WEB-INF/lib/xmlsec-1.4.2.jar new file mode 100644 index 0000000..6753cec Binary files /dev/null and b/webapps/WEB-INF/lib/xmlsec-1.4.2.jar differ diff --git a/webapps/WEB-INF/modules/addressing-1.5.mar b/webapps/WEB-INF/modules/addressing-1.5.mar new file mode 100644 index 0000000..12a52b4 Binary files /dev/null and b/webapps/WEB-INF/modules/addressing-1.5.mar differ diff --git a/webapps/WEB-INF/modules/axis2-jaxws-mar-1.5.mar b/webapps/WEB-INF/modules/axis2-jaxws-mar-1.5.mar new file mode 100644 index 0000000..a72358c Binary files /dev/null and b/webapps/WEB-INF/modules/axis2-jaxws-mar-1.5.mar differ diff --git a/webapps/WEB-INF/modules/axis2-scripting-1.5.mar b/webapps/WEB-INF/modules/axis2-scripting-1.5.mar new file mode 100644 index 0000000..c396a1a Binary files /dev/null and b/webapps/WEB-INF/modules/axis2-scripting-1.5.mar differ diff --git a/webapps/WEB-INF/modules/mex-1.5.mar b/webapps/WEB-INF/modules/mex-1.5.mar new file mode 100644 index 0000000..d09e1b1 Binary files /dev/null and b/webapps/WEB-INF/modules/mex-1.5.mar differ diff --git a/webapps/WEB-INF/modules/modules.list b/webapps/WEB-INF/modules/modules.list new file mode 100644 index 0000000..f3f6216 --- /dev/null +++ b/webapps/WEB-INF/modules/modules.list @@ -0,0 +1,23 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +# +addressing-1.5.mar +soapmonitor-1.5.mar +ping-1.5.mar +mex-1.5.mar +axis2-scripting-1.5.mar \ No newline at end of file diff --git a/webapps/WEB-INF/modules/mtompolicy-1.5.mar b/webapps/WEB-INF/modules/mtompolicy-1.5.mar new file mode 100644 index 0000000..c47de83 Binary files /dev/null and b/webapps/WEB-INF/modules/mtompolicy-1.5.mar differ diff --git a/webapps/WEB-INF/modules/ping-1.5.mar b/webapps/WEB-INF/modules/ping-1.5.mar new file mode 100644 index 0000000..417026c Binary files /dev/null and b/webapps/WEB-INF/modules/ping-1.5.mar differ diff --git a/webapps/WEB-INF/modules/soapmonitor-1.5.mar b/webapps/WEB-INF/modules/soapmonitor-1.5.mar new file mode 100644 index 0000000..e500b99 Binary files /dev/null and b/webapps/WEB-INF/modules/soapmonitor-1.5.mar differ diff --git a/webapps/WEB-INF/properties.txt b/webapps/WEB-INF/properties.txt new file mode 100644 index 0000000..8e39f6f --- /dev/null +++ b/webapps/WEB-INF/properties.txt @@ -0,0 +1 @@ +jdbc:db2://10.200.30.141:43000/CMCKWD,cmcdbmgr,cmcdbmgr \ No newline at end of file diff --git a/webapps/WEB-INF/services/services.list b/webapps/WEB-INF/services/services.list new file mode 100644 index 0000000..2ea006f --- /dev/null +++ b/webapps/WEB-INF/services/services.list @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +# +version-1.5.aar diff --git a/webapps/WEB-INF/services/version-1.5.aar b/webapps/WEB-INF/services/version-1.5.aar new file mode 100644 index 0000000..9ceb171 Binary files /dev/null and b/webapps/WEB-INF/services/version-1.5.aar differ diff --git a/webapps/WEB-INF/sun-web.xml b/webapps/WEB-INF/sun-web.xml new file mode 100644 index 0000000..1fc44dc --- /dev/null +++ b/webapps/WEB-INF/sun-web.xml @@ -0,0 +1,11 @@ + + + + / + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/webapps/WEB-INF/tlds/TrailTagLib.tld b/webapps/WEB-INF/tlds/TrailTagLib.tld new file mode 100644 index 0000000..eea5412 --- /dev/null +++ b/webapps/WEB-INF/tlds/TrailTagLib.tld @@ -0,0 +1,17 @@ + + + + + + 1.0 + 2.0 + trail + http://www.kihyun.co.kr/taglibs/trail + Tree structured Breadcrumbs in a taglib. + + trailMenu + kr.co.kihyun.beans.totsys.menu.TrailMenuTag + empty + Display Trail Menu + + \ No newline at end of file diff --git a/webapps/WEB-INF/web.xml b/webapps/WEB-INF/web.xml new file mode 100644 index 0000000..477354e --- /dev/null +++ b/webapps/WEB-INF/web.xml @@ -0,0 +1,144 @@ + + + moumi5 + + + index.html + index.htm + index.jsp + default.html + default.htm + default.jsp + + + + + + + + + + + + + + + Moumi + kr.co.kihyun.moumi.Moumi + + + + JavascriptDependencyFilter + gr.abiss.mvn.plugins.jstools.web.JavascriptDependencyFilter + + + allowedExtentions + js as fla png jpg gif txt css html htm xml xsl xslt svg svgz swf + + + + cacheControl + max-age=86400 + + + + enableGzip + true + + + + enableCache + true + + + + enableGzipedCache + true + + + + send404 + true + + + + basePath + /lib/js/ + + + + Moumi + /* + + + + JavascriptDependencyFilter + + /lib/js/* + + + + + org.apache.commons.fileupload.servlet.FileCleanerCleanup + + diff --git a/webapps/WEB-INF/web.xml.bak b/webapps/WEB-INF/web.xml.bak new file mode 100644 index 0000000..1ede88e --- /dev/null +++ b/webapps/WEB-INF/web.xml.bak @@ -0,0 +1,73 @@ + + + moumi06 + + index.html + index.htm + index.jsp + default.html + default.htm + default.jsp + + + JavascriptDependencyFilter + gr.abiss.mvn.plugins.jstools.web.JavascriptDependencyFilter + + allowedExtentions + js as fla png jpg gif txt css html htm xml xsl xslt svg svgz swf + + + cacheControl + max-age=86400 + + + enableGzip + true + + + enableCache + true + + + enableGzipedCache + true + + + send404 + true + + + basePath + /lib/js/ + + + + JavascriptDependencyFilter + /lib/js/* + + + + org.apache.commons.fileupload.servlet.FileCleanerCleanup + + + + Moumi + kr.co.kihyun.moumi.Moumi + + + Moumi + /* + + + encodingFilter + org.springframework.web.filter.CharacterEncodingFilter + + encoding + UTF-8 + + + + encodingFilter + /* + + \ No newline at end of file diff --git a/webapps/WEB-INF/web.xml.orig b/webapps/WEB-INF/web.xml.orig new file mode 100644 index 0000000..e0b942a --- /dev/null +++ b/webapps/WEB-INF/web.xml.orig @@ -0,0 +1,139 @@ + + + moumi5 + + index.html + index.htm + index.jsp + default.html + default.htm + default.jsp + + + + + + + + + + + + + + Moumi + kr.co.kihyun.moumi.Moumi + + + JavascriptDependencyFilter + gr.abiss.mvn.plugins.jstools.web.JavascriptDependencyFilter + + + allowedExtentions + js as fla png jpg gif txt css html htm xml xsl xslt svg svgz swf + + + + cacheControl + max-age=86400 + + + + enableGzip + true + + + + enableCache + true + + + + enableGzipedCache + true + + + + send404 + true + + + + basePath + /lib/js/ + + + + Moumi + /* + + + JavascriptDependencyFilter + + /lib/js/* + + + + org.apache.commons.fileupload.servlet.FileCleanerCleanup + + diff --git a/webapps/WEB-INF/weblogic.xml b/webapps/WEB-INF/weblogic.xml new file mode 100644 index 0000000..fba6704 --- /dev/null +++ b/webapps/WEB-INF/weblogic.xml @@ -0,0 +1,20 @@ + + + / + + false + + + + /servlet/kr.co.kihyun.beans.user.HttpOrgSearch + UTF-8 + + + + + false + + \ No newline at end of file diff --git a/webapps/all_moumi_ddl_oracle.sql b/webapps/all_moumi_ddl_oracle.sql new file mode 100644 index 0000000..aee08a0 --- /dev/null +++ b/webapps/all_moumi_ddl_oracle.sql @@ -0,0 +1,53 @@ +CREATE OR REPLACE FUNCTION SP_CM_DEC_FU ( V_COLUMN VARCHAR2 ) + RETURN VARCHAR2 +IS + RESULT VARCHAR2(2032); +BEGIN + RETURN V_COLUMN; +END SP_CM_DEC_FU; + + +CREATE OR REPLACE FUNCTION FN_ALLCNT ( DC_ID IN VARCHAR2 ) + RETURN VARCHAR2 +IS +Result varchar(200); +begin + SELECT COUNT(*) INTO Result + FROM MOUMI_TOT_REPORT RT, MOUMI_TOT_DOC DC + WHERE RT.DOC_ID = dc_id + AND RT.DOC_ID = DC.ID + AND RT.DEL_TYPE = 'N'; + + return(Result); +end FN_ALLCNT; + +CREATE OR REPLACE FUNCTION FN_NOTECNT ( DC_ID IN VARCHAR2 ) + RETURN VARCHAR2 +IS +Result VARCHAR2(4096); +begin + SELECT COUNT(*) INTO Result + FROM MOUMI_TOT_REPORT RT, MOUMI_TOT_DOC DC + WHERE RT.DOC_ID = dc_id + AND RT.DOC_ID = DC.ID + AND RT.DEL_TYPE = 'N' + AND RT.PRSS IN (14); + return(Result); + +end FN_NOTECNT; + +CREATE OR REPLACE FUNCTION FN_SNDCNT ( DC_ID IN VARCHAR2 ) + RETURN VARCHAR2 +IS +Result VARCHAR2(4096); +begin + SELECT COUNT(*) INTO Result + FROM MOUMI_TOT_REPORT RT, MOUMI_TOT_DOC DC + WHERE RT.DOC_ID = dc_id + AND RT.DOC_ID = DC.ID + AND RT.DEL_TYPE = 'N' + AND RT.PRSS IN (6,12); + + return(Result); + +end FN_SNDCNT; diff --git a/webapps/auth_broker.jsp b/webapps/auth_broker.jsp new file mode 100644 index 0000000..b6d8d85 --- /dev/null +++ b/webapps/auth_broker.jsp @@ -0,0 +1,74 @@ +<%-- + Document : auth_broker + Created on : 2011. 1. 13, 11:24:42 + Author : bhs +--%> + +<%@page contentType="text/html" pageEncoding="EUC-KR"%> +<%@page import="kr.co.kihyun.lang.MString"%> +<%@page import="org.slf4j.Logger"%> +<%@page import="org.slf4j.LoggerFactory"%> + +<% + Logger LOG = LoggerFactory.getLogger(this.getClass()); + + String strPostData1 = request.getParameter("SESSIONKEY1"); + String strPostData4 = request.getParameter("SESSIONVAL1"); + String strPostData2 = request.getParameter("SESSIONKEY2"); + String strPostData5 = request.getParameter("SESSIONVAL2"); + + if (MString.isNull(strPostData1) || MString.isNull(strPostData4) + || MString.isNull(strPostData2) || MString.isNull(strPostData5)) { + LOG.error("SESSIONKEY1/SESSIONVAL1: {}/{}, SESSIONKEY2/SESSIONVAL2: {}/{}", + new Object[] {strPostData1, strPostData4, strPostData2, strPostData5}); + response.sendRedirect("/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?redirect=/auth_broker.jsp"); + return; + } + + Cookie cookie1 = null; + Cookie cookie2 = null; + + //26.HTTP (addCookie)_CWE-113 : Update by KWON,HAN -- 2014.12.12 · + cookie1 = new Cookie(strPostData1, strPostData4); + +// // ش ΰ ϱ ܺο ԷµǴ \n \r Ѵ. +// String filtered_strPostData4 = strPostData4.replaceAll("\r", "").replaceAll("\n", ""); +// +// cookie1 = new Cookie(strPostData1, filtered_strPostData4); + //====================================================================== + + cookie1.setPath("/"); + cookie1.setDomain(request.getServerName().replace("ats", "")); + response.addCookie(cookie1); + + + //26.HTTP (addCookie)_CWE-113 : Update by KWON,HAN -- 2014.12.12 · + cookie2 = new Cookie(strPostData2, strPostData5); + + // ش ΰ ϱ ܺο ԷµǴ \n \r Ѵ. +// String filtered_strPostData5 = strPostData5.replaceAll("\r", "").replaceAll("\n", ""); +// +// cookie2 = new Cookie(strPostData1, filtered_strPostData5); + //====================================================================== + + cookie2.setPath("/"); + cookie2.setDomain(request.getServerName().replace("ats", "")); + response.addCookie(cookie2); + + LOG.info("redirect url : {}", request.getParameter("redirect_url")); + + response.sendRedirect(request.getParameter("redirect_url")); +%> + + + + + + + Authentication Broker + + +

Hello World!

+ + diff --git a/webapps/cronTest.jsp b/webapps/cronTest.jsp new file mode 100644 index 0000000..2727785 --- /dev/null +++ b/webapps/cronTest.jsp @@ -0,0 +1,5 @@ +01 01 * * * /opt/java1.4/bin/java -Dfile.encoding=8859_1 -classpath /kr/co/kihyun/beans/batch HttpUpdateBatch.doPost + + + + diff --git a/webapps/dtd/xhtml-lat1.ent b/webapps/dtd/xhtml-lat1.ent new file mode 100644 index 0000000..ffee223 --- /dev/null +++ b/webapps/dtd/xhtml-lat1.ent @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/webapps/dtd/xhtml-special.ent b/webapps/dtd/xhtml-special.ent new file mode 100644 index 0000000..ca358b2 --- /dev/null +++ b/webapps/dtd/xhtml-special.ent @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/webapps/dtd/xhtml-symbol.ent b/webapps/dtd/xhtml-symbol.ent new file mode 100644 index 0000000..63c2abf --- /dev/null +++ b/webapps/dtd/xhtml-symbol.ent @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/webapps/dtd/xhtml1-strict.dtd b/webapps/dtd/xhtml1-strict.dtd new file mode 100644 index 0000000..2324533 --- /dev/null +++ b/webapps/dtd/xhtml1-strict.dtd @@ -0,0 +1,988 @@ + + + + + +%HTMLlat1; + + +%HTMLsymbol; + + +%HTMLspecial; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/webapps/dtd/xhtml1-transitional.dtd b/webapps/dtd/xhtml1-transitional.dtd new file mode 100644 index 0000000..628f27a --- /dev/null +++ b/webapps/dtd/xhtml1-transitional.dtd @@ -0,0 +1,1201 @@ + + + + + +%HTMLlat1; + + +%HTMLsymbol; + + +%HTMLspecial; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/webapps/examples/template-list.jsp b/webapps/examples/template-list.jsp new file mode 100644 index 0000000..e078156 --- /dev/null +++ b/webapps/examples/template-list.jsp @@ -0,0 +1,152 @@ +<%-- + Document : template-list + Created on : 2011. 1. 18, 3:28:08 + Author : bhs +--%> + +<%@page contentType="text/html" pageEncoding="EUC-KR"%> +<%@page import="java.net.URLEncoder"%> +<%@page import="java.util.List"%> +<%@page import="javax.jdo.PersistenceManager"%> +<%@page import="javax.jdo.Transaction"%> +<%@page import="kr.co.kihyun.lang.MInteger"%> +<%@page import="kr.co.kihyun.lang.MString"%> +<%@page import="kr.co.kihyun.moumi.MoumiConfig"%> +<%@page import="kr.co.kihyun.beans.entity.MUser"%> +<%@page import="kr.co.kihyun.beans.entity.TotDoc"%> +<%@page import="kr.co.kihyun.beans.entity.util.PMF"%> +<%@page import="kr.co.kihyun.beans.entity.util.MPersistenceManager"%> +<%@page import="kr.co.kihyun.beans.user.HttpSSOLogin"%> +<%@page import="org.slf4j.Logger"%> +<%@page import="org.slf4j.LoggerFactory"%> + +<% + Logger LOG = LoggerFactory.getLogger(this.getClass()); + + request.setCharacterEncoding("UTF-8"); + + String filterOption = request.getParameter("filterOption"); + String filterValue = request.getParameter("filterValue"); + String uri = URLEncoder.encode("template-list.jsp?filterOption=" + MString.checkNull(filterOption) + + "&filterValue=" + MString.checkNull(filterValue), "UTF-8"); + + MUser mUser = null; + List onGoingDocs = null; + + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + tx.begin(); + + mUser = pm.getObjectById(MUser.class, HttpSSOLogin.getLoginID(request)); + onGoingDocs = mUser.getOnGoingDocs(pm, filterOption, filterValue); + + tx.rollback(); + + int strPage = MInteger.parseInt(request.getParameter("strPage"), 1); + int recordSize = 15; + int currentPage = strPage; + int pageSize = (int) Math.ceil(onGoingDocs.size() / (float) recordSize); + int currentPageSetUp = currentPage / 10 * 10; +%> + + + + + + + <%=MoumiConfig.getTitle()%> + + + + + + + + + + + +
  + + + + + + + + + + <% + int index = 0; + int nextCount = 0; + if (currentPage > 1) + nextCount = (currentPage - 1) * recordSize; + + tx.begin(); + for (int i = 0; i < recordSize && nextCount+i < onGoingDocs.size(); i++) { + index = nextCount+i; + TotDoc currentDoc = onGoingDocs.get(index); + %> + + + + + <% + } + tx.rollback(); + %> + + + + <% + if (onGoingDocs.isEmpty()) { + %> + + + + <% + } else { + %> + + + + <% + } + %> +
+ <%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.document") + + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.name") + %> + + <%= MoumiConfig.getMessageBundle().getString("moumi.message.doc.Devision") %> +
<%= currentDoc.getName() %><%= currentDoc.getDept(pm).getName() %>
+ <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.notPrssDoc")%> +
+ + + + + + +
+
+
+ + + <%=MoumiConfig.getMessageBundle().getString("moumi.message.button_large.next")%> + + +
+ + +<% + } catch (Exception e) { + throw new ServletException(e); + } finally { + if(tx.isActive()) + tx.rollback(); + pm.close(); + } +%> diff --git a/webapps/examples/template-main.jsp b/webapps/examples/template-main.jsp new file mode 100644 index 0000000..6ce41bf --- /dev/null +++ b/webapps/examples/template-main.jsp @@ -0,0 +1,58 @@ +<%-- + Document : template-main + Created on : 2011. 1. 18, 11:13:19 + Author : bhs +--%> + +<%@page contentType="text/html" pageEncoding="EUC-KR"%> +<%@page import="javax.jdo.PersistenceManager"%> +<%@page import="kr.co.kihyun.lang.MLong"%> +<%@page import="kr.co.kihyun.moumi.MoumiConfig"%> +<%@page import="kr.co.kihyun.beans.entity.TotDoc"%> +<%@page import="kr.co.kihyun.beans.entity.util.PMF"%> + +<% + PersistenceManager pm = PMF.get().getPersistenceManager(); + TotDoc totDoc = pm.getObjectById(TotDoc.class, MLong.parseLong(request.getParameter("docID"))); +%> + + + + + + + <%=MoumiConfig.getTitle()%> + + + + + + + + + + + +
  + + + + + + + + + + +
<%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.doc") %><%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.form") %>
<%= totDoc.getName() %><%= totDoc.getForm() %>
+
+
+ + + <%=MoumiConfig.getMessageBundle().getString("moumi.message.button_large.next")%> + + +
+ + diff --git a/webapps/index.html b/webapps/index.html new file mode 100644 index 0000000..d5ed96a --- /dev/null +++ b/webapps/index.html @@ -0,0 +1,11 @@ + + + + + +
+ + + diff --git a/webapps/index.jsp b/webapps/index.jsp new file mode 100644 index 0000000..997c47f --- /dev/null +++ b/webapps/index.jsp @@ -0,0 +1 @@ +index page - moumi diff --git a/webapps/indexSSO.jsp b/webapps/indexSSO.jsp new file mode 100644 index 0000000..d7d83a9 --- /dev/null +++ b/webapps/indexSSO.jsp @@ -0,0 +1,34 @@ +<%@page import="kr.co.kihyun.beans.entity.util.PMF"%> +<%@page import="kr.co.kihyun.beans.entity.util.MPersistenceManager"%> +<%@page import="kr.co.kihyun.beans.user.MultiCheck"%> +<%@page import="javax.jdo.Transaction"%> +<%@page import="javax.jdo.PersistenceManager"%> +<%@ page contentType="text/html; charset=euc-kr"%> +<% + String sso_Id = request.getParameter("sso_Id"); + String userId = sso_Id; + String deptID = request.getParameter("deptID"); + + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + request.setCharacterEncoding("euc-kr"); + MultiCheck mc = new MultiCheck(); + mc.deptUpdate(userId, deptID); + + System.out.println("deptID::::"+deptID); + + %> + + + + + + + +
+ + + diff --git a/webapps/indexSSO.jsp_org b/webapps/indexSSO.jsp_org new file mode 100644 index 0000000..d99351a --- /dev/null +++ b/webapps/indexSSO.jsp_org @@ -0,0 +1,25 @@ +<%@ page contentType="text/html; charset=euc-kr"%> +<% + String sso_Id = request.getParameter("sso_Id"); + + //28.ũνƮ ũƮ(Reflected)_CWE-80 : Add by KWON,HAN + if (sso_Id !=null) { + sso_Id = sso_Id.replaceAll("<","<"); + sso_Id = sso_Id.replaceAll(">",">"); + } + //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +%> + + + + + + +
+
+ + + diff --git a/webapps/indexSSOupdate.jsp b/webapps/indexSSOupdate.jsp new file mode 100644 index 0000000..0ce4962 --- /dev/null +++ b/webapps/indexSSOupdate.jsp @@ -0,0 +1,18 @@ +<%@ page contentType="text/html; charset=euc-kr"%> +<% + String sso_Id = request.getParameter("id"); +%> + + + + + + +
+
+ + + diff --git a/webapps/moumi5-war-neis-5.3.7-SNAPSHOT.war b/webapps/moumi5-war-neis-5.3.7-SNAPSHOT.war new file mode 100644 index 0000000..cbf45fb Binary files /dev/null and b/webapps/moumi5-war-neis-5.3.7-SNAPSHOT.war differ diff --git a/webapps/moumi_cmcp.properties b/webapps/moumi_cmcp.properties new file mode 100644 index 0000000..2529f51 --- /dev/null +++ b/webapps/moumi_cmcp.properties @@ -0,0 +1 @@ +jdbc:db2://10.50.9.140:11663/CMCKWD,cmcdbmgr,cmcdbmgr diff --git a/webapps/moumi_gacp.properties b/webapps/moumi_gacp.properties new file mode 100644 index 0000000..35390f9 --- /dev/null +++ b/webapps/moumi_gacp.properties @@ -0,0 +1 @@ +jdbc:oracle:thin:@localhost:1521:CMCKWD,cmcdbmgr,cmcdbmgr \ No newline at end of file diff --git a/webapps/moumi_gacp_db2.properties b/webapps/moumi_gacp_db2.properties new file mode 100644 index 0000000..a2cf75b --- /dev/null +++ b/webapps/moumi_gacp_db2.properties @@ -0,0 +1 @@ +jdbc:db2://10.50.9.140:11663/GACKWD,gacdbmgr,gacdbmgr diff --git a/webapps/moumi_gacp_oracle.properties b/webapps/moumi_gacp_oracle.properties new file mode 100644 index 0000000..35390f9 --- /dev/null +++ b/webapps/moumi_gacp_oracle.properties @@ -0,0 +1 @@ +jdbc:oracle:thin:@localhost:1521:CMCKWD,cmcdbmgr,cmcdbmgr \ No newline at end of file diff --git a/webapps/portlet/A00/board_list.jsp b/webapps/portlet/A00/board_list.jsp new file mode 100644 index 0000000..02c8842 --- /dev/null +++ b/webapps/portlet/A00/board_list.jsp @@ -0,0 +1,290 @@ +<%@page import="kr.co.kihyun.text.html.TagFilter"%> +<% +/********************************************************************************** + α׷ : board_list.jsp + α׷ : + : + : + ֽź : +***********************************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" import="java.text.SimpleDateFormat" + import="java.util.Date" import="java.util.List" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="javax.jdo.Query" import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.service.*" import="kr.co.kihyun.service.vo.*" import="java.util.*" + import="java.text.SimpleDateFormat" + import="kr.co.kihyun.moumi.Moumi"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +response.setBufferSize(1024*8); +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + String dtID = HttpSSOLogin.getDeptID(request); + + /************ Parameter ************/ + String boardGroupID = request.getParameter("boardGroupID"); + String strPage = clearXSS(request.getParameter("strPage"),""); + String findOption = clearXSS(request.getParameter("findOption"),null); + String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")),null); + String boardType = ""; + Category category = pm.getObjectById(Category.class, boardGroupID); + + String method = clearXSS(request.getParameter("method"),""); + if(method.equals("GET")) findWord = URLDecoder.decode(MString.checkNull(request.getParameter("findWord")), "UTF-8"); + //String uri = URLEncoder.encode("board_list.jsp?boardGroupID="+boardGroupID+"&findOption="+MString.checkNull(findOption),"UTF-8")+"&method=GET"; + + /************ Ʈ ************/ + int endPage=0; + int pageSize=0; + int currentPage=0; + int absolutePage=0; + int currentPageSetUp=0; + int recordSize=3; + + + if(strPage == null || strPage.length()<=0){ + currentPage = 1; + }else if(strPage.equals("null")){ + currentPage = 1; + }else{ + try{ + currentPage=Integer.parseInt(strPage); + }catch(NumberFormatException ex){ + System.out.println(ex); + } + } + + //====================================================================== + BoardService boardService = new BoardService(pm); + //˻Ķ + Map params = new HashMap(); + params.put("findOption", findOption); + params.put("findWord", findWord); + params.put("groupId", boardGroupID); + + //˻ ڵ尹ȸ + boardService.createBoardListQuery(params); + + //ڵ尹ȸ Ͽ ڵ尹 + int count = boardService.getCountFromMainQuery(); + + if((count%recordSize) == 0) { + pageSize = (int)(count/recordSize); + } else { + pageSize = (int)(count/recordSize)+1; + } + + if( currentPage > pageSize ) currentPage = pageSize; + currentPageSetUp = (int)(currentPage/10)*10; + if (currentPage%10 == 0){ + currentPageSetUp-=10; + } + + int startNo = (currentPage - 1) * recordSize + 1; + int endNo = currentPage * recordSize; + + List list = null; + + //˻ȸ + if( count > 0 ) { + //¡ó ߰Ķ + boardService.getParams().put("startNo", startNo); + boardService.getParams().put("endNo", endNo); + + //˻ ¡ó ȯ + boardService.convertToPagenatingQuery(); + + //ϴ ڵ尡 ϸ ȸ + list = boardService.executeQuery(BoardVO.class); + } + //====================================================================== + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + + session.setAttribute("envTagetURL", "/totsys/common/inc/sysadm/top/top.jsp"); + session.setAttribute("homeTagetURL", "/totsys/sysadm/board/board_list.jsp"); + + if("ID_SYSTEM_NOTICE".equals(boardGroupID)){ + boardType = Moumi.getMessageBundle().getString("moumi.message.board.notice"); + }else if("ID_FAQ".equals(boardGroupID)){ + boardType = Moumi.getMessageBundle().getString("moumi.message.board.faq"); + }else if("ID_QNA".equals(boardGroupID)){ + boardType = Moumi.getMessageBundle().getString("moumi.message.board.qna"); + }else if("ID_PDS".equals(boardGroupID)){ + boardType = Moumi.getMessageBundle().getString("moumi.message.board.pds"); + } +%> + + +<%@page import="java.net.URLDecoder"%> + + +<%=Moumi.getTitle()%> + + + + + + + + + + +
+ + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + <% + //[][] ̵ PAGE 1 ְ 10 + //1 μ 10 ڵ忡 κ Ʈ ݴϴ. + /*int nextCount = 0; + int index = 0; + if(currentPage > 1){ + nextCount = ((currentPage-1)*recordSize); + }*/ + %> + + <% + tx.begin(); + //for(int i = 0; (i < recordSize) && ((nextCount+i) < getCount); i++){ + //index = nextCount+i; + if( count > 0 ) { + int listCount = list.size(); + for(int i = 0; i < listCount; i++){ + BoardVO boardVO = (BoardVO)list.get(i); + %> + + + + + + <% + } //end of for list + + } //end of if( count > 0) + else + { + %> + + + + <% + } + tx.rollback(); + %> +
¥
+ + + <%=MString.getEllipsis( TagFilter.unconvertedMeta(boardVO.getTitle()) , 60 )%> + +  <%=sdf.format(boardVO.getWriteDate())%> 
ϵ ڷᰡ ϴ.
+
+
 
+ + +<% +}catch(Exception ex){ + //38.޼ (getMessage)_CWE-209 : Update by YOUNGJUN,CHO + ex.printStackTrace(); + //out.println(ex);//ذ + //out.println("

Can't contact servlet runner



Message : "+ex.getMessage()+""); + //out.println(""); + //================================================ +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/portlet/A00/counter.jsp b/webapps/portlet/A00/counter.jsp new file mode 100644 index 0000000..ab41a95 --- /dev/null +++ b/webapps/portlet/A00/counter.jsp @@ -0,0 +1,245 @@ +<%@page import="kr.co.kihyun.service.TotReportService"%> +<%@page import="kr.co.kihyun.service.TotDocService"%> +<%@page import="kr.co.kihyun.beans.tosys.etc1.TotsysEtc"%> +<%@page contentType="text/html; charset=euc-kr" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + + import="kr.co.kihyun.beans.entity.MUser" + import="kr.co.kihyun.beans.entity.util.PMF" + import="kr.co.kihyun.beans.entity.util.MPersistenceManager" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.lang.MString" +%> + +<%//@include file="/portlet/portlet.inc"%> + + + + +NEIS ڷǼ + + + +<% + String usId = (String) session.getAttribute("SSO_USER_ID"); + if (MString.isNull(usId)) { + if (MString.isNull(HttpSSOLogin.getLoginID(request))) { + out.println("
շα(SSO) ʾ ǥ ϴ.
"); + return; + } else { + usId = HttpSSOLogin.getLoginID(request); + } + } + + Long docCnt = 0L; + Long reportCnt = 0L; + + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + tx.begin(); + + MUser mUser = pm.getObjectById(MUser.class, usId); + /**************************************************** + docCnt = mUser.getOnGoingDocsCount(pm); + reportCnt = mUser.getUnwrittenReportsCount(pm); + *****************************************************/ + + // DBManager ϴ ʵ . 2014.11.18 by YOUNGJUN,CHO + //TotsysEtc te=new TotsysEtc(); + //docCnt=(long)(te.getDocCount(mUser.getId(),mUser.getDept(),mUser.getSysAuth())); + //reportCnt=(long)(te.getReportCount(mUser.getId(),mUser.getDept())); + + // ڷ Ǽ ȸ + TotDocService totdocService = new TotDocService(pm); + docCnt = (long) totdocService.getTotDocCount( mUser.getId(),mUser.getDept(),mUser.getSysAuth() ); + + // ڷ Ǽ ȸ + TotReportService totReportService = new TotReportService(pm); + reportCnt = (long) totReportService.getTotReportCount( mUser.getId(),mUser.getDept() ); + + tx.rollback(); + + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (tx.isActive()) + tx.rollback(); + pm.close(); + } + + String docUrl = "/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?redirect=/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=PRSS"; + String reportUrl = "/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?redirect=/totsys/repoper/mydocbox/returnbox/report_list.jsp"; +%> + + + + + + + + + + + + + + + + + + +   ش ڸ óϽø ˴ϴ. +
+ + + + + +
+
+ + + + + + +
  <%=reportCnt%> +
+
+ + + \ No newline at end of file diff --git a/webapps/portlet/A00/doc_list.jsp b/webapps/portlet/A00/doc_list.jsp new file mode 100644 index 0000000..fc3c61f --- /dev/null +++ b/webapps/portlet/A00/doc_list.jsp @@ -0,0 +1,643 @@ + +<% + /*********************************************************** + * @@ Program Name : doc_list.jsp + * @@ Description : //// + * @@ Author : ũ + * @@ Create Date : 2010.11.18 + * @@ History : 2014.09.30 Update by KWON,HAN : ¡ óϿ ҷ + * @@******************************************************* + */ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="java.util.List" + import="java.util.Map" + import="java.util.HashMap" + import="java.util.Date" + import="java.util.Calendar" + import="java.text.SimpleDateFormat" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.beans.entity.util.*" + import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" + import="kr.co.kihyun.service.TotDocService" + import="kr.co.kihyun.service.vo.TotDocVO"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + Logger LOG = LoggerFactory.getLogger(this.getClass()); + + /** + * ******** session userId ********* + */ + String usID = HttpSSOLogin.getLoginID(request); + String dpID = HttpSSOLogin.getDeptID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + + /** + * **** Parameter ***** + */ + String docType = clearXSS(request.getParameter("docType"), null); + int strPage = MInteger.parseInt(request.getParameter("strPage"), 1); + if(strPage <= 0) { strPage = 1; } + + String findOption = clearXSS(request.getParameter("findOption"), ""); + String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")), ""); +// String method = clearXSS(request.getParameter("method"), ""); +// +// if (method.equals("GET")) { +// findWord = URLDecoder.decode(MString.checkNull(request.getParameter("findWord")), "UTF-8"); +// } + +// String uri = URLEncoder.encode("doc_list.jsp?docType=" + MString.checkNull(docType) + "&findOption=" + MString.checkNull(findOption), "UTF-8") + "&method=GET"; + String stDate = clearXSS(request.getParameter("stDate"),""); + String edDate = clearXSS(request.getParameter("edDate"),""); + + SimpleDateFormat dForomat = new SimpleDateFormat("yyyy-MM-dd"); + Calendar date = Calendar.getInstance(); + date.add(Calendar.MONTH, -12); + Long prev_date = date.getTimeInMillis(); + Long now_today = new Date().getTime(); + if("".equals(stDate)) { + stDate = dForomat.format(prev_date); + } + if("".equals(edDate)) { + edDate = dForomat.format(now_today); + } + + + int wordLengthLimit = 30; + + /************ Ʈ ************/ + int pageSize = 0; + int currentPage = 0; + int currentPageSetUp = 0; + int recordSize = 3; + + currentPage = strPage; + + currentPageSetUp = (int) (currentPage / 10) * 10; + if (currentPage % 10 == 0) { + currentPageSetUp -= 10; + } + + tx.begin(); + + if (!"PRSS".equals(docType) && !"REG".equals(docType) && !"END".equals(docType)) { + LOG.error("docType is not specified."); + } + + //====================================================================== + TotDocService docService = new TotDocService(pm); + //˻Ķ + Map params = new HashMap(); + params.put("userId", usID); + params.put("deptId", dpID); + params.put("findOption", findOption); + params.put("filterValue", findWord); + + //˻ ڵ尹ȸ + docService.createDocListSearchQuery(params, docType); + + //ڵ尹ȸ Ͽ ڵ尹 + int count = docService.getCountFromMainQuery(); + + if((count%recordSize) == 0){ + pageSize = (int)(count/recordSize); + }else{ + pageSize = (int)(count/recordSize)+1; + } + + if( currentPage > pageSize ) currentPage = pageSize; + + int startNo = (currentPage - 1) * recordSize + 1; + int endNo = currentPage * recordSize; + + List list = null; + + //˻ȸ + if( count > 0 ) { + //¡ó ߰Ķ + docService.getParams().put("startNo", startNo); + docService.getParams().put("endNo", endNo); + + //˻ ¡ó ȯ + docService.convertToPagenatingQuery(); + + //ϴ ڵ尡 ϸ ȸ + list = docService.executeQuery(TotDocVO.class); + } + //====================================================================== + + tx.rollback(); +%> + + + <%=Moumi.getTitle()%> + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+
+ + + + + + + + +
+ + +
+ + + + + + + + + + +
+
+ + + + + + + +
+ + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + + <% + tx.begin(); + int index = 0; //迭 Ű +// int nextCount = 0; // +// +// if (currentPage > 1) { +// nextCount = ((currentPage - 1) * recordSize); +// } + + if( count > 0 ) { + int listCount = list.size(); + + for(int i = 0; i < listCount ; i++){ +// index = nextCount + i; + TotDocVO docVO = (TotDocVO)list.get(i); + %> + + + + + + + + + + + + + <% + } //end of for list + + } //end of if( count > 0) + else + { + %> + + + + <% + } + tx.rollback(); + %> + +
<%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.doc")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.name")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.request")%><%=Moumi.getMessageBundle().getString("moumi.message.totsys.sysadm.part.part_list_jsp")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.request")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.startDate")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.endDate")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.compSnd")%>/<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.all")%>
+ <% + if ("PRSS".equals(docType)) { + %> + + + <%= MString.getEllipsis(docVO.getName(), wordLengthLimit)%> + <% + } + %> + <%= MString.checkNull(docVO.getDeptName())%> <%= docVO.getOwnerName()%><%= docType.equals("REG") ? new SimpleDateFormat("yyyy-MM-dd HH:mm").format(docVO.getStartDate()) : new SimpleDateFormat("yyyy-MM-dd").format(docVO.getStartDate())%>> + <% + out.write(tmp2 + tstr + tcnt); + %> + + <% + out.write(docVO.getSndCnt() + "/" + docVO.getAllCnt()); + %> +
ڷᰡ ϴ.
+
+
+ + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> + diff --git a/webapps/portlet/A00/images/notice_dot.gif b/webapps/portlet/A00/images/notice_dot.gif new file mode 100644 index 0000000..f354d6a Binary files /dev/null and b/webapps/portlet/A00/images/notice_dot.gif differ diff --git a/webapps/portlet/A00/report_list.jsp b/webapps/portlet/A00/report_list.jsp new file mode 100644 index 0000000..53d48b1 --- /dev/null +++ b/webapps/portlet/A00/report_list.jsp @@ -0,0 +1,318 @@ +<%-- + Document : report_list.jsp + Created on : 2014. 8. 19, 5:12:19 + Author : choyoungjun + + * Ż Ʋ + 1. Ż ڷ α + 2. [] Ŭ -> [к] Ŭ + 3. ޴ [Ʋ] Ŭ + 4. Ʋ ã (2014.08.20 Ʋ "ڷ" Ǿ) + +--%> +<%@page import="kr.co.kihyun.moumi.MoumiConfig"%> +<%@page import="java.util.Date"%> +<%@page import="java.util.Calendar"%> +<%@page import="java.util.List"%> +<%@page import="java.util.Map"%> +<%@page import="java.util.HashMap"%> +<%@page import="java.text.SimpleDateFormat"%> +<%@page import="javax.jdo.Transaction"%> +<%@page import="kr.co.kihyun.moumi.Moumi"%> +<%@page import="kr.co.kihyun.lang.Encoder"%> +<%@page import="kr.co.kihyun.lang.MInteger"%> +<%@page import="kr.co.kihyun.lang.MString"%> +<%@page import="kr.co.kihyun.beans.entity.MUser"%> +<%@page import="kr.co.kihyun.beans.entity.*"%> +<%@page import="kr.co.kihyun.beans.entity.TotReportProcess"%> +<%@page import="kr.co.kihyun.beans.entity.util.PMF"%> +<%@page import="kr.co.kihyun.beans.entity.util.MPersistenceManager"%> +<%@page import="kr.co.kihyun.beans.user.HttpSSOLogin"%> +<%@page import="kr.co.kihyun.service.vo.TotReportVO"%> +<%@page import="kr.co.kihyun.service.TotReportService"%> +<%@page contentType="text/html" pageEncoding="EUC-KR"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% + String currentServerName = request.getServerName(); + //System.out.println("=====> currentServerName : " + currentServerName); + + String usID = (String) session.getAttribute("SSO_USER_ID"); + String dpID = HttpSSOLogin.getDeptID(request); + + if (MString.isNull(usID)) { + if (MString.isNull(HttpSSOLogin.getLoginID(request))) { + out.println("
շα(SSO) ʾ ǥ ϴ.
"); + return; + } else { + usID = HttpSSOLogin.getLoginID(request); + } + } + + //System.out.println("=====> usID : " + usID); + + MPersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + + try { + + /********** Parameter **********/ + String strPage = clearXSS(request.getParameter("strPage"),""); + String findOption = clearXSS(request.getParameter("findOption"),null); + String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")),null); + + //String method = clearXSS(request.getParameter("method"),""); + //if(method.equals("GET")) findWord = URLDecoder.decode(MString.checkNull(request.getParameter("findWord")), "UTF-8"); + //String uri = URLEncoder.encode("report_list.jsp?findOption="+MString.checkNull(findOption),"UTF-8")+"&method=GET"; + + int docNameLengthLimit = 30; // (ڷ) + + tx.begin(); + + String tmpMagam; + + int pageSize=0; + int currentPage=0; + int currentPageSetUp=0; + int recordSize=3; // ڵ + + if(strPage == null || strPage.length()<=0) { + currentPage = 1; + } else if(strPage.equals("null")) { + currentPage = 1; + } else { + try { + currentPage=Integer.parseInt(strPage); + } catch(NumberFormatException ex) { + System.out.println(ex); + } + } + + //====================================================================== + MUser mUser = pm.getObjectById(MUser.class, usID); + SysAuth sysAuth = mUser.getSysAuth(); + + TotReportService reportService = new TotReportService(pm); + //˻Ķ(Ʋ ˻ ܵȴ.) + Map params = new HashMap(); + params.put("findOption", findOption); + params.put("filterValue", findWord); + params.put("userId", usID); + params.put("deptId", dpID); + params.put("sysAuth", mUser.getSysAuth()); + + //˻ ڵ尹ȸ + reportService.createAcceptReportListSearchQuery(params); + + //ڵ尹ȸ Ͽ ڵ尹 + int count = reportService.getCountFromMainQuery(); + + if((count%recordSize) == 0) { + pageSize = (int)(count/recordSize); + } else { + pageSize = (int)(count/recordSize)+1; + } + + if( currentPage > pageSize ) currentPage = pageSize; + currentPageSetUp = (int)(currentPage/10)*10; + if (currentPage%10 == 0) { + currentPageSetUp-=10; + } + + int startNo = (currentPage - 1) * recordSize + 1; + int endNo = currentPage * recordSize; + + List list = null; + + //˻ȸ + if( count > 0 ) { + //¡ó ߰Ķ + reportService.getParams().put("startNo", startNo); + reportService.getParams().put("endNo", endNo); + + //˻ ¡ó ȯ + reportService.convertToPagenatingQuery(); + + //ϴ ڵ尡 ϸ ȸ + list = reportService.executeQuery(TotReportVO.class); + } + //====================================================================== + tx.rollback(); + + SimpleDateFormat ymdFormat = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Calendar cal = Calendar.getInstance(); + + String nowTime = ""; + nowTime = sdf.format(cal.getTime()); + Date nowDate = sdf.parse(nowTime); +%> + + + + Ż Ʋ + + + +
+ + + + + + + + + + + <% + tx.begin(); + if( count > 0 ) { + + int listCount = list.size(); + + for(int i = 0; i < listCount; i++){ + TotReportVO reportVO = (TotReportVO)list.get(i); + String tmpMoumiAcptLimitStrategy = Integer.toString(reportVO.getSubmitLimitCnt()); + String tmp2= null; + String tstr = " "; + String tcnt; + tcnt = "("+Integer.toString(reportVO.getSubmitLimitCnt())+" )"; + if(tmpMoumiAcptLimitStrategy.equals("0")){ + tmp2 = new SimpleDateFormat("yyyy-MM-dd HH").format(reportVO.getEndDate()); + tcnt = ""; + }else{ + tmp2 = Moumi.getMessageBundle().getString("moumi.message.tot_doc.endBySubmitTotal"); + tstr = ""; + } + if(tmp2.contains("9999-12-30")) tmp2=Moumi.getMessageBundle().getString("moumi.message.tot_doc.endManually"); + if(tmp2.equals(Moumi.getMessageBundle().getString("moumi.message.tot_doc.endManually"))) tstr = ""; + + tmpMagam = tmp2; + %> + + + + + + + + + + + + + + + + + + <% + } //end of for list + + } //end of if( count > 0) + else + { + %> + + + + <% + } + tx.rollback(); + %> +
<%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.doc")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.name")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.request")%><%=Moumi.getMessageBundle().getString("moumi.message.totsys.sysadm.part.part_list_jsp")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.request")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.startDate")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.endDate")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.remark")%>
+ + + <%= MString.getEllipsis(reportVO.getDocName(), docNameLengthLimit) %> + + + <%= MString.checkNull(reportVO.getDeptName()) %> + + <%= MString.checkNull(reportVO.getDocOwnerName()) %> + + <%=ymdFormat.format(reportVO.getStartDate())%> + + <% + out.write(tmp2+tstr+tcnt); + %> + + <%if(reportVO.getDownDocId() == 0){%> + <%if(reportVO.getPrss() == 3){%> + <%=TotReportProcess.RETURN %> + <%}%>  + <%}else{%> + <%if(reportVO.getPrss() == 3){%> + <%=TotReportProcess.RETURN %> + <%}%> + <%}%>  +
ڷᰡ ϴ.
+
+ + + +<% + } catch(Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if(tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> diff --git a/webapps/pub/getpost/changeProcess.jsp b/webapps/pub/getpost/changeProcess.jsp new file mode 100644 index 0000000..d1d0166 --- /dev/null +++ b/webapps/pub/getpost/changeProcess.jsp @@ -0,0 +1,50 @@ +<%@ page language="java" + contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" + import="kr.co.kihyun.beans.entity.*, kr.co.kihyun.beans.entity.util.*, + kr.co.kihyun.lang.MLong, + java.util.Date, + javax.jdo.PersistenceManager, javax.jdo.JDOObjectNotFoundException"%> +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Long reportID = MLong.parseLong(request.getParameter("reportID")); +if(reportID == null) { + response.sendError(HttpServletResponse.SC_BAD_REQUEST, + "reportID 매개변수가 null이거나 숫자형식이 아닙니다"); + return; +} +try { + TotReportProcess process = TotReportProcess.valueOf(request.getParameter("prss")); + TotReport report = pm.getObjectById(TotReport.class, reportID); + report.setProcess(process); + if(process == TotReportProcess.COMP) + report.setRegDate(new Date()); + pm.makePersistent(report); +} catch (IllegalArgumentException iae) { + StringBuilder errMsg = new StringBuilder(100).append("prss 매개변수가 올바르지 않습니다. ["); + for(int i = 0; i < TotReportProcess.values().length; i++) { + if(i != 0) + errMsg.append(","); + errMsg.append(TotReportProcess.values()[i].name()); + } + errMsg.append("] 중에 하나여야 합니다"); + response.sendError(HttpServletResponse.SC_BAD_REQUEST, errMsg.toString()); +} catch (NullPointerException npe) { + response.sendError(HttpServletResponse.SC_BAD_REQUEST, + "prss 매개변수에는 null이 올 수 없습니다"); +} catch (JDOObjectNotFoundException jonfe) { + response.sendError(HttpServletResponse.SC_NOT_FOUND, + "reportID : "+reportID); +} finally { + pm.close(); +} +%> + + + + +Insert title here + + + + diff --git a/webapps/startTestUpdate.sh b/webapps/startTestUpdate.sh new file mode 100644 index 0000000..9fbb766 --- /dev/null +++ b/webapps/startTestUpdate.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +CLASSPATH="/home/tmax/jeus/lib/datasource/db2fs.jar:/home/tmax/jeus/lib/datasource/db2java.zip:/home/tmax/jeus/lib/datasou +rce/db2jcc.jar:/home/tmax/jeus/lib/datasource/db2jcc_javax.jar:/home/tmax/jeus/lib/datasource/db2jcc_license_cu.jar:/home/ +tmax/jeus/lib/datasource/db2policy.jar:." + +export CLASSPATH + +/opt/java1.4/bin/java HttpUpdateBatch.doPost > /home/tmax/procedure/log.txt 2>&1 + +exit 0 \ No newline at end of file diff --git a/webapps/startUpdate.sh b/webapps/startUpdate.sh new file mode 100644 index 0000000..e38ea4e --- /dev/null +++ b/webapps/startUpdate.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +CLASSPATH="/home/tmax/jeus/lib/datasource/db2fs.jar:/home/tmax/jeus/lib/datasource/db2java.zip:/home/tmax/jeus/lib/datasou +rce/db2jcc.jar:/home/tmax/jeus/lib/datasource/db2jcc_javax.jar:/home/tmax/jeus/lib/datasource/db2jcc_license_cu.jar:/home/ +tmax/jeus/lib/datasource/db2policy.jar:." + +export CLASSPATH + +/opt/java1.4/bin/java adams_procedure_call > /home/tmax/procedure/log.txt 2>&1 + +exit 0 \ No newline at end of file diff --git a/webapps/sync.err b/webapps/sync.err new file mode 100644 index 0000000..91e18e1 --- /dev/null +++ b/webapps/sync.err @@ -0,0 +1,25 @@ +Thu Oct 18 23:58:01 KST 2007 +Fri Oct 19 23:58:01 KST 2007 +Sat Oct 20 23:58:01 KST 2007 +Sun Oct 21 23:58:01 KST 2007 +Mon Oct 22 23:58:01 KST 2007 +Tue Oct 23 23:58:01 KST 2007 +Wed Oct 24 23:58:01 KST 2007 +Thu Oct 25 23:58:01 KST 2007 +Fri Oct 26 23:58:01 KST 2007 +Sat Oct 27 23:58:01 KST 2007 +Sun Oct 28 23:58:01 KST 2007 +Wed Aug 20 23:58:01 KST 2008 +Thu Aug 21 23:58:01 KST 2008 +Fri Aug 22 23:58:01 KST 2008 +Sat Aug 23 23:58:01 KST 2008 +Sun Aug 24 23:58:01 KST 2008 +Mon Aug 25 23:58:01 KST 2008 +Tue Aug 26 23:58:01 KST 2008 +Wed Aug 27 23:58:01 KST 2008 +Thu Aug 28 23:58:01 KST 2008 +Fri Aug 29 23:58:01 KST 2008 +Sat Aug 30 23:58:01 KST 2008 +Sun Aug 31 23:58:04 KST 2008 +Mon Sep 1 23:58:01 KST 2008 +Tue Sep 2 23:58:01 KST 2008 diff --git a/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png new file mode 100644 index 0000000..954e22d Binary files /dev/null and b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png differ diff --git a/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png new file mode 100644 index 0000000..64ece57 Binary files /dev/null and b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png differ diff --git a/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png new file mode 100644 index 0000000..abdc010 Binary files /dev/null and b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png differ diff --git a/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png new file mode 100644 index 0000000..9b383f4 Binary files /dev/null and b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png differ diff --git a/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png new file mode 100644 index 0000000..a23baad Binary files /dev/null and b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png differ diff --git a/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 0000000..42ccba2 Binary files /dev/null and b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png new file mode 100644 index 0000000..39d5824 Binary files /dev/null and b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png differ diff --git a/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png new file mode 100644 index 0000000..f127367 Binary files /dev/null and b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png differ diff --git a/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png new file mode 100644 index 0000000..359397a Binary files /dev/null and b/webapps/test/JQ/ui/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png differ diff --git a/webapps/test/JQ/ui/css/ui-lightness/images/ui-icons_222222_256x240.png b/webapps/test/JQ/ui/css/ui-lightness/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..b273ff1 Binary files /dev/null and b/webapps/test/JQ/ui/css/ui-lightness/images/ui-icons_222222_256x240.png differ diff --git a/webapps/test/JQ/ui/css/ui-lightness/images/ui-icons_228ef1_256x240.png b/webapps/test/JQ/ui/css/ui-lightness/images/ui-icons_228ef1_256x240.png new file mode 100644 index 0000000..a641a37 Binary files /dev/null and b/webapps/test/JQ/ui/css/ui-lightness/images/ui-icons_228ef1_256x240.png differ diff --git a/webapps/test/JQ/ui/css/ui-lightness/images/ui-icons_ef8c08_256x240.png b/webapps/test/JQ/ui/css/ui-lightness/images/ui-icons_ef8c08_256x240.png new file mode 100644 index 0000000..85e63e9 Binary files /dev/null and b/webapps/test/JQ/ui/css/ui-lightness/images/ui-icons_ef8c08_256x240.png differ diff --git a/webapps/test/JQ/ui/css/ui-lightness/images/ui-icons_ffd27a_256x240.png b/webapps/test/JQ/ui/css/ui-lightness/images/ui-icons_ffd27a_256x240.png new file mode 100644 index 0000000..e117eff Binary files /dev/null and b/webapps/test/JQ/ui/css/ui-lightness/images/ui-icons_ffd27a_256x240.png differ diff --git a/webapps/test/JQ/ui/css/ui-lightness/images/ui-icons_ffffff_256x240.png b/webapps/test/JQ/ui/css/ui-lightness/images/ui-icons_ffffff_256x240.png new file mode 100644 index 0000000..42f8f99 Binary files /dev/null and b/webapps/test/JQ/ui/css/ui-lightness/images/ui-icons_ffffff_256x240.png differ diff --git a/webapps/test/JQ/ui/css/ui-lightness/jquery-ui-1.8.16.custom.css b/webapps/test/JQ/ui/css/ui-lightness/jquery-ui-1.8.16.custom.css new file mode 100644 index 0000000..5547c7b --- /dev/null +++ b/webapps/test/JQ/ui/css/ui-lightness/jquery-ui-1.8.16.custom.css @@ -0,0 +1,568 @@ +/* + * jQuery UI CSS Framework 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + +/* + * jQuery UI CSS Framework 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } +.ui-widget-content a { color: #333333; } +.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } +.ui-widget-header a { color: #ffffff; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } +.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } + +/* Overlays */ +.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } +.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* + * jQuery UI Resizable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; } +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* + * jQuery UI Selectable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectable#theming + */ +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } +/* + * jQuery UI Accordion 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Accordion#theming + */ +/* IE/Win - Fix animation bug - #4615 */ +.ui-accordion { width: 100%; } +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } +.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } +.ui-accordion .ui-accordion-content-active { display: block; } +/* + * jQuery UI Autocomplete 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * jQuery UI Menu 1.8.16 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} +/* + * jQuery UI Button 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Button#theming + */ +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ +/* + * jQuery UI Dialog 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog#theming + */ +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } +/* + * jQuery UI Slider 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider#theming + */ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; }/* + * jQuery UI Tabs 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs#theming + */ +.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } +/* + * jQuery UI Datepicker 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker#theming + */ +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +}/* + * jQuery UI Progressbar 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar#theming + */ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/webapps/test/JQ/ui/js/jquery-1.6.2.min.js b/webapps/test/JQ/ui/js/jquery-1.6.2.min.js new file mode 100644 index 0000000..48590ec --- /dev/null +++ b/webapps/test/JQ/ui/js/jquery-1.6.2.min.js @@ -0,0 +1,18 @@ +/*! + * jQuery JavaScript Library v1.6.2 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Jun 30 14:16:56 2011 -0400 + */ +(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i. +shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j +)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bL,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bM.test(this.nodeName)||bG.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bF.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bX(bS,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cu.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cu.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cv(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cv(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file diff --git a/webapps/test/JQ/ui/js/jquery-ui-1.8.16.custom.min.js b/webapps/test/JQ/ui/js/jquery-ui-1.8.16.custom.min.js new file mode 100644 index 0000000..14c9064 --- /dev/null +++ b/webapps/test/JQ/ui/js/jquery-ui-1.8.16.custom.min.js @@ -0,0 +1,791 @@ +/*! + * jQuery UI 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.16", +keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d= +this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this, +"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart": +"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight, +outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a, +"tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&& +a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted= +false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); +;/* + * jQuery UI Position 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Position + */ +(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY, +left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+= +k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-= +m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left= +d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+= +a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b), +g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery); +;/* + * jQuery UI Draggable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Draggables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== +"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= +this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;if(b.iframeFix)d(b.iframeFix===true?"iframe":b.iframeFix).each(function(){d('
').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")});return true},_mouseStart:function(a){var b=this.options; +this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}); +this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,a);return true}, +_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b= +false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration, +10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},_mouseUp:function(a){this.options.iframeFix===true&&d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,a);return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle|| +!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&& +a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent= +this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"), +10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"), +10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[a.containment=="document"?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a.containment=="document"?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top, +(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){a=d(a.containment);var b=a[0];if(b){a.offset();var c=d(b).css("overflow")!= +"hidden";this.containment=[(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"), +10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=a}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+ +this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&& +!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,h=a.pageY;if(this.originalPosition){var g;if(this.containment){if(this.relative_container){g=this.relative_container.offset();g=[this.containment[0]+g.left,this.containment[1]+g.top,this.containment[2]+g.left,this.containment[3]+g.top]}else g=this.containment;if(a.pageX-this.offset.click.leftg[2])e=g[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>g[3])h=g[3]+this.offset.click.top}if(b.grid){h=b.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY;h=g?!(h-this.offset.click.topg[3])?h:!(h-this.offset.click.topg[2])?e:!(e-this.offset.click.left=0;i--){var j=c.snapElements[i].left,l=j+c.snapElements[i].width,k=c.snapElements[i].top,m=k+c.snapElements[i].height;if(j-e=j&&f<=l||h>=j&&h<=l||fl)&&(e>= +i&&e<=k||g>=i&&g<=k||ek);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(), +top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle= +this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne", +nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor== +String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),l=0;l=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,l);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection(); +this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){if(!a.disabled){e(this).removeClass("ui-resizable-autohide");b._handles.show()}},function(){if(!a.disabled)if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy(); +var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a= +false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"}); +this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff= +{width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis]; +if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false}, +_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f, +{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateVirtualBoundaries:function(b){var a=this.options,c,d,f;a={minWidth:k(a.minWidth)?a.minWidth:0,maxWidth:k(a.maxWidth)?a.maxWidth:Infinity,minHeight:k(a.minHeight)?a.minHeight:0,maxHeight:k(a.maxHeight)?a.maxHeight: +Infinity};if(this._aspectRatio||b){b=a.minHeight*this.aspectRatio;d=a.minWidth/this.aspectRatio;c=a.maxHeight*this.aspectRatio;f=a.maxWidth/this.aspectRatio;if(b>a.minWidth)a.minWidth=b;if(d>a.minHeight)a.minHeight=d;if(cb.width,h=k(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,l=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&l)b.left=i-a.minWidth;if(d&&l)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left= +null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+ +a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+ +c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]); +b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.16"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(), +10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top- +f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var l=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:l.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(l.css("position"))){c._revertToRelativePosition=true;l.css({position:"absolute",top:"auto",left:"auto"})}l.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType? +e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a= +e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing, +step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement= +e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset; +var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left: +a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top- +d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition, +f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25, +display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b= +e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height= +d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},k=function(b){return!isNaN(parseInt(b,10))}})(jQuery); +;/* + * jQuery UI Selectable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"), +selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("
")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX, +c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unselecting", +c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d= +this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.righti||a.bottomb&&a.rightg&&a.bottom *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){var a=this.options;this.containerCache={};this.element.addClass("ui-sortable"); +this.refresh();this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a=== +"disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&& +!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top, +left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]}; +this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!= +document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a); +return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0], +e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset(); +c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"): +this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null, +dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")}, +toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+jg&&b+la[this.floating?"width":"height"]?j:g0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith(); +if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), +this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b=0;f--)for(var g=d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h=0;b--){var c=this.items[b];if(!(c.instance!=this.currentContainer&&this.currentContainer&&c.item[0]!=this.currentItem[0])){var e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b= +this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top=e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f= +d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")|| +0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out", +a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length===1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h- +f)this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g- +this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.topthis.containment[3])?g:!(g-this.offset.click.topthis.containment[2])?f:!(f-this.offset.click.left=0;e--)if(d.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this, +this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop", +a,this._uiHash());for(e=0;e li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"); +a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); +if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion", +function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a= +this.options;if(a.icons){c("").addClass("ui-icon "+a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"); +this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons(); +b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target); +a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+ +c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options; +if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(j,g,e,b,f);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header); +if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(), +e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight|| +e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false", +"aria-selected":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.16", +animations:{slide:function(a,b){a=c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/); +f[i]={value:j[1],unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide", +paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery); +;/* + * jQuery UI Autocomplete 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.position.js + */ +(function(d){var e=0;d.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,b=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.propAttr("readOnly"))){g= +false;var f=d.ui.keyCode;switch(c.keyCode){case f.PAGE_UP:a._move("previousPage",c);break;case f.PAGE_DOWN:a._move("nextPage",c);break;case f.UP:a._move("previous",c);c.preventDefault();break;case f.DOWN:a._move("next",c);c.preventDefault();break;case f.ENTER:case f.NUMPAD_ENTER:if(a.menu.active){g=true;c.preventDefault()}case f.TAB:if(!a.menu.active)return;a.menu.select(c);break;case f.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!= +a.element.val()){a.selectedItem=null;a.search(null,c)}},a.options.delay);break}}}).bind("keypress.autocomplete",function(c){if(g){g=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)}; +this.menu=d("
    ").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&& +a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.autocomplete"),i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"); +d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&& +b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source==="string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",autocompleteRequest:++e,success:function(h){this.autocompleteRequest===e&&f(h)},error:function(){this.autocompleteRequest===e&&f([])}})}}else this.source= +this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length").data("item.autocomplete",b).append(d("").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, +"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery); +(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", +-1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.scrollTop(),c=this.element.height();if(b<0)this.element.scrollTop(g+b);else b>=c&&this.element.scrollTop(g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id"); +this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b, +this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e,g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active|| +this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active|| +this.first()?":last":":first"))},hasScroll:function(){return this.element.height()").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),e=this.options.icons,f=e.primary&&e.secondary,d=[];if(e.primary||e.secondary){if(this.options.text)d.push("ui-button-text-icon"+(f?"s":e.primary?"-primary":"-secondary"));e.primary&&a.prepend("");e.secondary&&a.append("");if(!this.options.text){d.push(f?"ui-button-icons-only": +"ui-button-icon-only");this.hasTitle||a.attr("title",c)}}else d.push("ui-button-text-only");a.addClass(d.join(" "))}}});b.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,c){a==="disabled"&&this.buttons.button("option",a,c);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var a=this.element.css("direction")=== +"ltr";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(a?"ui-corner-left":"ui-corner-right").end().filter(":last").addClass(a?"ui-corner-right":"ui-corner-left").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"); +b.Widget.prototype.destroy.call(this)}})})(jQuery); +;/* + * jQuery UI Dialog 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.button.js + * jquery.ui.draggable.js + * jquery.ui.mouse.js + * jquery.ui.position.js + * jquery.ui.resizable.js + */ +(function(c,l){var m={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},n={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},o=c.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false, +position:{my:"center",at:"center",collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&&c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||" ",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("
    ")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+ +b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("
    ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g), +h=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("").addClass("ui-dialog-title").attr("id", +e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"); +a.uiDialog.remove();a.originalTitle&&a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!== +b.uiDialog[0]){e=c(this).css("z-index");isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()};c.ui.dialog.maxZ+=1; +d.uiDialog.css("z-index",c.ui.dialog.maxZ);d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target=== +f[0]&&e.shiftKey){g.focus(1);return false}}});c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("
    ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("
    ").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a, +function(){return!(d=true)});if(d){c.each(a,function(f,h){h=c.isFunction(h)?{click:h,text:f}:h;var i=c('').click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.each(h,function(j,k){if(j!=="click")j in o?i[j](k):i.attr(j,k)});c.fn.button&&i.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close", +handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition, +originalSize:f.originalSize,position:f.position,size:f.size}}a=a===l?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize", +f,b(h))},stop:function(f,h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "): +[a[0],a[1]];if(b.length===1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},a));e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f); +if(g in m)e=true;if(g in n)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"): +e.removeClass("ui-dialog-disabled");break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a= +this.options,b,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height- +b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.16",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "), +create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&& +c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(b.range==="min"||b.range==="max"?" ui-slider-range-"+b.range:""))}for(var j=c.length;j"); +this.handles=c.add(d(e.join("")).appendTo(a.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){b.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(b.disabled)d(this).blur();else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(g){d(this).data("index.ui-slider-handle", +g)});this.handles.keydown(function(g){var k=true,l=d(this).data("index.ui-slider-handle"),i,h,m;if(!a.options.disabled){switch(g.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:k=false;if(!a._keySliding){a._keySliding=true;d(this).addClass("ui-state-active");i=a._start(g,l);if(i===false)return}break}m=a.options.step;i=a.options.values&&a.options.values.length? +(h=a.values(l)):(h=a.value());switch(g.keyCode){case d.ui.keyCode.HOME:h=a._valueMin();break;case d.ui.keyCode.END:h=a._valueMax();break;case d.ui.keyCode.PAGE_UP:h=a._trimAlignValue(i+(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:h=a._trimAlignValue(i-(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(i===a._valueMax())return;h=a._trimAlignValue(i+m);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(i===a._valueMin())return;h=a._trimAlignValue(i- +m);break}a._slide(g,l,h);return k}}).keyup(function(g){var k=d(this).data("index.ui-slider-handle");if(a._keySliding){a._keySliding=false;a._stop(g,k);a._change(g,k);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy(); +return this},_mouseCapture:function(a){var b=this.options,c,f,e,j,g;if(b.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:a.pageX,y:a.pageY});f=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(k){var l=Math.abs(c-j.values(k));if(f>l){f=l;e=d(this);g=k}});if(b.range===true&&this.values(1)===b.min){g+=1;e=d(this.handles[g])}if(this._start(a,g)===false)return false; +this._mouseSliding=true;j._handleIndex=g;e.addClass("ui-state-active").focus();b=e.offset();this._clickOffset=!d(a.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:a.pageX-b.left-e.width()/2,top:a.pageY-b.top-e.height()/2-(parseInt(e.css("borderTopWidth"),10)||0)-(parseInt(e.css("borderBottomWidth"),10)||0)+(parseInt(e.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(a,g,c);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(a){var b= +this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,b);return false},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b;if(this.orientation==="horizontal"){b= +this.elementSize.width;a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{b=this.elementSize.height;a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}b=a/b;if(b>1)b=1;if(b<0)b=0;if(this.orientation==="vertical")b=1-b;a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+b*a)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b); +c.values=this.values()}return this._trigger("start",a,c)},_slide:function(a,b,c){var f;if(this.options.values&&this.options.values.length){f=this.values(b?0:1);if(this.options.values.length===2&&this.options.range===true&&(b===0&&c>f||b===1&&c1){this.options.values[a]=this._trimAlignValue(b);this._refreshValue();this._change(null,a)}else if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;f=arguments[0];for(e=0;e=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b;a=a-c;if(Math.abs(c)*2>=b)a+=c>0?b:-b;return parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var a= +this.options.range,b=this.options,c=this,f=!this._animateOff?b.animate:false,e,j={},g,k,l,i;if(this.options.values&&this.options.values.length)this.handles.each(function(h){e=(c.values(h)-c._valueMin())/(c._valueMax()-c._valueMin())*100;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";d(this).stop(1,1)[f?"animate":"css"](j,b.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(h===0)c.range.stop(1,1)[f?"animate":"css"]({left:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({width:e- +g+"%"},{queue:false,duration:b.animate})}else{if(h===0)c.range.stop(1,1)[f?"animate":"css"]({bottom:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({height:e-g+"%"},{queue:false,duration:b.animate})}g=e});else{k=this.value();l=this._valueMin();i=this._valueMax();e=i!==l?(k-l)/(i-l)*100:0;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[f?"animate":"css"](j,b.animate);if(a==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[f?"animate":"css"]({width:e+"%"}, +b.animate);if(a==="max"&&this.orientation==="horizontal")this.range[f?"animate":"css"]({width:100-e+"%"},{queue:false,duration:b.animate});if(a==="min"&&this.orientation==="vertical")this.range.stop(1,1)[f?"animate":"css"]({height:e+"%"},b.animate);if(a==="max"&&this.orientation==="vertical")this.range[f?"animate":"css"]({height:100-e+"%"},{queue:false,duration:b.animate})}}});d.extend(d.ui.slider,{version:"1.8.16"})})(jQuery); +;/* + * jQuery UI Tabs 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
    ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
  • #{label}
  • "},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&& +e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b= +d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]|| +(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); +this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected= +this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); +if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); +this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+ +g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal", +function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")}; +this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected= +-1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; +d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e= +d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b, +e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]); +j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove(); +if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null, +this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this}, +load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c, +"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this}, +url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.16"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k'))}function N(a){return a.bind("mouseout", +function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");b.length&&b.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");if(!(d.datepicker._isDisabledDatepicker(J.inline?a.parent()[0]:J.input[0])||!b.length)){b.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); +b.addClass("ui-state-hover");b.hasClass("ui-datepicker-prev")&&b.addClass("ui-datepicker-prev-hover");b.hasClass("ui-datepicker-next")&&b.addClass("ui-datepicker-next-hover")}})}function H(a,b){d.extend(a,b);for(var c in b)if(b[c]==null||b[c]==C)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.16"}});var B=(new Date).getTime(),J;d.extend(M.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv}, +setDefaults:function(a){H(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g, +"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:N(d('
    '))}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker", +function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b);b.settings.disabled&&this._disableDatepicker(a)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d(''+c+"");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c== +"focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('').addClass(this._triggerClass).html(f==""?c:d("").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker(): +d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;gh){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a, +b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b);b.settings.disabled&&this._disableDatepicker(a);b.dpDiv.css("display","block")}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+= +1;this._dialogInput=d('');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}H(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/ +2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b= +d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e= +a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().removeClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a, +"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().addClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f== +a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input", +a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);if(d.datepicker._curInst&&d.datepicker._curInst!=b){d.datepicker._datepickerShowing&&d.datepicker._triggerOnClose(d.datepicker._curInst);d.datepicker._curInst.dpDiv.stop(true,true)}var c=d.datepicker._get(b,"beforeShow");c=c?c.apply(a,[a,b]):{};if(c!==false){H(b.settings,c);b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value= +"";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b); +c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.datepicker._datepickerShowing= +true;d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}}},_updateDatepicker:function(a){this.maxRows=4;var b=d.datepicker._getBorders(a.dpDiv);J=a;a.dpDiv.empty().append(this._generateHTML(a));var c=a.dpDiv.find("iframe.ui-datepicker-cover");c.length&&c.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}); +a.dpDiv.find("."+this._dayOverClass+" a").mouseover();b=this._getNumberOfMonths(a);c=b[1];a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");c>1&&a.dpDiv.addClass("ui-datepicker-multi-"+c).css("width",17*c+"em");a.dpDiv[(b[0]!=1||b[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&& +!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var e=a.yearshtml;setTimeout(function(){e===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);e=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(), +h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b= +this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_triggerOnClose:function(a){var b=this._get(a,"onClose");if(b)b.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b); +this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();d.datepicker._triggerOnClose(b);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")}, +_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"): +0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e["selected"+(c=="M"? +"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a); +this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField"); +if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"? +b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=A+1-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,j-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=j||v.getDate()!=l)throw"Invalid date";return v},ATOM:"yy-mm-dd", +COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames: +null)||this._defaults.monthNames;var i=function(o){(o=k+1 +12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&& +a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay? +new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&nn;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a)); +n=this._canAdjustMonth(a,-1,m,g)?''+n+"":f?"":''+n+"";var s=this._get(a,"nextText");s=!h?s:this.formatDate(s,this._daylightSavingAdjust(new Date(m, +g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?''+s+"":f?"":''+s+"";j=this._get(a,"currentText");s=this._get(a,"gotoCurrent")&& +a.currentDay?u:b;j=!h?j:this.formatDate(j,s,this._getFormatConfig(a));h=!a.inline?'":"";e=e?'
    '+(c?h:"")+(this._isInRange(a,s)?'":"")+(c?"":h)+"
    ":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");s=this._get(a,"dayNames");this._get(a,"dayNamesShort");var q=this._get(a,"dayNamesMin"),A=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),D=this._get(a,"showOtherMonths"),K=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var E=this._getDefaultDate(a),w="",x=0;x1)switch(G){case 0:y+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:y+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:y+=" ui-datepicker-group-middle";t="";break}y+='">'}y+='
    '+(/all|left/.test(t)&& +x==0?c?f:n:"")+(/all|right/.test(t)&&x==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,x>0||G>0,A,v)+'
    ';var z=j?'":"";for(t=0;t<7;t++){var r=(t+h)%7;z+="=5?' class="ui-datepicker-week-end"':"")+'>'+q[r]+""}y+=z+"";z=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay, +z);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;z=Math.ceil((t+z)/7);this.maxRows=z=l?this.maxRows>z?this.maxRows:z:z;r=this._daylightSavingAdjust(new Date(m,g,1-t));for(var Q=0;Q";var R=!j?"":'";for(t=0;t<7;t++){var I=p?p.apply(a.input?a.input[0]:null,[r]):[true,""],F=r.getMonth()!=g,L=F&&!K||!I[0]||k&&ro;R+='";r.setDate(r.getDate()+1);r=this._daylightSavingAdjust(r)}y+=R+""}g++;if(g>11){g=0;m++}y+="
    '+this._get(a,"weekHeader")+"
    '+this._get(a,"calculateWeek")(r)+""+(F&&!D?" ":L?''+ +r.getDate()+"":''+r.getDate()+"")+"
    "+(l?""+(i[0]>0&&G==i[1]-1?'
    ':""):"");O+=y}w+=O}w+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'': +"");a._keyEvent=false;return w},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
    ',o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&&l)?" ":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var s=(new Date).getFullYear();i=function(q){q=q.match(/c[+-].*/)?c+parseInt(q.substring(1),10):q.match(/[+-].*/)?s+parseInt(q,10):parseInt(q,10);return isNaN(q)?s:q};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b, +e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
    ";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+ +(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b)b.apply(a.input? +a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c, +e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a, +"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length)return this; +if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));return this.each(function(){typeof a== +"string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new M;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.16";window["DP_jQuery_"+B]=d})(jQuery); +;/* + * jQuery UI Progressbar 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
    ").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); +this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* +this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.16"})})(jQuery); +;/* + * jQuery UI Effects 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/ + */ +jQuery.effects||function(f,j){function m(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], +16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return n.transparent;return n[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return m(b)}function o(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, +a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function p(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d= +a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function l(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor", +"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=m(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0, +0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211, +211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},q=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b, +d){if(f.isFunction(b)){d=b;b=null}return this.queue(function(){var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("class");f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});r=p(o.call(this));e.attr("class",v);e.animate(u(h,r),{queue:false,duration:a,easing:b,complete:function(){f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments);f.dequeue(this)}})})}; +f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this, +[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.16",save:function(c,a){for(var b=0;b").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}), +d=document.activeElement;c.wrap(b);if(c[0]===d||f.contains(c[0],d))f(d).focus();b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(e,g){a[g]=c.css(g);if(isNaN(parseInt(a[g],10)))a[g]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){var a,b=document.activeElement; +if(c.parent().is(".ui-effects-wrapper")){a=c.parent().replaceWith(c);if(c[0]===b||f.contains(c[0],b))f(b).focus();return a}return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)}); +return d.call(this,b)},_show:f.fn.show,show:function(c){if(l(c))return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(l(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(l(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this, +arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/ +2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b, +d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c, +a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b, +d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+ +e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); +;/* + * jQuery UI Effects Fade 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fade + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Fold 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fold + * + * Depends: + * jquery.effects.core.js + */ +(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1], +10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); +;/* + * jQuery UI Effects Highlight 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Highlight + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&& +this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Pulsate 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Pulsate + * + * Depends: + * jquery.effects.core.js + */ +(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments); +b.dequeue()})})}})(jQuery); +; \ No newline at end of file diff --git a/webapps/test/_demo/_dump.sql b/webapps/test/_demo/_dump.sql new file mode 100644 index 0000000..19dfdd1 --- /dev/null +++ b/webapps/test/_demo/_dump.sql @@ -0,0 +1,20 @@ +CREATE TABLE IF NOT EXISTS `tree` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `parent_id` bigint(20) unsigned NOT NULL, + `position` bigint(20) unsigned NOT NULL, + `left` bigint(20) unsigned NOT NULL, + `right` bigint(20) unsigned NOT NULL, + `level` bigint(20) unsigned NOT NULL, + `title` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, + `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ; + +INSERT INTO `tree` (`id`, `parent_id`, `position`, `left`, `right`, `level`, `title`, `type`) VALUES +(1, 0, 2, 1, 14, 0, 'ROOT', ''), +(2, 1, 0, 2, 11, 1, 'C:', 'drive'), +(3, 2, 0, 3, 6, 2, '_demo', 'folder'), +(4, 3, 0, 4, 5, 3, 'index.html', 'default'), +(5, 2, 1, 7, 10, 2, '_docs', 'folder'), +(6, 1, 1, 12, 13, 1, 'D:', 'drive'), +(12, 5, 0, 8, 9, 3, 'zmei.html', 'default'); diff --git a/webapps/test/_demo/_inc/__mysql_errors.log b/webapps/test/_demo/_inc/__mysql_errors.log new file mode 100644 index 0000000..e69de29 diff --git a/webapps/test/_demo/_inc/class._database.php b/webapps/test/_demo/_inc/class._database.php new file mode 100644 index 0000000..9b6fd56 --- /dev/null +++ b/webapps/test/_demo/_inc/class._database.php @@ -0,0 +1,146 @@ + "localhost", + "serverport"=> "3306", + "username" => false, + "password" => false, + "database" => false, + "persist" => false, + "dieonerror"=> false, + "showerror" => false, + "error_file"=> true + ); + + function __construct() { + global $db_config; + $this->settings = array_merge($this->settings, $db_config); + if($this->settings["error_file"] === true) $this->settings["error_file"] = dirname(__FILE__)."/__mysql_errors.log"; + } + + function connect() { + if (!$this->link) { + $this->link = ($this->settings["persist"]) ? + mysql_pconnect( + $this->settings["servername"].":".$this->settings["serverport"], + $this->settings["username"], + $this->settings["password"] + ) : + mysql_connect( + $this->settings["servername"].":".$this->settings["serverport"], + $this->settings["username"], + $this->settings["password"] + ) or $this->error(); + } + if (!mysql_select_db($this->settings["database"], $this->link)) $this->error(); + if($this->link) mysql_query("SET NAMES 'utf8'"); + return ($this->link) ? true : false; + } + + function query($sql) { + if (!$this->link && !$this->connect()) $this->error(); + if (!($this->result = mysql_query($sql, $this->link))) $this->error($sql); + return ($this->result) ? true : false; + } + + function nextr() { + if(!$this->result) { + $this->error("No query pending"); + return false; + } + unset($this->row); + $this->row = mysql_fetch_array($this->result, MYSQL_BOTH); + return ($this->row) ? true : false ; + } + + function get_row($mode = "both") { + if(!$this->row) return false; + + $return = array(); + switch($mode) { + case "assoc": + foreach($this->row as $k => $v) { + if(!is_int($k)) $return[$k] = $v; + } + break; + case "num": + foreach($this->row as $k => $v) { + if(is_int($k)) $return[$k] = $v; + } + break; + default: + $return = $this->row; + break; + } + return array_map("stripslashes",$return); + } + + function get_all($mode = "both", $key = false) { + if(!$this->result) { + $this->error("No query pending"); + return false; + } + $return = array(); + while($this->nextr()) { + if($key !== false) $return[$this->f($key)] = $this->get_row($mode); + else $return[] = $this->get_row($mode); + } + return $return; + } + + function f($index) { + return stripslashes($this->row[$index]); + } + + function go_to($row) { + if(!$this->result) { + $this->error("No query pending"); + return false; + } + if(!mysql_data_seek($this->result, $row)) $this->error(); + } + + function nf() { + if ($numb = mysql_num_rows($this->result) === false) $this->error(); + return mysql_num_rows($this->result); + } + function af() { + return mysql_affected_rows(); + } + function error($string="") { + $error = mysql_error(); + if($this->settings["show_error"]) echo $error; + if($this->settings["error_file"] !== false) { + $handle = @fopen($this->settings["error_file"], "a+"); + if($handle) { + @fwrite($handle, "[".date("Y-m-d H:i:s")."] ".$string." <".$error.">\n"); + @fclose($handle); + } + } + if($this->settings["dieonerror"]) { + if(isset($this->result)) mysql_free_result($this->result); + mysql_close($this->link); + die(); + } + } + function insert_id() { + if(!$this->link) return false; + return mysql_insert_id(); + } + function escape($string){ + if(!$this->link) return addslashes($string); + return mysql_real_escape_string($string); + } + + function destroy(){ + if (isset($this->result)) mysql_free_result($this->result); + if (isset($this->link)) mysql_close($this->link); + } + + +} +?> \ No newline at end of file diff --git a/webapps/test/_demo/_inc/class._database_i.php b/webapps/test/_demo/_inc/class._database_i.php new file mode 100644 index 0000000..04f9ee7 --- /dev/null +++ b/webapps/test/_demo/_inc/class._database_i.php @@ -0,0 +1,152 @@ + "localhost", + "serverport"=> "3306", + "username" => false, + "password" => false, + "database" => false, + "persist" => false, + "dieonerror"=> false, + "showerror" => false, + "error_file"=> true + ); + + function __construct() { + global $db_config; + $this->settings = array_merge($this->settings, $db_config); + if($this->settings["error_file"] === true) $this->settings["error_file"] = dirname(__FILE__)."/__mysql_errors.log"; + } + + function connect() { + $this->data = new mysqli( + $this->settings["servername"], + $this->settings["username"], + $this->settings["password"], + $this->settings["database"], + $this->settings["serverport"] + ); + + if(mysqli_connect_errno()) { + $this->error("Connection error: ".mysqli_connect_error() ); + return false; + } + if(!$this->data->set_charset("utf8")) { + $this->error("Error loading character set utf8"); + return false; + } + return true; + } + + function query($sql) { + if(!$this->data && !$this->connect()) { + $this->error("Could node connect for query: ".$sql); + return false; + } + //echo $sql."
    :"; + if(!($this->result = $this->data->query($sql))) $this->error($sql); + return ($this->result) ? true : false; + } + + function nextr(){ + if(!$this->result) { + $this->error("No query pending"); + return false; + } + unset($this->row); + $this->row = $this->result->fetch_array(MYSQL_BOTH); + return ($this->row) ? true : false ; + } + + function get_row($mode = "both") { + if(!$this->row) return false; + + $return = array(); + switch($mode) { + case "assoc": + foreach($this->row as $k => $v) { + if(!is_int($k)) $return[$k] = $v; + } + break; + case "num": + foreach($this->row as $k => $v) { + if(is_int($k)) $return[$k] = $v; + } + break; + default: + $return = $this->row; + break; + } + return array_map("stripslashes",$return); + } + + function get_all($mode = "both", $key = false) { + if(!$this->result) { + $this->error("No query pending"); + return false; + } + $return = array(); + while($this->nextr()) { + if($key !== false) $return[$this->f($key)] = $this->get_row($mode); + else $return[] = $this->get_row($mode); + } + return $return; + } + + function f($index) { + return stripslashes($this->row[$index]); + } + + function go_to($row) { + if(!$this->result) { + $this->error("No query pending"); + return false; + } + if(!$this->data->data_seek($row)) $this->error(); + } + + function nf() { + if (!$this->result) { + $this->error("nf: no result set"); + return false; + } + return $this->result->num_rows; + } + function af() { + return $this->data->affected_rows; + } + function error($string = "") { + $error = $this->data->error; + if($this->settings["show_error"]) echo $error; + if($this->settings["error_file"] !== false) { + $handle = @fopen($this->settings["error_file"], "a+"); + if($handle) { + @fwrite($handle, "[".date("Y-m-d H:i:s")."] ".$string." <".$error.">\n"); + @fclose($handle); + } + } + if($this->settings["dieonerror"]) { + if(isset($this->result)) $this->result->free(); + @$this->data->close(); + die(); + } + } + function insert_id() { + return $this->data->insert_id; + } + function escape($string) { + if(!$this->data) return addslashes($string); + return $this->data->escape_string($string); + } + + function destroy() { + if(isset($this->result)) $this->result->free(); + if($this->data) $this->data->close(); + } + + +} \ No newline at end of file diff --git a/webapps/test/_demo/_inc/class.tree.php b/webapps/test/_demo/_inc/class.tree.php new file mode 100644 index 0000000..690b0a3 --- /dev/null +++ b/webapps/test/_demo/_inc/class.tree.php @@ -0,0 +1,602 @@ + false, + "parent_id" => false, + "position" => false, + "left" => false, + "right" => false, + "level" => false + ); + + // Constructor + function __construct($table = "tree", $fields = array()) { + $this->table = $table; + if(!count($fields)) { + foreach($this->fields as $k => &$v) { $v = $k; } + } + else { + foreach($fields as $key => $field) { + switch($key) { + case "id": + case "parent_id": + case "position": + case "left": + case "right": + case "level": + $this->fields[$key] = $field; + break; + } + } + } + // Database + $this->db = new _database; + } + + function _get_node($id) { + $this->db->query("SELECT `".implode("` , `", $this->fields)."` FROM `".$this->table."` WHERE `".$this->fields["id"]."` = ".(int) $id); + $this->db->nextr(); + return $this->db->nf() === 0 ? false : $this->db->get_row("assoc"); + } + function _get_children($id, $recursive = false) { + $children = array(); + if($recursive) { + $node = $this->_get_node($id); + $this->db->query("SELECT `".implode("` , `", $this->fields)."` FROM `".$this->table."` WHERE `".$this->fields["left"]."` >= ".(int) $node[$this->fields["left"]]." AND `".$this->fields["right"]."` <= ".(int) $node[$this->fields["right"]]." ORDER BY `".$this->fields["left"]."` ASC"); + } + else { + $this->db->query("SELECT `".implode("` , `", $this->fields)."` FROM `".$this->table."` WHERE `".$this->fields["parent_id"]."` = ".(int) $id." ORDER BY `".$this->fields["position"]."` ASC"); + } + while($this->db->nextr()) $children[$this->db->f($this->fields["id"])] = $this->db->get_row("assoc"); + return $children; + } + function _get_path($id) { + $node = $this->_get_node($id); + $path = array(); + if(!$node === false) return false; + $this->db->query("SELECT `".implode("` , `", $this->fields)."` FROM `".$this->table."` WHERE `".$this->fields["left"]."` <= ".(int) $node[$this->fields["left"]]." AND `".$this->fields["right"]."` >= ".(int) $node[$this->fields["right"]]); + while($this->db->nextr()) $path[$this->db->f($this->fields["id"])] = $this->db->get_row("assoc"); + return $path; + } + + function _create($parent, $position) { + return $this->_move(0, $parent, $position); + } + function _remove($id) { + if((int)$id === 1) { return false; } + $data = $this->_get_node($id); + $lft = (int)$data[$this->fields["left"]]; + $rgt = (int)$data[$this->fields["right"]]; + $dif = $rgt - $lft + 1; + + // deleting node and its children + $this->db->query("" . + "DELETE FROM `".$this->table."` " . + "WHERE `".$this->fields["left"]."` >= ".$lft." AND `".$this->fields["right"]."` <= ".$rgt + ); + // shift left indexes of nodes right of the node + $this->db->query("". + "UPDATE `".$this->table."` " . + "SET `".$this->fields["left"]."` = `".$this->fields["left"]."` - ".$dif." " . + "WHERE `".$this->fields["left"]."` > ".$rgt + ); + // shift right indexes of nodes right of the node and the node's parents + $this->db->query("" . + "UPDATE `".$this->table."` " . + "SET `".$this->fields["right"]."` = `".$this->fields["right"]."` - ".$dif." " . + "WHERE `".$this->fields["right"]."` > ".$lft + ); + + $pid = (int)$data[$this->fields["parent_id"]]; + $pos = (int)$data[$this->fields["position"]]; + + // Update position of siblings below the deleted node + $this->db->query("" . + "UPDATE `".$this->table."` " . + "SET `".$this->fields["position"]."` = `".$this->fields["position"]."` - 1 " . + "WHERE `".$this->fields["parent_id"]."` = ".$pid." AND `".$this->fields["position"]."` > ".$pos + ); + return true; + } + function _move($id, $ref_id, $position = 0, $is_copy = false) { + if((int)$ref_id === 0 || (int)$id === 1) { return false; } + $sql = array(); // Queries executed at the end + $node = $this->_get_node($id); // Node data + $nchildren = $this->_get_children($id); // Node children + $ref_node = $this->_get_node($ref_id); // Ref node data + $rchildren = $this->_get_children($ref_id);// Ref node children + + $ndif = 2; + $node_ids = array(-1); + if($node !== false) { + $node_ids = array_keys($this->_get_children($id, true)); + // TODO: should be !$is_copy && , but if copied to self - screws some right indexes + if(in_array($ref_id, $node_ids)) return false; + $ndif = $node[$this->fields["right"]] - $node[$this->fields["left"]] + 1; + } + if($position >= count($rchildren)) { + $position = count($rchildren); + } + + // Not creating or copying - old parent is cleaned + if($node !== false && $is_copy == false) { + $sql[] = "" . + "UPDATE `".$this->table."` " . + "SET `".$this->fields["position"]."` = `".$this->fields["position"]."` - 1 " . + "WHERE " . + "`".$this->fields["parent_id"]."` = ".$node[$this->fields["parent_id"]]." AND " . + "`".$this->fields["position"]."` > ".$node[$this->fields["position"]]; + $sql[] = "" . + "UPDATE `".$this->table."` " . + "SET `".$this->fields["left"]."` = `".$this->fields["left"]."` - ".$ndif." " . + "WHERE `".$this->fields["left"]."` > ".$node[$this->fields["right"]]; + $sql[] = "" . + "UPDATE `".$this->table."` " . + "SET `".$this->fields["right"]."` = `".$this->fields["right"]."` - ".$ndif." " . + "WHERE " . + "`".$this->fields["right"]."` > ".$node[$this->fields["left"]]." AND " . + "`".$this->fields["id"]."` NOT IN (".implode(",", $node_ids).") "; + } + // Preparing new parent + $sql[] = "" . + "UPDATE `".$this->table."` " . + "SET `".$this->fields["position"]."` = `".$this->fields["position"]."` + 1 " . + "WHERE " . + "`".$this->fields["parent_id"]."` = ".$ref_id." AND " . + "`".$this->fields["position"]."` >= ".$position." " . + ( $is_copy ? "" : " AND `".$this->fields["id"]."` NOT IN (".implode(",", $node_ids).") "); + + $ref_ind = $ref_id === 0 ? (int)$rchildren[count($rchildren) - 1][$this->fields["right"]] + 1 : (int)$ref_node[$this->fields["right"]]; + $ref_ind = max($ref_ind, 1); + + $self = ($node !== false && !$is_copy && (int)$node[$this->fields["parent_id"]] == $ref_id && $position > $node[$this->fields["position"]]) ? 1 : 0; + foreach($rchildren as $k => $v) { + if($v[$this->fields["position"]] - $self == $position) { + $ref_ind = (int)$v[$this->fields["left"]]; + break; + } + } + if($node !== false && !$is_copy && $node[$this->fields["left"]] < $ref_ind) { + $ref_ind -= $ndif; + } + + $sql[] = "" . + "UPDATE `".$this->table."` " . + "SET `".$this->fields["left"]."` = `".$this->fields["left"]."` + ".$ndif." " . + "WHERE " . + "`".$this->fields["left"]."` >= ".$ref_ind." " . + ( $is_copy ? "" : " AND `".$this->fields["id"]."` NOT IN (".implode(",", $node_ids).") "); + $sql[] = "" . + "UPDATE `".$this->table."` " . + "SET `".$this->fields["right"]."` = `".$this->fields["right"]."` + ".$ndif." " . + "WHERE " . + "`".$this->fields["right"]."` >= ".$ref_ind." " . + ( $is_copy ? "" : " AND `".$this->fields["id"]."` NOT IN (".implode(",", $node_ids).") "); + + $ldif = $ref_id == 0 ? 0 : $ref_node[$this->fields["level"]] + 1; + $idif = $ref_ind; + if($node !== false) { + $ldif = $node[$this->fields["level"]] - ($ref_node[$this->fields["level"]] + 1); + $idif = $node[$this->fields["left"]] - $ref_ind; + if($is_copy) { + $sql[] = "" . + "INSERT INTO `".$this->table."` (" . + "`".$this->fields["parent_id"]."`, " . + "`".$this->fields["position"]."`, " . + "`".$this->fields["left"]."`, " . + "`".$this->fields["right"]."`, " . + "`".$this->fields["level"]."`" . + ") " . + "SELECT " . + "".$ref_id.", " . + "`".$this->fields["position"]."`, " . + "`".$this->fields["left"]."` - (".($idif + ($node[$this->fields["left"]] >= $ref_ind ? $ndif : 0))."), " . + "`".$this->fields["right"]."` - (".($idif + ($node[$this->fields["left"]] >= $ref_ind ? $ndif : 0))."), " . + "`".$this->fields["level"]."` - (".$ldif.") " . + "FROM `".$this->table."` " . + "WHERE " . + "`".$this->fields["id"]."` IN (".implode(",", $node_ids).") " . + "ORDER BY `".$this->fields["level"]."` ASC"; + } + else { + $sql[] = "" . + "UPDATE `".$this->table."` SET " . + "`".$this->fields["parent_id"]."` = ".$ref_id.", " . + "`".$this->fields["position"]."` = ".$position." " . + "WHERE " . + "`".$this->fields["id"]."` = ".$id; + $sql[] = "" . + "UPDATE `".$this->table."` SET " . + "`".$this->fields["left"]."` = `".$this->fields["left"]."` - (".$idif."), " . + "`".$this->fields["right"]."` = `".$this->fields["right"]."` - (".$idif."), " . + "`".$this->fields["level"]."` = `".$this->fields["level"]."` - (".$ldif.") " . + "WHERE " . + "`".$this->fields["id"]."` IN (".implode(",", $node_ids).") "; + } + } + else { + $sql[] = "" . + "INSERT INTO `".$this->table."` (" . + "`".$this->fields["parent_id"]."`, " . + "`".$this->fields["position"]."`, " . + "`".$this->fields["left"]."`, " . + "`".$this->fields["right"]."`, " . + "`".$this->fields["level"]."` " . + ") " . + "VALUES (" . + $ref_id.", " . + $position.", " . + $idif.", " . + ($idif + 1).", " . + $ldif. + ")"; + } + foreach($sql as $q) { $this->db->query($q); } + $ind = $this->db->insert_id(); + if($is_copy) $this->_fix_copy($ind, $position); + return $node === false || $is_copy ? $ind : true; + } + function _fix_copy($id, $position) { + $node = $this->_get_node($id); + $children = $this->_get_children($id, true); + + $map = array(); + for($i = $node[$this->fields["left"]] + 1; $i < $node[$this->fields["right"]]; $i++) { + $map[$i] = $id; + } + foreach($children as $cid => $child) { + if((int)$cid == (int)$id) { + $this->db->query("UPDATE `".$this->table."` SET `".$this->fields["position"]."` = ".$position." WHERE `".$this->fields["id"]."` = ".$cid); + continue; + } + $this->db->query("UPDATE `".$this->table."` SET `".$this->fields["parent_id"]."` = ".$map[(int)$child[$this->fields["left"]]]." WHERE `".$this->fields["id"]."` = ".$cid); + for($i = $child[$this->fields["left"]] + 1; $i < $child[$this->fields["right"]]; $i++) { + $map[$i] = $cid; + } + } + } + + function _reconstruct() { + $this->db->query("" . + "CREATE TEMPORARY TABLE `temp_tree` (" . + "`".$this->fields["id"]."` INTEGER NOT NULL, " . + "`".$this->fields["parent_id"]."` INTEGER NOT NULL, " . + "`". $this->fields["position"]."` INTEGER NOT NULL" . + ") type=HEAP" + ); + $this->db->query("" . + "INSERT INTO `temp_tree` " . + "SELECT " . + "`".$this->fields["id"]."`, " . + "`".$this->fields["parent_id"]."`, " . + "`".$this->fields["position"]."` " . + "FROM `".$this->table."`" + ); + + $this->db->query("" . + "CREATE TEMPORARY TABLE `temp_stack` (" . + "`".$this->fields["id"]."` INTEGER NOT NULL, " . + "`".$this->fields["left"]."` INTEGER, " . + "`".$this->fields["right"]."` INTEGER, " . + "`".$this->fields["level"]."` INTEGER, " . + "`stack_top` INTEGER NOT NULL, " . + "`".$this->fields["parent_id"]."` INTEGER, " . + "`".$this->fields["position"]."` INTEGER " . + ") type=HEAP" + ); + $counter = 2; + $this->db->query("SELECT COUNT(*) FROM temp_tree"); + $this->db->nextr(); + $maxcounter = (int) $this->db->f(0) * 2; + $currenttop = 1; + $this->db->query("" . + "INSERT INTO `temp_stack` " . + "SELECT " . + "`".$this->fields["id"]."`, " . + "1, " . + "NULL, " . + "0, " . + "1, " . + "`".$this->fields["parent_id"]."`, " . + "`".$this->fields["position"]."` " . + "FROM `temp_tree` " . + "WHERE `".$this->fields["parent_id"]."` = 0" + ); + $this->db->query("DELETE FROM `temp_tree` WHERE `".$this->fields["parent_id"]."` = 0"); + + while ($counter <= $maxcounter) { + $this->db->query("" . + "SELECT " . + "`temp_tree`.`".$this->fields["id"]."` AS tempmin, " . + "`temp_tree`.`".$this->fields["parent_id"]."` AS pid, " . + "`temp_tree`.`".$this->fields["position"]."` AS lid " . + "FROM `temp_stack`, `temp_tree` " . + "WHERE " . + "`temp_stack`.`".$this->fields["id"]."` = `temp_tree`.`".$this->fields["parent_id"]."` AND " . + "`temp_stack`.`stack_top` = ".$currenttop." " . + "ORDER BY `temp_tree`.`".$this->fields["position"]."` ASC LIMIT 1" + ); + + if ($this->db->nextr()) { + $tmp = $this->db->f("tempmin"); + + $q = "INSERT INTO temp_stack (stack_top, `".$this->fields["id"]."`, `".$this->fields["left"]."`, `".$this->fields["right"]."`, `".$this->fields["level"]."`, `".$this->fields["parent_id"]."`, `".$this->fields["position"]."`) VALUES(".($currenttop + 1).", ".$tmp.", ".$counter.", NULL, ".$currenttop.", ".$this->db->f("pid").", ".$this->db->f("lid").")"; + $this->db->query($q); + $this->db->query("DELETE FROM `temp_tree` WHERE `".$this->fields["id"]."` = ".$tmp); + $counter++; + $currenttop++; + } + else { + $this->db->query("" . + "UPDATE temp_stack SET " . + "`".$this->fields["right"]."` = ".$counter.", " . + "`stack_top` = -`stack_top` " . + "WHERE `stack_top` = ".$currenttop + ); + $counter++; + $currenttop--; + } + } + + $temp_fields = $this->fields; + unset($temp_fields["parent_id"]); + unset($temp_fields["position"]); + unset($temp_fields["left"]); + unset($temp_fields["right"]); + unset($temp_fields["level"]); + if(count($temp_fields) > 1) { + $this->db->query("" . + "CREATE TEMPORARY TABLE `temp_tree2` " . + "SELECT `".implode("`, `", $temp_fields)."` FROM `".$this->table."` " + ); + } + $this->db->query("TRUNCATE TABLE `".$this->table."`"); + $this->db->query("" . + "INSERT INTO ".$this->table." (" . + "`".$this->fields["id"]."`, " . + "`".$this->fields["parent_id"]."`, " . + "`".$this->fields["position"]."`, " . + "`".$this->fields["left"]."`, " . + "`".$this->fields["right"]."`, " . + "`".$this->fields["level"]."` " . + ") " . + "SELECT " . + "`".$this->fields["id"]."`, " . + "`".$this->fields["parent_id"]."`, " . + "`".$this->fields["position"]."`, " . + "`".$this->fields["left"]."`, " . + "`".$this->fields["right"]."`, " . + "`".$this->fields["level"]."` " . + "FROM temp_stack " . + "ORDER BY `".$this->fields["id"]."`" + ); + if(count($temp_fields) > 1) { + $sql = "" . + "UPDATE `".$this->table."` v, `temp_tree2` SET v.`".$this->fields["id"]."` = v.`".$this->fields["id"]."` "; + foreach($temp_fields as $k => $v) { + if($k == "id") continue; + $sql .= ", v.`".$v."` = `temp_tree2`.`".$v."` "; + } + $sql .= " WHERE v.`".$this->fields["id"]."` = `temp_tree2`.`".$this->fields["id"]."` "; + $this->db->query($sql); + } + } + + function _analyze() { + $report = array(); + + $this->db->query("" . + "SELECT " . + "`".$this->fields["left"]."` FROM `".$this->table."` s " . + "WHERE " . + "`".$this->fields["parent_id"]."` = 0 " + ); + $this->db->nextr(); + if($this->db->nf() == 0) { + $report[] = "[FAIL]\tNo root node."; + } + else { + $report[] = ($this->db->nf() > 1) ? "[FAIL]\tMore than one root node." : "[OK]\tJust one root node."; + } + $report[] = ($this->db->f(0) != 1) ? "[FAIL]\tRoot node's left index is not 1." : "[OK]\tRoot node's left index is 1."; + + $this->db->query("" . + "SELECT " . + "COUNT(*) FROM `".$this->table."` s " . + "WHERE " . + "`".$this->fields["parent_id"]."` != 0 AND " . + "(SELECT COUNT(*) FROM `".$this->table."` WHERE `".$this->fields["id"]."` = s.`".$this->fields["parent_id"]."`) = 0 "); + $this->db->nextr(); + $report[] = ($this->db->f(0) > 0) ? "[FAIL]\tMissing parents." : "[OK]\tNo missing parents."; + + $this->db->query("SELECT MAX(`".$this->fields["right"]."`) FROM `".$this->table."`"); + $this->db->nextr(); + $n = $this->db->f(0); + $this->db->query("SELECT COUNT(*) FROM `".$this->table."`"); + $this->db->nextr(); + $c = $this->db->f(0); + $report[] = ($n/2 != $c) ? "[FAIL]\tRight index does not match node count." : "[OK]\tRight index matches count."; + + $this->db->query("" . + "SELECT COUNT(`".$this->fields["id"]."`) FROM `".$this->table."` s " . + "WHERE " . + "(SELECT COUNT(*) FROM `".$this->table."` WHERE " . + "`".$this->fields["right"]."` < s.`".$this->fields["right"]."` AND " . + "`".$this->fields["left"]."` > s.`".$this->fields["left"]."` AND " . + "`".$this->fields["level"]."` = s.`".$this->fields["level"]."` + 1" . + ") != " . + "(SELECT COUNT(*) FROM `".$this->table."` WHERE " . + "`".$this->fields["parent_id"]."` = s.`".$this->fields["id"]."`" . + ") " + ); + $this->db->nextr(); + $report[] = ($this->db->f(0) > 0) ? "[FAIL]\tAdjacency and nested set do not match." : "[OK]\tNS and AJ match"; + + return implode("
    ",$report); + } + + function _dump($output = false) { + $nodes = array(); + $this->db->query("SELECT * FROM ".$this->table." ORDER BY `".$this->fields["left"]."`"); + while($this->db->nextr()) $nodes[] = $this->db->get_row("assoc"); + if($output) { + echo "
    ";
    +			foreach($nodes as $node) {
    +				echo str_repeat(" ",(int)$node[$this->fields["level"]] * 2);
    +				echo $node[$this->fields["id"]]." (".$node[$this->fields["left"]].",".$node[$this->fields["right"]].",".$node[$this->fields["level"]].",".$node[$this->fields["parent_id"]].",".$node[$this->fields["position"]].")
    "; + } + echo str_repeat("-",40); + echo "
    "; + } + return $nodes; + } + function _drop() { + $this->db->query("TRUNCATE TABLE `".$this->table."`"); + $this->db->query("" . + "INSERT INTO `".$this->table."` (" . + "`".$this->fields["id"]."`, " . + "`".$this->fields["parent_id"]."`, " . + "`".$this->fields["position"]."`, " . + "`".$this->fields["left"]."`, " . + "`".$this->fields["right"]."`, " . + "`".$this->fields["level"]."` " . + ") " . + "VALUES (" . + "1, " . + "0, " . + "0, " . + "1, " . + "2, " . + "0 ". + ")"); + } +} + +class json_tree extends _tree_struct { + function __construct($table = "tree", $fields = array(), $add_fields = array("title" => "title", "type" => "type")) { + parent::__construct($table, $fields); + $this->fields = array_merge($this->fields, $add_fields); + $this->add_fields = $add_fields; + } + + function create_node($data) { + $id = parent::_create((int)$data[$this->fields["id"]], (int)$data[$this->fields["position"]]); + if($id) { + $data["id"] = $id; + $this->set_data($data); + return "{ \"status\" : 1, \"id\" : ".(int)$id." }"; + } + return "{ \"status\" : 0 }"; + } + function set_data($data) { + if(count($this->add_fields) == 0) { return "{ \"status\" : 1 }"; } + $s = "UPDATE `".$this->table."` SET `".$this->fields["id"]."` = `".$this->fields["id"]."` "; + foreach($this->add_fields as $k => $v) { + if(isset($data[$k])) $s .= ", `".$this->fields[$v]."` = \"".$this->db->escape($data[$k])."\" "; + else $s .= ", `".$this->fields[$v]."` = `".$this->fields[$v]."` "; + } + $s .= "WHERE `".$this->fields["id"]."` = ".(int)$data["id"]; + $this->db->query($s); + return "{ \"status\" : 1 }"; + } + function rename_node($data) { return $this->set_data($data); } + + function move_node($data) { + $id = parent::_move((int)$data["id"], (int)$data["ref"], (int)$data["position"], (int)$data["copy"]); + if(!$id) return "{ \"status\" : 0 }"; + if((int)$data["copy"] && count($this->add_fields)) { + $ids = array_keys($this->_get_children($id, true)); + $data = $this->_get_children((int)$data["id"], true); + + $i = 0; + foreach($data as $dk => $dv) { + $s = "UPDATE `".$this->table."` SET `".$this->fields["id"]."` = `".$this->fields["id"]."` "; + foreach($this->add_fields as $k => $v) { + if(isset($dv[$k])) $s .= ", `".$this->fields[$v]."` = \"".$this->db->escape($dv[$k])."\" "; + else $s .= ", `".$this->fields[$v]."` = `".$this->fields[$v]."` "; + } + $s .= "WHERE `".$this->fields["id"]."` = ".$ids[$i]; + $this->db->query($s); + $i++; + } + } + return "{ \"status\" : 1, \"id\" : ".$id." }"; + } + function remove_node($data) { + $id = parent::_remove((int)$data["id"]); + return "{ \"status\" : 1 }"; + } + function get_children($data) { + $tmp = $this->_get_children((int)$data["id"]); + if((int)$data["id"] === 1 && count($tmp) === 0) { + $this->_create_default(); + $tmp = $this->_get_children((int)$data["id"]); + } + $result = array(); + if((int)$data["id"] === 0) return json_encode($result); + foreach($tmp as $k => $v) { + $result[] = array( + "attr" => array("id" => "node_".$k, "rel" => $v[$this->fields["type"]]), + "data" => $v[$this->fields["title"]], + "state" => ((int)$v[$this->fields["right"]] - (int)$v[$this->fields["left"]] > 1) ? "closed" : "" + ); + } + return json_encode($result); + } + function search($data) { + $this->db->query("SELECT `".$this->fields["left"]."`, `".$this->fields["right"]."` FROM `".$this->table."` WHERE `".$this->fields["title"]."` LIKE '%".$this->db->escape($data["search_str"])."%'"); + if($this->db->nf() === 0) return "[]"; + $q = "SELECT DISTINCT `".$this->fields["id"]."` FROM `".$this->table."` WHERE 0 "; + while($this->db->nextr()) { + $q .= " OR (`".$this->fields["left"]."` < ".(int)$this->db->f(0)." AND `".$this->fields["right"]."` > ".(int)$this->db->f(1).") "; + } + $result = array(); + $this->db->query($q); + while($this->db->nextr()) { $result[] = "#node_".$this->db->f(0); } + return json_encode($result); + } + + function _create_default() { + $this->_drop(); + $this->create_node(array( + "id" => 1, + "position" => 0, + "title" => "C:", + "type" => "drive" + )); + $this->create_node(array( + "id" => 1, + "position" => 1, + "title" => "D:", + "type" => "drive" + )); + $this->create_node(array( + "id" => 2, + "position" => 0, + "title" => "_demo", + "type" => "folder" + )); + $this->create_node(array( + "id" => 2, + "position" => 1, + "title" => "_docs", + "type" => "folder" + )); + $this->create_node(array( + "id" => 4, + "position" => 0, + "title" => "index.html", + "type" => "default" + )); + $this->create_node(array( + "id" => 5, + "position" => 1, + "title" => "doc.html", + "type" => "default" + )); + } +} + +?> \ No newline at end of file diff --git a/webapps/test/_demo/_install.txt b/webapps/test/_demo/_install.txt new file mode 100644 index 0000000..39aff82 --- /dev/null +++ b/webapps/test/_demo/_install.txt @@ -0,0 +1,6 @@ +1) Create a database and a user with all privileges for this database. +2) Edit the config.php file and update the configuration for the database at the top of the file +3) Import the _dump.sql in your newly created database +4) You are ready to go + +*) PLEASE NOTE THAT THE PHP TREE CLASS HAS NOT BEEN THOROUGHLY TESTED \ No newline at end of file diff --git a/webapps/test/_demo/config.php b/webapps/test/_demo/config.php new file mode 100644 index 0000000..354f6a9 --- /dev/null +++ b/webapps/test/_demo/config.php @@ -0,0 +1,14 @@ + "localhost", + "username" => "root", + "password" => "", + "database" => "" +); +if(extension_loaded("mysqli")) require_once("_inc/class._database_i.php"); +else require_once("_inc/class._database.php"); + +// Tree class +require_once("_inc/class.tree.php"); +?> \ No newline at end of file diff --git a/webapps/test/_demo/file.png b/webapps/test/_demo/file.png new file mode 100644 index 0000000..5895968 Binary files /dev/null and b/webapps/test/_demo/file.png differ diff --git a/webapps/test/_demo/folder.png b/webapps/test/_demo/folder.png new file mode 100644 index 0000000..30eedea Binary files /dev/null and b/webapps/test/_demo/folder.png differ diff --git a/webapps/test/_demo/index.html b/webapps/test/_demo/index.html new file mode 100644 index 0000000..342dfc5 --- /dev/null +++ b/webapps/test/_demo/index.html @@ -0,0 +1,461 @@ + + + + + jsTree v.1.0 - Demo + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    DEMO

    +

    Creating a tree, binding events, using the instance

    +
    +

    Here is how you create an instance, bind an event and then get the instance.

    +
    + +
    + +
    + +

    Doing something when the tree is loaded

    +
    +

    You can use a few events to do that.

    +
    + +
    + +
    + +

    Doing something when a node is clicked

    +
    +
    + +
    + +
    + +

    Using CSS to make nodes wrap

    +
    + + + +
    + +

    Using CSS to make the nodes bigger

    +
    + + + +
    + +

    PHP & mySQL demo + event order

    +
    +

    Here is a PHP & mySQL enabled demo. You can use the classes/DB structure included, but those are not thoroughly tested and not officially a part of jstree. In the log window you can also see all function calls as they happen on the instance.

    + + + +
    +
    + + + +
    +
    + + + +
    + +
    + + + \ No newline at end of file diff --git a/webapps/test/_demo/root.png b/webapps/test/_demo/root.png new file mode 100644 index 0000000..a27e6a3 Binary files /dev/null and b/webapps/test/_demo/root.png differ diff --git a/webapps/test/_demo/server.php b/webapps/test/_demo/server.php new file mode 100644 index 0000000..dd43517 --- /dev/null +++ b/webapps/test/_demo/server.php @@ -0,0 +1,69 @@ +_create_default(); +//die(); + +if(isset($_GET["reconstruct"])) { + $jstree->_reconstruct(); + die(); +} +if(isset($_GET["analyze"])) { + echo $jstree->_analyze(); + die(); +} + +if($_REQUEST["operation"] && strpos($_REQUEST["operation"], "_") !== 0 && method_exists($jstree, $_REQUEST["operation"])) { + header("HTTP/1.0 200 OK"); + header('Content-type: application/json; charset=utf-8'); + header("Cache-Control: no-cache, must-revalidate"); + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Pragma: no-cache"); + echo $jstree->{$_REQUEST["operation"]}($_REQUEST); + die(); +} +header("HTTP/1.0 404 Not Found"); +?> + +_drop(); +$jstree->create_node(array("id"=>0,"position"=>0)); +$jstree->create_node(array("id"=>1,"position"=>0)); +$jstree->create_node(array("id"=>1,"position"=>0)); +$jstree->create_node(array("id"=>3,"position"=>0,"name"=>"Pesho")); +$jstree->move(3,2,0,true); +$jstree->_dump(true); +$jstree->_reconstruct(); +echo $jstree->_analyze(); +die(); + +$tree = new _tree_struct; +$tree->drop(); +$tree->create(0, 0); +$tree->create(0, 0); +$tree->create(1, 0); +$tree->create(0, 3); +$tree->create(2, 3); +$tree->create(2, 0); +$tree->dump(true); +$tree->move(6,4,0); +$tree->move(1,0,0); +$tree->move(3,2,99,true); +$tree->move(7,1,0,true); +$tree->move(1,7,0); +$tree->move(1,0,1,true); +$tree->move(2, 0, 0, true); +$tree->move(13, 12, 2, true); +$tree->dump(true); +$tree->move(15, 16, 2, true); +$tree->dump(true); +$tree->move(4, 0, 0); +$tree->dump(true); +$tree->move(4, 0, 2); +$tree->dump(true); +echo $tree->analyze(); +$tree->drop(); +*/ +?> \ No newline at end of file diff --git a/webapps/test/_docs/!style.css b/webapps/test/_docs/!style.css new file mode 100644 index 0000000..a0e828c --- /dev/null +++ b/webapps/test/_docs/!style.css @@ -0,0 +1,48 @@ +html, body { margin:0; padding:0; background:#D9E3CB; } +body, td, th, pre, code, select, option, input, textarea { font-family:"lucida grande",tahoma,verdana,arial,sans-serif; font-size:10pt; } +#dhead { margin:0 0 0 -10px; padding:0; line-height:80px; font-size:18pt; font-family:Georgia; /*text-shadow:1px 1px 2px gray;*/ border-bottom:10px solid #73796B; margin-bottom:0.5em; text-align:center; width:820px; background:black; color:white; -moz-border-radius:5px 5px 0 0; border-radius:5px 5px 0 0; -webkit-border-radius:5px 5px 0 0; text-indent:-2000px; background:black url("logo.png") center center no-repeat; } +h1 { margin:0 0 0 0px; padding:0; font-size:14pt; font-family:Georgia; /*text-shadow:1px 1px 2px gray;*/ margin-bottom:1em; text-align:center; text-transform:uppercase;} +h2 { margin:0.5em 0 0.5em 0; padding:0.5em 0 0.5em 20px; font-size:12pt; font-family:Georgia; color:white; background:silver; text-shadow:1px 1px 2px gray; clear:both; -moz-border-radius:5px; border-radius:5px; -webkit-border-radius:5px; } +h3 { margin:0; padding:0.5em 0 0.5em 0; font-size:11.5pt; font-family:Georgia; color:gray; clear:both; } +p { padding:0em 0 0.5em 0; margin:0; line-height:1.8em; } +p.meta { font-size:9pt; color:gray; margin-top:-5px; } +.arguments .tp, p code { color:green; padding:0 4px; font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size:13px; } +#description, .panel { margin:0 20px; } +#container { width:800px; margin:10px auto; overflow:hidden; background:white; padding:0 10px 10px 10px; -moz-border-radius:5px; border-radius:5px; -webkit-border-radius:5px; -moz-box-shadow: 0px 0px 10px #000; } +.demo { width:255px; float:left; margin:0; border:1px solid gray; background:white; overflow:auto; } +.code { width:490px; float:right; margin:0 0 10px 0; border:1px solid gray; font-size:12px; } +pre { display:block; } +.code_f { border:1px solid gray; margin-bottom:1em; } +.syntaxhighlighter { margin:0 0 0 0 !important; padding:0 !important; line-height:18px; } + +.log { padding:4px; border:1px solid gray; margin-bottom:1em; } +.button { display:block; margin-bottom:0.5em; } +.arguments { margin:0em 1em; padding:0; list-style-type:none; } +.arguments .tp { padding:0 0 0 0; float:left; width:70px; } +.arguments strong { display:block; } + +.api h3 { margin-left:-10px; color:black; font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-weight: normal !important; font-size:14px; margin-top:2em; border-top:1px solid; width:780px; } +.api .arguments li strong { color:black; font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-weight: normal !important; font-size:13px; } + +.configuration h3 { margin-left:-10px; color:black; font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-weight: normal !important; font-size:14px; margin-top:2em; border-top:1px solid; width:780px; } +.note { background:#ffffee; padding:10px 20px; border:1px solid #333; -moz-border-radius:5px; border-radius:5px; -webkit-border-radius:5px; margin-bottom:15px; text-align:center; font-weight:bold; } + +.plugins, .demos { margin:0 auto 20px auto; } + +ul.columns { list-style-type:none; width:700px; margin:0px auto 15px auto; padding:0; overflow:hidden; } +ul.columns li { float:left; margin:0; padding:0 0 0 0px; line-height:18px; width:345px; } +ul.demos li, ul.plugins li { width:220px; text-align:left; padding:5px 0; } +ul.demos li a, ul.plugins li a { text-decoration:none; color:#3B5998; } +ul.demos li a:hover, ul.plugins li a:hover { text-decoration:underline; } +ul.plugins li p { text-align:left; font-size:9px; color:#333; margin:0 5px 0 0; } + +ul.demos li { width:auto; } + +.demo, .demo input, .jstree-dnd-helper, #vakata-contextmenu { font-size:10px; font-family:Verdana; } + +#demo_body .demo, #demo_body .code { width:auto; float:none; clear:both; margin:10px auto; } +#demo_body .code { margin-bottom:20px; } + +ul.jstree { width:700px; margin:0px auto 15px auto; padding:0; } +ul.jstree li { margin:0; padding:2px 0; } +ul.jstree li a { color:#3B5998; text-decoration:underline; } \ No newline at end of file diff --git a/webapps/test/_docs/_drive.png b/webapps/test/_docs/_drive.png new file mode 100644 index 0000000..a27e6a3 Binary files /dev/null and b/webapps/test/_docs/_drive.png differ diff --git a/webapps/test/_docs/_html_data.html b/webapps/test/_docs/_html_data.html new file mode 100644 index 0000000..3354d32 --- /dev/null +++ b/webapps/test/_docs/_html_data.html @@ -0,0 +1,2 @@ +
  • Node 1
  • +
  • Node 2
  • diff --git a/webapps/test/_docs/_json_data.json b/webapps/test/_docs/_json_data.json new file mode 100644 index 0000000..615a6a2 --- /dev/null +++ b/webapps/test/_docs/_json_data.json @@ -0,0 +1,4 @@ +[ + { "data" : "A node", "children" : [ { "data" : "Only child", "state" : "closed" } ], "state" : "open" }, + "Ajax node" +] \ No newline at end of file diff --git a/webapps/test/_docs/_search_data.json b/webapps/test/_docs/_search_data.json new file mode 100644 index 0000000..6501534 --- /dev/null +++ b/webapps/test/_docs/_search_data.json @@ -0,0 +1,6 @@ +[ + "Ajax node 1", + "Ajax node 2", + "TARGET", + "Ajax node 4" +] \ No newline at end of file diff --git a/webapps/test/_docs/_search_result.json b/webapps/test/_docs/_search_result.json new file mode 100644 index 0000000..1d292f3 --- /dev/null +++ b/webapps/test/_docs/_search_result.json @@ -0,0 +1 @@ +[ "#root_node" ] \ No newline at end of file diff --git a/webapps/test/_docs/_xml_flat.xml b/webapps/test/_docs/_xml_flat.xml new file mode 100644 index 0000000..6cad867 --- /dev/null +++ b/webapps/test/_docs/_xml_flat.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/webapps/test/_docs/_xml_nest.xml b/webapps/test/_docs/_xml_nest.xml new file mode 100644 index 0000000..4dd85db --- /dev/null +++ b/webapps/test/_docs/_xml_nest.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/webapps/test/_docs/checkbox.html b/webapps/test/_docs/checkbox.html new file mode 100644 index 0000000..82a32b4 --- /dev/null +++ b/webapps/test/_docs/checkbox.html @@ -0,0 +1,171 @@ + + + + + jsTree v.1.0 - checkbox documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    checkbox plugin

    +

    Description

    +
    +

    The checkbox plugin makes multiselection possible using three-state checkboxes.

    +
    + +

    Configuration

    +
    + +

    override_ui

    +

    A boolean. Default is false.

    +

    If set to true all selection will be handled by checkboxes. The checkbox plugin will map UI's get_selected function to its own get_checked function and overwrite the UI reselect function. It will also disable the select_node, deselect_node and deselect_all functions. If left as false nodes can be selected and checked independently.

    + +

    checked_parent_open

    +

    A Boolean. Default is true.

    +

    When set to true when programatically checking a node in the tree all of its closed parents are opened automatically.

    + +

    two_state

    +

    A boolean. Default is false.

    +

    If set to true checkboxes will be two-state only, meaning that you will be able to select parent and children independently and there will be no undetermined state.

    + +

    real_checkboxes

    +

    A boolean. Default is false.

    +

    If set to true real hidden checkboxes will be created for each element, so if the tree is part of a form, checked nodes will be submitted automatically. By default the name of the checkbox is "check_" + the ID of the LI element and the value is 1, this can be changed using the real_checkboxes_names config option.

    + +

    real_checkboxes_names

    +

    A function. Default is function (n) { return [("check_" + (n[0].id || Math.ceil(Math.random() * 10000))), 1]; }.

    +

    If real checkboxes are used this function is invoked in the current tree's scope for each new checkbox that is created. It receives a single argument - the node that will contain the checkbox. The function must return an array consisting of two values - the name for the checkbox and the value for the checkbox.

    + +
    + +

    Demos

    +
    +

    Using the checkbox plugin - all you need to do is include it in the list of active plugins.

    +
    + +
    + + +
    + +

    API

    +
    +

    ._prepare_checkboxes ( node )

    +

    Inserts the checkbox icons on the node. Used internally.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree.

      +
    • +
    + +

    ._repair_state ( node )

    +

    Repairs the checkbox state inside the node. Used internally.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree.

      +
    • +
    + +

    .change_state ( node , uncheck )

    +

    Changes the state of a node. Used mostly internally - you'd be better off using the check_node and uncheck_node functions. Triggers an event.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree.

      +
    • +
    • + boolean uncheck +

      If set to true the node is unchecked, if set to false the node is checked, otherwise - the state is toggled.

      +
    • +
    + +

    .check_node ( node )

    +

    Checks a node.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree.

      +
    • +
    + +

    .uncheck_node ( node )

    +

    Unchecks a node.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree.

      +
    • +
    + +

    .check_all ( )

    +

    Checks all nodes.

    + +

    .uncheck_all ( )

    +

    Unchecks all nodes.

    + +

    .is_checked ( node )

    +

    Checks if a node is checked. Returns boolean.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree.

      +
    • +
    + +
     
    +

    .get_checked ( context, get_all ), .get_unchecked ( context, get_all )

    +

    Both functions return jQuery collections.

    +
      +
    • + mixed context +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree. If specified only nodes inside the specified context are returned, otherwise the whole tree is searched.

      +
    • +
    • + boolean get_all +

      By default these functions return only top level checked/unchecked nodes (if a node is checked its children are note returned), if this parameter is set to true they will return all checked/unchecked nodes.

      +
    • +
    + +
     
    +

    .show_checkboxes ( ), .hide_checkboxes ( )

    +

    Show or hide the checkbox icons.

    + +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/contextmenu.html b/webapps/test/_docs/contextmenu.html new file mode 100644 index 0000000..0522f2e --- /dev/null +++ b/webapps/test/_docs/contextmenu.html @@ -0,0 +1,121 @@ + + + + + jsTree v.1.0 - contextmenu documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    contextmenu plugin

    +

    Description

    +
    +

    The contextmenu plugin enables a contextual menu to be shown, when the user right-clicks a node (or when triggered programatically by the developer).

    +
    + +

    Configuration

    +
    +

    select_node

    +

    Boolean. Default is false.

    +

    Whether to select the right clicked node when showing the context menu. If this is set to true and the node is not selected all currently selected nodes will be deselected.

    + +

    show_at_node

    +

    Boolean. Default is true.

    +

    Whether to show the context menu just below the node, or at the clicked point exactly.

    + +

    items

    +

    Expects an object or a function, which should return an object. If a function is used it fired in the tree's context and receives one argument - the node that was right clicked. The object format is:

    +
    +
    +{
    +// Some key
    +"rename" : {
    +	// The item label
    +	"label"				: "Rename",
    +	// The function to execute upon a click
    +	"action"			: function (obj) { this.rename(obj); },
    +	// All below are optional 
    +	"_disabled"			: true,		// clicking the item won't do a thing
    +	"_class"			: "class",	// class is applied to the item LI node
    +	"separator_before"	: false,	// Insert a separator before the item
    +	"separator_after"	: true,		// Insert a separator after the item
    +	// false or string - if does not contain `/` - used as classname
    +	"icon"				: false,
    +	"submenu"			: { 
    +		/* Collection of objects (the same structure) */
    +	}
    +}
    +/* MORE ENTRIES ... */
    +}
    +
    +
    +
    + +

    Demos

    +
    + +

    Using the contextmenu

    +
    + +
    + + +
    + +

    API

    +
    + +

    .show_contextmenu ( node , x, y )

    +

    Shows the contextmenu next to a node. Triggered automatically when right-clicking a node.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree.

      +
    • +
    • + number x +

      The X-coordinate to show the menu at - may be overwritten by show_at_node. If you omit this the menu is shown aligned with the left of the node.

      +
    • +
    • + number y +

      The Y-coordinate to show the menu at - may be overwritten by show_at_node. If you omit this the menu is shown just below the node.

      +
    • +
    + +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/cookies.html b/webapps/test/_docs/cookies.html new file mode 100644 index 0000000..f110d28 --- /dev/null +++ b/webapps/test/_docs/cookies.html @@ -0,0 +1,97 @@ + + + + + jsTree v.1.0 - cookies documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    cookies plugin

    +

    Description

    +
    +

    The cookies enables jstree to save the state of the tree across sessions. What this does is save the opened and selected nodes in a cookie, and reopen & reselect them the next time the user loads the tree. Depends on the jQuery.cookie plugin.

    The nodes need to have IDs for this plugin to work.

    +
    + +

    Configuration

    +
    + +

    save_opened

    +

    A string (or false). Default is "jstree_open".

    +

    The name of the cookie to save opened nodes in. If set to false - opened nodes won't be saved.

    + +

    save_selected

    +

    A string (or false). Default is "jstree_select".

    +

    The name of the cookie to save selected nodes in. If set to false - selected nodes won't be saved.

    + +

    auto_save

    +

    A Boolean. Default is true.

    +

    If set to true jstree will automatically update the cookies every time a change in the state occurs.

    + +

    cookie_options

    +

    An object. Default is {}.

    +

    The options accepted by the jQuery.cookie plugin.

    + +
    + +

    Demos

    +
    +

    Check your data plugin documentation (html_data, xml_data, json_data) or take a close look at these examples for information on how to specify multilanguage nodes.

    + +

    Using the cookies plugin

    +

    Go ahead and make changes to the tree and then refresh this page.

    +
    + +
    + + +
    + +

    API

    +
    + + +

    Save the current state.

    +
      +
    • + string event +

      Used internally with the auto_save option. Do not set this manually.

      +
    • +
    +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/core.html b/webapps/test/_docs/core.html new file mode 100644 index 0000000..0b32c50 --- /dev/null +++ b/webapps/test/_docs/core.html @@ -0,0 +1,689 @@ + + + + + jsTree v.1.0 Core documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    CORE

    +

    Description

    +
    +

    Including the files

    +

    First of all, as jsTree is a jQuery component, you need to include jQuery itself. jsTree v.1.0 requires jQuery version 1.4.2

    + +
    +<script type="text/javascript" src="_lib/jquery.js"></script>
    +
    + +

    Then you need to include jsTree:

    + +
    +<script type="text/javascript" src="jquery.jstree.js"></script>
    +
    + +

    Or you could use the minified version:

    + +
    +<script type="text/javascript" src="jquery.jstree.min.js"></script>
    +
    + +

    You may change the path to whatever you like, but it is recommended not to rename jquery.tree.js or jquery.tree.min.js as the filenames may be used for path autodetection (for example in the themes plugin, but if you really need to rename the file most plugins will give you the option to set the path manually).

    + +

    Additionally some plugins have dependencies - plugins that detect a dependency is missing will throw an error.

    + +

    Creating and configuring an instance

    +

    You can create a tree in the following manner:

    + +
    +jQuery("some-selector-to-container-node-here").jstree([ config_object ]);
    +
    + +

    In the optional config object you specify all the options that you want to set. Each plugin will describe its configuration and defaults. In the configuration section below you will find the options defined by the core. Each plugin's options (even the core) are set in their own subobject, which is named after the plugin. For example all of the core's options are set in the core key of the config object:

    +
    +jQuery("some-selector-to-container-node-here")
    +	.jstree({
    +		core : {
    +			/* core options go here */
    +		}
    +	});
    +
    + +

    Please note that if your options for a given plugin are the same as the defaults you may omit those options or omit the subobject completely (if you do not need to modify the defaults).

    + +

    There is only one special config option that is not a part of any plugin - this is the plugins option, which defines a list of active plugins for the instance being created. Although many plugins may be included, only the ones listed in this option will be active. The only autoincluded "plugin" is the jstree core.

    + +
    +jQuery("some-selector-to-container-node-here")
    +	.jstree({
    +		core : { /* core options go here */ },
    +		plugins : [ "themes", "html_data", "some-other-plugin" ]
    +	});
    +
    + +

    Interacting with the tree

    + +

    To perform an operation programatically on a given instance you can use two methods:

    +
    +/* METHOD ONE */
    +jQuery("some-selector-to-container-node-here")
    +	.jstree("operation_name" [, argument_1, argument_2, ...]);
    +
    +/* METHOD TWO */
    +jQuery.jstree._reference(needle) 
    +	/* NEEDLE can be a DOM node or selector for the container or a node within the container */
    +	.operation_name([ argument_1, argument_2, ...]);
    +
    +

    NOTE: Functions prefixed with _ can not be called with method one.

    + +

    jsTree uses events to notify of any changes happening in the tree. All events fire on the tree container in the jstree namespace and are named after the function that triggered them. Please note that for some events it is best to bind before creating the instance. For example:

    +
    +jQuery("some-container")
    +	.bind("loaded.jstree", function (event, data) {
    +		alert("TREE IS LOADED");
    +	})
    +	.jstree({ /* configuration here */ });
    +
    +

    Please note the second parameter data. Its structure is as follows:

    +
    +{ 
    +	"inst" : /* the actual tree instance */, 
    +	"args" : /* arguments passed to the function */, 
    +	"rslt" : /* any data the function passed to the event */, 
    +	"rlbk" : /* an optional rollback object - it is not always present */
    +}
    +
    +

    There is also one special event - before.jstree. This events enables you to prevent an operation from executing. Look at the demo below.

    + +
    + +

    Configuration

    +
    + +

    html_titles

    +

    Boolean. Default is false.

    +

    Defines whether titles can contain HTML code.

    + +

    animation

    +

    A number. Default is 500.

    +

    Defines the duration of open/close animations. 0 means no animation.

    + +

    initially_open

    +

    An array. Default is [].

    +

    Defines which nodes are to be automatically opened (if they are not present they will first be loaded) when the tree finishes loading - a list of IDs is expected.

    + +

    initially_load

    +

    An array. Default is [].

    +

    Defines which nodes are to be automatically loaded (but not opened) when the tree finishes loading - a list of IDs is expected.

    + +

    load_open

    +

    A Boolean. Default is false.

    +

    When set to true forces loading of nodes marked as open, which do not have children. Otherwise nodes are only visualized as open without any children and opening/closing such a node won't cause it to load (make a server call).

    + +

    open_parents

    +

    Boolean. Default is true.

    +

    If set to true opening a node will also open any closed ancestors it has (will open the whole chain down to this node).

    + +

    notify_plugins

    +

    Boolean. Default is true.

    +

    If set to true loading nodes with some metadata will trigger some actions on the corresponding plugin. So you can actually set the selected/checked/etc

    + +

    rtl

    +

    Boolean. Default is false.

    +

    Defines whether the tree is in right-to-left mode (also make sure you are using a RTL theme - for example the included default-rtl).

    + +

    strings

    +

    Object. Default is { loading : "Loading ...", new_node : "New node" }.

    +

    Contains strings needed for the operation of the tree so that you can localize.

    + + +
    + +

    Demos

    +
    + +

    Binding to an event and executing an action

    + +
    + +
    + +

     

    + +

    Preventing an action

    +

    This is the same demo as above, but this time the operation will be prevented.

    + +
    + +
    + + +

     

    +

    The important part is e.stopImmediatePropagation(); return false.

    +
    + +

    API

    +
    +

    Use extra caution when working with functions prefixed with an underscore - _!
    Those functions are probably for internal usage only.

    + + +

    jQuery.jstree.defaults

    +

    An object. Default is a collection of all included plugin's defaults.

    +

    This object is exposed so that you can apply standart settings to all future instances

    + +

    jQuery.jstree.plugin ( plugin_name , plugin_data )

    +

    This function is used by developers to extend jstree (add "plugins").

    +
      +
    • + string plugin_name +

      The plugin name - it should be unique.

      +
    • +
    • + object plugin_data +

      The plugin itself. It consists of __init & __destroy functions, defaults object (that of course could be an array or a simple value) and a _fn object, whose keys are all the functions you are extending jstree with. You can overwrite functions (but you can in your function call the overriden old function), and you are responsible for triggering events and setting rollback points. You can omit any of the elements in the plugin_data param. Keep in mind jstree will automatically clear classes prepended with jstree- and all events in the jstree namespace when destroying a tree, so you do not need to worry about those.

      +

      Read jstree's code for examples on how to develop plugins.

      +
    • +
    + +

    jQuery.jstree.rollback ( rollback_object )

    +

    This function will roll the tree back to the state specified by the rollback object

    +
      +
    • + string rollback_object +

      Normally you will get this object from the event you are handling. You can of course use .get_rollback() to get the current state of the tree as a rollback object.

      +
      +$("some-container").bind("some-event.jstree", function (e, data) {
      +	$.jstree.rollback(data.rlbk);
      +});
      +

      Keep in mind that not all events will give you a rollback object - sometimes data.rlbk will be false.

      +
    • +
    + +

    jQuery.jstree._focused ()

    +

    Returns the currently focused tree instance on the page. If not interaction has been made - it is the last one to be created.

    + +

    jQuery.jstree._reference ( needle )

    +

    Returns the tree instance for the specified needle.

    +
      +
    • + mixed needle +

      This can be a DOM node, jQuery node or selector pointing to the tree container, or an element within the tree.

      +
    • +
    + +

    jQuery.jstree._instance ( index , container , settings )

    +

    This function is used internally when creating new tree instances. Calling this function by itself is not enough to create a new instance. To create a tree use the documented method $("selector").jstree([ options ]).

    + +

    jQuery.jstree._fn

    +

    This object stores all functions included by plugins. It is used internally as a prototype for all instances - do not modify manually.

    + +

    .data

    +

    An object where all plugins store instance specific data. Do not modify manually.

    + +

    .get_settings ()

    +

    Returns a copy of the instance's settings object - the defaults, extended by your own config object.

    + +

    ._get_settings ()

    +

    Returns the instance's settings object - the defaults, extended by your own config object.

    + +

    .get_index ()

    +

    Returns the internal instance index.

    + +

    .get_container ()

    +

    Returns the jQuery extended container node of the tree.

    + +

    .get_container_ul ()

    +

    Returns the jQuery extended first UL node in the container of the tree.

    + +

    ._set_settings ( settings )

    +

    Replace the settings object with the settings param. Please note that not all plugins will react to the change. Unless you know exactly what you are doing you'd be better off recreating the tree with the new settings.

    + +

    .init ()

    +

    This function is used internally when creating a new instance. Triggers an event, which fires after the tree is initialized, but not yet loaded.

    + +

    .destroy ()

    +

    Destroys the instance - it will automatically remove all bound events in the jstree namespace & remove all classes starting with jstree-. Triggers an event.

    + +

    .save_opened ()

    +

    Stores the currently open nodes before refreshing. Used internally. Triggers an event.

    + +

    .reopen ( is_callback )

    +

    Reopens all the nodes stored by save_opened or set in the initially_open config option on first load. It is called multiple times while reopening nodes - the is_callback param determines if this is the first call (false) or not. Used internally. Triggers an event.

    + +

    .refresh ( node )

    +

    Refreshes the tree. Saves all open nodes, and reloads and then reopens all saved nodes. Triggers an event.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree. If set this will reload only the given node - otherwise - the whole tree. Passing -1 also reloads the whole tree.

      +
    • +
    + +

    .loaded ()

    +

    A dummy function, whose purpose is only to trigger the loaded event. This event is triggered once after the tree's root nodes are loaded, but before any nodes set in initially_open are opened.

    + +

    .set_focus ()

    +

    Makes the current instance the focused one on the page. Triggers an event.

    + +

    .unset_focus ()

    +

    If the current instance is focused this removes the focus. Triggers an event.

    + +

    .is_focused ()

    +

    Returns true if the current instance is the focused one, otherwise returns false.

    + +

    .lock ()

    +

    Sets the tree to a locked state - no methods can be called on that instance except for unlock and is_locked.

    +

    .unlock ()

    +

    Sets the tree to a unlocked state (the default state).

    +

    .is_locked ()

    +

    Returns true if the tree is locked, otherwise returns false.

    + +

    ._get_node ( node )

    +

    Return the jQuery extended LI element of the node, -1 if the container node is passed, or false otherwise.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree.

      +
    • +
    + +

    ._get_next ( node , strict )

    +

    Gets the LI element representing the node next to the passed node. Returns false on failure.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree, whose next sibling we want.

      +
    • +
    • + bool strict +

      If set to true only immediate siblings are calculated. Otherwise if the node is the last child of its parent this function will "jump out" and return the parent's next sibling, etc. Default is false.

      +
    • +
    + +

    ._get_prev ( node , strict )

    +

    Gets the LI element representing the node previous to the passed node. Returns false on failure.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree, whose previous sibling we want.

      +
    • +
    • + bool strict +

      If set to true only immediate siblings are calculated. Otherwise if the node is the first child of its parent this function will "jump out" and return the parent itself. Default is false.

      +
    • +
    + +

    ._get_parent ( node )

    +

    Gets the LI element representing the parent of the passed node. Returns false on failure.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree, whose parent we want.

      +
    • +
    + +

    ._get_children ( node )

    +

    Gets the LI elements representing the children of the passed node. Returns false on failure (or if the node has no children).

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree, whose children we want. Use -1 to return all root nodes.

      +
    • +
    + +

    .get_path ( node , id_mode )

    +

    Return the path to a node, either as an array of IDs or as an array of node names.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree, whose path we want.

      +
    • +
    • + bool id_mode +

      If set to true IDs are returned instead of the names of the parents. Default is false.

      +
    • +
    + +

    .correct_state ( node )

    +

    Corrects closed items to leaf items, if no children are found. Used internally, triggers an event.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element we want corrected.

      +
    • + + +

      .open_node ( node , callback , skip_animation )

      +

      Opens a closed node, so that its children are visible. If the animation config option is greater than 0 the children are revealed using a slide down animation, whose duration is the value of the animation config option in milliseconds. Triggers an event.

      +
        +
      • + mixed node +

        This can be a DOM node, jQuery node or selector pointing to an element we want opened.

        +
      • +
      • + function callback +

        A callback function executed once the node is opened. Used mostly internally, you'd be better of waiting for the event. You can skip this, by not specifying it, or by passing false.

        +
      • +
      • + bool skip_animation +

        If set to true the animation set in the animation config option is skipped. Default is false.

        +
      • +
      + +

      .after_open ( node )

      +

      A dummy function, it triggers an event after the open animation has finished.

      + +

      .close_node ( node , skip_animation )

      +

      Closes an open node, so that its children are not visible. If the animation config option is greater than 0 the children are hidden using a slide up animation, whose duration is the value of the animation config option in milliseconds. Triggers an event.

      +
        +
      • + mixed node +

        This can be a DOM node, jQuery node or selector pointing to an element we want closed.

        +
      • +
      • + bool skip_animation +

        If set to true the animation set in the animation config option is skipped. Default is false.

        +
      • +
      + +

      .after_close ( node )

      +

      A dummy function, it triggers an event after the close animation has finished.

      + +

      .toggle_node ( node )

      +

      If a node is closed - this function opens it, if it is open - calling this function will close it.

      +
        +
      • + mixed node +

        This can be a DOM node, jQuery node or selector pointing to an element we want toggled.

        +
      • +
      + +

      .open_all ( node , do_animation, original_obj )

      +

      Opens all descendants of the node node.

      +
        +
      • + mixed node +

        This can be a DOM node, jQuery node or selector pointing to an element whose descendants you want opened. If this param is omitted or set to -1 all nodes in the tree are opened.

        +
      • +
      • + boolean do_animation +

        If set to true all nodes are opened with an animation. This can be slow on large trees.

        +
      • +
      • + mixed original_obj +

        Used internally when recursively calling the same function - do not pass this param.

        +
      • +
      + +

      .close_all ( node, do_animation )

      +

      Closes all descendants of the node node.

      +
        +
      • + mixed node +

        This can be a DOM node, jQuery node or selector pointing to an element whose descendants you want closed. If this param is omitted or set to -1 all nodes in the tree are closed.

        +
      • +
      • + boolean do_animation +

        If set to true all nodes are closed with an animation. This can be slow on large trees.

        +
      • +
      + +
        
      +

      .is_open ( node ), .is_closed ( node ), .is_leaf ( node )

      +

      Those function check if the node is in a state.

      +
        +
      • + mixed node +

        This can be a DOM node, jQuery node or selector pointing to an element you want checked.

        +
      • +
      + +

      .clean_node ( node )

      +

      Applies all necessary classes to the node and its descendants. Used internally. Triggers an event.

      +
        +
      • + mixed node +

        This can be a DOM node, jQuery node or selector pointing to an element you want cleaned. If this param is omitted or set to -1 all nodes in the tree are cleaned.

        +
      • +
      + +

      .get_rollback ()

      +

      Get the current tree's state in the rollback format. Used mainly internally by plugins.

      + +

      .set_rollback ( html , data )

      +

      Rollback the tree. Used ONLY internally! Both arguments are part of the rollback object. If you need to rollback - take a look at jQuery.jstree.rollback(). Triggers event.

      + +

      .load_node ( node , success_callback , error_callback )

      +

      A dummy function that is overwritten by data plugins. Triggers event.

      +
        +
      • + mixed node +

        This can be a DOM node, jQuery node or selector pointing to an element you want loaded. Use -1 for root nodes.

        +
      • +
      • + function success_callback +

        A function to be executed once the node is loaded successfully - used internally. You should wait for the event.

        +
      • +
      • + function error_callback +

        A function to be executed if the node is not loaded due to an error - used internally. You should wait for the event.

        +
      • +
      + +

      ._is_loaded ( node )

      +

      A dummy function that should return true if the node's children are loaded or false otherwise.

      +
        +
      • + mixed node +

        This can be a DOM node, jQuery node or selector pointing to an element you want to check.

        +
      • +
      + +

      .create_node ( node , position , js , callback , is_loaded )

      +

      Creates the DOM structure necessary for a new node. Triggers an event.

      +
        +
      • + mixed node +

        This can be a DOM node, jQuery node or selector pointing to the element you want to create in (or next to).

        +
      • +
      • + mixed position +

        The position of the newly created node. This can be a zero based index to position the element at a specific point among the current children. You can also pass in one of those strings: "before", "after", "inside", "first", "last".

        +
      • +
      • + object js +

        The data for the newly created node. Consists of three keys:

        attr - an object of attributes (same used for jQuery.attr(). You can omit this key;
        state - a string - either "open" or "closed", for a leaf node - omit this key;
        data - a string or an object - if a string is passed it is used for the title of the node, if an object is passed there are two keys you can specify: attr and title;

        +
      • +
      • + function callback +

        A function to be executed once the node is created - used internally. You should wait for the event.

        +
      • +
      • + bool is_loaded +

        Specifies if the parent of the node is loaded or not - used ONLY internally.

        +
      • +
      + +

      ._get_string ( node )

      +

      Returns the needed string from the config object. If the key does not exist the key itself is returned.

      +
        +
      • + string key +

        The name of the string you are looking for.

        +
      • +
      + +

      .get_text ( node )

      +

      Returns the title of a node.

      +
        +
      • + mixed node +

        This can be a DOM node, jQuery node or selector pointing to the element whose title you need.

        +
      • +
      + +

      .set_text ( node , text )

      +

      Sets the title of a node. Triggers an event. This is used mostly internally - wait for a .rename_node event to avoid confusion.

      +
        +
      • + mixed node +

        This can be a DOM node, jQuery node or selector pointing to the element whose title you want to change.

        +
      • +
      • + string text +

        The new title.

        +
      • +
      + +

      .rename_node ( node , text )

      +

      Sets the title of a node. Triggers an event.

      +
        +
      • + mixed node +

        This can be a DOM node, jQuery node or selector pointing to the element whose title you want to change.

        +
      • +
      • + string text +

        The new title.

        +
      • +
      + +

      .delete_node ( node )

      +

      Removes a node. Triggers an event.

      +
        +
      • + mixed node +

        This can be a DOM node, jQuery node or selector pointing to the element you want to remove.

        +
      • +
      + +

      .prepare_move ( o , r , pos , cb , is_cb )

      +

      This function is used internally to prepare all necessary variables and nodes when moving a node around. It is automatically called as needed - you do not need to call it manually. Triggers an event.

      + +

      .check_move ()

      +

      Checks if the prepared move is a valid one.

      + +

      .move_node ( node , ref , position , is_copy , is_prepared , skip_check )

      +

      Moves a node to a new place. Triggers an event.

      +
        +
      • + mixed node +

        This can be a DOM node, jQuery node or selector pointing to the element you want to move.

        +
      • +
      • + mixed ref +

        This can be a DOM node, jQuery node or selector pointing to the element which will be the reference element in the move. -1 may be used too (to indicate the container node).

        +
      • +
      • + mixed position +

        The new position of the moved node. This can be a zero based index to position the element at a specific point among the reference node's current children. You can also use one of these strings: "before", "after", "inside", "first", "last".

        +
      • +
      • + bool is_copy +

        Should this be a copy or a move operation.

        +
      • +
      • + bool is_prepared +

        Used internally when this function is called recursively.

        +
      • +
      • + bool skip_check +

        If this is set to true check_move is not called.

        +
      • +
      + +

      ._get_move ()

      +

      Returns the lastly prepared move. The returned object contains:
      +.o - the node being moved
      +.r - the reference node in the move
      +.ot - the origin tree instance
      +.rt - the reference tree instance
      +.p - the position to move to (may be a string - "last", "first", etc)
      +.cp - the calculated position to move to (always a number)
      +.np - the new parent
      +.oc - the original node (if there was a copy)
      +.cy - boolen indicating if the move was a copy
      +.cr - same as np, but if a root node is created this is -1
      +.op - the former parent
      +.or - the node that was previously in the position of the moved node
      +

      + +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/crrm.html b/webapps/test/_docs/crrm.html new file mode 100644 index 0000000..c5cca49 --- /dev/null +++ b/webapps/test/_docs/crrm.html @@ -0,0 +1,316 @@ + + + + + jsTree v.1.0 - CRRM documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    crrm plugin

    +

    Description

    +
    +

    The CRRM plugin handles creating, renaming, removing and moving nodes by the user.

    +
    + +

    Configuration

    +
    +

    input_width_limit

    +

    A number. Default is 200.

    +

    When renaming (or creating) nodes the input for the text will autosize - this number sets the maximum size for the input.

    + +

    move

    +

    An object, containing various settings - see below for more.

    + +

    move.always_copy

    +

    true, false or "multitree". Default is false.

    +

    Defines how moves are handled - if set to true every move will be forced to a copy (leaving the original node in place). If set to "multitree" only moves between trees will be forced to a copy.

    + +

    move.open_onmove

    +

    A Boolean. Default is true.

    +

    If set to true, when moving a node to a new, closed parent, the parent node will be opened when the move completes.

    + +

    move.default_position

    +

    A string or a number. Default is "last".

    +

    The default position to move to if no position is specified. This can be a zero based index to position the element at a specific point among the new parent's current children. You can also use one of these strings: "before", "after", "inside", "first", "last".

    + +

    move.check_move

    +

    A function. Default is function (m) { return true; }.

    +

    The callback function enabling you to prevent some moves - just return false. The m parameter is the move object generated by jstree. The object follows the structure described in ._get_move.

    + +
    + +

    Demos

    +
    + +

    Creating nodes

    + + + +
    + +
    + + +

    Removing nodes

    + + +
    + +
    + + +

    Renaming nodes

    + + +
    + +
    + + +

    Moving nodes

    +

    move_1 uses the default position - "first"

    +

    move_2 specifies a position - "before" - meaning that the node specified as a first argument will come above the node specified as the second argument

    +

    move_3 will never work, because of the specified check_move function which prevents the first root node from being moved

    + + + +
    + +
    + + +
    + +

    API

    +
    + +

    ._show_input ( node , callback )

    +

    Renders an input field in a node. Used only internally.

    + +

    .rename ( node )

    +

    Sets a node in rename mode and when the user has entered changes, an event is triggered.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree. If you use the UI plugin - pass null to use the currently selected item.

      +
    • +
    + +

    .create ( node , position , js , callback , skip_rename )

    +

    Creates a new node. Triggers an event.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to the element you want to create in (or next to). If you use the UI plugin - pass null to use the currently selected item.

      +
    • +
    • + mixed position +

      The position of the newly created node. This can be a zero based index to position the element at a specific point among the current children. You can also pass in one of those strings: "before", "after", "inside", "first", "last".

      +
    • +
    • + object js +

      The data for the newly created node. Consists of three keys:

      attr - an object of attributes (same used for jQuery.attr(). You can omit this key;
      state - a string - either "open" or "closed", for a leaf node - omit this key;
      data - a string or an object - if a string is passed it is used for the title of the node, if an object is passed there are two keys you can specify: attr and title;

      +
    • +
    • + function callback +

      A function to be executed once the node is created. You'd be better off waiting for the event.

      +
    • +
    • + bool skip_rename +

      Skips the user input step. The node is created with the data you have supplied.

      +
    • +
    + +

    .remove ( node )

    +

    Removes a node. Triggers an event.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree. If you use the UI plugin - pass null to use the currently selected items.

      +
    • +
    + +
     
    +

    .check_move ( ), .move_node ( )

    +

    Both functions are overwritten from the core in order to implement the new functionality.

    + +

    .cut ( node )

    +

    Cuts a node (prepares it for pasting).

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree. If you use the UI plugin - pass null to use the currently selected item.

      +
    • +
    + +

    .copy ( node )

    +

    Copies a node (prepares it for pasting).

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree. If you use the UI plugin - pass null to use the currently selected item.

      +
    • +
    + +

    .paste ( node )

    +

    Pastes copied or cut nodes inside a node.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree. If you use the UI plugin - pass null to use the currently selected item.

      +
    • +
    + +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/dnd.html b/webapps/test/_docs/dnd.html new file mode 100644 index 0000000..0b8fef9 --- /dev/null +++ b/webapps/test/_docs/dnd.html @@ -0,0 +1,199 @@ + + + + + jsTree v.1.0 - dnd documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    dnd plugin

    +

    Description

    +
    +

    The dnd plugin enables drag'n'drop support for jstree, also using foreign nodes and drop targets.

    +

    All foreign node options and callback functions in the config (drop_target, drop_check, drop_finish, drag_target, drag_check, drag_finish) are to be used ONLY when nodes that are not part of any tree are involved.
    If moving nodes from one tree instance to another - just listen for the "move_node.jstree" event on the receiving tree.
    DO NOT SET drag_target AND drop_target to match tree nodes!

    +
    + +

    Configuration

    +
    + +

    copy_modifier

    +

    A string. Default is "ctrl".

    +

    The special key used to make a drag copy instead of move ("ctrl", "shift", "alt", "meta").

    + +

    check_timeout

    +

    A number. Default is 200.

    +

    The number of milliseconds to wait before checking if a move is valid upon hovering a node (while dragging). 200 is a reasonable value - a higher number means better performance but slow feedback to the user, a lower number means lower performance (possibly) but the user will get feedback faster.

    + +

    open_timeout

    +

    A number. Default is 500.

    +

    The number of milliseconds to wait before opening a hovered if it has children (while dragging). This means that the user has to stop over the node for half a second in order to trigger the open operation. Keep in mind that a low value in combination with async data could mean a lot of unneeded traffic, so 500 is quite reasonable.

    + +

    drop_target

    +

    A string (jQuery selector) (or false). Default is ".jstree-drop".

    +

    A jquery selector matching all drop targets (you can also use the comma , in the string to specify multiple valid targets). If set to false drop targets are disabled.

    + +

    drop_check

    +

    A function. Default is function (data) { return true; }.

    +

    Return false to mark the move as invalid, otherwise return true. The data parameter is as follows:

    +

    data.o - the object being dragged

    +

    data.r - the drop target

    + +

    drop_finish

    +

    A function. Default is $.noop.

    +

    Gets executed after a valid drop, you get one parameter, which is as follows:

    +

    data.o - the object being dragged

    +

    data.r - the drop target

    + +

    drag_target

    +

    A string (jQuery selector) (or false). Default is ".jstree-draggable".

    +

    A jquery selector matching all foreign nodes that can be dropped on the tree (you can also use the comma , in the string to specify multiple valid foreign nodes). If set to false dragging foreign nodes is disabled.

    + +

    drag_check

    +

    A function. Default is function (data) { return { after : false, before : false, inside : true }; }.

    +

    Return a boolean for each position. The data parameter is as follows:

    +

    data.o - the foreign object being dragged

    +

    data.r - the hovered node

    + +

    drag_finish

    +

    A function. Default is $.noop.

    +

    Gets executed after a dropping a foreign element on a tree item, you get one parameter, which is as follows:

    +

    data.o - the foreign object being dragged

    +

    data.r - the target node

    + + +
    + +

    Demos

    +
    +

    Using the dnd plugin

    +

    Drag stuff around!

    +
    I have the jstree-drop class
    +
    I have the jstree-draggable class
    +
    + +
    + + +

    Reorder only demo

    +
    + +
    + + +
    + +

    API

    +
    + +
    +   +   +   +   +   +
    +

    .dnd_prepare ( ), .dnd_show ( ), .dnd_open ( ), .dnd_finish ( ), .dnd_enter ( ), .dnd_leave ( ), .start_drag ( )

    +

    All those functions are used internally only. If you want more information - examine the source code.

    + +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/hotkeys.html b/webapps/test/_docs/hotkeys.html new file mode 100644 index 0000000..564ce8f --- /dev/null +++ b/webapps/test/_docs/hotkeys.html @@ -0,0 +1,82 @@ + + + + + jsTree v.1.0 - hotkeys documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    hotkeys plugin

    +

    Description

    +
    +

    The hotkeys plugin enables keyboard navigation and shortcuts. Depends on the jquery.hotkeys plugin.

    +
    + +

    Configuration

    +
    +

    Expects an object:
    each key is the keyboard shortcut (for possible values check the hotkeys plugin)
    each value is a function executed in the instance's context, the return value is used as a return value for the event.

    +

    Simple example:

    +

    "del" : function () { this.remove(); }

    +

    By default "up", "ctrl+up", "shift+up", "down", "ctrl+down", "shift+down", "left", "ctrl+left", "shift+left", "right", "ctrl+right", "shift+right", "space", "ctrl+space", "shift+space", "f2", "del" are bound.
    To override any of those - just specify your own function, to disable - just set to false. +

    + +

    Demos

    +
    + +

    Using the hotkeys plugin

    +

    Try pressing up/down/left/right/space/f2/del.

    +
    + +
    + + +
    + +

    API

    +
    + +

    .enable_hotkeys ( )

    +

    Enable shortcuts on the instance (enabled by default).

    + +

    .disable_hotkeys ( )

    +

    Disable shortcuts on the instance.

    + +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/html_data.html b/webapps/test/_docs/html_data.html new file mode 100644 index 0000000..9b06c48 --- /dev/null +++ b/webapps/test/_docs/html_data.html @@ -0,0 +1,175 @@ + + + + + jsTree v.1.0 - html_data documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    html_data plugin

    +

    Description

    +
    +

    The html_data plugin enables jsTree to convert nested unordered lists to interactive trees. jsTree can also get HTML from the server insert it into the DOM and convert that to a tree.

    +

    The basic structure you need to follow when supplying data in the HTML format is:

    +
    +
    +<li>
    +	<a href="some_value_here">Node title</a>
    +	<!-- UL node only needed for children - omit if there are no children -->
    +	<ul>
    +		<!-- Children LI nodes here -->
    +	</ul>
    +</li>
    +
    +
    +

    If you inspect the resulting structure you will find it a bit different - that is because jstree will automatically do some corrections.

    +
    +
    +<!-- one of the three classes will be applied depending on node structure -->
    +<li class="[ jstree-open | jstree-closed | jstree-leaf ]">
    +	<!-- an INS element is inserted -->
    +	<ins class="jstree-icon">&#160;</ins>
    +	<a href="some_value_here">
    +		<!-- another INS element is inserted -->
    +		<ins class="jstree-icon">&#160;</ins>
    +		Node title
    +	</a>
    +</li>
    +
    +
    +

    Both ins elements are inserted for visualization purposes. As for the class (jstree-open, jstree-closed) - you can specify that yourself to force the node to appear either closed or opened. Making a node with no children appear closed is often used - if you use ajax, opening a closed node with no children will result in jstree making a server call for the children (see the demo below).

    +
    + +

    Configuration

    +
    +

    data

    +

    A HTML string (or false if not used). Default is false.

    +

    Specifies the content to load into the container and convert to a tree.

    +

    ajax

    +

    An object (or false if not used). Default is false.

    +

    The ajax config object is pretty much the same as the jQuery ajax settings object.

    +

    You can set the data option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the node about to be open as a paramater (or -1 for initial load). Whatever you return in the function will be sent to the server as data (so for example you can send the node's ID).

    +

    You can set the url option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the node about to be open as a paramater (or -1 for initial load). Whatever you return in the url function will be used as the ajax URL (so that you can accomodate pretty paths such as /get_children/node_2).

    +

    The error and success functions (if present) also fire in the context of the tree, and if you return a value in the success function it will be used to populate the tree - this can be useful if you want to somehow change what the server returned on the client side before it is displayed in the tree.

    +

    correct_state

    +

    A Boolean. Default is true.

    +

    If this option is set to true if an AJAX request returns an empty result, the node that was about to be opened will be converted to a leaf node (the open icon will no longer be displayed).

    + +

    NOTE:
    If both data and ajax are not set, the current container's HTML is used to build the tree.
    If both data and ajax are set the initial tree is rendered from the data string. When opening a closed node (that has no loaded children) an AJAX request is made.

    +
    + +

    Demos

    +
    + +

    Using initial content (convert an existing list)

    +
    + +
    + + +

    Using the data config option

    +
    + + +

    Using the ajax config option

    +
    + + +

    Using both the data & ajax config options

    +
    + +
    + +

    API

    +
    +

    Both dummy functions - _is_loaded and load_node are overwritten.

    +

    .load_node_html ( node , success_callback , error_callback )

    +

    This function is called instead of load_node.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element you want loaded. Use -1 for root nodes.

      +
    • +
    • + function success_callback +

      A function to be executed once the node is loaded successfully - used internally. You should wait for the load_node event.

      +
    • +
    • + function error_callback +

      A function to be executed if the node is not loaded due to an error - used internally. You should wait for the load_node event.

      +
    • +
    + +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/index.html b/webapps/test/_docs/index.html new file mode 100644 index 0000000..610ad55 --- /dev/null +++ b/webapps/test/_docs/index.html @@ -0,0 +1,86 @@ + + + + + jsTree v.1.0 Documentation + + + + + + + + + + +
    + +

    jsTree - jquery tree plugin

    + +

    Description

    +
    + +

    jsTree:

    +
      +
    • ♦  is a javascript based, cross browser tree component. It is packaged as a jQuery plugin.
    • +
    • ♦  is absolutely free (licensed same as jQuery – under the terms of either the MIT License or the GPL v2 License).
    • +
    • ♦  is a one man project and relies on its great community for feature requests & bug reports. Join in!
    • +
    • ♦  passes jslint validation, minifies nicely and does not modify the global scope in any way.
    • +
    • ♦  uses plugins so feel free to remove any plugins you do not use (for an even smaller download) or create your own plugins.
    • +
    + +

    Features at a glance

    +
      +
    • Various data sources - HTML, JSON, XML
    • +
    • Supports AJAX loading
    • +
    • Drag & drop support
    • +
    • Highly configurable
    • +
    • Theme support + included themes
    • +
    • Uses jQuery's event system
    • +
    • Optional keyboard navigation
    • +
    • Maintain the same tree in many languages
    • +
    • Inline editing
    • +
    • Open/close optional animation
    • +
    • Define node types and fine tune them
    • +
    • Configurable multitree drag & drop
    • +
    • Optional checkbox tree support
    • +
    • Search function
    • +
    • Supports plugins
    • +
    • Optional state saving using cookies
    • +
    • RTL support
    • +
    • Optional sorting / unique management
    • +
    +

    if you like the project - consider supporting jstree.

    +
    + +

    Plugins documentation

    +
    +

    As of version 1.0 jsTree is extremely plugin friendly, so all functionality is now wrapped in plugins, which take care of various aspects of the tree and can be removed without affecting the functionality of other plugins. Below you will find a list of plugins - each with its own documentation page. Probably a good place to start is the core.

    +
      +
    • Core functionality

      all core functions for manipulating the tree + basic examples of including, configuring and working with the tree, along with demos of the new event system

    • +
    • HTML_DATA plugin

      enables jsTree to convert nested unordered lists to interactive trees, an already existing UL may be used or data could be retrieved from a server

    • +
    • JSON_DATA plugin

      enables jsTree to convert JSON objects to interactive trees, data can be set up in the config or retrieved from a server

    • +
    • XML_DATA plugin

      enables jsTree to convert XML objects to interactive trees (using XSL), data can be set up in the config or retrieved from a server

    • +
    • Themes plugin

      controls the looks of jstree - without this plugin you will get a functional tree, but it will look just like an ordinary UL list

    • +
    • UI plugin

      handles selecting, deselecting and hovering tree items

    • +
    • CRRM plugin

      handles creating, renaming, removing and moving nodes by the user, also includes cut/copy/paste functions

    • +
    • Hotkeys plugin

      enables support for keyboard navigation & shortcuts, highly configurable

    • +
    • Languages plugin

      enables multilanguage support - each node can have multiple titles, but only one is visible

    • +
    • Cookies plugin

      enables jstree to save the state of the tree across sessions, by saving selected and opened nodes in a cookie

    • +
    • Sort plugin

      enables jstree to automatically sort all nodes
      using a specified function

    • +
    • DND plugin

      enables drag'n'drop support for jstree, also using foreign nodes and drop targets

    • +
    • Checkbox plugin

      makes multiselection possible using three-state checkboxes

    • +
    • Search plugin

      enables searching for nodes whose title contains a given string, works on async trees too

    • +
    • Contextmenu plugin

      enables a multilevel context menu on tree items

    • +
    • Types plugin

      each node can have a type, and you can define rules on how that type should behave

    • +
    • Themeroller plugin

      adds support for jQuery UI's themes

    • +
    • Unique plugin

      adds unique checking to jsTree

    • +
    • Wholerow plugin

      enhances UIs select & hover functions

    • +
    +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/json_data.html b/webapps/test/_docs/json_data.html new file mode 100644 index 0000000..907816a --- /dev/null +++ b/webapps/test/_docs/json_data.html @@ -0,0 +1,249 @@ + + + + + jsTree v.1.0 - json_data documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    json_data plugin

    +

    Description

    +
    +

    The json_data plugin enables jsTree to convert JSON objects to interactive trees. The data (JSON) can be set up in the config or retrieved from a server (also ondemand). Version 1.0 also introduces the experimental progressive render feature, which is suitable for large heavy trees, when the DOM would be too heavy to manipulate.

    +

    The basic structure you need to follow when supplying data in the JSON format is:

    +
    +
    +{ 
    +	"data" : "node_title", 
    +	// omit `attr` if not needed; the `attr` object gets passed to the jQuery `attr` function
    +	"attr" : { "id" : "node_identificator", "some-other-attribute" : "attribute_value" }, 
    +	// `state` and `children` are only used for NON-leaf nodes
    +	"state" : "closed", // or "open", defaults to "closed"
    +	"children" : [ /* an array of child nodes objects */ ]
    +}
    +
    +
    +

    The attr object will appear as attributes on the resulting li node.

    +

    You may need to pass some attributes to the a node, or set some metadata, or use language versions (for the languages plugin):

    +
    +
    +{
    +	// `data` can also be an object
    +	"data" : { 
    +		"title" : "The node title", 
    +		// omit when not needed
    +		"attr" : {}, 
    +		// if `icon` contains a slash / it is treated as a file, used for background
    +		// otherwise - it is added as a class to the <ins> node
    +		"icon" : "folder"
    +	},
    +
    +	// the `metadata` property will be saved using the jQuery `data` function on the `li` node
    +	"metadata" : "a string, array, object, etc",
    +
    +	// if you use the language plugin - just set this property
    +	// also make sure that `data` is an array of objects
    +	"language" : "en" // any code you are using
    +}
    +
    +
    +

    As seen in the first example below - you can also use a simple string to define a node (Child 1 & Child 2).

    +
    + +

    Configuration

    +
    +

    data

    +

    A JSON object (or false if not used). Default is false.

    +

    Specifies the content to load into the container and convert to a tree. You can also set this to a function - it will be executed in the tree's scope for every node that needs to be loaded, the function will receive two arguments - the node being loaded & a function to call with the data once your processing is done.

    +

    ajax

    +

    An object (or false if not used). Default is false.

    +

    The ajax config object is pretty much the same as the jQuery ajax settings object.

    +

    You can set the data option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the node about to be open as a paramater (or -1 for initial load). Whatever you return in the data function will be sent to the server as data (so for example you can send the node's ID).

    +

    You can set the url option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the node about to be open as a paramater (or -1 for initial load). Whatever you return in the url function will be used as the ajax URL (so that you can accomodate pretty paths such as /get_children/node_2).

    +

    The error and success functions (if present) also fire in the context of the tree, and if you return a value in the success function it will be used to populate the tree - this can be useful if you want to somehow change what the server returned on the client side before it is displayed in the tree (for example some .NET json implementations require this to work: "success" : function (data) { return data.d; }.

    +

    correct_state

    +

    A Boolean. Default is true.

    +

    If this option is set to true if an AJAX returns an empty result, the node that was about to be opened will be converted to a leaf node (the open icon will no longer be displayed).

    +

    progressive_render

    +

    A Boolean. Default is false.

    +

    If this option is set to true only the visible (open nodes) parts of the returned JSON are converted to DOM nodes, any hidden parts are saved away and parsed ondemand (when a node becomes visible). This is useful when you have a large nested tree which would result in a heavy DOM.

    +

    progressive_unload

    +

    A Boolean. Default is false.

    +

    If this option is set to true when a node is closed its children are removed from the DOM and saved as metadata on the node itself, on reopen that metadata is used (much like progressive_render).

    + +

    NOTE:
    If both data and ajax are set the initial tree is rendered from the data string. When opening a closed node (that has no loaded children) an AJAX request is made.

    +
    + +

    Demos

    +
    + +

    Using the data config option

    +
    + + +

    Using the ajax config option

    +
    + + +

    Using the progressive render config option

    +
    + + +

    Using both the data & ajax config options

    +
    + +
    + +

    API

    +
    +

    Both dummy functions - _is_loaded and load_node are overwritten.

    +

    .load_node_json ( node , success_callback , error_callback )

    +

    This function is called instead of load_node.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element you want loaded. Use -1 for root nodes.

      +
    • +
    • + function success_callback +

      A function to be executed once the node is loaded successfully - used internally. You should wait for the load_node event.

      +
    • +
    • + function error_callback +

      A function to be executed if the node is not loaded due to an error - used internally. You should wait for the load_node event.

      +
    • +
    +

    ._parse_json ( data , node , is_callback )

    +

    This function converts JSON nodes to the DOM structure required by jstree. Returns a jQuery object.

    +
      +
    • + mixed node +

      This can be a tree node in the JSON format described above, or an array of such JSON nodes, may also be a string.

      +
    • +
    • + mixed node +

      This is the DOM node, jQuery node or selector pointing to the element for which data is parsed. -1 means root nodes.

      +
    • +
    • + bool is_callback +

      Specifies if the function is called recursively - used ONLY internally.

      +
    • +
    +

    .get_json ( node , li_attr , a_attr )

    +

    This function returns an array of tree nodes converted back to JSON.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element you want returned. Use -1 or omit to get the whole tree.

      +
    • +
    • + array li_attr +

      The attributes to collect from the LI node. Defaults to [ "id" , "class" ]

      +
    • +
    • + array a_attr +

      The attributes to collect from the A node. Defaults to [ ]

      +
    • +
    • + boolean is_callback +

      Used internally.

      +
    • +
    + +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/languages.html b/webapps/test/_docs/languages.html new file mode 100644 index 0000000..4b32afe --- /dev/null +++ b/webapps/test/_docs/languages.html @@ -0,0 +1,152 @@ + + + + + jsTree v.1.0 - languages documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    languages plugin

    +

    Description

    +
    +

    The languages plugin enables multilanguage trees. This means that each node has a specified number of titles - each in a different "language". Only one language set is visible at any given time. This is useful for maintaining the same structure in many languages (hence the name of the plugin)

    +
    + +

    Configuration

    +
    +

    Expects an array of language codes. Each of the items is used as a CSS class name, so make sure you specify only valid CSS class name strings. The first langauge will be visible onload. For example:

    +

    [ "en", "de", "bg" ]

    +
    + +

    Demos

    +
    +

    Check your data plugin documentation (html_data, xml_data, json_data) or take a close look at these examples for information on how to specify multilanguage nodes.

    + +

    Using the languages plugin with HTML data

    + + + + + + + +
    + +

    API

    +
    + +

    .set_lang ( lang )

    +

    Set the tree's visible language. Triggers an event.

    +
      +
    • + string
      number
      lang +

      Either the language code string (as specified in the config) or an index from the config array.

      +
    • +
    +

    .get_lang ( )

    +

    Returns the name of the currently visible language.

    + +

    ._get_string ( node , lang )

    +

    Returns the needed string from the core config object. Overwrites the get_string function from the core. If the key does not exist in that language, but exists in the root of the object - that is returned, if even that does not exist - the key itself is returned.

    +
      +
    • + string key +

      The name of the string you are looking for. If you want to use the localize option just set the strings core config option to an object like this one: strings : { "lang-code-here" : { "string-key" : "string-value" ... }, "other-lang" : { ... } }, otherwise _get_strings won't be affected.

      +
    • +
    • + string lang +

      The language code string (as specified in the config) to get the key in. If not specified the currently visible language is used.

      +
    • +
    + +

    .get_text ( node , lang )

    +

    Returns the title of a node. Overwrites the get_text function from the core.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to the element whose title you need.

      +
    • +
    • + string lang +

      The language code string (as specified in the config) to get the title in. If you omit this - the currently visible language is used.

      +
    • +
    + +

    .set_text ( node , text , lang )

    +

    Sets the title of a node. Overwrites the set_text function from the core. This is used internally - you should use rename_node. Since rename_node uses set_text internally you can pass a language string as a third parameter to rename_node.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to the element whose title you want to change.

      +
    • +
    • + string text +

      The new title.

      +
    • +
    • + string lang +

      The language code string (as specified in the config) to get the title in. If you omit this - the currently visible language is used.

      +
    • +
    + +

    ._load_css ( )

    +

    used only internally to include the CSS necessary for the plugin onload.

    + +

    .create_node ( obj , position , js , callback )

    +

    Overwrites the create_node function from the core. To create a node with a few titles use an array for the data property of the js parameter:

    +

    { "data" : [ { "title" : "EN title", language : "en" }, { "title" : "BG заглавие", language : "bg" } ] }

    + +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/logo.png b/webapps/test/_docs/logo.png new file mode 100644 index 0000000..9f7a35b Binary files /dev/null and b/webapps/test/_docs/logo.png differ diff --git a/webapps/test/_docs/search.html b/webapps/test/_docs/search.html new file mode 100644 index 0000000..8ce8f8a --- /dev/null +++ b/webapps/test/_docs/search.html @@ -0,0 +1,153 @@ + + + + + jsTree v.1.0 - Search documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    search plugin

    +

    Description

    +
    +

    The search plugin enables searching for nodes whose title contains a given string, works on async trees too. All found nodes get the jstree-search class applied to their contained a nodes - you can use that class to style search results.

    +
    + +

    Configuration

    +
    + +

    search_method

    +

    A string. Default is "contains".

    +

    The method to use for searching. The other options bundled with jstree are "jstree_contains" (case insensitive search) and "jstree_title_contains" (case insensitive based on the title tag of the A node). For multiple word search take a look this: https://github.com/vakata/jstree/issues/10 - you can easily write your own method too.

    + +

    show_only_matches

    +

    A boolean. Default is false.

    +

    If set to true all non-matching nodes are hidden and only the matching nodes (and their parents) are left visible, until the search is cleared. Keep in mind show_only_matches is heavy on the browser/DOM and is still experimental.

    + +

    ajax

    +

    An object (or false if not used). Default is false.

    +

    This object can be used to make a request to the server on each search - useful if you are using async trees. That way you can return an array of IDs that need to be loaded before the actual DOM search is performed (so that all the nodes that will match the search are loaded). For example if the user searches for "string", you get that on the server side, check the database and find out that there is a node containing that string. But the node is the child of some other node, etc - so in your response you must return the path to the node (without the node itself) as ids: ["#root_node","#child_node_3"]. This means that jstree will load those two nodes before doing the client side search, ensuring that your node will be visible.

    +

    The ajax config object is pretty much the same as the jQuery ajax settings object.

    +

    You can set the data option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the search string as a paramater. Whatever you return in the function will be sent to the server as data.

    +

    You can set the url option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the search string as a paramater. Whatever you return in the function will be used as the URL of the ajax request.

    +

    The error and success functions (if present) also fire in the context of the tree, and if you return a value in the success function it will be used as the array of IDs.

    + +
    + +

    Demos

    +
    + +

    Searching nodes

    +

    Do not open the node - instead - just press the button.

    + +
    + + +

    Using adv_search

    +

    Try pressing the buttons. It will also work with AJAX searching.

    + + + + + + + +
    + +

    API

    +
    + + +

    Searches for nodes matching the supplied string. Triggers an event.

    +
      +
    • + string str +

      The string to search for.

      +
    • +
    • + boolean skip_async +

      If set to true - skip the async search (if setup in the config). This is used mostly internally.

      +
    • +
    + + +

    Clears the current search. This function is automatically called when doing a new search. Triggers an event.

    + +

    ._search_open ( is_callback )

    +

    Used internally if async is setup in the config. This functions loads the nodes returned by the server one by one.

    + +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/sort.html b/webapps/test/_docs/sort.html new file mode 100644 index 0000000..34a8d17 --- /dev/null +++ b/webapps/test/_docs/sort.html @@ -0,0 +1,85 @@ + + + + + jsTree v.1.0 - sort documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    sort plugin

    +

    Description

    +
    +

    The sort enables jstree to automatically sort all nodes using a specified function. This means that when the user creates, renames or moves nodes around - they will automatically sort.

    +
    + +

    Configuration

    +
    + +

    Expects a function. The functions receives two arguments - two nodes to be compared. Return -1 or 1 (or any other different from -1). Default is:

    +

    function (a, b) { return this.get_text(a) > this.get_text(b) ? 1 : -1; }

    + +
    + +

    Demos

    +
    +

    Using the sort plugin

    + +
    + +
    + + +
    + +

    API

    +
    + +

    .sort ( node )

    +

    Sorts the children of the specified node - this function is called automatically.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to the element.

      +
    • +
    +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/syntax/!script.js b/webapps/test/_docs/syntax/!script.js new file mode 100644 index 0000000..b303c60 --- /dev/null +++ b/webapps/test/_docs/syntax/!script.js @@ -0,0 +1,2232 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/ + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate + * + * @version + * 2.1.364 (October 15 2009) + * + * @copyright + * Copyright (C) 2004-2009 Alex Gorbatchev. + * + * @license + * This file is part of SyntaxHighlighter. + * + * SyntaxHighlighter is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * SyntaxHighlighter is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with SyntaxHighlighter. If not, see . + */ +// +// Begin anonymous function. This is used to contain local scope variables without polutting global scope. +// +if (!window.SyntaxHighlighter) var SyntaxHighlighter = function() { + +// Shortcut object which will be assigned to the SyntaxHighlighter variable. +// This is a shorthand for local reference in order to avoid long namespace +// references to SyntaxHighlighter.whatever... +var sh = { + defaults : { + /** Additional CSS class names to be added to highlighter elements. */ + 'class-name' : '', + + /** First line number. */ + 'first-line' : 1, + + /** + * Pads line numbers. Possible values are: + * + * false - don't pad line numbers. + * true - automaticaly pad numbers with minimum required number of leading zeroes. + * [int] - length up to which pad line numbers. + */ + 'pad-line-numbers' : true, + + /** Lines to highlight. */ + 'highlight' : null, + + /** Enables or disables smart tabs. */ + 'smart-tabs' : true, + + /** Gets or sets tab size. */ + 'tab-size' : 4, + + /** Enables or disables gutter. */ + 'gutter' : true, + + /** Enables or disables toolbar. */ + 'toolbar' : true, + + /** Forces code view to be collapsed. */ + 'collapse' : false, + + /** Enables or disables automatic links. */ + 'auto-links' : true, + + /** Gets or sets light mode. Equavalent to turning off gutter and toolbar. */ + 'light' : false, + + /** Enables or disables automatic line wrapping. */ + 'wrap-lines' : true, + + 'html-script' : false + }, + + config : { + /** Enables use of tags. */ + scriptScriptTags : { left: /(<|<)\s*script.*?(>|>)/gi, right: /(<|<)\/\s*script\s*(>|>)/gi } + }, + + toolbar : { + /** + * Creates new toolbar for a highlighter. + * @param {Highlighter} highlighter Target highlighter. + */ + create : function(highlighter) + { + var div = document.createElement('DIV'), + items = sh.toolbar.items + ; + + div.className = 'toolbar'; + + for (var name in items) + { + var constructor = items[name], + command = new constructor(highlighter), + element = command.create() + ; + + highlighter.toolbarCommands[name] = command; + + if (element == null) + continue; + + if (typeof(element) == 'string') + element = sh.toolbar.createButton(element, highlighter.id, name); + + element.className += 'item ' + name; + div.appendChild(element); + } + + return div; + }, + + /** + * Create a standard anchor button for the toolbar. + * @param {String} label Label text to display. + * @param {String} highlighterId Highlighter ID that this button would belong to. + * @param {String} commandName Command name that would be executed. + * @return {Element} Returns an 'A' element. + */ + createButton : function(label, highlighterId, commandName) + { + var a = document.createElement('a'), + style = a.style, + config = sh.config, + width = config.toolbarItemWidth, + height = config.toolbarItemHeight + ; + + a.href = '#' + commandName; + a.title = label; + a.highlighterId = highlighterId; + a.commandName = commandName; + a.innerHTML = label; + + if (isNaN(width) == false) + style.width = width + 'px'; + + if (isNaN(height) == false) + style.height = height + 'px'; + + a.onclick = function(e) + { + try + { + sh.toolbar.executeCommand( + this, + e || window.event, + this.highlighterId, + this.commandName + ); + } + catch(e) + { + sh.utils.alert(e.message); + } + + return false; + }; + + return a; + }, + + /** + * Executes a toolbar command. + * @param {Element} sender Sender element. + * @param {MouseEvent} event Original mouse event object. + * @param {String} highlighterId Highlighter DIV element ID. + * @param {String} commandName Name of the command to execute. + * @return {Object} Passes out return value from command execution. + */ + executeCommand : function(sender, event, highlighterId, commandName, args) + { + var highlighter = sh.vars.highlighters[highlighterId], + command + ; + + if (highlighter == null || (command = highlighter.toolbarCommands[commandName]) == null) + return null; + + return command.execute(sender, event, args); + }, + + /** Collection of toolbar items. */ + items : { + expandSource : function(highlighter) + { + this.create = function() + { + if (highlighter.getParam('collapse') != true) + return; + + return sh.config.strings.expandSource; + }; + + this.execute = function(sender, event, args) + { + var div = highlighter.div; + + sender.parentNode.removeChild(sender); + div.className = div.className.replace('collapsed', ''); + }; + }, + + /** + * Command to open a new window and display the original unformatted source code inside. + */ + viewSource : function(highlighter) + { + this.create = function() + { + return sh.config.strings.viewSource; + }; + + this.execute = function(sender, event, args) + { + var code = sh.utils.fixInputString(highlighter.originalCode).replace(/' + code + ''); + wnd.document.close(); + }; + }, + + /** + * Command to copy the original source code in to the clipboard. + * Uses Flash method if clipboardSwf is configured. + */ + copyToClipboard : function(highlighter) + { + var flashDiv, flashSwf, + highlighterId = highlighter.id + ; + + this.create = function() + { + var config = sh.config; + + // disable functionality if running locally + if (config.clipboardSwf == null) + return null; + + function params(list) + { + var result = ''; + + for (var name in list) + result += ""; + + return result; + }; + + function attributes(list) + { + var result = ''; + + for (var name in list) + result += " " + name + "='" + list[name] + "'"; + + return result; + }; + + var args1 = { + width : config.toolbarItemWidth, + height : config.toolbarItemHeight, + id : highlighterId + '_clipboard', + type : 'application/x-shockwave-flash', + title : sh.config.strings.copyToClipboard + }, + + // these arguments are used in IE's collection + args2 = { + allowScriptAccess : 'always', + wmode : 'transparent', + flashVars : 'highlighterId=' + highlighterId, + menu : 'false' + }, + swf = config.clipboardSwf, + html + ; + + if (/msie/i.test(navigator.userAgent)) + { + html = '' + + params(args2) + + params({ movie : swf }) + + '' + ; + } + else + { + html = '' + ; + } + + flashDiv = document.createElement('div'); + flashDiv.innerHTML = html; + + return flashDiv; + }; + + this.execute = function(sender, event, args) + { + var command = args.command; + + switch (command) + { + case 'get': + var code = sh.utils.unindent( + sh.utils.fixInputString(highlighter.originalCode) + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/&/g, '&') + ); + + if(window.clipboardData) + // will fall through to the confirmation because there isn't a break + window.clipboardData.setData('text', code); + else + return sh.utils.unindent(code); + + case 'ok': + sh.utils.alert(sh.config.strings.copyToClipboardConfirmation); + break; + + case 'error': + sh.utils.alert(args.message); + break; + } + }; + }, + + /** Command to print the colored source code. */ + printSource : function(highlighter) + { + this.create = function() + { + return sh.config.strings.print; + }; + + this.execute = function(sender, event, args) + { + var iframe = document.createElement('IFRAME'), + doc = null + ; + + // make sure there is never more than one hidden iframe created by SH + if (sh.vars.printFrame != null) + document.body.removeChild(sh.vars.printFrame); + + sh.vars.printFrame = iframe; + + // this hides the iframe + iframe.style.cssText = 'position:absolute;width:0px;height:0px;left:-500px;top:-500px;'; + + document.body.appendChild(iframe); + doc = iframe.contentWindow.document; + + copyStyles(doc, window.document); + doc.write('
    ' + highlighter.div.innerHTML + '
    '); + doc.close(); + + iframe.contentWindow.focus(); + iframe.contentWindow.print(); + + function copyStyles(destDoc, sourceDoc) + { + var links = sourceDoc.getElementsByTagName('link'); + + for(var i = 0; i < links.length; i++) + if(links[i].rel.toLowerCase() == 'stylesheet' && /shCore\.css$/.test(links[i].href)) + destDoc.write(''); + }; + }; + }, + + /** Command to display the about dialog window. */ + about : function(highlighter) + { + this.create = function() + { + return sh.config.strings.help; + }; + + this.execute = function(sender, event) + { + var wnd = sh.utils.popup('', '_blank', 500, 250, 'scrollbars=0'), + doc = wnd.document + ; + + doc.write(sh.config.strings.aboutDialog); + doc.close(); + wnd.focus(); + }; + } + } + }, + + utils : { + /** + * Finds an index of element in the array. + * @ignore + * @param {Object} searchElement + * @param {Number} fromIndex + * @return {Number} Returns index of element if found; -1 otherwise. + */ + indexOf : function(array, searchElement, fromIndex) + { + fromIndex = Math.max(fromIndex || 0, 0); + + for (var i = fromIndex; i < array.length; i++) + if(array[i] == searchElement) + return i; + + return -1; + }, + + /** + * Generates a unique element ID. + */ + guid : function(prefix) + { + return prefix + Math.round(Math.random() * 1000000).toString(); + }, + + /** + * Merges two objects. Values from obj2 override values in obj1. + * Function is NOT recursive and works only for one dimensional objects. + * @param {Object} obj1 First object. + * @param {Object} obj2 Second object. + * @return {Object} Returns combination of both objects. + */ + merge: function(obj1, obj2) + { + var result = {}, name; + + for (name in obj1) + result[name] = obj1[name]; + + for (name in obj2) + result[name] = obj2[name]; + + return result; + }, + + /** + * Attempts to convert string to boolean. + * @param {String} value Input string. + * @return {Boolean} Returns true if input was "true", false if input was "false" and value otherwise. + */ + toBoolean: function(value) + { + switch (value) + { + case "true": + return true; + + case "false": + return false; + } + + return value; + }, + + /** + * Opens up a centered popup window. + * @param {String} url URL to open in the window. + * @param {String} name Popup name. + * @param {int} width Popup width. + * @param {int} height Popup height. + * @param {String} options window.open() options. + * @return {Window} Returns window instance. + */ + popup: function(url, name, width, height, options) + { + var x = (screen.width - width) / 2, + y = (screen.height - height) / 2 + ; + + options += ', left=' + x + + ', top=' + y + + ', width=' + width + + ', height=' + height + ; + options = options.replace(/^,/, ''); + + var win = window.open(url, name, options); + win.focus(); + return win; + }, + + /** + * Adds event handler to the target object. + * @param {Object} obj Target object. + * @param {String} type Name of the event. + * @param {Function} func Handling function. + */ + addEvent: function(obj, type, func) + { + if (obj.attachEvent) + { + obj['e' + type + func] = func; + obj[type + func] = function() + { + obj['e' + type + func](window.event); + } + obj.attachEvent('on' + type, obj[type + func]); + } + else + { + obj.addEventListener(type, func, false); + } + }, + + /** + * Displays an alert. + * @param {String} str String to display. + */ + alert: function(str) + { + alert(sh.config.strings.alert + str) + }, + + /** + * Finds a brush by its alias. + * + * @param {String} alias Brush alias. + * @param {Boolean} alert Suppresses the alert if false. + * @return {Brush} Returns bursh constructor if found, null otherwise. + */ + findBrush: function(alias, alert) + { + var brushes = sh.vars.discoveredBrushes, + result = null + ; + + if (brushes == null) + { + brushes = {}; + + // Find all brushes + for (var brush in sh.brushes) + { + var aliases = sh.brushes[brush].aliases; + + if (aliases == null) + continue; + + // keep the brush name + sh.brushes[brush].name = brush.toLowerCase(); + + for (var i = 0; i < aliases.length; i++) + brushes[aliases[i]] = brush; + } + + sh.vars.discoveredBrushes = brushes; + } + + result = sh.brushes[brushes[alias]]; + + if (result == null && alert != false) + sh.utils.alert(sh.config.strings.noBrush + alias); + + return result; + }, + + /** + * Executes a callback on each line and replaces each line with result from the callback. + * @param {Object} str Input string. + * @param {Object} callback Callback function taking one string argument and returning a string. + */ + eachLine: function(str, callback) + { + var lines = str.split('\n'); + + for (var i = 0; i < lines.length; i++) + lines[i] = callback(lines[i]); + + return lines.join('\n'); + }, + + /** + * This is a special trim which only removes first and last empty lines + * and doesn't affect valid leading space on the first line. + * + * @param {String} str Input string + * @return {String} Returns string without empty first and last lines. + */ + trimFirstAndLastLines: function(str) + { + return str.replace(/^[ ]*[\n]+|[\n]*[ ]*$/g, ''); + }, + + /** + * Parses key/value pairs into hash object. + * + * Understands the following formats: + * - name: word; + * - name: [word, word]; + * - name: "string"; + * - name: 'string'; + * + * For example: + * name1: value; name2: [value, value]; name3: 'value' + * + * @param {String} str Input string. + * @return {Object} Returns deserialized object. + */ + parseParams: function(str) + { + var match, + result = {}, + arrayRegex = new XRegExp("^\\[(?(.*?))\\]$"), + regex = new XRegExp( + "(?[\\w-]+)" + + "\\s*:\\s*" + + "(?" + + "[\\w-%#]+|" + // word + "\\[.*?\\]|" + // [] array + '".*?"|' + // "" string + "'.*?'" + // '' string + ")\\s*;?", + "g" + ) + ; + + while ((match = regex.exec(str)) != null) + { + var value = match.value + .replace(/^['"]|['"]$/g, '') // strip quotes from end of strings + ; + + // try to parse array value + if (value != null && arrayRegex.test(value)) + { + var m = arrayRegex.exec(value); + value = m.values.length > 0 ? m.values.split(/\s*,\s*/) : []; + } + + result[match.name] = value; + } + + return result; + }, + + /** + * Wraps each line of the string into tag with given style applied to it. + * + * @param {String} str Input string. + * @param {String} css Style name to apply to the string. + * @return {String} Returns input string with each line surrounded by tag. + */ + decorate: function(str, css) + { + if (str == null || str.length == 0 || str == '\n') + return str; + + str = str.replace(/... to them so that + // leading spaces aren't included. + if (css != null) + str = sh.utils.eachLine(str, function(line) + { + if (line.length == 0) + return ''; + + var spaces = ''; + + line = line.replace(/^( | )+/, function(s) + { + spaces = s; + return ''; + }); + + if (line.length == 0) + return spaces; + + return spaces + '' + line + ''; + }); + + return str; + }, + + /** + * Pads number with zeros until it's length is the same as given length. + * + * @param {Number} number Number to pad. + * @param {Number} length Max string length with. + * @return {String} Returns a string padded with proper amount of '0'. + */ + padNumber : function(number, length) + { + var result = number.toString(); + + while (result.length < length) + result = '0' + result; + + return result; + }, + + /** + * Measures width of a single space character. + * @return {Number} Returns width of a single space character. + */ + measureSpace : function() + { + var container = document.createElement('div'), + span, + result = 0, + body = document.body, + id = sh.utils.guid('measureSpace'), + + // variable names will be compressed, so it's better than a plain string + divOpen = '
    ' + + divOpen + 'lines">' + + divOpen + 'line">' + + divOpen + 'content' + + '"> ' + closeSpan + closeSpan + + closeDiv + + closeDiv + + closeDiv + + closeDiv + ; + + body.appendChild(container); + span = document.getElementById(id); + + if (/opera/i.test(navigator.userAgent)) + { + var style = window.getComputedStyle(span, null); + result = parseInt(style.getPropertyValue("width")); + } + else + { + result = span.offsetWidth; + } + + body.removeChild(container); + + return result; + }, + + /** + * Replaces tabs with spaces. + * + * @param {String} code Source code. + * @param {Number} tabSize Size of the tab. + * @return {String} Returns code with all tabs replaces by spaces. + */ + processTabs : function(code, tabSize) + { + var tab = ''; + + for (var i = 0; i < tabSize; i++) + tab += ' '; + + return code.replace(/\t/g, tab); + }, + + /** + * Replaces tabs with smart spaces. + * + * @param {String} code Code to fix the tabs in. + * @param {Number} tabSize Number of spaces in a column. + * @return {String} Returns code with all tabs replaces with roper amount of spaces. + */ + processSmartTabs : function(code, tabSize) + { + var lines = code.split('\n'), + tab = '\t', + spaces = '' + ; + + // Create a string with 1000 spaces to copy spaces from... + // It's assumed that there would be no indentation longer than that. + for (var i = 0; i < 50; i++) + spaces += ' '; // 20 spaces * 50 + + // This function inserts specified amount of spaces in the string + // where a tab is while removing that given tab. + function insertSpaces(line, pos, count) + { + return line.substr(0, pos) + + spaces.substr(0, count) + + line.substr(pos + 1, line.length) // pos + 1 will get rid of the tab + ; + }; + + // Go through all the lines and do the 'smart tabs' magic. + code = sh.utils.eachLine(code, function(line) + { + if (line.indexOf(tab) == -1) + return line; + + var pos = 0; + + while ((pos = line.indexOf(tab)) != -1) + { + // This is pretty much all there is to the 'smart tabs' logic. + // Based on the position within the line and size of a tab, + // calculate the amount of spaces we need to insert. + var spaces = tabSize - pos % tabSize; + line = insertSpaces(line, pos, spaces); + } + + return line; + }); + + return code; + }, + + /** + * Performs various string fixes based on configuration. + */ + fixInputString : function(str) + { + var br = /|<br\s*\/?>/gi; + + if (sh.config.bloggerMode == true) + str = str.replace(br, '\n'); + + if (sh.config.stripBrs == true) + str = str.replace(br, ''); + + return str; + }, + + /** + * Removes all white space at the begining and end of a string. + * + * @param {String} str String to trim. + * @return {String} Returns string without leading and following white space characters. + */ + trim: function(str) + { + return str.replace(/^\s+|\s+$/g, ''); + }, + + /** + * Unindents a block of text by the lowest common indent amount. + * @param {String} str Text to unindent. + * @return {String} Returns unindented text block. + */ + unindent: function(str) + { + var lines = sh.utils.fixInputString(str).split('\n'), + indents = new Array(), + regex = /^\s*/, + min = 1000 + ; + + // go through every line and check for common number of indents + for (var i = 0; i < lines.length && min > 0; i++) + { + var line = lines[i]; + + if (sh.utils.trim(line).length == 0) + continue; + + var matches = regex.exec(line); + + // In the event that just one line doesn't have leading white space + // we can't unindent anything, so bail completely. + if (matches == null) + return str; + + min = Math.min(matches[0].length, min); + } + + // trim minimum common number of white space from the begining of every line + if (min > 0) + for (var i = 0; i < lines.length; i++) + lines[i] = lines[i].substr(min); + + return lines.join('\n'); + }, + + /** + * Callback method for Array.sort() which sorts matches by + * index position and then by length. + * + * @param {Match} m1 Left object. + * @param {Match} m2 Right object. + * @return {Number} Returns -1, 0 or -1 as a comparison result. + */ + matchesSortCallback: function(m1, m2) + { + // sort matches by index first + if(m1.index < m2.index) + return -1; + else if(m1.index > m2.index) + return 1; + else + { + // if index is the same, sort by length + if(m1.length < m2.length) + return -1; + else if(m1.length > m2.length) + return 1; + } + + return 0; + }, + + /** + * Executes given regular expression on provided code and returns all + * matches that are found. + * + * @param {String} code Code to execute regular expression on. + * @param {Object} regex Regular expression item info from regexList collection. + * @return {Array} Returns a list of Match objects. + */ + getMatches: function(code, regexInfo) + { + function defaultAdd(match, regexInfo) + { + return [new sh.Match(match[0], match.index, regexInfo.css)]; + }; + + var index = 0, + match = null, + result = [], + func = regexInfo.func ? regexInfo.func : defaultAdd + ; + + while((match = regexInfo.regex.exec(code)) != null) + result = result.concat(func(match, regexInfo)); + + return result; + }, + + processUrls: function(code) + { + var lt = '<', + gt = '>' + ; + + return code.replace(sh.regexLib.url, function(m) + { + var suffix = '', prefix = ''; + + // We include < and > in the URL for the common cases like + // The problem is that they get transformed into <http://google.com> + // Where as > easily looks like part of the URL string. + + if (m.indexOf(lt) == 0) + { + prefix = lt; + m = m.substring(lt.length); + } + + if (m.indexOf(gt) == m.length - gt.length) + { + m = m.substring(0, m.length - gt.length); + suffix = gt; + } + + return prefix + '' + m + '' + suffix; + }); + }, + + /** + * Finds all + + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    themeroller plugin

    +

    Description

    +
    +

    The themeroller plugin adds support for jQuery UI's themes. Add the plugin as last in your plugins config option. Also make sure that you have included the jquery theme you'd like to use and you should NOT use the native jstree themes plugin.

    +

    If using the search plugin - bind to "search.jstree" to style the found nodes, or apply some styles to the .jstree-search class (which is added by default) but make sure the selector is stronger than your current theme or use !important

    +
    + +

    Configuration

    +
    +

    opened

    +

    A string. Default is "ui-icon-triangle-1-se".

    +

    The class name to use for open nodes (shows the arrow to close).

    + +

    closed

    +

    A string. Default is "ui-icon-triangle-1-e".

    +

    The class name to use for closed nodes (shows the arrow to open).

    + +

    item

    +

    A string. Default is "ui-state-default".

    +

    The class name to use for the actual items.

    + +

    item_h

    +

    A string. Default is "ui-state-hover".

    +

    The class name to use for the hovered item.

    + +

    item_a

    +

    A string. Default is "ui-state-active".

    +

    The class name to use for selected items (UI plugin).

    + +

    item_open

    +

    A string. Default is "ui-icon-folder-open".

    +

    The class name to use for the opened items. If set to false the icon is not shown.

    +

    item_clsd

    +

    A string. Default is "ui-icon-folder-collapsed".

    +

    The class name to use for the opened items. If set to false the icon is not shown.

    +

    item_leaf

    +

    A string. Default is "ui-icon-document".

    +

    The class name to use for the opened items. If set to false the icon is not shown.

    + + +
    + +

    Demos

    +
    + +

    Using the themeroller plugin

    +
    + +
    + + +
    + +

    API

    +
    + +

    ._themeroller ( obj )

    +

    Fixes the tree on various events by applying the configured classes - used internally only.

    + +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/themes.html b/webapps/test/_docs/themes.html new file mode 100644 index 0000000..a3318f4 --- /dev/null +++ b/webapps/test/_docs/themes.html @@ -0,0 +1,127 @@ + + + + + jsTree v.1.0 - themes documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    themes plugin

    +

    Description

    +
    +

    The themes plugin controls the looks of jstree - without this plugin you will get a functional tree, but it will look just like an ordinary UL list.

    +
    + +

    Configuration

    +
    +

    theme

    +

    A string. Default is "default".

    +

    The name of the theme to use to style the tree.

    + +

    url

    +

    A string (or false if not used). Default is false.

    +

    The location of the theme's CSS file, if set to false jstree will look for the file in < theme folder >/themes/< theme name >/style.css. You can set the theme folder using $.jstree._themes = "PATH/TO/FOLDER/";, otherwise it is autodetected as <jquery.tree.js location>/themes/.

    + +

    dots

    +

    A Boolean. Default is true.

    +

    Whether to show the connecting dots or not.

    + +

    icons

    +

    A Boolean. Default is true.

    +

    Whether to show the node icons or not.

    + +
    + +

    Demos

    +
    + +

    Using the themes plugin

    + + + + +
    + +
    + + +
    + +

    API

    +
    + +

    .set_theme ( name , url )

    +

    Set the tree's theme. Triggers an event.

    +
      +
    • + string name +

      The name of the theme to use to style the tree.

      +
    • +
    • + string url +

      The location of the theme's CSS file, if omitted jstree will look for the file in:
      < theme folder >/themes/< name >/style.css.
      You can set the theme folder using:
      $.jstree._themes = "PATH/TO/FOLDER/";, otherwise it is autodetected as <jquery.tree.js location>/themes/.

      +
    • +
    +

    .get_theme ( )

    +

    Returns the name of the currently active theme.

    + +
      
    +

    .show_dots ( ), .hide_dots ( ), .toggle_dots ( )

    +

    Show, hide or toggle the visibility of the dots connecting the tree's nodes.

    + +
      
    +

    .show_icons ( ), .hide_icons ( ), .toggle_icons ( )

    +

    Show, hide or toggle the visibility of the icons next to the title of each the tree node.

    + +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/types.html b/webapps/test/_docs/types.html new file mode 100644 index 0000000..620bba2 --- /dev/null +++ b/webapps/test/_docs/types.html @@ -0,0 +1,178 @@ + + + + + jsTree v.1.0 - types documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    types plugin

    +

    Description

    +
    +

    The types enables node types - each node can have a type, and you can define rules on how that type should behave - maximum children count, maximum depth, valid children types, selectable or not, etc.

    +
    + +

    Configuration

    +
    + +

    max_children

    +

    A number. Default is -1.

    +

    Defines maximum number of root nodes (-1 means unlimited, -2 means disable max_children checking in the tree).

    + +

    max_depth

    +

    A number. Default is -1.

    +

    Defines maximum depth of the tree (-1 means unlimited, -2 means disable max_depth checking in the tree).

    + +

    valid_children

    +

    A string or array. Default is "all".

    +

    Defines valid root node types (could be "all", "none", or an array of type strings).

    + +

    use_data

    +

    A boolean. Default is false.

    +

    If set to true jstree will check every node for $.metadata or $.data for rules (valid_children, max_depth & the function rules). Keep in mind jstree will look for this data in $("li-node-here").metadata().jstree.rule_name (or $.data respectively).

    + +

    type_attr

    +

    A string. Default is "rel".

    +

    Defines the attribute on each li node, where the type attribute will be stored. For correct usage in IE - do not assign to "type" - it triggers an IE bug.

    + +

    types

    +

    An object.

    +

    Defines all the active types in the tree. Each key is the type name, and each value represents the rules for this type. A default type is defined - all nodes with no explicit type set are treated as if they were of the default type.

    +
    +
    +types : {
    +	// the default type
    +	"default" : {
    +		"max_children"	: -1,
    +		"max_depth"		: -1,
    +		"valid_children": "all"
    +
    +		// Bound functions - you can bind any other function here (using boolean or function)
    +		//"select_node"	: true,
    +		//"open_node"	: true,
    +		//"close_node"	: true,
    +		//"create_node"	: true,
    +		//"delete_node"	: true
    +	}
    +}
    +
    +
    +

    For max_children, max_depth & valid_children use the same values as for the tree, but the value you set will only apply for that node type.

    +

    You can set an icon key - it should be an object consisting of two keys - image (string - location of the image to be used as an icon) & position (string - left and top pixels of the image - 10px 40px, only useful when using sprites - omit otherwise).

    +

    You can set more keys in that object - each key should be a function name, and each value - either a boolean (in order to allow or disallow that operation, on that node type) or a function. If you supply a function - your function will be called with two arguments - the name of the called function (the key) and the arguments passed to that function - you can then decide whether to return true or false.

    +

    For any type - for now you can control only functions that take the node being manipulated as the first argument.

    + +
    + +

    Demos

    +
    +

    Using the types plugin

    + +
    + +
    + + +
    + +

    API

    +
    + +

    ._get_type ( node )

    +

    Get the type of a node.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to the element.

      +
    • +
    + +

    .set_type ( type , node )

    +

    Set the type of a node. Triggers an event.

    +
      +
    • + string type +

      The new type.

      +
    • +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to the element.

      +
    • +
    + +

    ._check ( rule , node , opts )

    +

    Checks a rule on a give node. Used mostly internally.

    +
      +
    • + string rule +

      The rule to check.

      +
    • +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to the element.

      +
    • +
    • + mixed opts +

      Any additional options regarding the rule. Used internally.

      +
    • +
    + +
     
    +

    .create_node ( ), .check_move ( )

    +

    Both functions are overwritten to accomodate the new functionality presented by the plugin.

    + +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/ui.html b/webapps/test/_docs/ui.html new file mode 100644 index 0000000..4e7bc9a --- /dev/null +++ b/webapps/test/_docs/ui.html @@ -0,0 +1,197 @@ + + + + + jsTree v.1.0 - UI documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    ui plugin

    +

    Description

    +
    +

    The UI plugin handles selecting, deselecting and hovering tree items.

    +
    + +

    Configuration

    +
    +

    select_limit

    +

    A number. Default is -1.

    +

    Defines how many nodes can be selected at a given time (-1 means unlimited).

    + +

    select_multiple_modifier

    +

    A string. Default is "ctrl".

    +

    The special key used to make a click add to the selection and not replace it ("ctrl", "shift", "alt", "meta").
    You can also set this to "on" making every click add to the selection.

    + +

    select_range_modifier

    +

    A string. Default is "shift".

    +

    The special key used to make a click expand a range from the last selected item ("ctrl", "shift", "alt", "meta").
    Note that the last clicked elemtn should be a sibling of the currently clicked element so that a range will be created (same as common file explorers).

    + +

    selected_parent_close

    +

    A string (or false). Default is "select_parent".

    +

    What action to take when a selected node's parent is closed (making the selected node invisible). Possible values are false - do nothing, "select_parent" - select the closed node's parent and "deselect" - deselect the node.

    + +

    selected_parent_open

    +

    A Boolean. Default is true.

    +

    When set to true when programatically selecting a node in the tree all of its closed parents are opened automatically.

    + +

    select_prev_on_delete

    +

    A boolean. Default is true.

    +

    If set to true when a selected node is deleted, its previous sibling (or parent) is selected.

    + +

    disable_selecting_children

    +

    A boolean. Default is false.

    +

    If set to true you will not be able to select children of already selected nodes.

    + +

    initially_select

    +

    An array. Default is [].

    +

    Defines which nodes are to be automatically selected when the tree finishes loading - a list of IDs is expected.

    + +
    + +

    Demos

    +
    + +

    Using the UI plugin

    +
    + +
    + + +
    + +

    API

    +
    + +

    ._get_node ( node , allow_multiple )

    +

    Overrides the function from the core module.
    if node is undefined or null and allow_multiple is true all the currently selected nodes are returned
    if node is undefined or null and allow_multiple is NOT true only the last selected node is returned.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree.

      +
    • +
    • + boolean allow_multiple +

      Whether to return all selected nodes or only the last selected one if node is null.

      +
    • +
    + +

    .save_selected ( )

    +

    Saves away the current selection state of the tree (saves it in a variable, so do not expect a restore after a refresh - for that functionality refer to the cookies plugin. Used mostly internally. Triggers an event.

    + +

    .reselect ( )

    +

    Restores the state of the tree using the variable saved in the above function. Used mostly internally. Triggers an event.

    + +

    .refresh ( node )

    +

    Overrides the function form the core module.
    Enables saving the selection state before the refresh and restoring it afterwards.

    + +

    .hover_node ( node )

    +

    Sets the specified node as hovered. Triggers an event.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree.

      +
    • +
    + +

    .dehover_node ( )

    +

    Removes the hover state from the currently hovered node (if there is one). Triggers an event.

    + + +

    .select_node ( node , check , event )

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree.

      +
    • +
    • + bool check +

      Whether to check the specified rules and do appropriate actions (check select_limit, deselect other nodes respectively, etc) or to just force selection of the node regardless of select_limit.

      +
    • +
    • + event event +

      Used internally - when a click on a node caused this function to be executed.

      +
    • +
    + +
     
    +

    .deselect_node ( node ), .toggle_select ( node )

    +

    There functions control the selected state on a node. deselect_node triggers an event.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree.

      +
    • +
    + +

    .deselect_all ( context )

    +

    Deselects all selected nodes. If context is set - only the selected nodes within that context are deselected. Triggers an event.

    +
      +
    • + mixed context +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree.

      +
    • +
    + +

    .get_selected ( context )

    +

    Returns all selected nodes. If context is set - only the selected nodes within that context are returned.

    +
      +
    • + mixed context +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree.

      +
    • +
    + +

    .is_selected ( node )

    +

    Returns whether the specified node is selected or not.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element within the tree.

      +
    • +
    + +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/unique.html b/webapps/test/_docs/unique.html new file mode 100644 index 0000000..ae4e5da --- /dev/null +++ b/webapps/test/_docs/unique.html @@ -0,0 +1,85 @@ + + + + + jsTree v.1.0 - unique documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    unique plugin

    +

    Description

    +
    +

    The unique plugin prevents from nodes with same titles coexisting (create/move/rename) in the same parent.

    +
    + +

    Configuration

    +
    + +

    error_callback

    +

    A function. Default is $.noop.

    +

    Whenever the plugin stops an action (because it violates the unique policy) this function will bre triggered in current tree's scope, receiving the name, siblings and function name that caused the conflict.

    + +
    + +

    Demos

    +
    +

    Try moving the child nodes together (drag'n'drop).

    + +

    Using the unique plugin

    +
    + +
    + + +
    + +

    API

    +
    + + +

    Used internally - checks the names array against the sibling nodes for matches.

    +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_docs/xml_data.html b/webapps/test/_docs/xml_data.html new file mode 100644 index 0000000..eecc708 --- /dev/null +++ b/webapps/test/_docs/xml_data.html @@ -0,0 +1,218 @@ + + + + + jsTree v.1.0 - xml_data documentation + + + + + + + + + + +
    + +

    jsTree v.1.0

    +

    xml_data plugin

    +

    Description

    +
    +

    The xml_data plugin enables jsTree to convert XML objects to interactive trees (using XSL). The data (XML) can be set up in the config (as a string) or retrieved from a server (also ondemand).

    +

    Two types of XML structures are supported - flat and nested:

    +
    +
    +<!-- FLAT -->
    +<root>
    +	<item id="root_1" parent_id="0" state="closed">
    +		<content>
    +			<name><![CDATA[Node 1]]></name>
    +		</content>
    +	</item>
    +	<item id="node_2" parent_id="root_1">
    +		<content>
    +			<name><![CDATA[Node 2]]></name>
    +		</content>
    +	</item>
    +</root>
    +
    +<!-- NESTED -->
    +<root>
    +	<item id="xml_1">
    +		<content><name><![CDATA[Root node 1]]></name></content>
    +		<item id="xml_2">
    +			<content><name><![CDATA[Child node 1]]></name></content>
    +		</item>
    +	</item>
    +</root>
    +
    +
    +

    Aside from nesting the only difference is the parent_id attribute used in xml_flat.

    +

    parent_id defines the parent of the node in XML flat, use 0 for root nodes. Also when using async - use 0 for the first level.

    +

    state defines the state of the node (open or closed). You can omit it too - jstree will handle the data automatically - nodes with no children will be leaf nodes, nodes with children will be closed.

    +

    All attributes you set on the item node will be transfered to the resulting li node. All attributes you set on the name node will be transfered to the resulting a node.

    +

    If you are using the languages plugin you can have multiple name nodes in a every item node, just set a language attribute on each one (<name language="en" ...).

    +

    Remember to always set the XML header on your XML files.

    +
    + +

    Configuration

    +
    +

    data

    +

    A XML string (or false if not used). Default is false.

    +

    Specifies the content to load into the container and convert to a tree.

    +

    ajax

    +

    An object (or false if not used). Default is false.

    +

    The ajax config object is pretty much the same as the jQuery ajax settings object.

    +

    You can set the data option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the node about to be open as a parameter (or -1 for initial load). Whatever you return in the function will be sent to the server as data (so for example you can send the node's ID).

    +

    You can set the url option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the node about to be open as a paramater (or -1 for initial load). Whatever you return in the url function will be used as the ajax URL (so that you can accomodate pretty paths such as /get_children/node_2).

    +

    The error and success functions (if present) also fire in the context of the tree, and if you return a value in the success function it will be used to populate the tree - this can be useful if you want to somehow change what the server returned on the client side before it is displayed in the tree. Please note that the success function receives a string as the first parameter, and also if you decide to return a value - return a string.

    +

    correct_state

    +

    A Boolean. Default is true.

    +

    If this option is set to true if an AJAX returns an empty result, the node that was about to be opened will be converted to a leaf node (the open icon will no longer be displayed).

    +

    clean_node

    +

    A Boolean. Default is false.

    +

    Set to true if node needs to be cleaned - usually you should leave this to false.

    +

    xsl

    +

    A string. Default is "flat".

    +

    The type of structure you wiil be using - set either to "flat" or "nest".

    +

    get_skip_empty

    +

    A Boolean. Default is false.

    +

    If set to true empty attributes won't be returned by the get_xml function.

    + +

    NOTE:
    If both data and ajax are set the initial tree is rendered from the data string. When opening a closed node (that has no loaded children) an AJAX request is made.

    +
    + +

    Demos

    +
    + +

    Using the data config option (flat)

    +
    + + +

    Using the ajax config option (nested)

    +
    + + +

    Using both the data & ajax config options (flat)

    +
    + +
    + +

    API

    +
    +

    Both dummy functions - _is_loaded and load_node are overwritten.

    +

    .load_node_xml ( node , success_callback , error_callback )

    +

    This function is called instead of load_node.

    +
      +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element you want loaded. Use -1 for root nodes.

      +
    • +
    • + function success_callback +

      A function to be executed once the node is loaded successfully - used internally. You should wait for the load_node event.

      +
    • +
    • + function error_callback +

      A function to be executed if the node is not loaded due to an error - used internally. You should wait for the load_node event.

      +
    • +
    +

    .parse_xml ( data )

    +

    This function converts XML strings or objects to the DOM structure required by jstree. Returns a jQuery object.

    +
      +
    • + mixed data +

      The XML string/object.

      +
    • +
    +

    .get_xml ( type , node , li_attr , a_attr , is_callback )

    +

    This function returns an array of tree nodes converted back to XML.

    +
      +
    • + string type +

      Either "flat" or "nest". Default is "flat".

      +
    • +
    • + mixed node +

      This can be a DOM node, jQuery node or selector pointing to an element you want returned. Use -1 or omit to get the whole tree.

      +
    • +
    • + array li_attr +

      The attributes to collect from the LI node. Defaults to [ "id" , "class" ]

      +
    • +
    • + array a_attr +

      The attributes to collect from the A node. Defaults to [ ]

      +
    • +
    • + string is_callback +

      Used internally.

      +
    • +
    + +
    + +
    + + \ No newline at end of file diff --git a/webapps/test/_lib/jquery.cookie.js b/webapps/test/_lib/jquery.cookie.js new file mode 100644 index 0000000..6df1fac --- /dev/null +++ b/webapps/test/_lib/jquery.cookie.js @@ -0,0 +1,96 @@ +/** + * Cookie plugin + * + * Copyright (c) 2006 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ + +/** + * Create a cookie with the given name and value and other optional parameters. + * + * @example $.cookie('the_cookie', 'the_value'); + * @desc Set the value of a cookie. + * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); + * @desc Create a cookie with all available options. + * @example $.cookie('the_cookie', 'the_value'); + * @desc Create a session cookie. + * @example $.cookie('the_cookie', null); + * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain + * used when the cookie was set. + * + * @param String name The name of the cookie. + * @param String value The value of the cookie. + * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. + * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. + * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. + * If set to null or omitted, the cookie will be a session cookie and will not be retained + * when the the browser exits. + * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). + * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). + * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will + * require a secure protocol (like HTTPS). + * @type undefined + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ + +/** + * Get the value of a cookie with the given name. + * + * @example $.cookie('the_cookie'); + * @desc Get the value of a cookie. + * + * @param String name The name of the cookie. + * @return The value of the cookie. + * @type String + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ +jQuery.cookie = function(name, value, options) { + if (typeof value != 'undefined') { // name and value given, set cookie + options = options || {}; + if (value === null) { + value = ''; + options.expires = -1; + } + var expires = ''; + if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { + var date; + if (typeof options.expires == 'number') { + date = new Date(); + date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); + } else { + date = options.expires; + } + expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE + } + // CAUTION: Needed to parenthesize options.path and options.domain + // in the following expressions, otherwise they evaluate to undefined + // in the packed version for some reason... + var path = options.path ? '; path=' + (options.path) : ''; + var domain = options.domain ? '; domain=' + (options.domain) : ''; + var secure = options.secure ? '; secure' : ''; + document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); + } else { // only name given, get cookie + var cookieValue = null; + if (document.cookie && document.cookie != '') { + var cookies = document.cookie.split(';'); + for (var i = 0; i < cookies.length; i++) { + var cookie = jQuery.trim(cookies[i]); + // Does this cookie string begin with the name we want? + if (cookie.substring(0, name.length + 1) == (name + '=')) { + cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); + break; + } + } + } + return cookieValue; + } +}; \ No newline at end of file diff --git a/webapps/test/_lib/jquery.hotkeys.js b/webapps/test/_lib/jquery.hotkeys.js new file mode 100644 index 0000000..fbd71c7 --- /dev/null +++ b/webapps/test/_lib/jquery.hotkeys.js @@ -0,0 +1,99 @@ +/* + * jQuery Hotkeys Plugin + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * + * Based upon the plugin by Tzury Bar Yochay: + * http://github.com/tzuryby/hotkeys + * + * Original idea by: + * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/ +*/ + +(function(jQuery){ + + jQuery.hotkeys = { + version: "0.8", + + specialKeys: { + 8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause", + 20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home", + 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del", + 96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7", + 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/", + 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8", + 120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 191: "/", 224: "meta" + }, + + shiftNums: { + "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&", + "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<", + ".": ">", "/": "?", "\\": "|" + } + }; + + function keyHandler( handleObj ) { + // Only care when a possible input has been specified + if ( typeof handleObj.data !== "string" ) { + return; + } + + var origHandler = handleObj.handler, + keys = handleObj.data.toLowerCase().split(" "); + + handleObj.handler = function( event ) { + // Don't fire in text-accepting inputs that we didn't directly bind to + if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) || + event.target.type === "text") ) { + return; + } + + // Keypress represents characters, not special keys + var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[ event.which ], + character = String.fromCharCode( event.which ).toLowerCase(), + key, modif = "", possible = {}; + + // check combinations (alt|ctrl|shift+anything) + if ( event.altKey && special !== "alt" ) { + modif += "alt+"; + } + + if ( event.ctrlKey && special !== "ctrl" ) { + modif += "ctrl+"; + } + + // TODO: Need to make sure this works consistently across platforms + if ( event.metaKey && !event.ctrlKey && special !== "meta" ) { + modif += "meta+"; + } + + if ( event.shiftKey && special !== "shift" ) { + modif += "shift+"; + } + + if ( special ) { + possible[ modif + special ] = true; + + } else { + possible[ modif + character ] = true; + possible[ modif + jQuery.hotkeys.shiftNums[ character ] ] = true; + + // "$" can be triggered as "Shift+4" or "Shift+$" or just "$" + if ( modif === "shift+" ) { + possible[ jQuery.hotkeys.shiftNums[ character ] ] = true; + } + } + + for ( var i = 0, l = keys.length; i < l; i++ ) { + if ( possible[ keys[i] ] ) { + return origHandler.apply( this, arguments ); + } + } + }; + } + + jQuery.each([ "keydown", "keyup", "keypress" ], function() { + jQuery.event.special[ this ] = { add: keyHandler }; + }); + +})( jQuery ); \ No newline at end of file diff --git a/webapps/test/_lib/jquery.js b/webapps/test/_lib/jquery.js new file mode 100644 index 0000000..eb6a596 --- /dev/null +++ b/webapps/test/_lib/jquery.js @@ -0,0 +1,18 @@ +/*! + * jQuery JavaScript Library v1.6.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu May 12 15:04:36 2011 -0400 + */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!cj[a]){var b=f("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),c.body.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write("");b=cl.createElement(a),cl.body.appendChild(b),d=f.css(b,"display"),c.body.removeChild(ck)}cj[a]=d}return cj[a]}function cu(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function ct(){cq=b}function cs(){setTimeout(ct,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g=0===c})}function W(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function O(a,b){return(a&&a!=="*"?a+".":"")+b.replace(A,"`").replace(B,"&")}function N(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function L(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function F(){return!0}function E(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function H(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(H,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=d.userAgent,x,y,z,A=Object.prototype.toString,B=Object.prototype.hasOwnProperty,C=Array.prototype.push,D=Array.prototype.slice,E=String.prototype.trim,F=Array.prototype.indexOf,G={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.1",length:0,size:function(){return this.length},toArray:function(){return D.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?C.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(D.apply(this,arguments),"slice",D.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:C,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;y.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!y){y=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",z,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",z),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&H()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):G[A.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!B.call(a,"constructor")&&!B.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||B.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
    a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};f=c.createElement("select"),g=f.appendChild(c.createElement("option")),h=a.getElementsByTagName("input")[0],j={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},h.checked=!0,j.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,j.optDisabled=!g.disabled;try{delete a.test}catch(s){j.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function b(){j.noCloneEvent=!1,a.detachEvent("onclick",b)}),a.cloneNode(!0).fireEvent("onclick")),h=c.createElement("input"),h.value="t",h.setAttribute("type","radio"),j.radioValue=h.value==="t",h.setAttribute("checked","checked"),a.appendChild(h),k=c.createDocumentFragment(),k.appendChild(a.firstChild),j.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",l=c.createElement("body"),m={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};for(q in m)l.style[q]=m[q];l.appendChild(a),b.insertBefore(l,b.firstChild),j.appendChecked=h.checked,j.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,j.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
    ",j.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
    t
    ",n=a.getElementsByTagName("td"),r=n[0].offsetHeight===0,n[0].style.display="",n[1].style.display="none",j.reliableHiddenOffsets=r&&n[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(i=c.createElement("div"),i.style.width="0",i.style.marginRight="0",a.appendChild(i),j.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(i,null)||{marginRight:0}).marginRight,10)||0)===0),l.innerHTML="",b.removeChild(l);if(a.attachEvent)for(q in{submit:1,change:1,focusin:1})p="on"+q,r=p in a,r||(a.setAttribute(p,"return;"),r=typeof a[p]=="function"),j[q+"Bubbles"]=r;return j}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;return(e.value||"").replace(p,"")}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);c=j&&f.attrFix[c]||c,i=f.attrHooks[c],i||(!t.test(c)||typeof d!="boolean"&&d!==b&&d.toLowerCase()!==c.toLowerCase()?v&&(f.nodeName(a,"form")||u.test(c))&&(i=v):i=w);if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j)return i.get(a,c);h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);c=i&&f.propFix[c]||c,h=f.propHooks[c];return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return a[f.propFix[c]||c]?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=b),a.setAttribute(c,c.toLowerCase()));return c}},f.attrHooks.value={get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return a.value},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=Object.prototype.hasOwnProperty,y=/\.(.*)$/,z=/^(?:textarea|input|select)$/i,A=/\./g,B=/ /g,C=/[^\w\s.|`]/g,D=function(a){return a.replace(C,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=E;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=E);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),D).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem +)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},K=function(c){var d=c.target,e,g;if(!!z.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=J(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:K,beforedeactivate:K,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&K.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&K.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",J(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in I)f.event.add(this,c+".specialChange",I[c]);return z.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return z.test(this.nodeName)}},I=f.event.special.change.filters,I.focus=I.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
    ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=U.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(W(c[0])||W(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=T.call(arguments);P.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!V[a]?f.unique(e):e,(this.length>1||R.test(d))&&Q.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y=/ jQuery\d+="(?:\d+|null)"/g,Z=/^\s+/,$=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,_=/<([\w:]+)/,ba=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
    ","
    "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Y,""):null;if(typeof a=="string"&&!bc.test(a)&&(f.support.leadingWhitespace||!Z.test(a))&&!bg[(_.exec(a)||["",""])[1].toLowerCase()]){a=a.replace($,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bj(a,d),e=bk(a),g=bk(d);for(h=0;e[h];++h)bj(e[h],g[h])}if(b){bi(a,d);if(c){e=bk(a),g=bk(d);for(h=0;e[h];++h)bi(e[h],g[h])}}return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument|| +b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bb.test(k))k=b.createTextNode(k);else{k=k.replace($,"<$1>");var l=(_.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=ba.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Z.test(k)&&o.insertBefore(b.createTextNode(Z.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bp.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bo.test(g)?g.replace(bo,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,c){var d,e,g;c=c.replace(br,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bs.test(d)&&bt.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bE=/%20/g,bF=/\[\]$/,bG=/\r?\n/g,bH=/#.*$/,bI=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bJ=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bK=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bL=/^(?:GET|HEAD)$/,bM=/^\/\//,bN=/\?/,bO=/)<[^<]*)*<\/script>/gi,bP=/^(?:select|textarea)/i,bQ=/\s+/,bR=/([?&])_=[^&]*/,bS=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bT=f.fn.load,bU={},bV={},bW,bX;try{bW=e.href}catch(bY){bW=c.createElement("a"),bW.href="",bW=bW.href}bX=bS.exec(bW.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bT)return bT.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
    ").append(c.replace(bO,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bP.test(this.nodeName)||bJ.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bG,"\r\n")}}):{name:b.name,value:c.replace(bG,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bW,isLocal:bK.test(bX[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bZ(bU),ajaxTransport:bZ(bV),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?ca(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=cb(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bI.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bH,"").replace(bM,bX[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bQ),d.crossDomain==null&&(r=bS.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bX[1]&&r[2]==bX[2]&&(r[3]||(r[1]==="http:"?80:443))==(bX[3]||(bX[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bU,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bL.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bN.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bR,"$1_="+x);d.url=y+(y===d.url?(bN.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bV,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bE,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq,cr=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
    ";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){return this[0]?parseFloat(f.css(this[0],d,"padding")):null},f.fn["outer"+c]=function(a){return this[0]?parseFloat(f.css(this[0],d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file diff --git a/webapps/test/ajax-loader1.gif b/webapps/test/ajax-loader1.gif new file mode 100644 index 0000000..c97ec6e Binary files /dev/null and b/webapps/test/ajax-loader1.gif differ diff --git a/webapps/test/ajax-loader2.gif b/webapps/test/ajax-loader2.gif new file mode 100644 index 0000000..c101053 Binary files /dev/null and b/webapps/test/ajax-loader2.gif differ diff --git a/webapps/test/jquery-1.6.4.js b/webapps/test/jquery-1.6.4.js new file mode 100644 index 0000000..11e6d06 --- /dev/null +++ b/webapps/test/jquery-1.6.4.js @@ -0,0 +1,9046 @@ +/*! + * jQuery JavaScript Library v1.6.4 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Sep 12 18:54:48 2011 -0400 + */ +(function( window, undefined ) { + +// Use the correct document accordingly with window argument (sandbox) +var document = window.document, + navigator = window.navigator, + location = window.location; +var jQuery = (function() { + +// Define a local copy of jQuery +var jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // A central reference to the root jQuery(document) + rootjQuery, + + // A simple way to check for HTML strings or ID strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, + + // Check if a string has a non-whitespace character in it + rnotwhite = /\S/, + + // Used for trimming whitespace + trimLeft = /^\s+/, + trimRight = /\s+$/, + + // Check for digits + rdigit = /\d/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, + rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + + // Useragent RegExp + rwebkit = /(webkit)[ \/]([\w.]+)/, + ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, + rmsie = /(msie) ([\w.]+)/, + rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, + + // Matches dashed string for camelizing + rdashAlpha = /-([a-z]|[0-9])/ig, + rmsPrefix = /^-ms-/, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return ( letter + "" ).toUpperCase(); + }, + + // Keep a UserAgent string for use with jQuery.browser + userAgent = navigator.userAgent, + + // For matching the engine and version of the browser + browserMatch, + + // The deferred used on DOM ready + readyList, + + // The ready event handler + DOMContentLoaded, + + // Save a reference to some core methods + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty, + push = Array.prototype.push, + slice = Array.prototype.slice, + trim = String.prototype.trim, + indexOf = Array.prototype.indexOf, + + // [[Class]] -> type pairs + class2type = {}; + +jQuery.fn = jQuery.prototype = { + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem, ret, doc; + + // Handle $(""), $(null), or $(undefined) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + // The body element only exists once, optimize finding it + if ( selector === "body" && !context && document.body ) { + this.context = document; + this[0] = document.body; + this.selector = selector; + this.length = 1; + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + 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 = quickExpr.exec( selector ); + } + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + doc = (context ? context.ownerDocument || context : document); + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + ret = rsingleTag.exec( selector ); + + if ( ret ) { + if ( jQuery.isPlainObject( context ) ) { + selector = [ document.createElement( ret[1] ) ]; + jQuery.fn.attr.call( selector, context, true ); + + } else { + selector = [ doc.createElement( ret[1] ) ]; + } + + } else { + ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); + selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes; + } + + return jQuery.merge( this, selector ); + + // 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: $(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 current version of jQuery being used + jquery: "1.6.4", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return slice.call( this, 0 ); + }, + + // 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, name, selector ) { + // Build a new jQuery matched element set + var ret = this.constructor(); + + if ( jQuery.isArray( elems ) ) { + push.apply( ret, elems ); + + } else { + jQuery.merge( ret, elems ); + } + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + (this.selector ? " " : "") + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // 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 ) { + // Attach the listeners + jQuery.bindReady(); + + // Add the callback + readyList.done( fn ); + + return this; + }, + + eq: function( i ) { + return i === -1 ? + this.slice( i ) : + this.slice( i, +i + 1 ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ), + "slice", slice.call(arguments).join(",") ); + }, + + 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: 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 options, name, src, copy, copyIsArray, 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({ + 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 ) { + // Either a released hold or an DOMready/load event and not yet ready + if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 1 ); + } + + // 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" ).unbind( "ready" ); + } + } + }, + + bindReady: function() { + if ( readyList ) { + return; + } + + readyList = jQuery._Deferred(); + + // Catch cases where $(document).ready() is called after the + // browser event has already occurred. + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + return setTimeout( jQuery.ready, 1 ); + } + + // Mozilla, Opera and webkit nightlies currently support this event + if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else if ( document.attachEvent ) { + // ensure firing before onload, + // maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", DOMContentLoaded ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var toplevel = false; + + try { + toplevel = window.frameElement == null; + } catch(e) {} + + if ( document.documentElement.doScroll && toplevel ) { + doScrollCheck(); + } + } + }, + + // 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"; + }, + + // A crude way of determining if an object is a window + isWindow: function( obj ) { + return obj && typeof obj === "object" && "setInterval" in obj; + }, + + isNaN: function( obj ) { + return obj == null || !rdigit.test( obj ) || isNaN( obj ); + }, + + type: function( obj ) { + return obj == null ? + String( obj ) : + class2type[ toString.call(obj) ] || "object"; + }, + + isPlainObject: function( obj ) { + // 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; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + for ( var name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw msg; + }, + + parseJSON: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( 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; + 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 && rnotwhite.test( 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.toUpperCase() === name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, + length = object.length, + isObj = length === undefined || jQuery.isFunction( object ); + + if ( args ) { + if ( isObj ) { + for ( name in object ) { + if ( callback.apply( object[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( object[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in object ) { + if ( callback.call( object[ name ], name, object[ name ] ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { + break; + } + } + } + } + + return object; + }, + + // Use native String.trim function wherever possible + trim: trim ? + function( text ) { + return text == null ? + "" : + trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); + }, + + // results is for internal usage only + makeArray: function( array, results ) { + var ret = results || []; + + if ( array != null ) { + // The window, strings (and functions) also have 'length' + // The extra typeof function check is to prevent crashes + // in Safari 2 (See: #3039) + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 + var type = jQuery.type( array ); + + if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { + push.call( ret, array ); + } else { + jQuery.merge( ret, array ); + } + } + + return ret; + }, + + inArray: function( elem, array ) { + if ( !array ) { + return -1; + } + + if ( indexOf ) { + return indexOf.call( array, elem ); + } + + for ( var i = 0, length = array.length; i < length; i++ ) { + if ( array[ i ] === elem ) { + return i; + } + } + + return -1; + }, + + merge: function( first, second ) { + var i = first.length, + j = 0; + + if ( typeof second.length === "number" ) { + for ( var l = second.length; 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 ret = [], retVal; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, length = elems.length; 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, key, ret = [], + i = 0, + length = elems.length, + // jquery objects are treated as arrays + isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; + + // 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 ( key in elems ) { + value = callback( elems[ key ], key, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return ret.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 ) { + if ( typeof context === "string" ) { + var 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 + var args = slice.call( arguments, 2 ), + proxy = function() { + return fn.apply( context, 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 || proxy.guid || jQuery.guid++; + + return proxy; + }, + + // Mutifunctional method to get and set values to a collection + // The value/s can optionally be executed if it's a function + access: function( elems, key, value, exec, fn, pass ) { + var length = elems.length; + + // Setting many attributes + if ( typeof key === "object" ) { + for ( var k in key ) { + jQuery.access( elems, k, key[k], exec, fn, value ); + } + return elems; + } + + // Setting one attribute + if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = !pass && exec && jQuery.isFunction(value); + + for ( var i = 0; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + + return elems; + } + + // Getting an attribute + return length ? fn( elems[0], key ) : undefined; + }, + + now: function() { + return (new Date()).getTime(); + }, + + // Use of jQuery.browser is frowned upon. + // More details: http://docs.jquery.com/Utilities/jQuery.browser + uaMatch: function( ua ) { + ua = ua.toLowerCase(); + + var match = rwebkit.exec( ua ) || + ropera.exec( ua ) || + rmsie.exec( ua ) || + ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || + []; + + return { browser: match[1] || "", version: match[2] || "0" }; + }, + + sub: function() { + function jQuerySub( selector, context ) { + return new jQuerySub.fn.init( selector, context ); + } + jQuery.extend( true, jQuerySub, this ); + jQuerySub.superclass = this; + jQuerySub.fn = jQuerySub.prototype = this(); + jQuerySub.fn.constructor = jQuerySub; + jQuerySub.sub = this.sub; + jQuerySub.fn.init = function init( selector, context ) { + if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { + context = jQuerySub( context ); + } + + return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); + }; + jQuerySub.fn.init.prototype = jQuerySub.fn; + var rootjQuerySub = jQuerySub(document); + return jQuerySub; + }, + + browser: {} +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +browserMatch = jQuery.uaMatch( userAgent ); +if ( browserMatch.browser ) { + jQuery.browser[ browserMatch.browser ] = true; + jQuery.browser.version = browserMatch.version; +} + +// Deprecated, use jQuery.browser.webkit instead +if ( jQuery.browser.webkit ) { + jQuery.browser.safari = true; +} + +// IE doesn't match non-breaking spaces with \s +if ( rnotwhite.test( "\xA0" ) ) { + trimLeft = /^[\s\xA0]+/; + trimRight = /[\s\xA0]+$/; +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); + +// Cleanup functions for the document ready method +if ( document.addEventListener ) { + DOMContentLoaded = function() { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + }; + +} else if ( document.attachEvent ) { + DOMContentLoaded = function() { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( document.readyState === "complete" ) { + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }; +} + +// The DOM ready check for Internet Explorer +function doScrollCheck() { + if ( jQuery.isReady ) { + return; + } + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch(e) { + setTimeout( doScrollCheck, 1 ); + return; + } + + // and execute any waiting functions + jQuery.ready(); +} + +return jQuery; + +})(); + + +var // Promise methods + promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ), + // Static reference to slice + sliceDeferred = [].slice; + +jQuery.extend({ + // Create a simple deferred (one callbacks list) + _Deferred: function() { + var // callbacks list + callbacks = [], + // stored [ context , args ] + fired, + // to avoid firing when already doing so + firing, + // flag to know if the deferred has been cancelled + cancelled, + // the deferred itself + deferred = { + + // done( f1, f2, ...) + done: function() { + if ( !cancelled ) { + var args = arguments, + i, + length, + elem, + type, + _fired; + if ( fired ) { + _fired = fired; + fired = 0; + } + for ( i = 0, length = args.length; i < length; i++ ) { + elem = args[ i ]; + type = jQuery.type( elem ); + if ( type === "array" ) { + deferred.done.apply( deferred, elem ); + } else if ( type === "function" ) { + callbacks.push( elem ); + } + } + if ( _fired ) { + deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] ); + } + } + return this; + }, + + // resolve with given context and args + resolveWith: function( context, args ) { + if ( !cancelled && !fired && !firing ) { + // make sure args are available (#8421) + args = args || []; + firing = 1; + try { + while( callbacks[ 0 ] ) { + callbacks.shift().apply( context, args ); + } + } + finally { + fired = [ context, args ]; + firing = 0; + } + } + return this; + }, + + // resolve with this as context and given arguments + resolve: function() { + deferred.resolveWith( this, arguments ); + return this; + }, + + // Has this deferred been resolved? + isResolved: function() { + return !!( firing || fired ); + }, + + // Cancel + cancel: function() { + cancelled = 1; + callbacks = []; + return this; + } + }; + + return deferred; + }, + + // Full fledged deferred (two callbacks list) + Deferred: function( func ) { + var deferred = jQuery._Deferred(), + failDeferred = jQuery._Deferred(), + promise; + // Add errorDeferred methods, then and promise + jQuery.extend( deferred, { + then: function( doneCallbacks, failCallbacks ) { + deferred.done( doneCallbacks ).fail( failCallbacks ); + return this; + }, + always: function() { + return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments ); + }, + fail: failDeferred.done, + rejectWith: failDeferred.resolveWith, + reject: failDeferred.resolve, + isRejected: failDeferred.isResolved, + pipe: function( fnDone, fnFail ) { + return jQuery.Deferred(function( newDefer ) { + jQuery.each( { + done: [ fnDone, "resolve" ], + fail: [ fnFail, "reject" ] + }, function( handler, data ) { + var fn = data[ 0 ], + action = data[ 1 ], + returned; + if ( jQuery.isFunction( fn ) ) { + deferred[ handler ](function() { + returned = fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise().then( newDefer.resolve, newDefer.reject ); + } else { + newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); + } + }); + } else { + deferred[ handler ]( newDefer[ action ] ); + } + }); + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + if ( obj == null ) { + if ( promise ) { + return promise; + } + promise = obj = {}; + } + var i = promiseMethods.length; + while( i-- ) { + obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ]; + } + return obj; + } + }); + // Make sure only one callback list will be used + deferred.done( failDeferred.cancel ).fail( deferred.cancel ); + // Unexpose cancel + delete deferred.cancel; + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + return deferred; + }, + + // Deferred helper + when: function( firstParam ) { + var args = arguments, + i = 0, + length = args.length, + count = length, + deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? + firstParam : + jQuery.Deferred(); + function resolveFunc( i ) { + return function( value ) { + args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; + if ( !( --count ) ) { + // Strange bug in FF4: + // Values changed onto the arguments object sometimes end up as undefined values + // outside the $.when method. Cloning the object into a fresh array solves the issue + deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) ); + } + }; + } + if ( length > 1 ) { + for( ; i < length; i++ ) { + if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) { + args[ i ].promise().then( resolveFunc(i), deferred.reject ); + } else { + --count; + } + } + if ( !count ) { + deferred.resolveWith( deferred, args ); + } + } else if ( deferred !== firstParam ) { + deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); + } + return deferred.promise(); + } +}); + + + +jQuery.support = (function() { + + var div = document.createElement( "div" ), + documentElement = document.documentElement, + all, + a, + select, + opt, + input, + marginDiv, + support, + fragment, + body, + testElementParent, + testElement, + testElementStyle, + tds, + events, + eventName, + i, + isSupported; + + // Preliminary tests + div.setAttribute("className", "t"); + div.innerHTML = "
    a"; + + + all = div.getElementsByTagName( "*" ); + a = div.getElementsByTagName( "a" )[ 0 ]; + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return {}; + } + + // First batch of supports tests + select = document.createElement( "select" ); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName( "input" )[ 0 ]; + + support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: ( div.firstChild.nodeType === 3 ), + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName( "tbody" ).length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName( "link" ).length, + + // Get the style information from getAttribute + // (IE uses .cssText instead) + style: /top/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + 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 + opacity: /^0.55$/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: ( input.value === "on" ), + + // 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) + optSelected: opt.selected, + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + getSetAttribute: div.className !== "t", + + // Will be defined later + submitBubbles: true, + changeBubbles: true, + focusinBubbles: false, + deleteExpando: true, + noCloneEvent: true, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableMarginRight: 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; + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { + div.attachEvent( "onclick", function() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + support.noCloneEvent = false; + }); + div.cloneNode( true ).fireEvent( "onclick" ); + } + + // Check if a radio maintains it's value + // after being appended to the DOM + input = document.createElement("input"); + input.value = "t"; + input.setAttribute("type", "radio"); + support.radioValue = input.value === "t"; + + input.setAttribute("checked", "checked"); + div.appendChild( input ); + fragment = document.createDocumentFragment(); + fragment.appendChild( div.firstChild ); + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + div.innerHTML = ""; + + // Figure out if the W3C box model works as expected + div.style.width = div.style.paddingLeft = "1px"; + + body = document.getElementsByTagName( "body" )[ 0 ]; + // We use our own, invisible, body unless the body is already present + // in which case we use a div (#9239) + testElement = document.createElement( body ? "div" : "body" ); + testElementStyle = { + visibility: "hidden", + width: 0, + height: 0, + border: 0, + margin: 0, + background: "none" + }; + if ( body ) { + jQuery.extend( testElementStyle, { + position: "absolute", + left: "-1000px", + top: "-1000px" + }); + } + for ( i in testElementStyle ) { + testElement.style[ i ] = testElementStyle[ i ]; + } + testElement.appendChild( div ); + testElementParent = body || documentElement; + testElementParent.insertBefore( testElement, testElementParent.firstChild ); + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + support.boxModel = div.offsetWidth === 2; + + if ( "zoom" in div.style ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.style.display = "inline"; + div.style.zoom = 1; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 ); + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = ""; + div.innerHTML = "
    "; + support.shrinkWrapBlocks = ( div.offsetWidth !== 2 ); + } + + div.innerHTML = "
    t
    "; + tds = div.getElementsByTagName( "td" ); + + // 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). + // (only IE 8 fails this test) + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE < 8 fail this test) + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + div.innerHTML = ""; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. For more + // info see bug #3333 + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + if ( document.defaultView && document.defaultView.getComputedStyle ) { + marginDiv = document.createElement( "div" ); + marginDiv.style.width = "0"; + marginDiv.style.marginRight = "0"; + div.appendChild( marginDiv ); + support.reliableMarginRight = + ( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; + } + + // Remove the body element we added + testElement.innerHTML = ""; + testElementParent.removeChild( testElement ); + + // Technique from Juriy Zaytsev + // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ + // We only care about the case where non-standard event systems + // are used, namely in IE. Short-circuiting here helps us to + // avoid an eval call (in setAttribute) which can cause CSP + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP + if ( div.attachEvent ) { + for( i in { + submit: 1, + change: 1, + focusin: 1 + } ) { + eventName = "on" + i; + isSupported = ( eventName in div ); + if ( !isSupported ) { + div.setAttribute( eventName, "return;" ); + isSupported = ( typeof div[ eventName ] === "function" ); + } + support[ i + "Bubbles" ] = isSupported; + } + } + + // Null connected elements to avoid leaks in IE + testElement = fragment = select = opt = body = marginDiv = div = input = null; + + return support; +})(); + +// Keep track of boxModel +jQuery.boxModel = jQuery.support.boxModel; + + + + +var rbrace = /^(?:\{.*\}|\[.*\])$/, + rmultiDash = /([A-Z])/g; + +jQuery.extend({ + cache: {}, + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, ret, + internalKey = jQuery.expando, + getByName = typeof name === "string", + + // 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[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando; + + // 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 || (pvt && id && (cache[ id ] && !cache[ id ][ internalKey ]))) && getByName && data === undefined ) { + 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 ) { + elem[ jQuery.expando ] = id = ++jQuery.uuid; + } else { + id = jQuery.expando; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery + // metadata on plain JS objects when the object is serialized using + // JSON.stringify + if ( !isNode ) { + cache[ id ].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 ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name); + } else { + cache[ id ] = jQuery.extend(cache[ id ], name); + } + } + + thisCache = cache[ id ]; + + // Internal jQuery data is stored in a separate object inside the object's data + // cache in order to avoid key collisions between internal data and user-defined + // data + if ( pvt ) { + if ( !thisCache[ internalKey ] ) { + thisCache[ internalKey ] = {}; + } + + thisCache = thisCache[ internalKey ]; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should + // not attempt to inspect the internal events object using jQuery.data, as this + // internal data object is undocumented and subject to change. + if ( name === "events" && !thisCache[name] ) { + return thisCache[ internalKey ] && thisCache[ internalKey ].events; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( getByName ) { + + // 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; + }, + + removeData: function( elem, name, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, + + // Reference to internal data cache key + internalKey = jQuery.expando, + + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + + // See jQuery.data for more information + 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 ][ internalKey ] : cache[ id ]; + + if ( thisCache ) { + + // Support interoperable removal of hyphenated or camelcased keys + if ( !thisCache[ name ] ) { + name = jQuery.camelCase( name ); + } + + delete thisCache[ name ]; + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !isEmptyDataObject(thisCache) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( pvt ) { + delete cache[ id ][ internalKey ]; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject(cache[ id ]) ) { + return; + } + } + + var internalCache = cache[ id ][ internalKey ]; + + // Browsers that fail expando deletion also refuse to delete expandos on + // the window, but it will allow it on all other JS objects; other browsers + // don't care + // Ensure that `cache` is not a window object #10080 + if ( jQuery.support.deleteExpando || !cache.setInterval ) { + delete cache[ id ]; + } else { + cache[ id ] = null; + } + + // We destroyed the entire user cache at once because it's faster than + // iterating through each key, but we need to continue to persist internal + // data if it existed + if ( internalCache ) { + cache[ id ] = {}; + // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery + // metadata on plain JS objects when the object is serialized using + // JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + + cache[ id ][ internalKey ] = internalCache; + + // Otherwise, we need to eliminate the expando on the node to avoid + // false lookups in the cache for entries that no longer exist + } else if ( isNode ) { + // 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 ( jQuery.support.deleteExpando ) { + delete elem[ jQuery.expando ]; + } else if ( elem.removeAttribute ) { + elem.removeAttribute( jQuery.expando ); + } else { + elem[ jQuery.expando ] = null; + } + } + }, + + // For internal use only. + _data: function( elem, name, data ) { + return jQuery.data( elem, name, data, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + if ( elem.nodeName ) { + var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; + + if ( match ) { + return !(match === true || elem.getAttribute("classid") !== match); + } + } + + return true; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var data = null; + + if ( typeof key === "undefined" ) { + if ( this.length ) { + data = jQuery.data( this[0] ); + + if ( this[0].nodeType === 1 ) { + var attr = this[0].attributes, name; + for ( var i = 0, l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.substring(5) ); + + dataAttr( this[0], name, data[ name ] ); + } + } + } + } + + return data; + + } else if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + var parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + // Try to fetch any internally stored data first + if ( data === undefined && this.length ) { + data = jQuery.data( this[0], key ); + data = dataAttr( this[0], key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + + } else { + return this.each(function() { + var $this = jQuery( this ), + args = [ parts[0], value ]; + + $this.triggerHandler( "setData" + parts[1] + "!", args ); + jQuery.data( this, key, value ); + $this.triggerHandler( "changeData" + parts[1] + "!", args ); + }); + } + }, + + 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 : + !jQuery.isNaN( data ) ? parseFloat( 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; +} + +// TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON +// property to be considered empty objects; this property always exists in +// order to make sure JSON.stringify does not expose internal metadata +function isEmptyDataObject( obj ) { + for ( var name in obj ) { + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + + + + +function handleQueueMarkDefer( elem, type, src ) { + var deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + defer = jQuery.data( elem, deferDataKey, undefined, true ); + if ( defer && + ( src === "queue" || !jQuery.data( elem, queueDataKey, undefined, true ) ) && + ( src === "mark" || !jQuery.data( elem, markDataKey, undefined, true ) ) ) { + // Give room for hard-coded callbacks to fire first + // and eventually mark/queue something else on the element + setTimeout( function() { + if ( !jQuery.data( elem, queueDataKey, undefined, true ) && + !jQuery.data( elem, markDataKey, undefined, true ) ) { + jQuery.removeData( elem, deferDataKey, true ); + defer.resolve(); + } + }, 0 ); + } +} + +jQuery.extend({ + + _mark: function( elem, type ) { + if ( elem ) { + type = (type || "fx") + "mark"; + jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true ); + } + }, + + _unmark: function( force, elem, type ) { + if ( force !== true ) { + type = elem; + elem = force; + force = false; + } + if ( elem ) { + type = type || "fx"; + var key = type + "mark", + count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 ); + if ( count ) { + jQuery.data( elem, key, count, true ); + } else { + jQuery.removeData( elem, key, true ); + handleQueueMarkDefer( elem, type, "mark" ); + } + } + }, + + queue: function( elem, type, data ) { + if ( elem ) { + type = (type || "fx") + "queue"; + var q = jQuery.data( elem, type, undefined, true ); + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !q || jQuery.isArray(data) ) { + q = jQuery.data( elem, type, jQuery.makeArray(data), true ); + } else { + q.push( data ); + } + } + return q || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(), + defer; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift("inprogress"); + } + + fn.call(elem, function() { + jQuery.dequeue(elem, type); + }); + } + + if ( !queue.length ) { + jQuery.removeData( elem, type + "queue", true ); + handleQueueMarkDefer( elem, type, "queue" ); + } + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + } + + if ( data === undefined ) { + return jQuery.queue( this[0], type ); + } + return this.each(function() { + var queue = jQuery.queue( this, type, data ); + + 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() { + var elem = this; + setTimeout(function() { + jQuery.dequeue( elem, type ); + }, time ); + }); + }, + 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, object ) { + if ( typeof type !== "string" ) { + object = type; + type = undefined; + } + type = type || "fx"; + var defer = jQuery.Deferred(), + elements = this, + i = elements.length, + count = 1, + deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + tmp; + function resolve() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + } + while( i-- ) { + if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || + ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || + jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && + jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) { + count++; + tmp.done( resolve ); + } + } + resolve(); + return defer.promise(); + } +}); + + + + +var rclass = /[\n\t\r]/g, + rspace = /\s+/, + rreturn = /\r/g, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea)?$/i, + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + nodeHook, boolHook; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.attr ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.prop ); + }, + + 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 classNames, i, l, elem, + setClass, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call(this, j, this.className) ); + }); + } + + if ( value && typeof value === "string" ) { + classNames = value.split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className && classNames.length === 1 ) { + elem.className = value; + + } else { + setClass = " " + elem.className + " "; + + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { + setClass += classNames[ c ] + " "; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classNames, i, l, elem, className, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call(this, j, this.className) ); + }); + } + + if ( (value && typeof value === "string") || value === undefined ) { + classNames = (value || "").split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 && elem.className ) { + if ( value ) { + className = (" " + elem.className + " ").replace( rclass, " " ); + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + className = className.replace(" " + classNames[ c ] + " ", " "); + } + elem.className = jQuery.trim( className ); + + } else { + elem.className = ""; + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + 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 ), + state = stateVal, + classNames = value.split( rspace ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space seperated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " "; + for ( var i = 0, l = this.length; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var hooks, ret, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; + + 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 undefined; + } + + var isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var self = jQuery(this), val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, self.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.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ]; + + // 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 ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, + index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (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 ); + } + } + + // Fixes Bug #2551 -- select.val() broken in IE after form.reset() + if ( one && !values.length && options.length ) { + return jQuery( options[ index ] ).val(); + } + + return values; + }, + + set: function( elem, value ) { + var values = jQuery.makeArray( value ); + + jQuery(elem).find("option").each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attrFn: { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true + }, + + attrFix: { + // Always normalize to ensure hook usage + tabindex: "tabIndex" + }, + + attr: function( elem, name, value, pass ) { + var nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return undefined; + } + + if ( pass && name in jQuery.attrFn ) { + return jQuery( elem )[ name ]( value ); + } + + // Fallback to prop when attributes are not supported + if ( !("getAttribute" in elem) ) { + return jQuery.prop( elem, name, value ); + } + + var ret, hooks, + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + // Normalize the name if needed + if ( notxml ) { + name = jQuery.attrFix[ name ] || name; + + hooks = jQuery.attrHooks[ name ]; + + if ( !hooks ) { + // Use boolHook for boolean attributes + if ( rboolean.test( name ) ) { + hooks = boolHook; + + // Use nodeHook if available( IE6/7 ) + } else if ( nodeHook ) { + hooks = nodeHook; + } + } + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return undefined; + + } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, "" + value ); + return value; + } + + } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + + ret = elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return ret === null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, name ) { + var propName; + if ( elem.nodeType === 1 ) { + name = jQuery.attrFix[ name ] || name; + + jQuery.attr( elem, name, "" ); + elem.removeAttribute( name ); + + // Set corresponding property to false for boolean attributes + if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) { + elem[ propName ] = false; + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } else 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 it's default in case type is set after value + // This is for element creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + }, + // Use the value property for back compat + // Use the nodeHook for button elements in IE6/7 (#1954) + value: { + get: function( elem, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.get( elem, name ); + } + return name in elem ? + elem.value : + null; + }, + set: function( elem, value, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.set( elem, value, name ); + } + // Does not return so that setAttribute is also used + elem.value = value; + } + } + }, + + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + + prop: function( elem, name, value ) { + var nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return undefined; + } + + var ret, hooks, + 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 ) { + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + return (elem[ name ] = value); + } + + } else { + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + return 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/ + var attributeNode = elem.getAttributeNode("tabindex"); + + return attributeNode && attributeNode.specified ? + parseInt( attributeNode.value, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + } + } +}); + +// Add the tabindex propHook to attrHooks for back-compat +jQuery.attrHooks.tabIndex = jQuery.propHooks.tabIndex; + +// Hook for boolean attributes +boolHook = { + get: function( elem, name ) { + // Align boolean attributes with corresponding properties + // Fall back to attribute presence where some booleans are not supported + var attrNode; + return jQuery.prop( elem, name ) === true || ( attrNode = elem.getAttributeNode( name ) ) && attrNode.nodeValue !== false ? + name.toLowerCase() : + undefined; + }, + set: function( elem, value, name ) { + var propName; + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + // value is true since we know at this point it's type boolean and not false + // Set boolean attributes to the same name and set the DOM property + propName = jQuery.propFix[ name ] || name; + if ( propName in elem ) { + // Only set the IDL specifically if it already exists on the element + elem[ propName ] = true; + } + + elem.setAttribute( name, name.toLowerCase() ); + } + return name; + } +}; + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !jQuery.support.getSetAttribute ) { + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = jQuery.valHooks.button = { + get: function( elem, name ) { + var ret; + ret = elem.getAttributeNode( name ); + // Return undefined if nodeValue is empty string + return ret && ret.nodeValue !== "" ? + ret.nodeValue : + undefined; + }, + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + ret = document.createAttribute( name ); + elem.setAttributeNode( ret ); + } + return (ret.nodeValue = value + ""); + } + }; + + // 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 ] = jQuery.extend( jQuery.attrHooks[ name ], { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }); + }); +} + + +// Some attributes require a special call on IE +if ( !jQuery.support.hrefNormalized ) { + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + get: function( elem ) { + var ret = elem.getAttribute( name, 2 ); + return ret === null ? undefined : ret; + } + }); + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Normalize to lowercase since IE uppercases css property names + return elem.style.cssText.toLowerCase() || 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 = jQuery.extend( 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; + } + }); +} + +// Radios and checkboxes getter/setter +if ( !jQuery.support.checkOn ) { + jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + get: function( elem ) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + } + }; + }); +} +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0); + } + } + }); +}); + + + + +var rnamespaces = /\.(.*)$/, + rformElems = /^(?:textarea|input|select)$/i, + rperiod = /\./g, + rspaces = / /g, + rescape = /[^\w\s.|`]/g, + fcleanup = function( nm ) { + return nm.replace(rescape, "\\$&"); + }; + +/* + * A number of helper functions used for managing events. + * Many of the ideas behind this code originated from + * Dean Edwards' addEvent library. + */ +jQuery.event = { + + // Bind an event to an element + // Original by Dean Edwards + add: function( elem, types, handler, data ) { + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + if ( handler === false ) { + handler = returnFalse; + } else if ( !handler ) { + // Fixes bug #7229. Fix recommended by jdalton + return; + } + + var handleObjIn, handleObj; + + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + } + + // Make sure that the function being executed has a unique ID + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure + var elemData = jQuery._data( elem ); + + // If no elemData is found then we must be trying to bind to one of the + // banned noData elements + if ( !elemData ) { + return; + } + + var events = elemData.events, + eventHandle = elemData.handle; + + if ( !events ) { + elemData.events = events = {}; + } + + if ( !eventHandle ) { + elemData.handle = eventHandle = 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 !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.handle.apply( eventHandle.elem, arguments ) : + undefined; + }; + } + + // Add elem as a property of the handle function + // This is to prevent a memory leak with non-native events in IE. + eventHandle.elem = elem; + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = types.split(" "); + + var type, i = 0, namespaces; + + while ( (type = types[ i++ ]) ) { + handleObj = handleObjIn ? + jQuery.extend({}, handleObjIn) : + { handler: handler, data: data }; + + // Namespaced event handlers + if ( type.indexOf(".") > -1 ) { + namespaces = type.split("."); + type = namespaces.shift(); + handleObj.namespace = namespaces.slice(0).sort().join("."); + + } else { + namespaces = []; + handleObj.namespace = ""; + } + + handleObj.type = type; + if ( !handleObj.guid ) { + handleObj.guid = handler.guid; + } + + // Get the current list of functions bound to this event + var handlers = events[ type ], + special = jQuery.event.special[ type ] || {}; + + // Init the event handler queue + if ( !handlers ) { + handlers = events[ type ] = []; + + // Check for a special event handler + // 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 the function to the element's handler list + handlers.push( handleObj ); + + // Keep track of which events have been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, pos ) { + // don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + if ( handler === false ) { + handler = returnFalse; + } + + var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ), + events = elemData && elemData.events; + + if ( !elemData || !events ) { + return; + } + + // types is actually an event object here + if ( types && types.type ) { + handler = types.handler; + types = types.type; + } + + // Unbind all events for the element + if ( !types || typeof types === "string" && types.charAt(0) === "." ) { + types = types || ""; + + for ( type in events ) { + jQuery.event.remove( elem, type + types ); + } + + return; + } + + // Handle multiple events separated by a space + // jQuery(...).unbind("mouseover mouseout", fn); + types = types.split(" "); + + while ( (type = types[ i++ ]) ) { + origType = type; + handleObj = null; + all = type.indexOf(".") < 0; + namespaces = []; + + if ( !all ) { + // Namespaced event handlers + namespaces = type.split("."); + type = namespaces.shift(); + + namespace = new RegExp("(^|\\.)" + + jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + eventType = events[ type ]; + + if ( !eventType ) { + continue; + } + + if ( !handler ) { + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( all || namespace.test( handleObj.namespace ) ) { + jQuery.event.remove( elem, origType, handleObj.handler, j ); + eventType.splice( j--, 1 ); + } + } + + continue; + } + + special = jQuery.event.special[ type ] || {}; + + for ( j = pos || 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( handler.guid === handleObj.guid ) { + // remove the given handler for the given type + if ( all || namespace.test( handleObj.namespace ) ) { + if ( pos == null ) { + eventType.splice( j--, 1 ); + } + + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + + if ( pos != null ) { + break; + } + } + } + + // remove generic event handler if no more handlers exist + if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { + if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + ret = null; + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + var handle = elemData.handle; + if ( handle ) { + handle.elem = null; + } + + delete elemData.events; + delete elemData.handle; + + if ( jQuery.isEmptyObject( elemData ) ) { + jQuery.removeData( elem, undefined, true ); + } + } + }, + + // Events that are safe to short-circuit if no handlers are attached. + // Native DOM events should not be added, they may have inline handlers. + customEvent: { + "getData": true, + "setData": true, + "changeData": true + }, + + trigger: function( event, data, elem, onlyHandlers ) { + // Event object or event type + var type = event.type || event, + namespaces = [], + exclusive; + + if ( type.indexOf("!") >= 0 ) { + // Exclusive events trigger only for the exact event (no namespaces) + type = type.slice(0, -1); + exclusive = true; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + + if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { + // No jQuery handlers for this event type, and it can't have inline handlers + return; + } + + // Caller can pass in an Event, Object, or just an event type string + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + new jQuery.Event( type, event ) : + // Just the event type (string) + new jQuery.Event( type ); + + event.type = type; + event.exclusive = exclusive; + event.namespace = namespaces.join("."); + event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)"); + + // triggerHandler() and global events don't bubble or run the default action + if ( onlyHandlers || !elem ) { + event.preventDefault(); + event.stopPropagation(); + } + + // Handle a global trigger + if ( !elem ) { + // TODO: Stop taunting the data cache; remove global events and always attach to document + jQuery.each( jQuery.cache, function() { + // internalKey variable is just used to make it easier to find + // and potentially change this stuff later; currently it just + // points to jQuery.expando + var internalKey = jQuery.expando, + internalCache = this[ internalKey ]; + if ( internalCache && internalCache.events && internalCache.events[ type ] ) { + jQuery.event.trigger( event, data, internalCache.handle.elem ); + } + }); + return; + } + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // Clean up the event in case it is being reused + event.result = undefined; + event.target = elem; + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data != null ? jQuery.makeArray( data ) : []; + data.unshift( event ); + + var cur = elem, + // IE doesn't like method names with a colon (#3533, #8272) + ontype = type.indexOf(":") < 0 ? "on" + type : ""; + + // Fire event on the current element, then bubble up the DOM tree + do { + var handle = jQuery._data( cur, "handle" ); + + event.currentTarget = cur; + if ( handle ) { + handle.apply( cur, data ); + } + + // Trigger an inline bound script + if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) { + event.result = false; + event.preventDefault(); + } + + // Bubble up to document, then to window + cur = cur.parentNode || cur.ownerDocument || cur === event.target.ownerDocument && window; + } while ( cur && !event.isPropagationStopped() ); + + // If nobody prevented the default action, do it now + if ( !event.isDefaultPrevented() ) { + var old, + special = jQuery.event.special[ type ] || {}; + + if ( (!special._default || special._default.call( elem.ownerDocument, event ) === false) && + !(type === "click" && jQuery.nodeName( elem, "a" )) && 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. + // IE<9 dies on focus to hidden element (#1486), may want to revisit a try/catch. + try { + if ( ontype && elem[ type ] ) { + // Don't re-trigger an onFOO event when we call its FOO() method + old = elem[ ontype ]; + + if ( old ) { + elem[ ontype ] = null; + } + + jQuery.event.triggered = type; + elem[ type ](); + } + } catch ( ieError ) {} + + if ( old ) { + elem[ ontype ] = old; + } + + jQuery.event.triggered = undefined; + } + } + + return event.result; + }, + + handle: function( event ) { + event = jQuery.event.fix( event || window.event ); + // Snapshot the handlers list since a called handler may add/remove events. + var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0), + run_all = !event.exclusive && !event.namespace, + args = Array.prototype.slice.call( arguments, 0 ); + + // Use the fix-ed Event rather than the (read-only) native event + args[0] = event; + event.currentTarget = this; + + for ( var j = 0, l = handlers.length; j < l; j++ ) { + var handleObj = handlers[ j ]; + + // Triggered event must 1) be non-exclusive and have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event. + if ( run_all || event.namespace_re.test( handleObj.namespace ) ) { + // Pass in a reference to the handler function itself + // So that we can later remove it + event.handler = handleObj.handler; + event.data = handleObj.data; + event.handleObj = handleObj; + + var ret = handleObj.handler.apply( this, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + + if ( event.isImmediatePropagationStopped() ) { + break; + } + } + } + return event.result; + }, + + props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // store a copy of the original event object + // and "clone" to set read-only properties + var originalEvent = event; + event = jQuery.Event( originalEvent ); + + for ( var i = this.props.length, prop; i; ) { + prop = this.props[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary + if ( !event.target ) { + // Fixes #1925 where srcElement might not be defined either + event.target = event.srcElement || document; + } + + // check if target is a textnode (safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && event.fromElement ) { + event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; + } + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && event.clientX != null ) { + var eventDocument = event.target.ownerDocument || document, + doc = eventDocument.documentElement, + body = eventDocument.body; + + event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); + event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); + } + + // Add which for key events + if ( event.which == null && (event.charCode != null || event.keyCode != null) ) { + event.which = event.charCode != null ? event.charCode : event.keyCode; + } + + // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) + if ( !event.metaKey && event.ctrlKey ) { + event.metaKey = event.ctrlKey; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && event.button !== undefined ) { + event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); + } + + return event; + }, + + // Deprecated, use jQuery.guid instead + guid: 1E8, + + // Deprecated, use jQuery.proxy instead + proxy: jQuery.proxy, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady, + teardown: jQuery.noop + }, + + live: { + add: function( handleObj ) { + jQuery.event.add( this, + liveConvert( handleObj.origType, handleObj.selector ), + jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); + }, + + remove: function( handleObj ) { + jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj ); + } + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + if ( elem.detachEvent ) { + elem.detachEvent( "on" + type, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !this.preventDefault ) { + 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 ); + } + + // timeStamp is buggy for some events on Firefox(#3843) + // So we won't rely on the native value + this.timeStamp = jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return 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 = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Checks if an event happened on an element within another element +// Used in jQuery.event.special.mouseenter and mouseleave handlers +var withinElement = function( event ) { + + // Check if mouse(over|out) are still within the same parent element + var related = event.relatedTarget, + inside = false, + eventType = event.type; + + event.type = event.data; + + if ( related !== this ) { + + if ( related ) { + inside = jQuery.contains( this, related ); + } + + if ( !inside ) { + + jQuery.event.handle.apply( this, arguments ); + + event.type = eventType; + } + } +}, + +// In case of event delegation, we only need to rename the event.type, +// liveHandler will take care of the rest. +delegate = function( event ) { + event.type = event.data; + jQuery.event.handle.apply( this, arguments ); +}; + +// Create mouseenter and mouseleave events +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + setup: function( data ) { + jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig ); + }, + teardown: function( data ) { + jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement ); + } + }; +}); + +// submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function( data, namespaces ) { + if ( !jQuery.nodeName( this, "form" ) ) { + jQuery.event.add(this, "click.specialSubmit", function( e ) { + // Avoid triggering error on non-existent type attribute in IE VML (#7071) + var elem = e.target, + type = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.type : ""; + + if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) { + trigger( "submit", this, arguments ); + } + }); + + jQuery.event.add(this, "keypress.specialSubmit", function( e ) { + var elem = e.target, + type = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.type : ""; + + if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) { + trigger( "submit", this, arguments ); + } + }); + + } else { + return false; + } + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialSubmit" ); + } + }; + +} + +// change delegation, happens here so we have bind. +if ( !jQuery.support.changeBubbles ) { + + var changeFilters, + + getVal = function( elem ) { + var type = jQuery.nodeName( elem, "input" ) ? elem.type : "", + val = elem.value; + + if ( type === "radio" || type === "checkbox" ) { + val = elem.checked; + + } else if ( type === "select-multiple" ) { + val = elem.selectedIndex > -1 ? + jQuery.map( elem.options, function( elem ) { + return elem.selected; + }).join("-") : + ""; + + } else if ( jQuery.nodeName( elem, "select" ) ) { + val = elem.selectedIndex; + } + + return val; + }, + + testChange = function testChange( e ) { + var elem = e.target, data, val; + + if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) { + return; + } + + data = jQuery._data( elem, "_change_data" ); + val = getVal(elem); + + // the current data will be also retrieved by beforeactivate + if ( e.type !== "focusout" || elem.type !== "radio" ) { + jQuery._data( elem, "_change_data", val ); + } + + if ( data === undefined || val === data ) { + return; + } + + if ( data != null || val ) { + e.type = "change"; + e.liveFired = undefined; + jQuery.event.trigger( e, arguments[1], elem ); + } + }; + + jQuery.event.special.change = { + filters: { + focusout: testChange, + + beforedeactivate: testChange, + + click: function( e ) { + var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; + + if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) { + testChange.call( this, e ); + } + }, + + // Change has to be called before submit + // Keydown will be called before keypress, which is used in submit-event delegation + keydown: function( e ) { + var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; + + if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) || + (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || + type === "select-multiple" ) { + testChange.call( this, e ); + } + }, + + // Beforeactivate happens also before the previous element is blurred + // with this event you can't trigger a change event, but you can store + // information + beforeactivate: function( e ) { + var elem = e.target; + jQuery._data( elem, "_change_data", getVal(elem) ); + } + }, + + setup: function( data, namespaces ) { + if ( this.type === "file" ) { + return false; + } + + for ( var type in changeFilters ) { + jQuery.event.add( this, type + ".specialChange", changeFilters[type] ); + } + + return rformElems.test( this.nodeName ); + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialChange" ); + + return rformElems.test( this.nodeName ); + } + }; + + changeFilters = jQuery.event.special.change.filters; + + // Handle when the input is .focus()'d + changeFilters.focus = changeFilters.beforeactivate; +} + +function trigger( type, elem, args ) { + // 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. + // Don't pass args or remember liveFired; they apply to the donor event. + var event = jQuery.extend( {}, args[ 0 ] ); + event.type = type; + event.originalEvent = {}; + event.liveFired = undefined; + jQuery.event.handle.call( elem, event ); + if ( event.isDefaultPrevented() ) { + args[ 0 ].preventDefault(); + } +} + +// 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; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + + function handler( donor ) { + // Donor event is always a native one; fix it and switch its type. + // Let focusin/out handler cancel the donor focus/blur event. + var e = jQuery.event.fix( donor ); + e.type = fix; + e.originalEvent = {}; + jQuery.event.trigger( e, null, e.target ); + if ( e.isDefaultPrevented() ) { + donor.preventDefault(); + } + } + }); +} + +jQuery.each(["bind", "one"], function( i, name ) { + jQuery.fn[ name ] = function( type, data, fn ) { + var handler; + + // Handle object literals + if ( typeof type === "object" ) { + for ( var key in type ) { + this[ name ](key, data, type[key], fn); + } + return this; + } + + if ( arguments.length === 2 || data === false ) { + fn = data; + data = undefined; + } + + if ( name === "one" ) { + handler = function( event ) { + jQuery( this ).unbind( event, handler ); + return fn.apply( this, arguments ); + }; + handler.guid = fn.guid || jQuery.guid++; + } else { + handler = fn; + } + + if ( type === "unload" && name !== "one" ) { + this.one( type, data, fn ); + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + jQuery.event.add( this[i], type, handler, data ); + } + } + + return this; + }; +}); + +jQuery.fn.extend({ + unbind: function( type, fn ) { + // Handle object literals + if ( typeof type === "object" && !type.preventDefault ) { + for ( var key in type ) { + this.unbind(key, type[key]); + } + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + jQuery.event.remove( this[i], type, fn ); + } + } + + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.live( types, data, fn, selector ); + }, + + undelegate: function( selector, types, fn ) { + if ( arguments.length === 0 ) { + return this.unbind( "live" ); + + } else { + return this.die( types, null, fn, selector ); + } + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + + triggerHandler: function( type, data ) { + if ( this[0] ) { + return jQuery.event.trigger( type, data, this[0], true ); + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + guid = fn.guid || jQuery.guid++, + i = 0, + toggler = function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + }; + + // link all the functions, so any of them can unbind this click handler + toggler.guid = guid; + while ( i < args.length ) { + args[ i++ ].guid = guid; + } + + return this.click( toggler ); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +var liveMap = { + focus: "focusin", + blur: "focusout", + mouseenter: "mouseover", + mouseleave: "mouseout" +}; + +jQuery.each(["live", "die"], function( i, name ) { + jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) { + var type, i = 0, match, namespaces, preType, + selector = origSelector || this.selector, + context = origSelector ? this : jQuery( this.context ); + + if ( typeof types === "object" && !types.preventDefault ) { + for ( var key in types ) { + context[ name ]( key, data, types[key], selector ); + } + + return this; + } + + if ( name === "die" && !types && + origSelector && origSelector.charAt(0) === "." ) { + + context.unbind( origSelector ); + + return this; + } + + if ( data === false || jQuery.isFunction( data ) ) { + fn = data || returnFalse; + data = undefined; + } + + types = (types || "").split(" "); + + while ( (type = types[ i++ ]) != null ) { + match = rnamespaces.exec( type ); + namespaces = ""; + + if ( match ) { + namespaces = match[0]; + type = type.replace( rnamespaces, "" ); + } + + if ( type === "hover" ) { + types.push( "mouseenter" + namespaces, "mouseleave" + namespaces ); + continue; + } + + preType = type; + + if ( liveMap[ type ] ) { + types.push( liveMap[ type ] + namespaces ); + type = type + namespaces; + + } else { + type = (liveMap[ type ] || type) + namespaces; + } + + if ( name === "live" ) { + // bind live handler + for ( var j = 0, l = context.length; j < l; j++ ) { + jQuery.event.add( context[j], "live." + liveConvert( type, selector ), + { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } ); + } + + } else { + // unbind live handler + context.unbind( "live." + liveConvert( type, selector ), fn ); + } + } + + return this; + }; +}); + +function liveHandler( event ) { + var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret, + elems = [], + selectors = [], + events = jQuery._data( this, "events" ); + + // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911) + if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) { + return; + } + + if ( event.namespace ) { + namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + event.liveFired = this; + + var live = events.live.slice(0); + + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) { + selectors.push( handleObj.selector ); + + } else { + live.splice( j--, 1 ); + } + } + + match = jQuery( event.target ).closest( selectors, event.currentTarget ); + + for ( i = 0, l = match.length; i < l; i++ ) { + close = match[i]; + + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) { + elem = close.elem; + related = null; + + // Those two events require additional checking + if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) { + event.type = handleObj.preType; + related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0]; + + // Make sure not to accidentally match a child element with the same selector + if ( related && jQuery.contains( elem, related ) ) { + related = elem; + } + } + + if ( !related || related !== elem ) { + elems.push({ elem: elem, handleObj: handleObj, level: close.level }); + } + } + } + } + + for ( i = 0, l = elems.length; i < l; i++ ) { + match = elems[i]; + + if ( maxLevel && match.level > maxLevel ) { + break; + } + + event.currentTarget = match.elem; + event.data = match.handleObj.data; + event.handleObj = match.handleObj; + + ret = match.handleObj.origHandler.apply( match.elem, arguments ); + + if ( ret === false || event.isPropagationStopped() ) { + maxLevel = match.level; + + if ( ret === false ) { + stop = false; + } + if ( event.isImmediatePropagationStopped() ) { + break; + } + } + } + + return stop; +} + +function liveConvert( type, selector ) { + return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&"); +} + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.bind( name, data, fn ) : + this.trigger( name ); + }; + + if ( jQuery.attrFn ) { + jQuery.attrFn[ name ] = true; + } +}); + + + +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true, + rBackslash = /\\/g, + rNonWord = /\W/; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + + var origContext = context; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var m, set, checkSet, extra, ret, cur, pop, i, + prune = true, + contextXML = Sizzle.isXML( context ), + parts = [], + soFar = selector; + + // Reset the position of the chunker regexp (start from head) + do { + chunker.exec( "" ); + m = chunker.exec( soFar ); + + if ( m ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + } while ( m ); + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context ); + + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set ); + } + } + + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + + ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? + Sizzle.filter( ret.expr, ret.set )[0] : + ret.set[0]; + } + + if ( context ) { + ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + + set = ret.expr ? + Sizzle.filter( ret.expr, ret.set ) : + ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray( set ); + + } else { + prune = false; + } + + while ( parts.length ) { + cur = parts.pop(); + pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + + } else if ( context && context.nodeType === 1 ) { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + + } else { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function( results ) { + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +Sizzle.matches = function( expr, set ) { + return Sizzle( expr, null, null, set ); +}; + +Sizzle.matchesSelector = function( node, expr ) { + return Sizzle( expr, null, null, [node] ).length > 0; +}; + +Sizzle.find = function( expr, context, isXML ) { + var set; + + if ( !expr ) { + return []; + } + + for ( var i = 0, l = Expr.order.length; i < l; i++ ) { + var match, + type = Expr.order[i]; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + var left = match[1]; + match.splice( 1, 1 ); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace( rBackslash, "" ); + set = Expr.find[ type ]( match, context, isXML ); + + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( "*" ) : + []; + } + + return { set: set, expr: expr }; +}; + +Sizzle.filter = function( expr, set, inplace, not ) { + var match, anyFound, + old = expr, + result = [], + curLoop = set, + isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); + + while ( expr && set.length ) { + for ( var type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + var found, item, + filter = Expr.filter[ type ], + left = match[1]; + + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( var i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + var pass = not ^ !!found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + + } else { + curLoop[i] = false; + } + + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw "Syntax error, unrecognized expression: " + msg; +}; + +var Expr = Sizzle.selectors = { + order: [ "ID", "NAME", "TAG" ], + + match: { + ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, + ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, + TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, + CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, + POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, + PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ + }, + + leftMatch: {}, + + attrMap: { + "class": "className", + "for": "htmlFor" + }, + + attrHandle: { + href: function( elem ) { + return elem.getAttribute( "href" ); + }, + type: function( elem ) { + return elem.getAttribute( "type" ); + } + }, + + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !rNonWord.test( part ), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + + ">": function( checkSet, part ) { + var elem, + isPartStr = typeof part === "string", + i = 0, + l = checkSet.length; + + if ( isPartStr && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + + } else { + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + + "": function(checkSet, part, isXML){ + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); + }, + + "~": function( checkSet, part, isXML ) { + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); + } + }, + + find: { + ID: function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }, + + NAME: function( match, context ) { + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], + results = context.getElementsByName( match[1] ); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + + TAG: function( match, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( match[1] ); + } + } + }, + preFilter: { + CLASS: function( match, curLoop, inplace, result, not, isXML ) { + match = " " + match[1].replace( rBackslash, "" ) + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + + ID: function( match ) { + return match[1].replace( rBackslash, "" ); + }, + + TAG: function( match, curLoop ) { + return match[1].replace( rBackslash, "" ).toLowerCase(); + }, + + CHILD: function( match ) { + if ( match[1] === "nth" ) { + if ( !match[2] ) { + Sizzle.error( match[0] ); + } + + match[2] = match[2].replace(/^\+|\s*/g, ''); + + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + else if ( match[2] ) { + Sizzle.error( match[0] ); + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + + ATTR: function( match, curLoop, inplace, result, not, isXML ) { + var name = match[1] = match[1].replace( rBackslash, "" ); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + // Handle if an un-quoted value was used + match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + + PSEUDO: function( match, curLoop, inplace, result, not ) { + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + + if ( !inplace ) { + result.push.apply( result, ret ); + } + + return false; + } + + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + + POS: function( match ) { + match.unshift( true ); + + return match; + } + }, + + filters: { + enabled: function( elem ) { + return elem.disabled === false && elem.type !== "hidden"; + }, + + disabled: function( elem ) { + return elem.disabled === true; + }, + + checked: function( elem ) { + return elem.checked === true; + }, + + 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; + }, + + parent: function( elem ) { + return !!elem.firstChild; + }, + + empty: function( elem ) { + return !elem.firstChild; + }, + + has: function( elem, i, match ) { + return !!Sizzle( match[3], elem ).length; + }, + + header: function( elem ) { + return (/h\d/i).test( elem.nodeName ); + }, + + text: function( elem ) { + var attr = elem.getAttribute( "type" ), type = elem.type; + // 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" && "text" === type && ( attr === type || attr === null ); + }, + + radio: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; + }, + + checkbox: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; + }, + + file: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; + }, + + password: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; + }, + + submit: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "submit" === elem.type; + }, + + image: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; + }, + + reset: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "reset" === elem.type; + }, + + button: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && "button" === elem.type || name === "button"; + }, + + input: function( elem ) { + return (/input|select|textarea|button/i).test( elem.nodeName ); + }, + + focus: function( elem ) { + return elem === elem.ownerDocument.activeElement; + } + }, + setFilters: { + first: function( elem, i ) { + return i === 0; + }, + + last: function( elem, i, match, array ) { + return i === array.length - 1; + }, + + even: function( elem, i ) { + return i % 2 === 0; + }, + + odd: function( elem, i ) { + return i % 2 === 1; + }, + + lt: function( elem, i, match ) { + return i < match[3] - 0; + }, + + gt: function( elem, i, match ) { + return i > match[3] - 0; + }, + + nth: function( elem, i, match ) { + return match[3] - 0 === i; + }, + + eq: function( elem, i, match ) { + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function( elem, match, i, array ) { + var name = match[1], + filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0; + + } else if ( name === "not" ) { + var not = match[3]; + + for ( var j = 0, l = not.length; j < l; j++ ) { + if ( not[j] === elem ) { + return false; + } + } + + return true; + + } else { + Sizzle.error( name ); + } + }, + + CHILD: function( elem, match ) { + var type = match[1], + node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + + case "nth": + var first = match[2], + last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + var doneName = match[0], + parent = elem.parentNode; + + if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { + var count = 0; + + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + + parent.sizcache = doneName; + } + + var diff = elem.nodeIndex - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + + ID: function( elem, match ) { + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + + TAG: function( elem, match ) { + return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; + }, + + CLASS: function( elem, match ) { + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + + ATTR: function( elem, match ) { + var name = match[1], + result = Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + + POS: function( elem, match, i, array ) { + var name = match[2], + filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS, + fescape = function(all, num){ + return "\\" + (num - 0 + 1); + }; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); +} + +var makeArray = function( array, results ) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch( e ) { + makeArray = function( array, results ) { + var i = 0, + ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + + } else { + if ( typeof array.length === "number" ) { + for ( var l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + + } else { + for ( ; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder, siblingCheck; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + return a.compareDocumentPosition ? -1 : 1; + } + + return a.compareDocumentPosition(b) & 4 ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Fallback to using sourceIndex (in IE) if it's available on both nodes + } else if ( a.sourceIndex && b.sourceIndex ) { + return a.sourceIndex - b.sourceIndex; + } + + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // If the nodes are siblings (or identical) we can do a quick check + if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Utility function for retreiving the text value of an array of DOM nodes +Sizzle.getText = function( elems ) { + var ret = "", elem; + + for ( var i = 0; elems[i]; i++ ) { + elem = elems[i]; + + // Get the text from text nodes and CDATA nodes + if ( elem.nodeType === 3 || elem.nodeType === 4 ) { + ret += elem.nodeValue; + + // Traverse everything else, except comment nodes + } else if ( elem.nodeType !== 8 ) { + ret += Sizzle.getText( elem.childNodes ); + } + } + + return ret; +}; + +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + var form = document.createElement("div"), + id = "script" + (new Date()).getTime(), + root = document.documentElement; + + form.innerHTML = ""; + + // Inject it into the root element, check its status, and remove it quickly + root.insertBefore( form, root.firstChild ); + + // The workaround has to do additional checks after a getElementById + // Which slows things down for other browsers (hence the branching) + if ( document.getElementById( id ) ) { + Expr.find.ID = function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + + return m ? + m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? + [m] : + undefined : + []; + } + }; + + Expr.filter.ID = function( elem, match ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + + // release memory in IE + root = form = null; +})(); + +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + // Make sure no comments are found + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function( match, context ) { + var results = context.getElementsByTagName( match[1] ); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + // Check to see if an attribute returns normalized href attributes + div.innerHTML = ""; + + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + + Expr.attrHandle.href = function( elem ) { + return elem.getAttribute( "href", 2 ); + }; + } + + // release memory in IE + div = null; +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, + div = document.createElement("div"), + id = "__sizzle__"; + + div.innerHTML = "

    "; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function( query, context, extra, seed ) { + context = context || document; + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && !Sizzle.isXML(context) ) { + // See if we find a selector to speed up + var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); + + if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { + // Speed-up: Sizzle("TAG") + if ( match[1] ) { + return makeArray( context.getElementsByTagName( query ), extra ); + + // Speed-up: Sizzle(".CLASS") + } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { + return makeArray( context.getElementsByClassName( match[2] ), extra ); + } + } + + if ( context.nodeType === 9 ) { + // Speed-up: Sizzle("body") + // The body element only exists once, optimize finding it + if ( query === "body" && context.body ) { + return makeArray( [ context.body ], extra ); + + // Speed-up: Sizzle("#ID") + } else if ( match && match[3] ) { + var elem = context.getElementById( match[3] ); + + // 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[3] ) { + return makeArray( [ elem ], extra ); + } + + } else { + return makeArray( [], extra ); + } + } + + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(qsaError) {} + + // 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 + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var oldContext = context, + old = context.getAttribute( "id" ), + nid = old || id, + hasParent = context.parentNode, + relativeHierarchySelector = /^\s*[+~]/.test( query ); + + if ( !old ) { + context.setAttribute( "id", nid ); + } else { + nid = nid.replace( /'/g, "\\$&" ); + } + if ( relativeHierarchySelector && hasParent ) { + context = context.parentNode; + } + + try { + if ( !relativeHierarchySelector || hasParent ) { + return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); + } + + } catch(pseudoError) { + } finally { + if ( !old ) { + oldContext.removeAttribute( "id" ); + } + } + } + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + // release memory in IE + div = null; + })(); +} + +(function(){ + var html = document.documentElement, + matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; + + if ( matches ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9 fails this) + var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), + pseudoWorks = false; + + try { + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( document.documentElement, "[test!='']:sizzle" ); + + } catch( pseudoError ) { + pseudoWorks = true; + } + + Sizzle.matchesSelector = function( node, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + if ( !Sizzle.isXML( node ) ) { + try { + if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { + var ret = matches.call( node, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || !disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9, so check for that + node.document && node.document.nodeType !== 11 ) { + return ret; + } + } + } catch(e) {} + } + + return Sizzle(expr, null, null, [node]).length > 0; + }; + } +})(); + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "
    "; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function( match, context, isXML ) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + // release memory in IE + div = null; +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +if ( document.documentElement.contains ) { + Sizzle.contains = function( a, b ) { + return a !== b && (a.contains ? a.contains(b) : true); + }; + +} else if ( document.documentElement.compareDocumentPosition ) { + Sizzle.contains = function( a, b ) { + return !!(a.compareDocumentPosition(b) & 16); + }; + +} else { + Sizzle.contains = function() { + return false; + }; +} + +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 : 0).documentElement; + + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function( selector, context ) { + var match, + tmpSet = [], + later = "", + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.filters; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})(); + + +var runtil = /Until$/, + rparentsprev = /^(?:parents|prevUntil|prevAll)/, + // Note: This RegExp should be improved, or likely pulled from Sizzle + rmultiselector = /,/, + isSimple = /^.[^:#\[\.,]*$/, + slice = Array.prototype.slice, + POS = jQuery.expr.match.POS, + // 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 self = this, + i, l; + + if ( typeof selector !== "string" ) { + return jQuery( selector ).filter(function() { + for ( i = 0, l = self.length; i < l; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }); + } + + var ret = this.pushStack( "", "find", selector ), + length, n, r; + + for ( i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( n = length; n < ret.length; n++ ) { + for ( r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var targets = jQuery( target ); + return this.filter(function() { + for ( var i = 0, l = targets.length; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && ( typeof selector === "string" ? + jQuery.filter( selector, this ).length > 0 : + this.filter( selector ).length > 0 ); + }, + + closest: function( selectors, context ) { + var ret = [], i, l, cur = this[0]; + + // Array + if ( jQuery.isArray( selectors ) ) { + var match, selector, + matches = {}, + level = 1; + + if ( cur && selectors.length ) { + for ( i = 0, l = selectors.length; i < l; i++ ) { + selector = selectors[i]; + + if ( !matches[ selector ] ) { + matches[ selector ] = POS.test( selector ) ? + jQuery( selector, context || this.context ) : + selector; + } + } + + while ( cur && cur.ownerDocument && cur !== context ) { + for ( selector in matches ) { + match = matches[ selector ]; + + if ( match.jquery ? match.index( cur ) > -1 : jQuery( cur ).is( match ) ) { + ret.push({ selector: selector, elem: cur, level: level }); + } + } + + cur = cur.parentNode; + level++; + } + } + + return ret; + } + + // String + var pos = POS.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( i = 0, l = this.length; i < l; i++ ) { + cur = this[i]; + + while ( cur ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + + } else { + cur = cur.parentNode; + if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { + break; + } + } + } + } + + ret = ret.length > 1 ? jQuery.unique( ret ) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // 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.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( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + andSelf: function() { + return this.add( this.prevObject ); + } +}); + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +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 jQuery.nth( elem, 2, "nextSibling" ); + }, + prev: function( elem ) { + return jQuery.nth( elem, 2, "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.makeArray( elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ), + // The variable 'args' was introduced in + // https://github.com/jquery/jquery/commit/52a0238 + // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed. + // http://code.google.com/p/v8/issues/detail?id=1050 + args = slice.call(arguments); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, args.join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + 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; + }, + + nth: function( cur, result, dir, elem ) { + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType === 1 && ++num === result ) { + break; + } + } + + return cur; + }, + + 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, keep ) { + + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return (elem === qualifier) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return (jQuery.inArray( elem, qualifier ) >= 0) === keep; + }); +} + + + + +var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, + rtagName = /<([\w:]+)/, + rtbody = /", "" ], + legend: [ 1, "
    ", "
    " ], + thead: [ 1, "", "
    " ], + tr: [ 2, "", "
    " ], + td: [ 3, "", "
    " ], + col: [ 2, "", "
    " ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }; + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE can't serialize and + + + + + + + + + +
    +
    + + + + + diff --git a/webapps/test/test.json b/webapps/test/test.json new file mode 100644 index 0000000..f1428b2 --- /dev/null +++ b/webapps/test/test.json @@ -0,0 +1,25 @@ +[{ + "attributes": { "id" : "pjson_1" }, + "state": "open", + "data": "Root node 1", + "children" : + [ + { + "attributes": { "id" : "pjson_2" }, + "data": { "title" : "Custom icon", "icon" : "../media/images/ok.png" } + }, + { + "attributes": { "id" : "pjson_3" }, + "data": "Child node 2" + }, + { + "attributes": { "id" : "pjson_4" }, + "data": "Some other child node" + } + ] +}, +{ + "attributes": { "id" : "pjson_5" }, + "data": "Root node 2" +} +] \ No newline at end of file diff --git a/webapps/test/test.xml b/webapps/test/test.xml new file mode 100644 index 0000000..f127b94 --- /dev/null +++ b/webapps/test/test.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/webapps/test/test1.jsp b/webapps/test/test1.jsp new file mode 100644 index 0000000..e1d6e71 --- /dev/null +++ b/webapps/test/test1.jsp @@ -0,0 +1,54 @@ + +<%-- + 클릭시 일정영역을 팝업으로 출력함. +--%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + + + + + + LOGIN + + + + + + diff --git a/webapps/test/test2.json b/webapps/test/test2.json new file mode 100644 index 0000000..0d0523d --- /dev/null +++ b/webapps/test/test2.json @@ -0,0 +1,42 @@ +[ + { + "data" : "A node", + "children" : [ { "data" : "Only child", "state" : "closed" } ], + "state" : "open", + "attr" : { "id":"000001"} + }, + { + "data" : "B node", + "children" : + [ + { + "data" : "A child", + "state" : "closed", + "attr" : { "id":"000003"}, + "children" : + [ + { + "data": "hahaha", + "state":"closed", + "attr" : { "id":"000004"} + } + ] + }, + { + "data" : "B child", + "state" : "closed", + "attr" : { "id":"000003"}, + "children" : + [ + { + "data": "hahaha", + "state":"closed", + "attr" : { "id":"000004"} + } + ] + } + ], + "state" : "open", + "attr" : { "id":"000002"} + } +] \ No newline at end of file diff --git a/webapps/test/test2.jsp b/webapps/test/test2.jsp new file mode 100644 index 0000000..bf7fcb4 --- /dev/null +++ b/webapps/test/test2.jsp @@ -0,0 +1,102 @@ +<%-- + 하하하 +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + JSP Page + + + + + + +

    JQuery

    +

    JQuery

    +

    JQuery

    + +

    Click It!

    + + diff --git a/webapps/test/test3.jsp b/webapps/test/test3.jsp new file mode 100644 index 0000000..e104bda --- /dev/null +++ b/webapps/test/test3.jsp @@ -0,0 +1,66 @@ + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + JSP Page + + + + + + + + + + + + +
    +
    +

    + +

    +
    +
    + + diff --git a/webapps/test/test4.jsp b/webapps/test/test4.jsp new file mode 100644 index 0000000..54fc1ba --- /dev/null +++ b/webapps/test/test4.jsp @@ -0,0 +1,43 @@ + +<%-- + 클릭시 일정영역을 팝업으로 출력함. +--%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + jQuery Selector + + + + + + +

    jQuery 시작 Selector

    +

    jQuery에 대한 자세한 내용을 보려면 jquery.com 을 방문하세요.

    +
    +
      +
    • CheckBox #1 -
    • +
    • CheckBox #2
    • +
    • CheckBox #3
    • +
    + +
    + + + + \ No newline at end of file diff --git a/webapps/test/test5.jsp b/webapps/test/test5.jsp new file mode 100644 index 0000000..bf926e7 --- /dev/null +++ b/webapps/test/test5.jsp @@ -0,0 +1,72 @@ +<%@ page contentType="application/vnd.ms-excel; charset=UTF-8" %> +<% + response.reset(); + response.setContentType("application/vnd.ms-excel;charset=UTF-8"); + response.setHeader("Content-Disposition", "attachment; filename=gameLogExcel.xls"); + response.setHeader("Content-Description", "Tetris GameLog Data"); + +%> + + +

    + 시도교육청 자료집계시스템 담당자 +

    +

    + + + + + + + + + + + + + + + + + + + + + +
    +

    + 시도 +

    +

    + 교육청 +

    +
    +

    + 소속(과/팀) +

    +
    +

    + 직급 +

    +
    +

    + 성명 +

    +
    +

    + 연락처 +

    +

    + /휴대전화 +

    +
    +

    + E-mail +

    +
    +

    + 시스템 사용여부 +

    +
    +

    + diff --git a/webapps/test/test6.jsp b/webapps/test/test6.jsp new file mode 100644 index 0000000..5ca2029 --- /dev/null +++ b/webapps/test/test6.jsp @@ -0,0 +1,81 @@ +<%@page contentType="text/html" pageEncoding="EUC-KR"%> + + + + + + JSP Page + + +

    + õû ڷý +

    +

    + + + + + + + + + + + + + + + + + + + + + +
    +

    + õ +

    +

    + û +

    +
    +

    + Ҽ(/) +

    +
    +

    + +

    +
    +

    + +

    +
    +

    + ó +

    +

    + /޴ȭ +

    +
    +

    + E-mail +

    +
    +

    + ý 뿩 +

    +
    +

    + + + + + diff --git a/webapps/test/themes/apple/bg.jpg b/webapps/test/themes/apple/bg.jpg new file mode 100644 index 0000000..3aad05d Binary files /dev/null and b/webapps/test/themes/apple/bg.jpg differ diff --git a/webapps/test/themes/apple/d.png b/webapps/test/themes/apple/d.png new file mode 100644 index 0000000..2463ba6 Binary files /dev/null and b/webapps/test/themes/apple/d.png differ diff --git a/webapps/test/themes/apple/dot_for_ie.gif b/webapps/test/themes/apple/dot_for_ie.gif new file mode 100644 index 0000000..c0cc5fd Binary files /dev/null and b/webapps/test/themes/apple/dot_for_ie.gif differ diff --git a/webapps/test/themes/apple/style.css b/webapps/test/themes/apple/style.css new file mode 100644 index 0000000..d0c4163 --- /dev/null +++ b/webapps/test/themes/apple/style.css @@ -0,0 +1,61 @@ +/* + * jsTree apple theme 1.0 + * Supported features: dots/no-dots, icons/no-icons, focused, loading + * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search + */ + +.jstree-apple > ul { background:url("bg.jpg") left top repeat; } +.jstree-apple li, +.jstree-apple ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; } +.jstree-apple li { background-position:-90px 0; background-repeat:repeat-y; } +.jstree-apple li.jstree-last { background:transparent; } +.jstree-apple .jstree-open > ins { background-position:-72px 0; } +.jstree-apple .jstree-closed > ins { background-position:-54px 0; } +.jstree-apple .jstree-leaf > ins { background-position:-36px 0; } + +.jstree-apple a { border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px; text-shadow:1px 1px 1px white; } +.jstree-apple .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 3px 0 1px; text-shadow:1px 1px 1px silver; } +.jstree-apple .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 3px 0 1px; } +.jstree-apple a .jstree-icon { background-position:-56px -20px; } +.jstree-apple a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; } + +.jstree-apple.jstree-focused { background:white; } + +.jstree-apple .jstree-no-dots li, +.jstree-apple .jstree-no-dots .jstree-leaf > ins { background:transparent; } +.jstree-apple .jstree-no-dots .jstree-open > ins { background-position:-18px 0; } +.jstree-apple .jstree-no-dots .jstree-closed > ins { background-position:0 0; } + +.jstree-apple .jstree-no-icons a .jstree-icon { display:none; } + +.jstree-apple .jstree-search { font-style:italic; } + +.jstree-apple .jstree-no-icons .jstree-checkbox { display:inline-block; } +.jstree-apple .jstree-no-checkboxes .jstree-checkbox { display:none !important; } +.jstree-apple .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; } +.jstree-apple .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; } +.jstree-apple .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; } +.jstree-apple .jstree-checked > a > .checkbox:hover { background-position:-38px -37px; } +.jstree-apple .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; } +.jstree-apple .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; } + +#vakata-dragged.jstree-apple ins { background:transparent !important; } +#vakata-dragged.jstree-apple .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; } +#vakata-dragged.jstree-apple .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; } +#jstree-marker.jstree-apple { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; } + +.jstree-apple a.jstree-search { color:aqua; } +.jstree-apple .jstree-locked a { color:silver; cursor:default; } + +#vakata-contextmenu.jstree-apple-context, +#vakata-contextmenu.jstree-apple-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; } +#vakata-contextmenu.jstree-apple-context li { } +#vakata-contextmenu.jstree-apple-context a { color:black; } +#vakata-contextmenu.jstree-apple-context a:hover, +#vakata-contextmenu.jstree-apple-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; } +#vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a, +#vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; } +#vakata-contextmenu.jstree-apple-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; } +#vakata-contextmenu.jstree-apple-context li ul { margin-left:-4px; } + +/* TODO: IE6 support - the `>` selectors */ \ No newline at end of file diff --git a/webapps/test/themes/apple/throbber.gif b/webapps/test/themes/apple/throbber.gif new file mode 100644 index 0000000..5b33f7e Binary files /dev/null and b/webapps/test/themes/apple/throbber.gif differ diff --git a/webapps/test/themes/classic/d.gif b/webapps/test/themes/classic/d.gif new file mode 100644 index 0000000..6eb0004 Binary files /dev/null and b/webapps/test/themes/classic/d.gif differ diff --git a/webapps/test/themes/classic/d.png b/webapps/test/themes/classic/d.png new file mode 100644 index 0000000..275daec Binary files /dev/null and b/webapps/test/themes/classic/d.png differ diff --git a/webapps/test/themes/classic/dot_for_ie.gif b/webapps/test/themes/classic/dot_for_ie.gif new file mode 100644 index 0000000..c0cc5fd Binary files /dev/null and b/webapps/test/themes/classic/dot_for_ie.gif differ diff --git a/webapps/test/themes/classic/style.css b/webapps/test/themes/classic/style.css new file mode 100644 index 0000000..0351b4c --- /dev/null +++ b/webapps/test/themes/classic/style.css @@ -0,0 +1,77 @@ +/* + * jsTree classic theme 1.0 + * Supported features: dots/no-dots, icons/no-icons, focused, loading + * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search + */ + +.jstree-classic li, +.jstree-classic ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; } +.jstree-classic li { background-position:-90px 0; background-repeat:repeat-y; } +.jstree-classic li.jstree-last { background:transparent; } +.jstree-classic .jstree-open > ins { background-position:-72px 0; } +.jstree-classic .jstree-closed > ins { background-position:-54px 0; } +.jstree-classic .jstree-leaf > ins { background-position:-36px 0; } + +.jstree-classic .jstree-hovered { background:#e7f4f9; border:1px solid #e7f4f9; padding:0 2px 0 1px; } +.jstree-classic .jstree-clicked { background:navy; border:1px solid navy; padding:0 2px 0 1px; color:white; } +.jstree-classic a .jstree-icon { background-position:-56px -19px; } +.jstree-classic .jstree-open > a .jstree-icon { background-position:-56px -36px; } +.jstree-classic a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; } + +.jstree-classic.jstree-focused { background:white; } + +.jstree-classic .jstree-no-dots li, +.jstree-classic .jstree-no-dots .jstree-leaf > ins { background:transparent; } +.jstree-classic .jstree-no-dots .jstree-open > ins { background-position:-18px 0; } +.jstree-classic .jstree-no-dots .jstree-closed > ins { background-position:0 0; } + +.jstree-classic .jstree-no-icons a .jstree-icon { display:none; } + +.jstree-classic .jstree-search { font-style:italic; } + +.jstree-classic .jstree-no-icons .jstree-checkbox { display:inline-block; } +.jstree-classic .jstree-no-checkboxes .jstree-checkbox { display:none !important; } +.jstree-classic .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; } +.jstree-classic .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; } +.jstree-classic .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; } +.jstree-classic .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; } +.jstree-classic .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; } +.jstree-classic .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; } + +#vakata-dragged.jstree-classic ins { background:transparent !important; } +#vakata-dragged.jstree-classic .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; } +#vakata-dragged.jstree-classic .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; } +#jstree-marker.jstree-classic { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; } + +.jstree-classic a.jstree-search { color:aqua; } +.jstree-classic .jstree-locked a { color:silver; cursor:default; } + +#vakata-contextmenu.jstree-classic-context, +#vakata-contextmenu.jstree-classic-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; } +#vakata-contextmenu.jstree-classic-context li { } +#vakata-contextmenu.jstree-classic-context a { color:black; } +#vakata-contextmenu.jstree-classic-context a:hover, +#vakata-contextmenu.jstree-classic-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; } +#vakata-contextmenu.jstree-classic-context li.jstree-contextmenu-disabled a, +#vakata-contextmenu.jstree-classic-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; } +#vakata-contextmenu.jstree-classic-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; } +#vakata-contextmenu.jstree-classic-context li ul { margin-left:-4px; } + +/* IE6 BEGIN */ +.jstree-classic li, +.jstree-classic ins, +#vakata-dragged.jstree-classic .jstree-invalid, +#vakata-dragged.jstree-classic .jstree-ok, +#jstree-marker.jstree-classic { _background-image:url("d.gif"); } +.jstree-classic .jstree-open ins { _background-position:-72px 0; } +.jstree-classic .jstree-closed ins { _background-position:-54px 0; } +.jstree-classic .jstree-leaf ins { _background-position:-36px 0; } +.jstree-classic .jstree-open a ins.jstree-icon { _background-position:-56px -36px; } +.jstree-classic .jstree-closed a ins.jstree-icon { _background-position:-56px -19px; } +.jstree-classic .jstree-leaf a ins.jstree-icon { _background-position:-56px -19px; } +#vakata-contextmenu.jstree-classic-context ins { _display:none; } +#vakata-contextmenu.jstree-classic-context li { _zoom:1; } +.jstree-classic .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; } +.jstree-classic .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; } +.jstree-classic .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; } +/* IE6 END */ \ No newline at end of file diff --git a/webapps/test/themes/classic/throbber.gif b/webapps/test/themes/classic/throbber.gif new file mode 100644 index 0000000..5b33f7e Binary files /dev/null and b/webapps/test/themes/classic/throbber.gif differ diff --git a/webapps/test/themes/classic/throbber2.gif b/webapps/test/themes/classic/throbber2.gif new file mode 100644 index 0000000..5b33f7e Binary files /dev/null and b/webapps/test/themes/classic/throbber2.gif differ diff --git a/webapps/test/themes/default-rtl/d.gif b/webapps/test/themes/default-rtl/d.gif new file mode 100644 index 0000000..d85aba0 Binary files /dev/null and b/webapps/test/themes/default-rtl/d.gif differ diff --git a/webapps/test/themes/default-rtl/d.png b/webapps/test/themes/default-rtl/d.png new file mode 100644 index 0000000..5179cf6 Binary files /dev/null and b/webapps/test/themes/default-rtl/d.png differ diff --git a/webapps/test/themes/default-rtl/dots.gif b/webapps/test/themes/default-rtl/dots.gif new file mode 100644 index 0000000..0043364 Binary files /dev/null and b/webapps/test/themes/default-rtl/dots.gif differ diff --git a/webapps/test/themes/default-rtl/style.css b/webapps/test/themes/default-rtl/style.css new file mode 100644 index 0000000..1343cf3 --- /dev/null +++ b/webapps/test/themes/default-rtl/style.css @@ -0,0 +1,84 @@ +/* + * jsTree default-rtl theme 1.0 + * Supported features: dots/no-dots, icons/no-icons, focused, loading + * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search + */ + +.jstree-default-rtl li, +.jstree-default-rtl ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; } +.jstree-default-rtl li { background-position:-90px 0; background-repeat:repeat-y; } +.jstree-default-rtl li.jstree-last { background:transparent; } +.jstree-default-rtl .jstree-open > ins { background-position:-72px 0; } +.jstree-default-rtl .jstree-closed > ins { background-position:-54px 0; } +.jstree-default-rtl .jstree-leaf > ins { background-position:-36px 0; } + +.jstree-default-rtl .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; } +.jstree-default-rtl .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; } +.jstree-default-rtl a .jstree-icon { background-position:-56px -19px; } +.jstree-default-rtl a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; } + +.jstree-default-rtl.jstree-focused { background:#ffffee; } + +.jstree-default-rtl .jstree-no-dots li, +.jstree-default-rtl .jstree-no-dots .jstree-leaf > ins { background:transparent; } +.jstree-default-rtl .jstree-no-dots .jstree-open > ins { background-position:-18px 0; } +.jstree-default-rtl .jstree-no-dots .jstree-closed > ins { background-position:0 0; } + +.jstree-default-rtl .jstree-no-icons a .jstree-icon { display:none; } + +.jstree-default-rtl .jstree-search { font-style:italic; } + +.jstree-default-rtl .jstree-no-icons .jstree-checkbox { display:inline-block; } +.jstree-default-rtl .jstree-no-checkboxes .jstree-checkbox { display:none !important; } +.jstree-default-rtl .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; } +.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; } +.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; } +.jstree-default-rtl .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; } +.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; } +.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; } + +#vakata-dragged.jstree-default-rtl ins { background:transparent !important; } +#vakata-dragged.jstree-default-rtl .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; } +#vakata-dragged.jstree-default-rtl .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; } +#jstree-marker.jstree-default-rtl { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; } + +.jstree-default-rtl a.jstree-search { color:aqua; } +.jstree-default-rtl .jstree-locked a { color:silver; cursor:default; } + +#vakata-contextmenu.jstree-default-rtl-context, +#vakata-contextmenu.jstree-default-rtl-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; } +#vakata-contextmenu.jstree-default-rtl-context li { } +#vakata-contextmenu.jstree-default-rtl-context a { color:black; } +#vakata-contextmenu.jstree-default-rtl-context a:hover, +#vakata-contextmenu.jstree-default-rtl-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; } +#vakata-contextmenu.jstree-default-rtl-context li.jstree-contextmenu-disabled a, +#vakata-contextmenu.jstree-default-rtl-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; } +#vakata-contextmenu.jstree-default-rtl-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; } +#vakata-contextmenu.jstree-default-rtl-context li ul { margin-left:-4px; } + +/* IE6 BEGIN */ +.jstree-default-rtl li, +.jstree-default-rtl ins, +#vakata-dragged.jstree-default-rtl .jstree-invalid, +#vakata-dragged.jstree-default-rtl .jstree-ok, +#jstree-marker.jstree-default-rtl { _background-image:url("d.gif"); } +.jstree-default-rtl .jstree-open ins { _background-position:-72px 0; } +.jstree-default-rtl .jstree-closed ins { _background-position:-54px 0; } +.jstree-default-rtl .jstree-leaf ins { _background-position:-36px 0; } +.jstree-default-rtl a ins.jstree-icon { _background-position:-56px -19px; } +#vakata-contextmenu.jstree-default-rtl-context ins { _display:none; } +#vakata-contextmenu.jstree-default-rtl-context li { _zoom:1; } +.jstree-default-rtl .jstree-undetermined a .jstree-checkbox { _background-position:-18px -19px; } +.jstree-default-rtl .jstree-checked a .jstree-checkbox { _background-position:-36px -19px; } +.jstree-default-rtl .jstree-unchecked a .jstree-checkbox { _background-position:0px -19px; } +/* IE6 END */ + +/* RTL part */ +.jstree-default-rtl .jstree-hovered, .jstree-default-rtl .jstree-clicked { padding:0 1px 0 2px; } +.jstree-default-rtl li { background-image:url("dots.gif"); background-position: 100% 0px; } +.jstree-default-rtl .jstree-checked > a > .jstree-checkbox { background-position:-36px -19px; margin-left:2px; } +.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox { background-position:0px -19px; margin-left:2px; } +.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox { background-position:-18px -19px; margin-left:2px; } +.jstree-default-rtl .jstree-checked > a > .jstree-checkbox:hover { background-position:-36px -37px; } +.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox:hover { background-position:0px -37px; } +.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-18px -37px; } \ No newline at end of file diff --git a/webapps/test/themes/default-rtl/throbber.gif b/webapps/test/themes/default-rtl/throbber.gif new file mode 100644 index 0000000..5b33f7e Binary files /dev/null and b/webapps/test/themes/default-rtl/throbber.gif differ diff --git a/webapps/test/themes/default/d.gif b/webapps/test/themes/default/d.gif new file mode 100644 index 0000000..0e958d3 Binary files /dev/null and b/webapps/test/themes/default/d.gif differ diff --git a/webapps/test/themes/default/d.png b/webapps/test/themes/default/d.png new file mode 100644 index 0000000..8540175 Binary files /dev/null and b/webapps/test/themes/default/d.png differ diff --git a/webapps/test/themes/default/style.css b/webapps/test/themes/default/style.css new file mode 100644 index 0000000..7ef6a04 --- /dev/null +++ b/webapps/test/themes/default/style.css @@ -0,0 +1,74 @@ +/* + * jsTree default theme 1.0 + * Supported features: dots/no-dots, icons/no-icons, focused, loading + * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search + */ + +.jstree-default li, +.jstree-default ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; } +.jstree-default li { background-position:-90px 0; background-repeat:repeat-y; } +.jstree-default li.jstree-last { background:transparent; } +.jstree-default .jstree-open > ins { background-position:-72px 0; } +.jstree-default .jstree-closed > ins { background-position:-54px 0; } +.jstree-default .jstree-leaf > ins { background-position:-36px 0; } + +.jstree-default .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; } +.jstree-default .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; } +.jstree-default a .jstree-icon { background-position:-56px -19px; } +.jstree-default a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; } + +.jstree-default.jstree-focused { background:#ffffee; } + +.jstree-default .jstree-no-dots li, +.jstree-default .jstree-no-dots .jstree-leaf > ins { background:transparent; } +.jstree-default .jstree-no-dots .jstree-open > ins { background-position:-18px 0; } +.jstree-default .jstree-no-dots .jstree-closed > ins { background-position:0 0; } + +.jstree-default .jstree-no-icons a .jstree-icon { display:none; } + +.jstree-default .jstree-search { font-style:italic; } + +.jstree-default .jstree-no-icons .jstree-checkbox { display:inline-block; } +.jstree-default .jstree-no-checkboxes .jstree-checkbox { display:none !important; } +.jstree-default .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; } +.jstree-default .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; } +.jstree-default .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; } +.jstree-default .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; } +.jstree-default .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; } +.jstree-default .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; } + +#vakata-dragged.jstree-default ins { background:transparent !important; } +#vakata-dragged.jstree-default .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; } +#vakata-dragged.jstree-default .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; } +#jstree-marker.jstree-default { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; } + +.jstree-default a.jstree-search { color:aqua; } +.jstree-default .jstree-locked a { color:silver; cursor:default; } + +#vakata-contextmenu.jstree-default-context, +#vakata-contextmenu.jstree-default-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; } +#vakata-contextmenu.jstree-default-context li { } +#vakata-contextmenu.jstree-default-context a { color:black; } +#vakata-contextmenu.jstree-default-context a:hover, +#vakata-contextmenu.jstree-default-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; } +#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a, +#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; } +#vakata-contextmenu.jstree-default-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; } +#vakata-contextmenu.jstree-default-context li ul { margin-left:-4px; } + +/* IE6 BEGIN */ +.jstree-default li, +.jstree-default ins, +#vakata-dragged.jstree-default .jstree-invalid, +#vakata-dragged.jstree-default .jstree-ok, +#jstree-marker.jstree-default { _background-image:url("d.gif"); } +.jstree-default .jstree-open ins { _background-position:-72px 0; } +.jstree-default .jstree-closed ins { _background-position:-54px 0; } +.jstree-default .jstree-leaf ins { _background-position:-36px 0; } +.jstree-default a ins.jstree-icon { _background-position:-56px -19px; } +#vakata-contextmenu.jstree-default-context ins { _display:none; } +#vakata-contextmenu.jstree-default-context li { _zoom:1; } +.jstree-default .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; } +.jstree-default .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; } +.jstree-default .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; } +/* IE6 END */ \ No newline at end of file diff --git a/webapps/test/themes/default/throbber.gif b/webapps/test/themes/default/throbber.gif new file mode 100644 index 0000000..5b33f7e Binary files /dev/null and b/webapps/test/themes/default/throbber.gif differ diff --git a/webapps/test/tmp1.jsp b/webapps/test/tmp1.jsp new file mode 100644 index 0000000..804be5b --- /dev/null +++ b/webapps/test/tmp1.jsp @@ -0,0 +1,45 @@ +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + +<% + int inx1=0,inx2=0,order=4; + String ret=""; + String src="A2A3A2A2A4A5A2A3A5"; + String findStr="A2"; + + for(int ii=0;ii-1) inx1+=findStr.length(); + if(inx1<0) System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!1111"); + } + ret=src.substring(0,inx1-2); + System.out.println(ret); + +%> + + + + JSP Page + + + +
    +

    <%=ret%>

    + + +
    + + diff --git a/webapps/test/tmp7.jsp b/webapps/test/tmp7.jsp new file mode 100644 index 0000000..f33e052 --- /dev/null +++ b/webapps/test/tmp7.jsp @@ -0,0 +1,33 @@ +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + + + + + + + + + +
    +

    This is the default dialog which is useful for displaying information. The dialog window can be moved

    +
    + + + + diff --git a/webapps/test/tmp8.jsp b/webapps/test/tmp8.jsp new file mode 100644 index 0000000..07e582d --- /dev/null +++ b/webapps/test/tmp8.jsp @@ -0,0 +1,91 @@ +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + jsTree v.1.0 - full featured demo + + + + + + + + + + + + + + + + +
    + + + + + + diff --git a/webapps/test/tmp9.jsp b/webapps/test/tmp9.jsp new file mode 100644 index 0000000..a987167 --- /dev/null +++ b/webapps/test/tmp9.jsp @@ -0,0 +1,108 @@ +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + jsTree v.1.0 - full featured demo + + + + + + + + + + + + + + + + +
    + + + + + + diff --git a/webapps/totsys/board/doc/images/btn_cancel_1.gif b/webapps/totsys/board/doc/images/btn_cancel_1.gif new file mode 100644 index 0000000..509cdf2 Binary files /dev/null and b/webapps/totsys/board/doc/images/btn_cancel_1.gif differ diff --git a/webapps/totsys/board/doc/images/btn_close_1.gif b/webapps/totsys/board/doc/images/btn_close_1.gif new file mode 100644 index 0000000..2ffcd5b Binary files /dev/null and b/webapps/totsys/board/doc/images/btn_close_1.gif differ diff --git a/webapps/totsys/board/doc/images/btn_delete_1.gif b/webapps/totsys/board/doc/images/btn_delete_1.gif new file mode 100644 index 0000000..986b868 Binary files /dev/null and b/webapps/totsys/board/doc/images/btn_delete_1.gif differ diff --git a/webapps/totsys/board/doc/images/btn_enter_1.gif b/webapps/totsys/board/doc/images/btn_enter_1.gif new file mode 100644 index 0000000..cc4a362 Binary files /dev/null and b/webapps/totsys/board/doc/images/btn_enter_1.gif differ diff --git a/webapps/totsys/board/doc/images/btn_replace_1.gif b/webapps/totsys/board/doc/images/btn_replace_1.gif new file mode 100644 index 0000000..0d39f39 Binary files /dev/null and b/webapps/totsys/board/doc/images/btn_replace_1.gif differ diff --git a/webapps/totsys/board/doc/images/notice_write.gif b/webapps/totsys/board/doc/images/notice_write.gif new file mode 100644 index 0000000..196d12a Binary files /dev/null and b/webapps/totsys/board/doc/images/notice_write.gif differ diff --git a/webapps/totsys/board/doc/popup_board_modify.jsp b/webapps/totsys/board/doc/popup_board_modify.jsp new file mode 100644 index 0000000..c6dcf7a --- /dev/null +++ b/webapps/totsys/board/doc/popup_board_modify.jsp @@ -0,0 +1,380 @@ + +<% +/********************************************************************************** + α׷ : popup_board_modify.jsp + α׷ : 蹮 + : + : 2004. 06.07 + ֽź : 2005. 05.11 +***********************************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr"%> + +<%@ page import="java.util.Map.Entry"%> +<%@ page import="java.util.List"%> +<%@ page import="kr.co.kihyun.text.html.ServletUtil"%> +<%@ page import="kr.co.kihyun.lang.MInteger"%> +<%@ page import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.lang.MLong" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.beans.entity.Board"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + /*********** User HttpSSOLogin check ***********/ + if(!HttpSSOLogin.isLogin(request)){ + String connURL="opener.location='/totsys/login/login.jsp';"; + out.println(ServletUtil.getJavaScript(connURL)); + out.println(ServletUtil.getJavaScript("window.close();")); + return; + } + + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + + /****** Parameter ******/ + Long docID = MLong.parseLong(request.getParameter("docID"),null); + Long boardID = MLong.parseLong(request.getParameter("boardID"),null); + String strPage = clearXSS(request.getParameter("strPage"),""); + String findOption = clearXSS(request.getParameter("findOption"),""); + String findWord = clearXSS(request.getParameter("findWord"),""); + + tx.begin(); + + /****** Doc list data get ******/ + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String docName = totDoc.getName(); + String regID = totDoc.getUser(pm).getId(); + + /****** ó ******/ + boolean isManager = false; + if(usID.equals(regID)){ + isManager = true; + } + + /*********** Board View vlaues ***********/ + Board board = null; + String boardTitle = ""; + String boardContents = ""; + String usrFilenames = ""; + String svrFilenames = ""; + String boardGroupID = ""; + int fileCount = 0; + + board = boardID == null ? null : pm.getObjectById(Board.class, boardID); + boardTitle = board.getTitle(); + boardContents=board.getContents(); + for (Entry> entry : board.getAttachments().entrySet()) { + usrFilenames += entry.getKey() + ";"; + svrFilenames += entry.getKey() + ";"; + } + fileCount = board.getAttachments().size(); + boardGroupID = board.getCategory().getId(); + + tx.rollback(); + + session.setAttribute("modifyTargetURI", "opener.location='/totsys/total/doc_view.jsp?docID="+docID+"&strPage="+strPage+"&findOption="+findOption+"&findWord="+findWord+"'"); + %> + + +- + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    +

     

    +
    +

     

    +
    +

     

    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +   [<%= docName %> ] +
       +          +

    +            +
    +
       +   ÷ +
    + + +    + + + +
    +
    + +
    + + + + + + + + +
    +

     

    +
    +

     

    +
    +

     

    +
    +
    + + +<% +}catch(Exception ex){ + //38.޼ (getMessage)_CWE-209 : Update by YOUNGJUN,CHO + ex.printStackTrace(); + //out.println(ex);//ذ + //out.println("

    Can't contact servlet runner



    Message : "+ex.getMessage()+""); + //out.println(""); + //================================================ +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/totsys/board/doc/popup_board_write.jsp b/webapps/totsys/board/doc/popup_board_write.jsp new file mode 100644 index 0000000..1780c5e --- /dev/null +++ b/webapps/totsys/board/doc/popup_board_write.jsp @@ -0,0 +1,349 @@ + +<% +/********************************************************************************** + α׷ : popup_board_write.jsp + α׷ : 蹮 + : + : 2004. 06.07 + ֽź : 2005. 05.11 +***********************************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.text.html.ServletUtil" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + /*********** User HttpSSOLogin check ***********/ + if(!HttpSSOLogin.isLogin(request)){ + //login ǵƿ ּ + String connURL="opener.location='/totsys/login/login.jsp';"; + out.println(ServletUtil.getJavaScript(connURL)); + out.println(ServletUtil.getJavaScript("window.close();")); + return; + } + + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + + /****** Parameter ******/ + Long docID = MLong.parseLong(request.getParameter("docID"),null); + String boardGroupID = clearXSS(request.getParameter("boardGroupID"),""); + String strPage = clearXSS(request.getParameter("strPage"),""); + String findOption = clearXSS(request.getParameter("findOption"),""); + String findWord = clearXSS(request.getParameter("findWord"),""); + + tx.begin(); + + /****** Doc list data get ******/ + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String docName = totDoc.getName(); + String regID = totDoc.getUser(pm).getId(); + + tx.rollback(); + + /****** ó ******/ + boolean isManager = false; + if(usID.equals(regID)){ + isManager = true; + } + + session.setAttribute("writeTargetURI", "opener.location='/totsys/total/doc_view.jsp?docID="+docID+"&strPage="+strPage+"&findOption="+findOption+"&findWord="+findWord+"'"); + %> + + +- + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    +

     

    +
    +

     

    +
    +

     

    +
    +
    +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      [<%= docName %> ]
       +          + + +

       +          +
    +
       +   ÷ + + +
    + + +    + + + +
    +
    +
    + +
    + + + + + + + + +
    +

     

    +
    +

     

    +
    +

     

    +
    +
    + + +<% +}catch(Exception ex){ + //38.޼ (getMessage)_CWE-209 : Update by YOUNGJUN,CHO + ex.printStackTrace(); + //out.println(ex);//ذ + //out.println("

    Can't contact servlet runner



    Message : "+ex.getMessage()+""); + //out.println(""); + //================================================ +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/totsys/common/css/SquareButtons.css b/webapps/totsys/common/css/SquareButtons.css new file mode 100644 index 0000000..e1b501b --- /dev/null +++ b/webapps/totsys/common/css/SquareButtons.css @@ -0,0 +1,411 @@ +@CHARSET "UTF-8"; + +/*Credits: Dynamic Drive CSS Library */ +/*URL: http://www.dynamicdrive.com/style/ */ +a.squarebutton { + background: transparent + url('/totsys/common/images/square-blue-left.gif') no-repeat top left; + display: block; + float: left; + font-weight: bold; + font-size: 6pt; + font-family: Courier; + line-height: 15px; + /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 23px) */ + height: 23px; /* Height of button background height */ + padding-left: 9px; /* Width of left menu image */ + text-decoration: none; +} + +a:link.squarebutton,a:visited.squarebutton,a:active.squarebutton { + color: #4444AA; /*button text color*/ +} + +a.squarebutton span { + background: transparent + url('/totsys/common/images/square-blue-right.gif') no-repeat top right; + display: block; + padding: 5px 9px 5px 0; + /*Set 9px below to match value of 'padding-left' value above*/ +} + +a.squarebutton:hover { /* Hover state CSS */ + background: transparent + url('/totsys/common/images/square-blue-left.gif') no-repeat top left; + background-position: bottom left; + padding-bottom: 0px; +} + +a.squarebutton:hover span { /* Hover state CSS */ + background-position: bottom right; + color: #FFFFEF; +} + +.buttonWrapper { + /* Container you can use to surround a CSS button to clear float */ + overflow: hidden; /*See: http://www.quirksmode.org/css/clearing.html */ + width: 100%; +} + +.buttonWrapper img { + vertical-align: middle; +} + +a .buttonWrapper { + cursor: pointer; +} + +/**********************************************************************************************/ +a.mediumButton { + display: block; +/* float: left;*/ + font-weight: bold; + font-size: 5pt; + font-family: Dotum, Arial; + line-height: 33px; + /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 23px) */ + height: 28px; /* Height of button background height */ + /*padding-left: 16px; Width of left menu image */ + padding:0 16px 0 16px; + text-decoration: none; + position:relative; +} + +a.mediumHighlight { +/* background: transparent + url('/totsys/common/images/square-blue-medium-left.png') no-repeat top + left;*/ + background: transparent + url('/totsys/common/images/menu_on_01.png') repeat-x top + left; + + +} + +a:link.mediumButton,a:visited.mediumButton,a:active.mediumButton { +/* color: #2a4d68; button text color*/ + color: #EEEEFF; +} + +a:link.mediumHighlight,a:visited.mediumHighlight,a:active.mediumHighlight + { + color: #EEEEFF; /*button text color*/ +} + +a.mediumButton span { + background: none; + cursor: pointer; + display: block; +/* padding: 2px 16px 1px 0;*/ + /*padding: 2px 7px 1px 0;*/ + /*Set 9px below to match value of 'padding-left' value above*/ +} + +a.mediumHighlight span { +/* background: transparent + url('/totsys/common/images/square-blue-medium-right.png') no-repeat + top right;*/ +/* background: transparent + url('/totsys/common/images/menu_on_02.png') no-repeat + top right;*/ +} + +a.mediumHighlight:hover { /* Hover state CSS */ +/* background: transparent + url('/totsys/common/images/square-blue-medium-left.png') no-repeat top + left;*/ +/* background: transparent + url('/totsys/common/images/menu_on_01.png') no-repeat top + left;*/ + color: #aacdd8; +} + +a.mediumButton:hover span { /* Hover state CSS */ + color: #aacdd8; +} + +/**********************************************************************************************/ +.largeButton { + +/* background: transparent + url('/totsys/common/images/square-white-large-left.png') no-repeat top + left;*/ + background: transparent + url('/totsys/common/images/menu_bg_repeat.png') repeat-x top + left; + display: block; + float: left; + font-weight: bold; + font-size: 20pt; + font-family: Dotum, Courier; + line-height: 31px; + /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 23px) */ + /*height: 45px;*/ /* Height of button background height */ + height: 35px; + /*padding-left: 9px;*/ /* Width of left menu image */ + text-decoration: none; + z-index: 0; +} + +a:link.largeButton,a:visited.largeButton,a:active.largeButton { + color: #4444AA; /*button text color*/ +} + +.largeButton span { +/* background: transparent + url('/totsys/common/images/square-white-large-right.png') no-repeat + top right;*/ + background: transparent + url('/totsys/common/images/menu_bg_repeat.png') repeat-x + top right; + display: block; + height:35px; +/* padding: 7px 9px 7px 0;*/ + /*padding: 2px 9px 0px 0;*/ + /*Set 9px below to match value of 'padding-left' value above*/ + z-index: 0; +} + +a.largeButton:hover span { /* Hover state CSS */ + color: #4444AA; +} + +/**********************************************************************************************/ +.largeButton2 { +/* background: transparent + url('/totsys/common/images/square-white-large-left.png') no-repeat top + left;*/ + background: transparent + url('/totsys/common/images/menu_Bg_02.png') no-repeat top + left; + display: block; +/* float: left;*/ + font-weight: bold; + font-size: 20pt; + font-family: Dotum, Courier; + line-height: 35px; + /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 23px) */ + /*height: 45px;*/ /* Height of button background height */ + height: 35px; + /*padding-left: 9px;*/ /* Width of left menu image */ + padding-left: 1px; + text-decoration: none; + z-index: 0; +} + +a:link.largeButton2,a:visited.largeButton2,a:active.largeButton2 { + /*color: #4444AA;*/ /*button text color*/ + color: #404c87; +} + +.largeButton2 span { +/* background: transparent + url('/totsys/common/images/square-white-large-right2.png') no-repeat + top right;*/ + display: block; + /*padding: 7px 9px 7px 0;*/ + /*padding: 2px 9px 7px 0;*/ + /*Set 9px below to match value of 'padding-left' value above*/ + z-index: 0; +} + +a.largeButton2:hover span { /* Hover state CSS */ + /*color: #4444AA;*/ + color: #aacdd8; +} + +/**********************************************************************************************/ +.simplebutton { + background: #FAFAFA; + vertical-align: middle; + border: solid 1px #AAAAAA; + display: block; + color: #333333; + font-size: 11px; + font-family: Dotum, serif; + text-decoration: none; + padding: 2px 3px 0 1px; +} + +a:link.simplebutton,a:visited.simplebutton,a:active.simplebutton { + color: #333333; + text-decoration: none; + vertical-align: middle; +} + +a:hover.simplebutton { + background: #FFFFFF; +} + +.simplebutton:hover span { /* Hover state CSS */ + color: #000; +} + +.simplebutton span { + display: block; + font-size: 11px; + color: #333333; + text-decoration: none; + padding: 2px 3px 1px 1px; + vertical-align: middle; +} + +/**********************************************************************************************/ +.blueButton { + background: transparent + url('/totsys/common/images/blue_background_left.png') no-repeat top + left; + display: block; + float: left; + font-size: 20pt; + font-family: Dotum, serif; + /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 23px) */ + height: 25px; /* Height of button background height */ + padding-left: 5px; /* Width of left menu image */ + text-decoration: none; + z-index: 0; + background-position: 0% 50%; +} + +a:link.blueButton,a:visited.blueButton,a:active.blueButton { + color: #000000; /*button text color*/ + text-decoration: none; + padding-left: 10px; +} + +.blueButton span { + background: transparent + url('/totsys/common/images/blue_background_right2.png') no-repeat top + right; + display: block; + padding: 7px 9px 4px 0px; + /*Set 9px below to match value of 'padding-left' value above*/ + z-index: 0; + background-position: 100% 50% +} + +/*********************************************************************************************/ +.yes { + background: url(/totsys/common/images/yes.png) no-repeat left -3px; + text-indent: 21px; +} + +.no { + background: url(/totsys/common/images/no.png) no-repeat left -3px; + text-indent: 20px; +} + +.regist { + background: url(/totsys/common/images/regist.png) no-repeat left -3px; + text-indent: 18px; +} + +.next { + background: url(/totsys/common/images/next.png) no-repeat left -3px; + text-indent: 22px; +} + +.previous { + background: url(/totsys/common/images/previous.png) no-repeat left -3px; + text-indent: 22px; +} + +.check { + background: url(/totsys/common/images/check.png) no-repeat left -3px; + text-indent: 22px; +} + +.disksave { + background: url(/totsys/common/images/disksave.png) no-repeat left -3px; + text-indent: 22px; +} + +.excel { + background: url(/totsys/common/images/excel.png) no-repeat left -3px; + text-indent: 22px; +} + +.info { + background: url(/totsys/common/images/info.png) no-repeat left -3px; + text-indent: 22px; +} + +.list { + background: url(/totsys/common/images/list.png) no-repeat left -3px; + text-indent: 22px; +} + +.listcopy { + background: url(/totsys/common/images/listcopy.png) no-repeat left -3px; + text-indent: 22px; +} + +.manager { + background: url(/totsys/common/images/manager.png) no-repeat left -3px; + text-indent: 22px; +} + +.modify { + background: url(/totsys/common/images/modify.png) no-repeat left -3px; + text-indent: 22px; +} + +.ok { + background: url(/totsys/common/images/ok.png) no-repeat left -3px; + text-indent: 22px; +} + +.plus { + background: url(/totsys/common/images/plus.png) no-repeat left -3px; + text-indent: 22px; +} + +.print { + background: url(/totsys/common/images/print.png) no-repeat left -3px; + text-indent: 22px; +} + +.remove { + background: url(/totsys/common/images/remove.png) no-repeat left -3px; + text-indent: 22px; +} + +.table { + background: url(/totsys/common/images/table.png) no-repeat left -3px; + text-indent: 22px; +} + +.clock { + background: url(/totsys/common/images/clock.png) no-repeat left -3px; + text-indent: 22px; +} + +.detail { + background: url(/totsys/common/images/detail.png) no-repeat left -3px; + text-indent: 22px; +} + +.recall { + background: url(/totsys/common/images/recall.png) no-repeat left -3px; + text-indent: 22px; +} + +.hwp { + background: url(/totsys/common/images/hwp.png) no-repeat left -3px; + text-indent: 22px; +} + +.pencil { + background: url(/totsys/common/images/pencil.png) no-repeat left -3px; + text-indent: 22px; +} + +.dept_init { + background: url(/totsys/common/images/dept_init.png) no-repeat left -3px; + text-indent: 22px; +} + +.disk { + background: url(/totsys/common/images/disk3.png) no-repeat left -1px; + text-indent: 22px; +} diff --git a/webapps/totsys/common/css/SquareButtons_origin.css b/webapps/totsys/common/css/SquareButtons_origin.css new file mode 100644 index 0000000..3b2b8d0 --- /dev/null +++ b/webapps/totsys/common/css/SquareButtons_origin.css @@ -0,0 +1,378 @@ +@CHARSET "UTF-8"; + +/*Credits: Dynamic Drive CSS Library */ +/*URL: http://www.dynamicdrive.com/style/ */ +a.squarebutton { + background: transparent + url('/totsys/common/images/square-blue-left.gif') no-repeat top left; + display: block; + float: left; + font-weight: bold; + font-size: 6pt; + font-family: Courier; + line-height: 15px; + /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 23px) */ + height: 23px; /* Height of button background height */ + padding-left: 9px; /* Width of left menu image */ + text-decoration: none; +} + +a:link.squarebutton,a:visited.squarebutton,a:active.squarebutton { + color: #4444AA; /*button text color*/ +} + +a.squarebutton span { + background: transparent + url('/totsys/common/images/square-blue-right.gif') no-repeat top right; + display: block; + padding: 5px 9px 5px 0; + /*Set 9px below to match value of 'padding-left' value above*/ +} + +a.squarebutton:hover { /* Hover state CSS */ + background: transparent + url('/totsys/common/images/square-blue-left.gif') no-repeat top left; + background-position: bottom left; + padding-bottom: 0px; +} + +a.squarebutton:hover span { /* Hover state CSS */ + background-position: bottom right; + color: #FFFFEF; +} + +.buttonWrapper { + /* Container you can use to surround a CSS button to clear float */ + overflow: hidden; /*See: http://www.quirksmode.org/css/clearing.html */ + width: 100%; +} + +.buttonWrapper img { + vertical-align: middle; +} + +a .buttonWrapper { + cursor: hand; +} + +/**********************************************************************************************/ +a.mediumButton { + display: block; + float: left; + font-weight: bold; + font-size: 5pt; + font-family: Courier; + line-height: 21px; + /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 23px) */ + height: 24px; /* Height of button background height */ + padding-left: 16px; /* Width of left menu image */ + text-decoration: none; +} + +a.mediumHighlight { + background: transparent + url('/totsys/common/images/square-blue-medium-left.png') no-repeat top + left; +} + +a:link.mediumButton,a:visited.mediumButton,a:active.mediumButton { + color: #2a4d68; /*button text color*/ +} + +a:link.mediumHighlight,a:visited.mediumHighlight,a:active.mediumHighlight + { + color: #EEEEFF; /*button text color*/ +} + +a.mediumButton span { + background: none; + cursor: hand; + display: block; + padding: 2px 16px 1px 0; + /*Set 9px below to match value of 'padding-left' value above*/ +} + +a.mediumHighlight span { + background: transparent + url('/totsys/common/images/square-blue-medium-right.png') no-repeat + top right; +} + +a.mediumHighlight:hover { /* Hover state CSS */ + background: transparent + url('/totsys/common/images/square-blue-medium-left.png') no-repeat top + left; +} + +a.mediumButton:hover span { /* Hover state CSS */ + color: #aacdd8; +} + +/**********************************************************************************************/ +.largeButton { + + background: transparent + url('/totsys/common/images/square-white-large-left.png') no-repeat top + left; + display: block; + float: left; + font-weight: bold; + font-size: 20pt; + font-family: Dotum, Courier; + line-height: 31px; + /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 23px) */ + height: 45px; /* Height of button background height */ + padding-left: 9px; /* Width of left menu image */ + text-decoration: none; + z-index: 0; +} + +a:link.largeButton,a:visited.largeButton,a:active.largeButton { + color: #4444AA; /*button text color*/ +} + +.largeButton span { + background: transparent + url('/totsys/common/images/square-white-large-right.png') no-repeat + top right; + display: block; + padding: 7px 9px 7px 0; + /*Set 9px below to match value of 'padding-left' value above*/ + z-index: 0; +} + +a.largeButton:hover span { /* Hover state CSS */ + color: #4444AA; +} + +/**********************************************************************************************/ +.largeButton2 { + background: transparent + url('/totsys/common/images/square-white-large-left.png') no-repeat top + left; + display: block; + float: left; + font-weight: bold; + font-size: 20pt; + font-family: Dotum, Courier; + line-height: 31px; + /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 23px) */ + height: 45px; /* Height of button background height */ + padding-left: 9px; /* Width of left menu image */ + text-decoration: none; + z-index: 0; +} + +a:link.largeButton2,a:visited.largeButton2,a:active.largeButton2 { + color: #4444AA; /*button text color*/ +} + +.largeButton2 span { + background: transparent + url('/totsys/common/images/square-white-large-right2.png') no-repeat + top right; + display: block; + padding: 7px 9px 7px 0; + /*Set 9px below to match value of 'padding-left' value above*/ + z-index: 0; +} + +a.largeButton2:hover span { /* Hover state CSS */ + color: #4444AA; +} + +/**********************************************************************************************/ +.simplebutton { + background: #FAFAFA; + vertical-align: middle; + border: solid 1px #AAAAAA; + display: block; + color: #333333; + font-size: 11px; + font-family: Dotum, serif; + text-decoration: none; + padding: 2px 3px 0 1px; +} + +a:link.simplebutton,a:visited.simplebutton,a:active.simplebutton { + color: #333333; + text-decoration: none; + vertical-align: middle; +} + +a:hover.simplebutton { + background: #FFFFFF; +} + +.simplebutton:hover span { /* Hover state CSS */ + color: #000; +} + +.simplebutton span { + display: block; + font-size: 11px; + color: #333333; + text-decoration: none; + padding: 2px 3px 1px 1px; + vertical-align: middle; +} + +/**********************************************************************************************/ +.blueButton { + background: transparent + url('/totsys/common/images/blue_background_left.png') no-repeat top + left; + display: block; + float: left; + font-size: 20pt; + font-family: Dotum, serif; + /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 23px) */ + height: 25px; /* Height of button background height */ + padding-left: 5px; /* Width of left menu image */ + text-decoration: none; + z-index: 0; + background-position: 0% 50%; +} + +a:link.blueButton,a:visited.blueButton,a:active.blueButton { + color: #000000; /*button text color*/ + text-decoration: none; + padding-left: 10px; +} + +.blueButton span { + background: transparent + url('/totsys/common/images/blue_background_right2.png') no-repeat top + right; + display: block; + padding: 7px 9px 4px 0px; + /*Set 9px below to match value of 'padding-left' value above*/ + z-index: 0; + background-position: 100% 50% +} + +/*********************************************************************************************/ +.yes { + background: url(/totsys/common/images/yes.png) no-repeat left -3px; + text-indent: 21px; +} + +.no { + background: url(/totsys/common/images/no.png) no-repeat left -3px; + text-indent: 20px; +} + +.regist { + background: url(/totsys/common/images/regist.png) no-repeat left -3px; + text-indent: 18px; +} + +.next { + background: url(/totsys/common/images/next.png) no-repeat left -3px; + text-indent: 22px; +} + +.previous { + background: url(/totsys/common/images/previous.png) no-repeat left -3px; + text-indent: 22px; +} + +.check { + background: url(/totsys/common/images/check.png) no-repeat left -3px; + text-indent: 22px; +} + +.disksave { + background: url(/totsys/common/images/disksave.png) no-repeat left -3px; + text-indent: 22px; +} + +.excel { + background: url(/totsys/common/images/excel.png) no-repeat left -3px; + text-indent: 22px; +} + +.info { + background: url(/totsys/common/images/info.png) no-repeat left -3px; + text-indent: 22px; +} + +.list { + background: url(/totsys/common/images/list.png) no-repeat left -3px; + text-indent: 22px; +} + +.listcopy { + background: url(/totsys/common/images/listcopy.png) no-repeat left -3px; + text-indent: 22px; +} + +.manager { + background: url(/totsys/common/images/manager.png) no-repeat left -3px; + text-indent: 22px; +} + +.modify { + background: url(/totsys/common/images/modify.png) no-repeat left -3px; + text-indent: 22px; +} + +.ok { + background: url(/totsys/common/images/ok.png) no-repeat left -3px; + text-indent: 22px; +} + +.plus { + background: url(/totsys/common/images/plus.png) no-repeat left -3px; + text-indent: 22px; +} + +.print { + background: url(/totsys/common/images/print.png) no-repeat left -3px; + text-indent: 22px; +} + +.remove { + background: url(/totsys/common/images/remove.png) no-repeat left -3px; + text-indent: 22px; +} + +.table { + background: url(/totsys/common/images/table.png) no-repeat left -3px; + text-indent: 22px; +} + +.clock { + background: url(/totsys/common/images/clock.png) no-repeat left -3px; + text-indent: 22px; +} + +.detail { + background: url(/totsys/common/images/detail.png) no-repeat left -3px; + text-indent: 22px; +} + +.recall { + background: url(/totsys/common/images/recall.png) no-repeat left -3px; + text-indent: 22px; +} + +.hwp { + background: url(/totsys/common/images/hwp.png) no-repeat left -3px; + text-indent: 22px; +} + +.pencil { + background: url(/totsys/common/images/pencil.png) no-repeat left -3px; + text-indent: 22px; +} + +.dept_init { + background: url(/totsys/common/images/dept_init.png) no-repeat left -3px; + text-indent: 22px; +} + +.disk { + background: url(/totsys/common/images/disk3.png) no-repeat left -1px; + text-indent: 22px; +} diff --git a/webapps/totsys/common/css/basic.css b/webapps/totsys/common/css/basic.css new file mode 100644 index 0000000..763774c --- /dev/null +++ b/webapps/totsys/common/css/basic.css @@ -0,0 +1,141 @@ +.hide { + display:none; +} +.over_hidden { +overflow: hidden; +} +.blind { + overflow:hidden; + position:absolute; + top:0; + left:0; + width:0; + height:0; + font-size:0; + line-height:0; +} +.mp_0 { + margin: 0; + padding: 0; +} +.padding_0 { + padding: 0; +} +.margin_0 { + margin: 0; +} +.margin_10 { + margin: 10px; +} + +.padding_10 { + padding: 10px; +} +.mt_0 { + margin-top: 0px; +} +.mt_5 { + margin-top: 5px; +} +.mt_10 { + margin-top: 10px; +} +.mt_15 { + margin-top: 15px; +} +.mt_20 { + margin-top: 20px; +} +.mr_5 { + margin-right: 5px; +} +.mb_5 { + margin-bottom: 5px; +} +.ml_5 { + margin-left: 5px; +} +.pt_0 { + padding-top: 0px; +} +.pt_30 { + padding-top: 30px; +} +.pr_20 { + padding-right: 20px; +} +.pl_10 { + padding-left: 10px; +} +.pl_15 { + padding-left: 15px; +} +.pl_20 { + padding-left: 20px; +} + +.pl_25 { + padding-left: 25px; +} +.pl_30 { + padding-left: 30px; +} +.height_5 { + height: 5px; +} +.height_10 { + height: 10px; +} +.width_5 { + width: 5px; +} +.width_10 { + width: 10px; +} +.width_full { + width: 100%; +} +.center { + text-align: center; + vertical-align: middle; +} +.tac { + text-align: center; +} +.tal { + text-align: left; +} +.tar { + text-align: right; +} +.vTop { + vertical-align: top; +} +.vMiddle { + vertical-align: middle; +} +.vBottom { + vertical-align: bottom; +} +.bold { + font-weight: bold; +} +.red { + color: red; +} +.white { + color: #FFFFFF; +} + +.disFlex { + display: flex; +} +.flex_1 { + flex:1; +} +.flowHidden { + overflow: hidden; +} +.font_size_middle { + font-size: 0.8rem; +} diff --git a/webapps/totsys/common/css/contentStyle.css b/webapps/totsys/common/css/contentStyle.css new file mode 100644 index 0000000..2385c86 --- /dev/null +++ b/webapps/totsys/common/css/contentStyle.css @@ -0,0 +1,115 @@ +/******************* HTML5 *******************/ +body { + background-color: #FFFFFF; + margin: 0; + min-width:1250px; +} +table { + border: 0px; + width: 100%; + border-spacing: 0; + border-collapse: collapse; +} +#formDiv table { + width: auto; +} +imgae { + margin: 0; +} +td>input{ + box-sizing: border-box; +} +td>textarea{ + box-sizing: border-box; +} +.trail { + font-family: "굴림"; + font-size: 15px; + font-style: normal; + line-height: normal; + text-decoration: none; +} +.trail a:link {color: #004080;} +.trail a:visited {color: #3366CC;} +.trail a:active {color: #535353;} +.trail a:hover {color: #FF6600;} + +.titleTable { + width: 100%; +} +.titleTable td:first-child { + width: 18px; + height: 44px; +} +/******************* doc_regist.jsp *******************/ +.tooltip { + postion: relative; + display: inline-block; + border-bottom:1px dotted black; +} +.tooltip .tooltiptext{ + visibility: hidden; + width: 120px; + background-color: black; + color: #fff; + text-align: center; + padding : 5px 0; + border-radius: 6px; + position : absolute; + z-index:1; +} +tooltip:hover .tooltiptext { + visibility: visible; +} +.label-cotent1 { + display: inline; + width: 100%; + padding: 3px; +} +.label-cotent1 input{ + padding: 0; + vertical-align:middle; +} +.pading_margin_zero{ + padding: 0; + margin: 0; +} + +.iframeHidden { + position: absolute; + visibility: hidden; +} +.contentFrame { + width: 100%; + height:300px; + border: 0; +} +.overlay{ + top:175px; + left:0; + width:100%; + height:310px; + position:absolute; +} +.td_style1{ + padding-left: 5px; + text-align: left; + width: 100%; +} + +.wrap{margin:0; overflow: hidden;} +.report_txt{font-size: 9pt; font-family: Gulim, Dotum, Arial; color: #000;} +.report_list{margin:20px 0 0 0; padding:0; list-style: none;} +.report_list th{font-size: 9pt; font-family: Gulim, Dotum, Arial; color: #555; border-bottom:1px solid #ccc;} +.report_list td{height:19px;} +.report_title{width:41%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;} +.report_title a{width:100%; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; border:none;} +.report_title .report_title_prefix{color: #8e86d4;} +.report_title .report_title_txt:hover{color: #088ce0;} + +.report_name_up{width:15%; text-align: center;} +.report_onwer_name{width:10%; text-align: center;} +.report_start_date{width:12%; text-align: center;} +.report_end_date{width:12%; text-align: center;} +.report_etc{text-align: center;} +.report_no_data{padding:30px 0 0 0; text-align: center;} diff --git a/webapps/totsys/common/css/dtree.css b/webapps/totsys/common/css/dtree.css new file mode 100644 index 0000000..a4525b8 --- /dev/null +++ b/webapps/totsys/common/css/dtree.css @@ -0,0 +1,39 @@ +/*--------------------------------------------------| +| dTree 2.05 | www.destroydrop.com/javascript/tree/ | +|---------------------------------------------------| +| Copyright (c) 2002-2003 Geir | +|--------------------------------------------------*/ +.dtree { + font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size: 11px; + color: #666; + white-space: nowrap; +} + +.dtree img { + border: 0px; + vertical-align: middle; +} + +.dtree a { + color: #333; + text-decoration: none; +} + +.dtree a.node,.dtree a.nodeSel { + white-space: nowrap; + padding: 1px 2px 1px 2px; +} + +.dtree a.node:hover,.dtree a.nodeSel:hover { + color: #333; + text-decoration: underline; +} + +.dtree a.nodeSel { + background-color: #c0d2ec; +} + +.dtree .clip { + overflow: hidden; +} diff --git a/webapps/totsys/common/css/frame.css b/webapps/totsys/common/css/frame.css new file mode 100644 index 0000000..124eb22 --- /dev/null +++ b/webapps/totsys/common/css/frame.css @@ -0,0 +1,49 @@ +@CHARSET "UTF-8"; + +* { + box-sizing: border-box; +} + +nav { + padding: 0 0 0 10px; + width: 150px; +} +html { + height: 100%; +} +article { + -webkit-flex: 3; + -ms-flex: 3; + flex: 3; + padding: 10px 0px 64px 0px; + height: 100%; +} + +footer { + background-color: #777; + padding: 10px; + text-align: center; + color: white; +} + +body { + height:100%; + margin: 0px; + padding: 0px; + overflow: hidden; +} +section { + display: -webkit-flex; + display: flex; + flex-wrap: nowrap; + width: 100%; + height: 100%; +} +iframe { + border: 0; + width: 100%; + height: 100%; +} +header iframe { + height: 102px; +} diff --git a/webapps/totsys/common/css/kecttep.css b/webapps/totsys/common/css/kecttep.css new file mode 100644 index 0000000..e9a31da --- /dev/null +++ b/webapps/totsys/common/css/kecttep.css @@ -0,0 +1,484 @@ +.kecttep_title { + font-family: Dotum; + font-size: 12px; + color: #3C64AB; + font-weight: bold; + padding-top: 3px; +} + +.kecttep_div_show { + font-family: Dotum; + font-size: 12px; + color: #666666; + font-weight: bold; + padding-top: 3px; + padding-left: 5px; +} + +.kecttep_tdmenu { + height: 25px; + background-color: #dedcec; + font-family: Dotum; + font-size: 12px; + font-weight: bold; + color: #666699; + padding-top: 3px; + border-top: none; + border-bottom-width: 1px; + border-left: none; + border-right-width: 0px; + border-right:0px; + border-bottom: 1px solid #8e86d4; +} +.kecttep_tdmenu_middle{ + height: 25px; + background-color: #dedcec; + font-family: Dotum; + font-size: 12px; + font-weight: bold; + color: #666699; + padding-top: 3px; + border-top: none; + border-left: none; + border-right-width: 0px; + border-right:0px; + border-bottom: 1px solid rgb(238, 238, 238); +} + +.kecttep_last_tdmenu { + height: 25px; + background-color: #dedcec; + font-family: Dotum; + font-size: 12px; + font-weight: bold; + color: #666699; + padding-top: 3px; + border-top: none; + border-bottom-width: 1px; + border-left: none; + border-right: none; + border-bottom: 1px solid #8e86d4; +} + +.kecttep_list_tdmenu { + /* + height: 25px; + background-color: #f3f3f3; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 3px; + border-bottom-color: #cccccc; + border-bottom-width: 1px; + border-right-width: 1px; + border-top: none; + border-left: none; + */ + height: 33px; + background-color: #dedcec; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 3px; + border-bottom-color: #dedcec; + border-bottom-width: 1px; + border-right-width: 1px; + border-top: none; + border-left: none; +} + +.kecttep_col_tdmenu { + height: 25px; + background-color: #f3f3f3; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 1px; + border-top-width: 1pt; + border-left: none; +} + +.kecttep_sub_tdmenu { + height: 25px; + background-color: #f3f3f3; + font-family: Dotum; + font-size: 12px; + color: #666666; + border-bottom-width: 1px; + border-left: none; + border-top: none; +} + +.kecttep_graytd { + height: 33px; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 3px; + border-top: none; + border-bottom-color: #dedcec; + border-left: none; + border-right: 1px solid #dedcec; + border-bottom: 1px solid #dedcec; +} + +.kecttep_graytd a{ + display: inline-block; +} + +.kecttep_top_graytd { + height: 25px; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 3px; + border-top-width: 1pt; + border-bottom-width: 1px; + border-left: none; + border-right-width: 1px; + border-bottom-color: #cccccc; + border-right: none; +} + +.kecttep_top2_graytd { + height: 25px; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 3px; + border-top-width: 1pt; + border-bottom-width: 1px; + border-left: none; + border-bottom-color: #cccccc; + border-right: none; +} + +.kecttep_last_graytd { + height: 25px; + font-family: Dotum; + font-size: 12px; + color: #666666; + /*padding-top: 3px;*/ + padding-top: 0px; + border-top: none; + border-bottom-color: #dedcec; + border-left: none; + border-right: none; + border-bottom: 1px solid #dedcec; +} +.kecttep_last_graytd_bottom { + height: 25px; + font-family: Dotum; + font-size: 12px; + color: #666666; + /*padding-top: 3px;*/ + padding-top: 0px; + border-top: none; + border-bottom-color: #dedcec; + border-left: none; + border-right: none; + border-bottom: 1px solid #8e86d4; +} + +.kecttep_list_graytd { + /* + height: 25px; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 3px; + border-top: none; + border-bottom-color: #cccccc; + border-left: none; + border-right: none; + */ + height: 33px; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 3px; + border-top: none; + border-bottom-color: #cccccc; + border-left: none; + border-right: none; +} + +.kecttep_board { + height: 25px; + font-family: Dotum; + font-size: 12px; + padding-top: 3px; + border-left: none; + border-right: none; + border-top: none; + border-bottom: none; +} + +.kecttep_list_table { + border-left: none; + border-right: none; + border-bottom: 1px solid #8e86d4; + /*border-top:2px solid #8e86d4;*/ + /*border-top-color: #8e86d4;*/ + border-top:2px solid #8e86d4; + margin-top: 8px; + /*margin-top: 0px;*/ +} + +.kecttep_none_tdmenu { + font-family: Dotum; + font-size: 12px; + color: #3c64ab; + padding-top: 3px; + border-top-width: 1pt; + border-bottom-width: 1px; + border-left: none; + border-right: none; +} + +.kecttep_date_search { + font-family: Dotum; + font-size: 12px; + color: #3c64ab; +} + +.kecttep_menu_focous { + font-style: normal; + font-family: Dotum; + font-size: 10pt; + color: #4892db; + background-image: transparent url('/totsys/common/images/tab_on.gif') + no-repeat; +} + +.kecttep_menu_focous_out { + font-style: normal; + font-family: Dotum; + font-size: 10pt; + color: #999999; + padding-bottom: 2px; + background-image: transparent url('/totsys/common/images/tab_off.gif') + no-repeat; +} + +.kecttep_button { + margin-top: 1px; +} + +.kecttep_left { + font-family: Dotum; + font-size: 11px; + color: #19468d; + padding-left: 10px; + text-decoration: none; +} + +.kecttep_leftup { + font-family: Dotum; + font-size: 11px; + color: #091d72; + padding-left: 5px; + text-decoration: none; +} + +.kecttep_none { + font-family: Dotum; + font-size: 12px; + color: #666666; + text-decoration: none; +} + +.kecttep_left-bold { + font-family: Dotum; + font-size: 11px; + color: #19468d; + padding-left: 10px; + font-weight: bold; + text-decoration: none; +} + +.kecttep_leftup-bold { + font-family: Dotum; + font-size: 11px; + color: #091d72; + padding-left: 5px; + font-weight: bold; + text-decoration: none; +} + +.kecttep_body { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #535353; + text-decoration: none; + scrollbar-face-color: #DEECEC; + scrollbar-shadow-color: gray; + scrollbar-highlight-color: #ffffff; + scrollbar-3dlight-color: #F0F0F0; + scrollbar-darkshadow-color: #ffffff; + scrollbar-track-color: #F0F0F0; + scrollbar-arrow-color: #666666; +} + +.kecttep_table { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #535353; + text-decoration: none +} + +.kecttep_cal { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #535353; + text-decoration: none; + padding-top: 3px +} + +.kecttep_button_td { + padding-left: 5px; +} + +.kecttep_button_td a:hover { + text-decoration: none; +} + +img { + border: none; +} + +.a:link { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #004080; + text-decoration: none; +} + +.a:visited { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #3366CC; + text-decoration: none; +} + +.a:active { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #535353; + text-decoration: none; +} + +.a:hover { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #FF6600; + text-decoration: underline; +} + +.body { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #535353; + text-decoration: none; +} + +.toolbar { +/* height: 30px;*/ + height: 40px; + vertical-align: middle; + text-align: left; +/* border-left: 1px solid #000000; + border-right: 1px solid #000000; + background: transparent url('/totsys/common/images/bgtoolbar.gif') + repeat-x top center;*/ + background: #efefef; +/* padding-top: 5px; + padding-bottom: 4px; + padding-left: 10px;*/ + padding-top: 8px; + padding-bottom: 0px; + padding-left: 10px; + padding-right: 10px; +} + +.toolbar select, input, img {vertical-align: middle;} + +.toolbar td { + vertical-align: middle; + padding:0 5px 0 5px; +} + +.toolbar td:first-child { + border-left: none; +} + +.toolbar td:last-child { + border-right: none; +} + +.toolbar a {text-decoration: none;} +.toolbar a:hover {text-decoration: none;} + +td { + font-size: 12px; + font-family: "Dotum,arial"; + color: #454545; + line-height: 16px; +} +/*��ũ �׵θ� ����*/ +/* a �±׿� expression ��� �κ� ���� by 2014.11.13 Youngjun Cho */ +a { /*selector-dummy : expression(this.hideFocus=true);*/ text-decoration:none;} +a:link { text-decoration:none;} +a:visited { text-decoration:none;} +a:hover { font-weight:none;} +a:active { text-decoration:none;} + +/* label element ���� input �� �������� ���� by 2014.08.27 Youngjun Cho */ +label {display: inline-block; padding: 4px 0 0 0; cursor: pointer;} +label input, input[type="radio"], input[type="checkbox"] {margin: -5px 0 0 0;} +/*input[type='radio'] {cursor: pointer;}*/ + +/* �����ڷ�(�����ڷ�, ���������ڷ�, �������ڷ�, ��ü�����ڷ�) ����Ʈ �������� ���� by 2014.09.24 Youngjun Cho */ +.kecttep_doc_append_type{position: relative; display: inline-block; width: auto; height: auto; vertical-align: middle;} +.kecttep_doc_append_type_random_collection {background-color: transparent; color: #60497A;} /* ����/���� */ +.kecttep_doc_append_type_random_file {background-color: transparent; color: #31869B;} /* ����/���� */ +.kecttep_doc_append_type_periodical_collection {background-color: transparent; color: #76933C;} /* ����/���� */ +.kecttep_doc_append_type_periodical_file {background-color: transparent; color: #16365C;} /* ����/���� */ + +/* +height: 33px; + background-color: #dedcec; + font-family: Dotum; + font-size: 12px; + font-weight: bold; + color: #666699; + padding-top: 3px; + border-top: none; + border-bottom-width: 1px; + border-left: none; + border-right-width: 1px; + border-right:1px solid #dedcec; +*/ +#div_error {position: relative; display: inline-block; display: none; width: 350px; height: 200px; border:1px solid #dedcec;} +#div_error div.div_error_title {height: 33px; line-height: 33px; background-color: #DEDCEC; color: #F00; text-align: center; font-weight: bold;} +#div_error ul.ul_error_list {margin: 0; padding: 0 0 0 0; list-style: none; overflow: hidden; height: 100%; overflow-y: scroll; /*border: 1px solid blue;*/} +#div_error ul.ul_error_list li {margin: 0; padding: 3px 0 0 5px; list-style: none; /*border: 1px solid #f00;*/} + + +.statistics_number {text-align: right; padding-right: 25px;} \ No newline at end of file diff --git a/webapps/totsys/common/css/kecttep_origin.css b/webapps/totsys/common/css/kecttep_origin.css new file mode 100644 index 0000000..5a60b2d --- /dev/null +++ b/webapps/totsys/common/css/kecttep_origin.css @@ -0,0 +1,361 @@ +.kecttep_title { + font-family: Dotum; + font-size: 12px; + color: #3C64AB; + font-weight: bold; + padding-top: 3px; +} + +.kecttep_div_show { + font-family: Dotum; + font-size: 12px; + color: #666666; + font-weight: bold; + padding-top: 3px; + padding-left: 5px; +} + +.kecttep_tdmenu { + height: 25px; + background-color: #f3f3f3; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 3px; + border-top: none; + border-bottom-width: 1px; + border-left: none; + border-right-width: 1px; +} + +.kecttep_last_tdmenu { + height: 25px; + background-color: #f3f3f3; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 3px; + border-top: none; + border-bottom-width: 1px; + border-left: none; + border-right: none; +} + +.kecttep_list_tdmenu { + height: 25px; + background-color: #f3f3f3; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 3px; + border-bottom-color: #cccccc; + border-bottom-width: 1px; + border-right-width: 1px; + border-top: none; + border-left: none; +} + +.kecttep_col_tdmenu { + height: 25px; + background-color: #f3f3f3; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 1px; + border-top-width: 1pt; + border-left: none; +} + +.kecttep_sub_tdmenu { + height: 25px; + background-color: #f3f3f3; + font-family: Dotum; + font-size: 12px; + color: #666666; + border-bottom-width: 1px; + border-left: none; + border-top: none; +} + +.kecttep_graytd { + height: 25px; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 3px; + border-top: none; + border-bottom-color: #cccccc; + border-left: none; +} + +.kecttep_top_graytd { + height: 25px; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 3px; + border-top-width: 1pt; + border-bottom-width: 1px; + border-left: none; + border-right-width: 1px; + border-bottom-color: #cccccc; + border-right: none; +} + +.kecttep_top2_graytd { + height: 25px; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 3px; + border-top-width: 1pt; + border-bottom-width: 1px; + border-left: none; + border-bottom-color: #cccccc; + border-right: none; +} + +.kecttep_last_graytd { + height: 25px; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 3px; + border-top: none; + border-bottom-color: #cccccc; + border-left: none; + border-right: none; +} + +.kecttep_list_graytd { + height: 25px; + font-family: Dotum; + font-size: 12px; + color: #666666; + padding-top: 3px; + border-top: none; + border-bottom-color: #cccccc; + border-left: none; + border-right: none; +} + +.kecttep_board { + height: 25px; + font-family: Dotum; + font-size: 12px; + padding-top: 3px; + border-left: none; + border-right: none; + border-top: none; + border-bottom: none; +} + +.kecttep_list_table { + border-left: none; + border-right: none; + border-bottom: none; + border-top-color: #4892db; + margin-top: 2px +} + +.kecttep_none_tdmenu { + font-family: Dotum; + font-size: 12px; + color: #3c64ab; + padding-top: 3px; + border-top-width: 1pt; + border-bottom-width: 1px; + border-left: none; + border-right: none; +} + +.kecttep_date_search { + font-family: Dotum; + font-size: 12px; + color: #3c64ab; +} + +.kecttep_menu_focous { + font-style: normal; + font-family: Dotum; + font-size: 10pt; + color: #4892db; + background-image: transparent url('/totsys/common/images/tab_on.gif') + no-repeat; +} + +.kecttep_menu_focous_out { + font-style: normal; + font-family: Dotum; + font-size: 10pt; + color: #999999; + padding-bottom: 2px; + background-image: transparent url('/totsys/common/images/tab_off.gif') + no-repeat; +} + +.kecttep_button { + margin-top: 1px; +} + +.kecttep_left { + font-family: Dotum; + font-size: 11px; + color: #19468d; + padding-left: 10px; + text-decoration: none; +} + +.kecttep_leftup { + font-family: Dotum; + font-size: 11px; + color: #091d72; + padding-left: 5px; + text-decoration: none; +} + +.kecttep_none { + font-family: Dotum; + font-size: 12px; + color: #666666; + text-decoration: none; +} + +.kecttep_left-bold { + font-family: Dotum; + font-size: 11px; + color: #19468d; + padding-left: 10px; + font-weight: bold; + text-decoration: none; +} + +.kecttep_leftup-bold { + font-family: Dotum; + font-size: 11px; + color: #091d72; + padding-left: 5px; + font-weight: bold; + text-decoration: none; +} + +.kecttep_body { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #535353; + text-decoration: none; + scrollbar-face-color: #DEECEC; + scrollbar-shadow-color: gray; + scrollbar-highlight-color: #ffffff; + scrollbar-3dlight-color: #F0F0F0; + scrollbar-darkshadow-color: #ffffff; + scrollbar-track-color: #F0F0F0; + scrollbar-arrow-color: #666666; +} + +.kecttep_table { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #535353; + text-decoration: none +} + +.kecttep_cal { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #535353; + text-decoration: none; + padding-top: 3px +} + +.kecttep_button_td { + padding-left: 5px; +} + +img { + border: none; +} + +.a:link { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #004080; + text-decoration: none; +} + +.a:visited { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #3366CC; + text-decoration: none; +} + +.a:active { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #535353; + text-decoration: none; +} + +.a:hover { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #FF6600;; + text-decoration: underline; +} + +.body { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #535353; + text-decoration: none; +} + +.toolbar { + height: 30px; + vertical-align: middle; + text-align: center; + border-left: 1px solid #000000; + border-right: 1px solid #000000; + background: transparent url('/totsys/common/images/bgtoolbar.gif') + repeat-x top center; + padding-top: 5px; + padding-bottom: 4px; + padding-left: 10px; +} + +.toolbar td:first-child { + border-left: none; +} + +.toolbar td:last-child { + border-right: none; +} +td { + font-size: 12px; + font-family: "Dotum,arial"; + color: #454545; + line-height: 16px; +} +/*��ũ �׵θ� ����*/ +a { selector-dummy : expression(this.hideFocus=true);} +a:link { text-decoration:none;} +a:visited { text-decoration:none;} +a:hover { font-weight:none;} +a:active { text-decoration:none;} diff --git a/webapps/totsys/common/css/mktree.css b/webapps/totsys/common/css/mktree.css new file mode 100644 index 0000000..6a17ec7 --- /dev/null +++ b/webapps/totsys/common/css/mktree.css @@ -0,0 +1,67 @@ +/* Put this inside a @media qualifier so Netscape 4 ignores it */ +@media screen , print { /* Turn off list bullets */ + /*ul.mktree li { list-style: none; padding-left:0px; } */ + /* Control how "spaced out" the tree is */ + ul.mktree,ul.mktree ul,ul.mktree li { + margin-left: 0px; + padding-left: 0px; + list-style: none; + } + ul.mktree_b { + margin-left: 0px; + padding-left: 0px; + } + ul.mktree_b ul { + margin-left: 0px; + padding-left: 0px; + } + ul.mktree_b li { + margin-left: 0px; + padding-left: 23px; + } + /* Provide space for our own "bullet" inside the LI */ + /*ul.mktree li .bullet { padding-left: 0px; }*/ + /*ul.mktree_b li .bullet { padding-left: 10px; }*/ + /* Show "bullets" in the links, depending on the class of the LI that the link's in + ul.mktree li.liOpen .bullet { cursor: pointer; background: url(/totsys/common/images/minus.gif) center left no-repeat; } + ul.mktree li.liClosed .bullet { cursor: pointer; background: url(/totsys/common/images/plus.gif) center left no-repeat; } + ul.mktree li.liBullet .bullet { cursor: default; background: url(/totsys/common/images/bullet.gif) center left no-repeat; } + /* Sublists are visible or not based on class of parent LI */ + ul.mktree li.liOpen ul { + display: block; + } + ul.mktree li.liClosed ul { + display: none; + } + /* Format menu items differently depending on what level of the tree they are in */ + ul.mktree li { + font-size: 9pt; + } + ul.mktree li ul li { + font-size: 9pt; + } + ul.mktree li ul li ul li { + font-size: 9pt; + } + ul.mktree li ul li ul li ul li { + font-size: 9pt; + } + ul.mktree li ul li ul li ul li ul li { + font-size: 9pt; + } + ul.mktree li ul li ul li ul li ul li ul li { + font-size: 9pt; + } + ul.mktree li ul li ul li ul li ul li ul li ul li { + font-size: 9pt; + } + ul.mktree li ul li ul li ul li ul li ul li ul li ul li { + font-size: 9pt; + } + ul.mktree li ul li ul li ul li ul li ul li ul li ul li ul li { + font-size: 9pt; + } + ul.mktree li ul li ul li ul li ul li ul li ul li ul li ul li ul li { + font-size: 9pt; + } +} diff --git a/webapps/totsys/common/css/popup.css b/webapps/totsys/common/css/popup.css new file mode 100644 index 0000000..d2ea3d3 --- /dev/null +++ b/webapps/totsys/common/css/popup.css @@ -0,0 +1,128 @@ +body { + padding: 0px 0px; +} +a:link { + font-style: none; + line-height: normal; + color: #004080; + text-decoration: none; +} + +a:visited { + font-style: none; + line-height: normal; + color: #3366CC; + text-decoration: none; +} + +a:active { + font-style: none; + line-height: normal; + color: #535353; + text-decoration: none; +} + +a:hover { + font-style: none; + line-height: normal; + color: #FF6600; + text-decoration: none; +} + +img { + border: none; +} + +table { + border: 0px; + padding:0px; + border-spacing: 0px; + border-collapse: collapse; +} +th, td{ + padding:0px; +} +td>input{ + box-sizing: border-box; +} +td>textarea{ + border: none; + width: 100%; + box-sizing: border-box; /* Chrome, IE8, Opera, Safari 5.1*/ + margin: 0; padding: 0; border-width: 0; +} +.borderTable { + border: 1px; + border:solid; + border-color: #e3e3e3; +} + +.title { + display: table; + background-color:#728ab5; + margin: 0px; + padding: 0px; + width: 100%; + height: 30px; +} +.title>div { + display: table-cell; + font-weight: bold; + font-size: 0.75rem; + color: #FFFFFF; + vertical-align: middle; + padding-left: 20px; + +} + +.deptListSide { + flex:1; +} +.deptListSide b { + font-size: 0.8rem; +} +iframe { + border: 0; +} +.deptListSide>iframe { + width: 100%; + height: 410px; + border: 2px solid; + border-color: #8ea6d6; +} +.deptListCenter { + width: 100px; +} +.lv1 { + height: 40px; + align-items: center; +} +.lv3 { + border:solid; + line-height: 100px; + border-color: #728ab5; + align-items: center; +} +.hr { + height: 1px; + background: #728ab5; +} +.deptPt { + padding-top: 150px; +} +.table1 tr>td{ + border-bottom: 1px solid #dedcec; +} +.table1 tr:last-child>td { + border-bottom: 1px solid #8e86d4; + + } +.table_border1 tr>td { + border: 1px solid grey; +} + +.td_style1{ + padding-left: 5px; + text-align: left; + width: 100%; +} \ No newline at end of file diff --git a/webapps/totsys/common/css/style.css b/webapps/totsys/common/css/style.css new file mode 100644 index 0000000..a38098e --- /dev/null +++ b/webapps/totsys/common/css/style.css @@ -0,0 +1,623 @@ +/********************* top.jsp *********************************************************************************************************************************/ +#systemName { + position: absolute; + top: 0; + right: 0; + font-weight: bold; + font-size: 13pt; + font-family: Dotum, Courier; + padding-top: 20px; + padding-right: 15px; + letter-spacing: 0; + color: #ccc; + z-index: 1; +} + +#welcome { + background: transparent url('/totsys/common/images/menu_bg_repeat.png') repeat-x top left; + vertical-align: middle; + display: block; + color: #EEEEFF; + font-size: 11px; + font-family: Dotum, serif; + font-weight: normal; + height: auto; + margin:2px 3px 0 40px; +/* padding: 3px 10px 2px 10px;*/ +} + +#welcome span {display: inline-block; background: transparent; height: 23px; line-height: 27px; vertical-align: middle;} +#welcome .welcome_dept {margin: 0 0 0 10px;} +#welcome .welcome_username {margin: 0 0 0 10px;} +#welcome .welcome_greeting {margin: 0 0 0 10px;} +#welcome .welcome_close {margin: 0 3px 0 10px; vertical-align: top; line-height: 23px;} +#welcome .welcome_close img {vertical-align: top; cursor: pointer;} + +#top_other_menu { + height: auto; + margin:5px 3px 0 40px; + padding: 3px 10px 2px 10px; +} +#top_other_menu a { + color: #EEEEFF; + font-size: 12px; + font-family: �룍��, serif; +} +#top_other_menu a:hover { + color: #aacdd8; +} + +#top_body { + margin:0px; + background: transparent url('/totsys/common/images/sky.png') no-repeat top left; + display: block; + height: 180px; +} + +#top_tableMenu { + width: 100%; + border-spacing: 0; + border-collapse: collapse; + margin: 20px 0 0 5px; +} +.table_aleft{ + border-spacing: 0; + border-collapse: collapse; + text-align: left; +} +.width_full { + width: 100%; +} +/********************* left.jsp *********************************************************************************************************************************/ +table caption{ + overflow: hidden; + position: absolute; + top: 0; + left: 0; + width: 1px; + height: 1px; + font-size: 0; + line-height: 0; +} +.menuFont { + color: #FFFFFF; + font-size: 10pt; + vertical-align: top; + font-weight: bold; +} +.display_none { + display: none; +} +.display_tc { + display:table-cell; +} + +.leftMenu_main { + width: 130px; + border: 0; + border-spacing: 0px; + border-collapse: collapse; + padding: 0; + margin: 0; + text-align: center; +} +.leftMenu_sub { + width: 120px; + border: 1; + border-spacing: 0px; + border-collapse: collapse; + padding: 0; + text-align: center; +} +.leftMenu_detail { + padding-left:10px; + text-align:left; + height:30px; + top:50%; + line-height: 30px; + vertical-align: middle; +} +.left_body { + background-color: #ffffff; + margin: 0; + padding: 0; +} +.pdl_10 { + padding-left: 5px; +} +/******************************************************************************************************************************************************/ +td { + font-size: 12px; + font-family: "Dotum,arial"; + color: #454545; + line-height: 16px; +} + +/********************* Forms *********************************************************************************************************************************/ +input,textarea,select { + border: #ABBDDD 1px solid; + font-size: 11px; + font-family: "Dotum,arial"; + color: #3C64AB; +} + +/********************* basic Link ****************************************************************************************************************************/ +a:link { + font-family: "Dotum,arial"; + font-size: 12px; + color: #000000; + text-decoration: none; +} + +a:visited { + font-family: "Dotum,arial"; + font-size: 12px; + color: #000000; + text-decoration: none; +} +a:active { + font-family: "Dotum,arial"; + font-size: 12px; + color: #d93300; + text-decoration: none; +} + +a:hover { + font-family: "Dotum,arial"; + font-size: 12px; + color: #d93300; + text-decoration: none; +} + +/********************* Scrollbar ****************************************************************************************************************************/ +BODY { + scrollbar-face-color: #F2F2F2; + scrollbar-shadow-color: #B7B7B7; + scrollbar-highlight-color: #F2F2F2; + scrollbar-3dlight-color: #F2F2F2; + scrollbar-darkshadow-color: #E9E9E9; + scrollbar-track-color: #E9E9E9; + scrollbar-arrow-color: #999999; +} + +TABLE,IMG { + border: 0px; +} + +FORM,P { + margin: 0px; +} + +/* Link */ +.menu_L:link { + font-size: 12px; + color: #3C64AB; + text-decoration: none; +} + +.menu_L:visited { + font-size: 12px; + color: #3C64AB; + text-decoration: none; +} + +.menu_L:active { + font-size: 12px; + color: #3C64AB; + text-decoration: none; + font-weight: bold; +} + +.menu_L:hover { + font-size: 12px; + color: #3C64AB; + text-decoration: none; + font-weight: bold; +} + +.f_11_gray { + FONT-SIZE: 11px; + color: #9F9F9F; +} + +.f_11_gray:link { + font-size: 11px; + color: #9F9F9F; + text-decoration: none; +} + +.f_11_gray:visited { + font-size: 11px; + color: #9F9F9F; + text-decoration: none; +} + +.f_11_gray:active { + font-size: 11px; + color: #9F9F9F; + text-decoration: none; +} + +.f_11_gray:hover { + font-size: 11px; + color: #9F9F9F; + text-decoration: none; +} + +.f_11_gray1 { + FONT-SIZE: 11px; + color: #666666; +} + +.f_11_gray1:link { + font-size: 11px; + color: #666666; + text-decoration: none; +} + +.f_11_gray1:visited { + font-size: 11px; + color: #666666; + text-decoration: none; +} + +.f_11_gray1:active { + font-size: 11px; + color: #000000; + text-decoration: none; +} + +.f_11_gray1:hover { + font-size: 11px; + color: #000000; + text-decoration: none; +} + +.f_11_site_tl { + FONT-SIZE: 11px; + color: #346DBA; +} + +.f_11_site_tl:link { + font-size: 11px; + color: #346DBA; + text-decoration: none; +} + +.f_11_site_tl:visited { + font-size: 11px; + color: #346DBA; + text-decoration: none; +} + +.f_11_site_tl:active { + font-size: 11px; + color: #346DBA; + text-decoration: none; +} + +.f_11_site_tl:hover { + font-size: 11px; + color: #346DBA; + text-decoration: none; +} + +.f_11_site { + FONT-SIZE: 11px; + color: #454545; +} + +.f_11_site:link { + font-size: 11px; + color: #454545; + text-decoration: none; +} + +.f_11_site:visited { + font-size: 11px; + color: #454545; + text-decoration: none; +} + +.f_11_site:active { + font-size: 11px; + color: #454545; + text-decoration: none; +} + +.f_11_site:hover { + font-size: 11px; + color: #454545; + text-decoration: none; +} + +.f_11_tab { + FONT-SIZE: 11px; + color: #ffffff; + text-align: center; + padding-top: 2px; +} + +.f_11_tab:link { + font-size: 11px; + color: #ffffff; + text-decoration: none; + text-align: center; +} + +.f_11_tab:visited { + font-size: 11px; + color: #ffffff; + text-decoration: none; + text-align: center; +} + +.f_11_tab:active { + font-size: 11px; + color: #ffffff; + text-decoration: none; + text-align: center; +} + +.f_11_tab:hover { + font-size: 11px; + color: #ffffff; + text-decoration: none; + text-align: center; +} + +.f_12_p_L { + FONT-SIZE: 12px; + color: #5083D4; +} + +.f_12_p_L:link { + font-size: 12px; + color: #666666; + text-decoration: none; +} + +.f_12_p_L:visited { + font-size: 12px; + color: #666666; + text-decoration: none; +} + +.f_12_p_L:active { + font-size: 12px; + color: #5083D4; + text-decoration: none; +} + +.f_12_p_L:hover { + font-size: 12px; + color: #5083D4; + text-decoration: none; +} + +.f_12_p_Black_L { + FONT-SIZE: 12px; + color: #000000; +} + +.f_12_p_Black_L:link { + font-size: 12px; + color: #004080; + text-decoration: none; +} + +.f_12_p_Black_L:visited { + font-size: 12px; + color: #3366CC; + text-decoration: none; +} + +.f_12_p_Black_L:active { + font-size: 12px; + color: #FF6600; + text-decoration: none; +} + +.f_12_p_Black_L:hover { + font-size: 12px; + color: #FF6600; + text-decoration: none; +} + +.left-L { + font-size: 11px; + color: #666666; +} + +.left-L:link { + font-size: 11px; + color: #666666; + text-decoration: none +} + +.left-L:visited { + font-size: 11px; + color: #666666; + ext-decoration: none +} + +.left-L:active { + font-size: 11px; + color: #666666; + text-decoration: none +} + +.left-L:hover { + font-size: 11px; + color: #666666; + text-decoration: none +} + +/* font */ +.f_13_title { + FONT-SIZE: 13px; + color: #3C64AB; + font-weight: bold; +} + +.f_12_33 { + FONT-SIZE: 12px; + color: #333333; + font-weight: bold; + padding-top: 3px; +} + +.f_12_66 { + FONT-SIZE: 12px; + color: #666666; + padding-top: 3px; +} + +.f_11_ptl { + FONT-SIZE: 11px; + color: #2C2C2C; + padding-top: 3px; + background-color: #F4F4F4; + text-align: center; + height: 20px; +} + +.f_12_orange { + FONT-SIZE: 12px; + color: #ff6600; +} + +.f_12_blue { + FONT-SIZE: 12px; + color: #0974C3; + font-weight: bold; +} + +.f_12_white_b { + FONT-SIZE: 12px; + color: #ffffff; + font-weight: bold; +} + +.f_11_bottom { + FONT-SIZE: 11px; + color: #A8A8A8; + font-family: arial; +} + +/* box */ +.left_box1 { + FONT-SIZE: 12px; + background-color: #ffffff; + border: #A8C8EE 1px solid; + table-layout: fixed; +} + +.left_box2 { + FONT-SIZE: 12px; + background-color: #EFF6FC; + border: #A8C8EE 1px solid; + table-layout: fixed; +} + +.right_box1 { + FONT-SIZE: 12px; + background-color: #ffffff; + border: #BEBEBE 1px solid; + table-layout: fixed; +} + +.table_title { + FONT-SIZE: 11px; + color: #3C64AC; + background-color: #F3F6FD; + table-layout: fixed; + text-align: center; + height: 18px; +} + +.table_title12 { + FONT-SIZE: 12px; + color: #3C64AC; + background-color: #F3F6FD; + table-layout: fixed; + text-align: center; + height: 21px; +} + +.table_con12 { + FONT-SIZE: 12px; + color: #5A6466; + background-color: #ffffff; + table-layout: fixed; + height: 21px; + padding: 0 12px 0 12px; +} + +.bod_con12_c { + FONT-SIZE: 12px; + color: #5A6466; + background-color: #ffffff; + text-align: center; + table-layout: fixed; + height: 21px; +} + +.bod_con12 { + FONT-SIZE: 12px; + color: #5A6466; + background-color: #ffffff; + table-layout: fixed; + height: 21px; + padding: 0 4px 0 4px; +} + +.table_con { + FONT-SIZE: 11px; + color: #5A6466; + background-color: #ffffff; + table-layout: fixed; + text-align: center; + height: 18px; +} + +.tab_see { + FONT-SIZE: 12px; + background-color: #AABDDD; + border: #AABDDD 1px solid; + font-weight: bold; + color: #ffffff; + text-align: center; + height: 20px; + table-layout: fixed; +} + +.tab_non { + FONT-SIZE: 12px; + background-color: #F3F3F3; + border: #C8C8C8 1px solid; + font-weight: bold; + color: #3C64AB; + text-align: center; + height: 20px; + table-layout: fixed; +} + +.data_no { + FONT-SIZE: 12px; + background-color: #F2F2F4; + border: #AABDDD 1px solid; + color: #3C64AB; + text-align: center; + height: 30px; + table-layout: fixed; +} + +/* input */ +input.no { + border: #ABBDDD 1px solid; + background-color: #F1F1F1; + font-size: 11px; + font-family: "Dotum,arial"; + color: #3C64AB; +} \ No newline at end of file diff --git a/webapps/totsys/common/css/tabs.css b/webapps/totsys/common/css/tabs.css new file mode 100644 index 0000000..3b4fa39 --- /dev/null +++ b/webapps/totsys/common/css/tabs.css @@ -0,0 +1,143 @@ +@CHARSET "UTF-8"; + +#main { + border-top: 3px solid #ff9c1b; + clear: both; + width: 100%; + + /* + background: #EEEEF0; + padding-top: 2em; + */ +} + +#contents { /*padding: 1.5em;*/ + padding-top: 0px; + padding-left:0px; + padding-right:0px; + width: 100%; + /*background: #FFFDF3;*/ + /*min-height: 300px;*/ +} + +#header { + padding-left:0px; + position: relative; + padding-right:0px; + height: 1em; + width: 45em; + /* a width is required for Opera, older Mozilla browsers, and Konqueror browsers */ + margin: 10px 0 0 0; +} + +#header ul#primary { + margin: 0; + padding: 0; + position: absolute; + bottom: -3px; + width: 45em; + /* a width is required for Opera, older Mozilla browsers, and Konqueror browsers */ +} + +#header ul li { + display: inline; + list-style: none; +} + +#header ul#primary a,#header ul#primary span,#header ul#primary a.current + { + width: 105px; + height:28px; + display: block; + float: left; + padding: 2px 0 0 0; + margin: 1px 0px 1px 0; + /*margin: 0px 0px 1px 0;*/ + text-align: center; + font-weight: bold; + font-family: Dotum, tahoma, verdana, sans-serif; + font-size: 82%; + text-decoration: none; + color: #fff; +} + +#header ul#primary span,#header ul#primary a.current,#header ul#primary a.current:hover + { /*border: 3px solid #58BDF7;*/ + border-bottom: none; + border-radius: 9px 9px 0 0; + -moz-border-radius: 9px 9px 0 0; + -webkit-border-radius: 9px 9px 0 0; + -khtml-border-radius: 9px 9px 0 0; + /*background: #FCFCFF;*/ + background: transparent url('/totsys/common/images/tab_on_orange.gif'); + padding-top:6px; + padding-bottom: 3px; + margin-top: 0; + margin-bottom: 0; +} + +#header ul#primary a { /*background: #FFFAE1;*/ + background: transparent url('/totsys/common/images/tab_off_orange.gif'); + /*border: 2px solid #DADADA;*/ + border-bottom: none; + border-radius: 9px 9px 0 0; + /* + -moz-border-radius: 9px 9px 0 0; + -webkit-border-radius: 9px 9px 0 0; + -khtml-border-radius: 9px 9px 0 0; + */ + padding-top: 6px; + color: #fff; +} + +#header ul#primary a:hover { + margin-top: 0; + border-color: #666; + /*background: #FFF7CD;*/ + padding-bottom: 3px; + +} + +#header ul#secondary { + position: absolute; + margin: 0; + padding: 0; + bottom: -1.4em; + left: 1px; + width: 50em; + /* a width is required for Opera, older Mozilla browsers, and Konqueror browsers */ +} + +#header ul#secondary li a,#header ul#secondary li span { + width: auto; + display: block; + float: left; + /*padding: 0 10px;*/ + margin: 0; + text-align: auto; + border: none; + border-right: 1px solid #AAA; + background: none; +} + +#header ul#secondary li a { + color: #06C; + text-decoration: underline; +} + +#header ul#secondary li a:hover { + color: #333; + background: transparent; + padding: 0 10px; + border: none; + border-right: 1px solid #AAA; +} + +#header ul#secondary li a:active { + color: #000; + background: transparent; +} + +#header ul#secondary li:last-child a { + border: none; +} diff --git a/webapps/totsys/common/css/tabs_origin.css b/webapps/totsys/common/css/tabs_origin.css new file mode 100644 index 0000000..ff90da5 --- /dev/null +++ b/webapps/totsys/common/css/tabs_origin.css @@ -0,0 +1,131 @@ +@CHARSET "UTF-8"; + +#main { + border-top: 3px solid #48ADE7; + clear: both; + /* + background: #EEEEF0; + padding-top: 2em; + */ +} + +#contents { /*padding: 1.5em;*/ + padding-top: 2px; + /*background: #FFFDF3;*/ + /*min-height: 300px;*/ +} + +#header { + position: relative; + width: 100%; + height: 1em; + width: 45em; + /* a width is required for Opera, older Mozilla browsers, and Konqueror browsers */ +} + +#header ul#primary { + margin: 0; + padding: 0; + position: absolute; + bottom: -3px; + width: 45em; + /* a width is required for Opera, older Mozilla browsers, and Konqueror browsers */ +} + +#header ul li { + display: inline; + list-style: none; +} + +#header ul#primary a,#header ul#primary span,#header ul#primary a.current + { + width: 83px; + display: block; + float: left; + padding: 2px 0 0 0; + margin: 1px 3px 1px 0; + text-align: center; + font-weight: bold; + font-family: Dotum, tahoma, verdana, sans-serif; + font-size: 82%; + text-decoration: none; + color: #307AA7; +} + +#header ul#primary span,#header ul#primary a.current,#header ul#primary a.current:hover + { /*border: 3px solid #58BDF7;*/ + border-bottom: none; + border-radius: 9px 9px 0 0; + -moz-border-radius: 9px 9px 0 0; + -webkit-border-radius: 9px 9px 0 0; + -khtml-border-radius: 9px 9px 0 0; + /*background: #FCFCFF;*/ + background: transparent url('/totsys/common/images/tab_on.gif'); + padding-top: 2px; + padding-bottom: 3px; + margin-top: 0; + margin-bottom: 0; +} + +#header ul#primary a { /*background: #FFFAE1;*/ + background: transparent url('/totsys/common/images/tab_off.gif'); + /*border: 2px solid #DADADA;*/ + border-bottom: none; + border-radius: 9px 9px 0 0; + -moz-border-radius: 9px 9px 0 0; + -webkit-border-radius: 9px 9px 0 0; + -khtml-border-radius: 9px 9px 0 0; + padding-top: 2px; + color: #777; +} + +#header ul#primary a:hover { + margin-top: 0; + border-color: #666; + /*background: #FFF7CD;*/ + padding-bottom: 3px; +} + +#header ul#secondary { + position: absolute; + margin: 0; + padding: 0; + bottom: -1.4em; + left: 1px; + width: 50em; + /* a width is required for Opera, older Mozilla browsers, and Konqueror browsers */ +} + +#header ul#secondary li a,#header ul#secondary li span { + width: auto; + display: block; + float: left; + /*padding: 0 10px;*/ + margin: 0; + text-align: auto; + border: none; + border-right: 1px solid #AAA; + background: none; +} + +#header ul#secondary li a { + color: #06C; + text-decoration: underline; +} + +#header ul#secondary li a:hover { + color: #333; + background: transparent; + padding: 0 10px; + border: none; + border-right: 1px solid #AAA; +} + +#header ul#secondary li a:active { + color: #000; + background: transparent; +} + +#header ul#secondary li:last-child a { + border: none; +} diff --git a/webapps/totsys/common/css/text.css b/webapps/totsys/common/css/text.css new file mode 100644 index 0000000..d41656e --- /dev/null +++ b/webapps/totsys/common/css/text.css @@ -0,0 +1,261 @@ +@CHARSET "UTF-8"; + +/* +body {font-family: "굴림"; font-size: 12px; font-style: normal; line-height: normal; color: #535353; text-decoration: none; +scrollbar-face-color:#DEECEC; scrollbar-shadow-color:gray; scrollbar-highlight-color:#ffffff; scrollbar-3dlight-color:#F0F0F0; scrollbar-darkshadow-color:#ffffff; +scrollbar-track-color:#F0F0F0; scrollbar-arrow-color:#666666;} + +table{font-family: "굴림"; font-size: 12px; font-style: normal; line-height: normal; color: #535353; text-decoration: none} +*/ +img { + border: none; +} + +a:link { + font-family: "굴림"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #004080; + text-decoration: none; +} + +a:visited { + font-family: "굴림"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #3366CC; + text-decoration: none; +} + +a:active { + font-family: "굴림"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #535353; + text-decoration: none; +} + +a:hover { + font-family: "굴림"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #FF6600;; + text-decoration: underline; +} + +.d11_gray { + font-family: "돋움"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #535353; + text-decoration: none; +} + +.g12b_gray { + font-family: "굴림"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #737373; + text-decoration: none; + font-weight: bold; +} + +.notice_tgray { + font-family: "굴림"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #464646; + text-decoration: none; +} + +.notice_bgray { + font-family: "굴림"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #7f7f7f; + text-decoration: none; +} + +a.d11_bgreen:link { + font-family: "돋움"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #1A667B; + text-decoration: none; +} + +a.d11_bgreen:visited { + font-family: "돋움"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #1A667B; + text-decoration: none; +} + +a.d11_bgreen:active { + font-family: "돋움"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #1A667B; + text-decoration: none; +} + +a.d11_bgreen:hover { + font-family: "돋움"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #1A667B; + text-decoration: underline; +} + +a.d11_blue:link { + font-family: "돋움"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #336699; + text-decoration: none; +} + +a.d11_blue:visited { + font-family: "돋움"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #336699; + text-decoration: none; +} + +a.d11_blue:active { + font-family: "돋움"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #336699; + text-decoration: none; +} + +a.d11_blue:hover { + font-family: "돋움"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #336699; + text-decoration: underline; +} + +a.d11_green:link { + font-family: "돋움"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #457106; + text-decoration: none; +} + +a.d11_green:visited { + font-family: "돋움"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #457106; + text-decoration: none; +} + +a.d11_green:active { + font-family: "돋움"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #457106; + text-decoration: none; +} + +a.d11_green:hover { + font-family: "돋움"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #457106; + text-decoration: underline; +} + +.sub_title { + font-family: "돋움"; + font-size: 13px; + font-style: normal; + line-height: normal; + font-weight: bold; + font-variant: normal; + color: #535353; + text-decoration: none +} + +.doc_reg { + font-family: "굴림"; + font-size: 12px; + font-style: normal; + line-height: normal; + font-weight: bold; + font-variant: normal; + color: #325A82; + text-decoration: none +} + +.box { + background-color: #ffffff; + font-family: "굴림,Gulim"; + font-size: 12px; + color: #636163; + border: 1px solid #cccccc +} + +.inputtxt { + BORDER-RIGHT: #C0BFBF 1px solid; + BORDER-TOP: #C0BFBF 1px solid; + FONT-SIZE: 9pt; + BORDER-LEFT: #C0BFBF 1px solid; + BORDER-BOTTOM: #C0BFBF 1px solid; + FONT-FAMILY: "Tahoma,Verdana,MS Sans Serif"; + BACKGROUND-COLOR: #ffffff; + ime-mode: active; +} + +.login_input { + BORDER-RIGHT: #B4B3B3 1px solid; + BORDER-TOP: #B4B3B3 1px solid; + FONT-SIZE: 9pt; + BORDER-LEFT: #B4B3B3 1px solid; + BORDER-BOTTOM: #B4B3B3 1px solid; + FONT-FAMILY: "Tahoma,Verdana,MS Sans Serif"; + BACKGROUND-COLOR: #EFEFED; +} + +.doc_title { + font-family: "돋움"; + font-size: 14px; + font-style: normal; + line-height: 25pt; + font-weight: bold; + font-variant: normal; + color: #464646; + text-decoration: none +} + +.button_img { + border-style: solid; + border-color: #B0AFAF; + border-width: 1px +} diff --git a/webapps/totsys/common/images/B_SEND.gif b/webapps/totsys/common/images/B_SEND.gif new file mode 100644 index 0000000..7b7d755 Binary files /dev/null and b/webapps/totsys/common/images/B_SEND.gif differ diff --git a/webapps/totsys/common/images/COUNT_TITLE01.GIF b/webapps/totsys/common/images/COUNT_TITLE01.GIF new file mode 100644 index 0000000..e3e2675 Binary files /dev/null and b/webapps/totsys/common/images/COUNT_TITLE01.GIF differ diff --git a/webapps/totsys/common/images/EXIT.gif b/webapps/totsys/common/images/EXIT.gif new file mode 100644 index 0000000..e08064c Binary files /dev/null and b/webapps/totsys/common/images/EXIT.gif differ diff --git a/webapps/totsys/common/images/LEFT_ARROW.GIF b/webapps/totsys/common/images/LEFT_ARROW.GIF new file mode 100644 index 0000000..22ab2f8 Binary files /dev/null and b/webapps/totsys/common/images/LEFT_ARROW.GIF differ diff --git a/webapps/totsys/common/images/Thumbs.db b/webapps/totsys/common/images/Thumbs.db new file mode 100644 index 0000000..e69de29 diff --git a/webapps/totsys/common/images/accept.gif b/webapps/totsys/common/images/accept.gif new file mode 100644 index 0000000..dce6196 Binary files /dev/null and b/webapps/totsys/common/images/accept.gif differ diff --git a/webapps/totsys/common/images/afolder.gif b/webapps/totsys/common/images/afolder.gif new file mode 100644 index 0000000..caf0863 Binary files /dev/null and b/webapps/totsys/common/images/afolder.gif differ diff --git a/webapps/totsys/common/images/aft.gif b/webapps/totsys/common/images/aft.gif new file mode 100644 index 0000000..8e8b5fb Binary files /dev/null and b/webapps/totsys/common/images/aft.gif differ diff --git a/webapps/totsys/common/images/all_form.gif b/webapps/totsys/common/images/all_form.gif new file mode 100644 index 0000000..7cd2854 Binary files /dev/null and b/webapps/totsys/common/images/all_form.gif differ diff --git a/webapps/totsys/common/images/b_top_cbg.jpg b/webapps/totsys/common/images/b_top_cbg.jpg new file mode 100644 index 0000000..0cc90e0 Binary files /dev/null and b/webapps/totsys/common/images/b_top_cbg.jpg differ diff --git a/webapps/totsys/common/images/b_topbg.jpg b/webapps/totsys/common/images/b_topbg.jpg new file mode 100644 index 0000000..bf835d8 Binary files /dev/null and b/webapps/totsys/common/images/b_topbg.jpg differ diff --git a/webapps/totsys/common/images/bg_balloon_center.jpg b/webapps/totsys/common/images/bg_balloon_center.jpg new file mode 100644 index 0000000..c7fcbfe Binary files /dev/null and b/webapps/totsys/common/images/bg_balloon_center.jpg differ diff --git a/webapps/totsys/common/images/bg_balloon_left.jpg b/webapps/totsys/common/images/bg_balloon_left.jpg new file mode 100644 index 0000000..522c330 Binary files /dev/null and b/webapps/totsys/common/images/bg_balloon_left.jpg differ diff --git a/webapps/totsys/common/images/bg_balloon_right.jpg b/webapps/totsys/common/images/bg_balloon_right.jpg new file mode 100644 index 0000000..49b793a Binary files /dev/null and b/webapps/totsys/common/images/bg_balloon_right.jpg differ diff --git a/webapps/totsys/common/images/bgtoolbar.gif b/webapps/totsys/common/images/bgtoolbar.gif new file mode 100644 index 0000000..722415c Binary files /dev/null and b/webapps/totsys/common/images/bgtoolbar.gif differ diff --git a/webapps/totsys/common/images/blue_background_left.png b/webapps/totsys/common/images/blue_background_left.png new file mode 100644 index 0000000..28a5251 Binary files /dev/null and b/webapps/totsys/common/images/blue_background_left.png differ diff --git a/webapps/totsys/common/images/blue_background_right2.png b/webapps/totsys/common/images/blue_background_right2.png new file mode 100644 index 0000000..93f4931 Binary files /dev/null and b/webapps/totsys/common/images/blue_background_right2.png differ diff --git a/webapps/totsys/common/images/bottombar_bg.jpg b/webapps/totsys/common/images/bottombar_bg.jpg new file mode 100644 index 0000000..b2372fd Binary files /dev/null and b/webapps/totsys/common/images/bottombar_bg.jpg differ diff --git a/webapps/totsys/common/images/bt_2ndReg.gif b/webapps/totsys/common/images/bt_2ndReg.gif new file mode 100644 index 0000000..aefe764 Binary files /dev/null and b/webapps/totsys/common/images/bt_2ndReg.gif differ diff --git a/webapps/totsys/common/images/bt_accept.gif b/webapps/totsys/common/images/bt_accept.gif new file mode 100644 index 0000000..95f896c Binary files /dev/null and b/webapps/totsys/common/images/bt_accept.gif differ diff --git a/webapps/totsys/common/images/bt_allsel.gif b/webapps/totsys/common/images/bt_allsel.gif new file mode 100644 index 0000000..e8c3324 Binary files /dev/null and b/webapps/totsys/common/images/bt_allsel.gif differ diff --git a/webapps/totsys/common/images/bt_approve.gif b/webapps/totsys/common/images/bt_approve.gif new file mode 100644 index 0000000..0c0af36 Binary files /dev/null and b/webapps/totsys/common/images/bt_approve.gif differ diff --git a/webapps/totsys/common/images/bt_approveCancel.gif b/webapps/totsys/common/images/bt_approveCancel.gif new file mode 100644 index 0000000..1fe16b8 Binary files /dev/null and b/webapps/totsys/common/images/bt_approveCancel.gif differ diff --git a/webapps/totsys/common/images/bt_big_excel_save.gif b/webapps/totsys/common/images/bt_big_excel_save.gif new file mode 100644 index 0000000..a5ca3d9 Binary files /dev/null and b/webapps/totsys/common/images/bt_big_excel_save.gif differ diff --git a/webapps/totsys/common/images/bt_big_excel_save_backup.gif b/webapps/totsys/common/images/bt_big_excel_save_backup.gif new file mode 100644 index 0000000..451c3e7 Binary files /dev/null and b/webapps/totsys/common/images/bt_big_excel_save_backup.gif differ diff --git a/webapps/totsys/common/images/bt_board_del.gif b/webapps/totsys/common/images/bt_board_del.gif new file mode 100644 index 0000000..89cf4e5 Binary files /dev/null and b/webapps/totsys/common/images/bt_board_del.gif differ diff --git a/webapps/totsys/common/images/bt_board_modify.gif b/webapps/totsys/common/images/bt_board_modify.gif new file mode 100644 index 0000000..4310e9c Binary files /dev/null and b/webapps/totsys/common/images/bt_board_modify.gif differ diff --git a/webapps/totsys/common/images/bt_board_write.gif b/webapps/totsys/common/images/bt_board_write.gif new file mode 100644 index 0000000..1775bda Binary files /dev/null and b/webapps/totsys/common/images/bt_board_write.gif differ diff --git a/webapps/totsys/common/images/bt_bu1.gif b/webapps/totsys/common/images/bt_bu1.gif new file mode 100644 index 0000000..4ab3d31 Binary files /dev/null and b/webapps/totsys/common/images/bt_bu1.gif differ diff --git a/webapps/totsys/common/images/bt_bu2.gif b/webapps/totsys/common/images/bt_bu2.gif new file mode 100644 index 0000000..bbfbb5b Binary files /dev/null and b/webapps/totsys/common/images/bt_bu2.gif differ diff --git a/webapps/totsys/common/images/bt_bu3.gif b/webapps/totsys/common/images/bt_bu3.gif new file mode 100644 index 0000000..9c3487f Binary files /dev/null and b/webapps/totsys/common/images/bt_bu3.gif differ diff --git a/webapps/totsys/common/images/bt_cal.gif b/webapps/totsys/common/images/bt_cal.gif new file mode 100644 index 0000000..15c8e19 Binary files /dev/null and b/webapps/totsys/common/images/bt_cal.gif differ diff --git a/webapps/totsys/common/images/bt_cancel2.gif b/webapps/totsys/common/images/bt_cancel2.gif new file mode 100644 index 0000000..2c2d1cb Binary files /dev/null and b/webapps/totsys/common/images/bt_cancel2.gif differ diff --git a/webapps/totsys/common/images/bt_cancel3.gif b/webapps/totsys/common/images/bt_cancel3.gif new file mode 100644 index 0000000..37a7cd7 Binary files /dev/null and b/webapps/totsys/common/images/bt_cancel3.gif differ diff --git a/webapps/totsys/common/images/bt_cancel_all.gif b/webapps/totsys/common/images/bt_cancel_all.gif new file mode 100644 index 0000000..7b34f64 Binary files /dev/null and b/webapps/totsys/common/images/bt_cancel_all.gif differ diff --git a/webapps/totsys/common/images/bt_cancle.gif b/webapps/totsys/common/images/bt_cancle.gif new file mode 100644 index 0000000..10d2079 Binary files /dev/null and b/webapps/totsys/common/images/bt_cancle.gif differ diff --git a/webapps/totsys/common/images/bt_cancle3.gif b/webapps/totsys/common/images/bt_cancle3.gif new file mode 100644 index 0000000..a4458d8 Binary files /dev/null and b/webapps/totsys/common/images/bt_cancle3.gif differ diff --git a/webapps/totsys/common/images/bt_changestructure.jpg b/webapps/totsys/common/images/bt_changestructure.jpg new file mode 100644 index 0000000..441fad2 Binary files /dev/null and b/webapps/totsys/common/images/bt_changestructure.jpg differ diff --git a/webapps/totsys/common/images/bt_chart.jpg b/webapps/totsys/common/images/bt_chart.jpg new file mode 100644 index 0000000..36abcd9 Binary files /dev/null and b/webapps/totsys/common/images/bt_chart.jpg differ diff --git a/webapps/totsys/common/images/bt_close.gif b/webapps/totsys/common/images/bt_close.gif new file mode 100644 index 0000000..8aeb90d Binary files /dev/null and b/webapps/totsys/common/images/bt_close.gif differ diff --git a/webapps/totsys/common/images/bt_collect.jpg b/webapps/totsys/common/images/bt_collect.jpg new file mode 100644 index 0000000..170fded Binary files /dev/null and b/webapps/totsys/common/images/bt_collect.jpg differ diff --git a/webapps/totsys/common/images/bt_consent.jpg b/webapps/totsys/common/images/bt_consent.jpg new file mode 100644 index 0000000..021c6e7 Binary files /dev/null and b/webapps/totsys/common/images/bt_consent.jpg differ diff --git a/webapps/totsys/common/images/bt_copyin.gif b/webapps/totsys/common/images/bt_copyin.gif new file mode 100644 index 0000000..e8b3298 Binary files /dev/null and b/webapps/totsys/common/images/bt_copyin.gif differ diff --git a/webapps/totsys/common/images/bt_copytable.gif b/webapps/totsys/common/images/bt_copytable.gif new file mode 100644 index 0000000..bbc3901 Binary files /dev/null and b/webapps/totsys/common/images/bt_copytable.gif differ diff --git a/webapps/totsys/common/images/bt_damd.gif b/webapps/totsys/common/images/bt_damd.gif new file mode 100644 index 0000000..04a28fe Binary files /dev/null and b/webapps/totsys/common/images/bt_damd.gif differ diff --git a/webapps/totsys/common/images/bt_damdang.gif b/webapps/totsys/common/images/bt_damdang.gif new file mode 100644 index 0000000..31fa1a2 Binary files /dev/null and b/webapps/totsys/common/images/bt_damdang.gif differ diff --git a/webapps/totsys/common/images/bt_data_del.gif b/webapps/totsys/common/images/bt_data_del.gif new file mode 100644 index 0000000..f5d008c Binary files /dev/null and b/webapps/totsys/common/images/bt_data_del.gif differ diff --git a/webapps/totsys/common/images/bt_del.gif b/webapps/totsys/common/images/bt_del.gif new file mode 100644 index 0000000..eb885fd Binary files /dev/null and b/webapps/totsys/common/images/bt_del.gif differ diff --git a/webapps/totsys/common/images/bt_dept_select2.gif b/webapps/totsys/common/images/bt_dept_select2.gif new file mode 100644 index 0000000..475c309 Binary files /dev/null and b/webapps/totsys/common/images/bt_dept_select2.gif differ diff --git a/webapps/totsys/common/images/bt_deptcancel.jpg b/webapps/totsys/common/images/bt_deptcancel.jpg new file mode 100644 index 0000000..996a44c Binary files /dev/null and b/webapps/totsys/common/images/bt_deptcancel.jpg differ diff --git a/webapps/totsys/common/images/bt_deptselect.jpg b/webapps/totsys/common/images/bt_deptselect.jpg new file mode 100644 index 0000000..7550a99 Binary files /dev/null and b/webapps/totsys/common/images/bt_deptselect.jpg differ diff --git a/webapps/totsys/common/images/bt_disk.gif b/webapps/totsys/common/images/bt_disk.gif new file mode 100644 index 0000000..cc4c4ed Binary files /dev/null and b/webapps/totsys/common/images/bt_disk.gif differ diff --git a/webapps/totsys/common/images/bt_doc_del.gif b/webapps/totsys/common/images/bt_doc_del.gif new file mode 100644 index 0000000..d568159 Binary files /dev/null and b/webapps/totsys/common/images/bt_doc_del.gif differ diff --git a/webapps/totsys/common/images/bt_doc_list.gif b/webapps/totsys/common/images/bt_doc_list.gif new file mode 100644 index 0000000..67e2926 Binary files /dev/null and b/webapps/totsys/common/images/bt_doc_list.gif differ diff --git a/webapps/totsys/common/images/bt_doc_list_backup.gif b/webapps/totsys/common/images/bt_doc_list_backup.gif new file mode 100644 index 0000000..5cff561 Binary files /dev/null and b/webapps/totsys/common/images/bt_doc_list_backup.gif differ diff --git a/webapps/totsys/common/images/bt_doc_list_backup2.gif b/webapps/totsys/common/images/bt_doc_list_backup2.gif new file mode 100644 index 0000000..705178b Binary files /dev/null and b/webapps/totsys/common/images/bt_doc_list_backup2.gif differ diff --git a/webapps/totsys/common/images/bt_doc_modify.gif b/webapps/totsys/common/images/bt_doc_modify.gif new file mode 100644 index 0000000..0e0f2f8 Binary files /dev/null and b/webapps/totsys/common/images/bt_doc_modify.gif differ diff --git a/webapps/totsys/common/images/bt_doc_reg.gif b/webapps/totsys/common/images/bt_doc_reg.gif new file mode 100644 index 0000000..12e330e Binary files /dev/null and b/webapps/totsys/common/images/bt_doc_reg.gif differ diff --git a/webapps/totsys/common/images/bt_doc_status.gif b/webapps/totsys/common/images/bt_doc_status.gif new file mode 100644 index 0000000..e86ee28 Binary files /dev/null and b/webapps/totsys/common/images/bt_doc_status.gif differ diff --git a/webapps/totsys/common/images/bt_doc_trans.gif b/webapps/totsys/common/images/bt_doc_trans.gif new file mode 100644 index 0000000..3453994 Binary files /dev/null and b/webapps/totsys/common/images/bt_doc_trans.gif differ diff --git a/webapps/totsys/common/images/bt_doc_view.gif b/webapps/totsys/common/images/bt_doc_view.gif new file mode 100644 index 0000000..26a4669 Binary files /dev/null and b/webapps/totsys/common/images/bt_doc_view.gif differ diff --git a/webapps/totsys/common/images/bt_doc_view2.gif b/webapps/totsys/common/images/bt_doc_view2.gif new file mode 100644 index 0000000..9d1e2a7 Binary files /dev/null and b/webapps/totsys/common/images/bt_doc_view2.gif differ diff --git a/webapps/totsys/common/images/bt_docdel.gif b/webapps/totsys/common/images/bt_docdel.gif new file mode 100644 index 0000000..9344691 Binary files /dev/null and b/webapps/totsys/common/images/bt_docdel.gif differ diff --git a/webapps/totsys/common/images/bt_doctxt_modify.gif b/webapps/totsys/common/images/bt_doctxt_modify.gif new file mode 100644 index 0000000..8c4dab9 Binary files /dev/null and b/webapps/totsys/common/images/bt_doctxt_modify.gif differ diff --git a/webapps/totsys/common/images/bt_doctxt_modify2.gif b/webapps/totsys/common/images/bt_doctxt_modify2.gif new file mode 100644 index 0000000..09b5e46 Binary files /dev/null and b/webapps/totsys/common/images/bt_doctxt_modify2.gif differ diff --git a/webapps/totsys/common/images/bt_down.jpg b/webapps/totsys/common/images/bt_down.jpg new file mode 100644 index 0000000..da33813 Binary files /dev/null and b/webapps/totsys/common/images/bt_down.jpg differ diff --git a/webapps/totsys/common/images/bt_down_doc.gif b/webapps/totsys/common/images/bt_down_doc.gif new file mode 100644 index 0000000..c4bd684 Binary files /dev/null and b/webapps/totsys/common/images/bt_down_doc.gif differ diff --git a/webapps/totsys/common/images/bt_end.gif b/webapps/totsys/common/images/bt_end.gif new file mode 100644 index 0000000..e7272a1 Binary files /dev/null and b/webapps/totsys/common/images/bt_end.gif differ diff --git a/webapps/totsys/common/images/bt_end_backup.gif b/webapps/totsys/common/images/bt_end_backup.gif new file mode 100644 index 0000000..c10f936 Binary files /dev/null and b/webapps/totsys/common/images/bt_end_backup.gif differ diff --git a/webapps/totsys/common/images/bt_enter.gif b/webapps/totsys/common/images/bt_enter.gif new file mode 100644 index 0000000..2ad918b Binary files /dev/null and b/webapps/totsys/common/images/bt_enter.gif differ diff --git a/webapps/totsys/common/images/bt_excel.gif b/webapps/totsys/common/images/bt_excel.gif new file mode 100644 index 0000000..2d92c7f Binary files /dev/null and b/webapps/totsys/common/images/bt_excel.gif differ diff --git a/webapps/totsys/common/images/bt_excel_save.gif b/webapps/totsys/common/images/bt_excel_save.gif new file mode 100644 index 0000000..b9fd794 Binary files /dev/null and b/webapps/totsys/common/images/bt_excel_save.gif differ diff --git a/webapps/totsys/common/images/bt_file_append.gif b/webapps/totsys/common/images/bt_file_append.gif new file mode 100644 index 0000000..d639156 Binary files /dev/null and b/webapps/totsys/common/images/bt_file_append.gif differ diff --git a/webapps/totsys/common/images/bt_file_del.gif b/webapps/totsys/common/images/bt_file_del.gif new file mode 100644 index 0000000..cbb3fca Binary files /dev/null and b/webapps/totsys/common/images/bt_file_del.gif differ diff --git a/webapps/totsys/common/images/bt_fileadd.gif b/webapps/totsys/common/images/bt_fileadd.gif new file mode 100644 index 0000000..e149e64 Binary files /dev/null and b/webapps/totsys/common/images/bt_fileadd.gif differ diff --git a/webapps/totsys/common/images/bt_form_confirm.gif b/webapps/totsys/common/images/bt_form_confirm.gif new file mode 100644 index 0000000..ac169d9 Binary files /dev/null and b/webapps/totsys/common/images/bt_form_confirm.gif differ diff --git a/webapps/totsys/common/images/bt_form_delete.gif b/webapps/totsys/common/images/bt_form_delete.gif new file mode 100644 index 0000000..34c1cd7 Binary files /dev/null and b/webapps/totsys/common/images/bt_form_delete.gif differ diff --git a/webapps/totsys/common/images/bt_form_infoview.gif b/webapps/totsys/common/images/bt_form_infoview.gif new file mode 100644 index 0000000..67c2abd Binary files /dev/null and b/webapps/totsys/common/images/bt_form_infoview.gif differ diff --git a/webapps/totsys/common/images/bt_form_list.gif b/webapps/totsys/common/images/bt_form_list.gif new file mode 100644 index 0000000..16ce3e9 Binary files /dev/null and b/webapps/totsys/common/images/bt_form_list.gif differ diff --git a/webapps/totsys/common/images/bt_form_modify.gif b/webapps/totsys/common/images/bt_form_modify.gif new file mode 100644 index 0000000..9c19eff Binary files /dev/null and b/webapps/totsys/common/images/bt_form_modify.gif differ diff --git a/webapps/totsys/common/images/bt_form_modify2.gif b/webapps/totsys/common/images/bt_form_modify2.gif new file mode 100644 index 0000000..3798718 Binary files /dev/null and b/webapps/totsys/common/images/bt_form_modify2.gif differ diff --git a/webapps/totsys/common/images/bt_form_modify3.gif b/webapps/totsys/common/images/bt_form_modify3.gif new file mode 100644 index 0000000..ab8a5e7 Binary files /dev/null and b/webapps/totsys/common/images/bt_form_modify3.gif differ diff --git a/webapps/totsys/common/images/bt_form_view.gif b/webapps/totsys/common/images/bt_form_view.gif new file mode 100644 index 0000000..67c2abd Binary files /dev/null and b/webapps/totsys/common/images/bt_form_view.gif differ diff --git a/webapps/totsys/common/images/bt_form_view2.gif b/webapps/totsys/common/images/bt_form_view2.gif new file mode 100644 index 0000000..73f5381 Binary files /dev/null and b/webapps/totsys/common/images/bt_form_view2.gif differ diff --git a/webapps/totsys/common/images/bt_formdel.gif b/webapps/totsys/common/images/bt_formdel.gif new file mode 100644 index 0000000..dec9fab Binary files /dev/null and b/webapps/totsys/common/images/bt_formdel.gif differ diff --git a/webapps/totsys/common/images/bt_formtxt_modify.gif b/webapps/totsys/common/images/bt_formtxt_modify.gif new file mode 100644 index 0000000..4b3aa3b Binary files /dev/null and b/webapps/totsys/common/images/bt_formtxt_modify.gif differ diff --git a/webapps/totsys/common/images/bt_fsdf.gif b/webapps/totsys/common/images/bt_fsdf.gif new file mode 100644 index 0000000..a021756 Binary files /dev/null and b/webapps/totsys/common/images/bt_fsdf.gif differ diff --git a/webapps/totsys/common/images/bt_grup.gif b/webapps/totsys/common/images/bt_grup.gif new file mode 100644 index 0000000..a486dac Binary files /dev/null and b/webapps/totsys/common/images/bt_grup.gif differ diff --git a/webapps/totsys/common/images/bt_hwp_save.gif b/webapps/totsys/common/images/bt_hwp_save.gif new file mode 100644 index 0000000..5c4b79a Binary files /dev/null and b/webapps/totsys/common/images/bt_hwp_save.gif differ diff --git a/webapps/totsys/common/images/bt_info_modify.gif b/webapps/totsys/common/images/bt_info_modify.gif new file mode 100644 index 0000000..04bbe1d Binary files /dev/null and b/webapps/totsys/common/images/bt_info_modify.gif differ diff --git a/webapps/totsys/common/images/bt_info_modify.png b/webapps/totsys/common/images/bt_info_modify.png new file mode 100644 index 0000000..c9f8db1 Binary files /dev/null and b/webapps/totsys/common/images/bt_info_modify.png differ diff --git a/webapps/totsys/common/images/bt_init_2ndreg.jpg b/webapps/totsys/common/images/bt_init_2ndreg.jpg new file mode 100644 index 0000000..8cdb604 Binary files /dev/null and b/webapps/totsys/common/images/bt_init_2ndreg.jpg differ diff --git a/webapps/totsys/common/images/bt_input_write.gif b/webapps/totsys/common/images/bt_input_write.gif new file mode 100644 index 0000000..603a206 Binary files /dev/null and b/webapps/totsys/common/images/bt_input_write.gif differ diff --git a/webapps/totsys/common/images/bt_line_add.gif b/webapps/totsys/common/images/bt_line_add.gif new file mode 100644 index 0000000..ec49dd4 Binary files /dev/null and b/webapps/totsys/common/images/bt_line_add.gif differ diff --git a/webapps/totsys/common/images/bt_line_add.jpg b/webapps/totsys/common/images/bt_line_add.jpg new file mode 100644 index 0000000..4cbbc92 Binary files /dev/null and b/webapps/totsys/common/images/bt_line_add.jpg differ diff --git a/webapps/totsys/common/images/bt_line_add2.gif b/webapps/totsys/common/images/bt_line_add2.gif new file mode 100644 index 0000000..d34d01c Binary files /dev/null and b/webapps/totsys/common/images/bt_line_add2.gif differ diff --git a/webapps/totsys/common/images/bt_line_add_org.jpg b/webapps/totsys/common/images/bt_line_add_org.jpg new file mode 100644 index 0000000..05dd032 Binary files /dev/null and b/webapps/totsys/common/images/bt_line_add_org.jpg differ diff --git a/webapps/totsys/common/images/bt_line_add_out.gif b/webapps/totsys/common/images/bt_line_add_out.gif new file mode 100644 index 0000000..d34d01c Binary files /dev/null and b/webapps/totsys/common/images/bt_line_add_out.gif differ diff --git a/webapps/totsys/common/images/bt_line_add_over.gif b/webapps/totsys/common/images/bt_line_add_over.gif new file mode 100644 index 0000000..3c436e4 Binary files /dev/null and b/webapps/totsys/common/images/bt_line_add_over.gif differ diff --git a/webapps/totsys/common/images/bt_line_addbg.gif b/webapps/totsys/common/images/bt_line_addbg.gif new file mode 100644 index 0000000..d62f562 Binary files /dev/null and b/webapps/totsys/common/images/bt_line_addbg.gif differ diff --git a/webapps/totsys/common/images/bt_line_addbg.jpg b/webapps/totsys/common/images/bt_line_addbg.jpg new file mode 100644 index 0000000..d4eb61f Binary files /dev/null and b/webapps/totsys/common/images/bt_line_addbg.jpg differ diff --git a/webapps/totsys/common/images/bt_line_addbg.png b/webapps/totsys/common/images/bt_line_addbg.png new file mode 100644 index 0000000..f89309a Binary files /dev/null and b/webapps/totsys/common/images/bt_line_addbg.png differ diff --git a/webapps/totsys/common/images/bt_line_addbg2.gif b/webapps/totsys/common/images/bt_line_addbg2.gif new file mode 100644 index 0000000..d62f562 Binary files /dev/null and b/webapps/totsys/common/images/bt_line_addbg2.gif differ diff --git a/webapps/totsys/common/images/bt_line_addbg3.gif b/webapps/totsys/common/images/bt_line_addbg3.gif new file mode 100644 index 0000000..59043be Binary files /dev/null and b/webapps/totsys/common/images/bt_line_addbg3.gif differ diff --git a/webapps/totsys/common/images/bt_line_addbg4.gif b/webapps/totsys/common/images/bt_line_addbg4.gif new file mode 100644 index 0000000..e4ccb6e Binary files /dev/null and b/webapps/totsys/common/images/bt_line_addbg4.gif differ diff --git a/webapps/totsys/common/images/bt_line_del.gif b/webapps/totsys/common/images/bt_line_del.gif new file mode 100644 index 0000000..9fd6249 Binary files /dev/null and b/webapps/totsys/common/images/bt_line_del.gif differ diff --git a/webapps/totsys/common/images/bt_line_del.jpg b/webapps/totsys/common/images/bt_line_del.jpg new file mode 100644 index 0000000..1564fae Binary files /dev/null and b/webapps/totsys/common/images/bt_line_del.jpg differ diff --git a/webapps/totsys/common/images/bt_line_del2.gif b/webapps/totsys/common/images/bt_line_del2.gif new file mode 100644 index 0000000..539b2d3 Binary files /dev/null and b/webapps/totsys/common/images/bt_line_del2.gif differ diff --git a/webapps/totsys/common/images/bt_line_del_out.gif b/webapps/totsys/common/images/bt_line_del_out.gif new file mode 100644 index 0000000..539b2d3 Binary files /dev/null and b/webapps/totsys/common/images/bt_line_del_out.gif differ diff --git a/webapps/totsys/common/images/bt_line_del_over.gif b/webapps/totsys/common/images/bt_line_del_over.gif new file mode 100644 index 0000000..477d2c4 Binary files /dev/null and b/webapps/totsys/common/images/bt_line_del_over.gif differ diff --git a/webapps/totsys/common/images/bt_line_delbg.gif b/webapps/totsys/common/images/bt_line_delbg.gif new file mode 100644 index 0000000..250139f Binary files /dev/null and b/webapps/totsys/common/images/bt_line_delbg.gif differ diff --git a/webapps/totsys/common/images/bt_line_delbg.jpg b/webapps/totsys/common/images/bt_line_delbg.jpg new file mode 100644 index 0000000..50d9dbf Binary files /dev/null and b/webapps/totsys/common/images/bt_line_delbg.jpg differ diff --git a/webapps/totsys/common/images/bt_line_delbg.png b/webapps/totsys/common/images/bt_line_delbg.png new file mode 100644 index 0000000..7fc057a Binary files /dev/null and b/webapps/totsys/common/images/bt_line_delbg.png differ diff --git a/webapps/totsys/common/images/bt_line_delbg2.gif b/webapps/totsys/common/images/bt_line_delbg2.gif new file mode 100644 index 0000000..250139f Binary files /dev/null and b/webapps/totsys/common/images/bt_line_delbg2.gif differ diff --git a/webapps/totsys/common/images/bt_line_delbg3.gif b/webapps/totsys/common/images/bt_line_delbg3.gif new file mode 100644 index 0000000..da13e4a Binary files /dev/null and b/webapps/totsys/common/images/bt_line_delbg3.gif differ diff --git a/webapps/totsys/common/images/bt_line_delbg4.gif b/webapps/totsys/common/images/bt_line_delbg4.gif new file mode 100644 index 0000000..e5127dc Binary files /dev/null and b/webapps/totsys/common/images/bt_line_delbg4.gif differ diff --git a/webapps/totsys/common/images/bt_list.gif b/webapps/totsys/common/images/bt_list.gif new file mode 100644 index 0000000..67e2926 Binary files /dev/null and b/webapps/totsys/common/images/bt_list.gif differ diff --git a/webapps/totsys/common/images/bt_list.jpg b/webapps/totsys/common/images/bt_list.jpg new file mode 100644 index 0000000..67e2926 Binary files /dev/null and b/webapps/totsys/common/images/bt_list.jpg differ diff --git a/webapps/totsys/common/images/bt_list_big.gif b/webapps/totsys/common/images/bt_list_big.gif new file mode 100644 index 0000000..705178b Binary files /dev/null and b/webapps/totsys/common/images/bt_list_big.gif differ diff --git a/webapps/totsys/common/images/bt_list_next.gif b/webapps/totsys/common/images/bt_list_next.gif new file mode 100644 index 0000000..a791502 Binary files /dev/null and b/webapps/totsys/common/images/bt_list_next.gif differ diff --git a/webapps/totsys/common/images/bt_list_pre.gif b/webapps/totsys/common/images/bt_list_pre.gif new file mode 100644 index 0000000..0f84977 Binary files /dev/null and b/webapps/totsys/common/images/bt_list_pre.gif differ diff --git a/webapps/totsys/common/images/bt_modify.gif b/webapps/totsys/common/images/bt_modify.gif new file mode 100644 index 0000000..e46322b Binary files /dev/null and b/webapps/totsys/common/images/bt_modify.gif differ diff --git a/webapps/totsys/common/images/bt_newform_reg.gif b/webapps/totsys/common/images/bt_newform_reg.gif new file mode 100644 index 0000000..6888f61 Binary files /dev/null and b/webapps/totsys/common/images/bt_newform_reg.gif differ diff --git a/webapps/totsys/common/images/bt_next.gif b/webapps/totsys/common/images/bt_next.gif new file mode 100644 index 0000000..4c3f8b1 Binary files /dev/null and b/webapps/totsys/common/images/bt_next.gif differ diff --git a/webapps/totsys/common/images/bt_nextb.gif b/webapps/totsys/common/images/bt_nextb.gif new file mode 100644 index 0000000..f2862c0 Binary files /dev/null and b/webapps/totsys/common/images/bt_nextb.gif differ diff --git a/webapps/totsys/common/images/bt_no.gif b/webapps/totsys/common/images/bt_no.gif new file mode 100644 index 0000000..428e519 Binary files /dev/null and b/webapps/totsys/common/images/bt_no.gif differ diff --git a/webapps/totsys/common/images/bt_not_doc.gif b/webapps/totsys/common/images/bt_not_doc.gif new file mode 100644 index 0000000..4abb6a7 Binary files /dev/null and b/webapps/totsys/common/images/bt_not_doc.gif differ diff --git a/webapps/totsys/common/images/bt_notdoc.gif b/webapps/totsys/common/images/bt_notdoc.gif new file mode 100644 index 0000000..df4100e Binary files /dev/null and b/webapps/totsys/common/images/bt_notdoc.gif differ diff --git a/webapps/totsys/common/images/bt_ok.gif b/webapps/totsys/common/images/bt_ok.gif new file mode 100644 index 0000000..9e74c5c Binary files /dev/null and b/webapps/totsys/common/images/bt_ok.gif differ diff --git a/webapps/totsys/common/images/bt_out_print.gif b/webapps/totsys/common/images/bt_out_print.gif new file mode 100644 index 0000000..a242e78 Binary files /dev/null and b/webapps/totsys/common/images/bt_out_print.gif differ diff --git a/webapps/totsys/common/images/bt_page_setup.gif b/webapps/totsys/common/images/bt_page_setup.gif new file mode 100644 index 0000000..ded1892 Binary files /dev/null and b/webapps/totsys/common/images/bt_page_setup.gif differ diff --git a/webapps/totsys/common/images/bt_pop_print.gif b/webapps/totsys/common/images/bt_pop_print.gif new file mode 100644 index 0000000..7bb0e70 Binary files /dev/null and b/webapps/totsys/common/images/bt_pop_print.gif differ diff --git a/webapps/totsys/common/images/bt_pre.gif b/webapps/totsys/common/images/bt_pre.gif new file mode 100644 index 0000000..25641b3 Binary files /dev/null and b/webapps/totsys/common/images/bt_pre.gif differ diff --git a/webapps/totsys/common/images/bt_pre.png b/webapps/totsys/common/images/bt_pre.png new file mode 100644 index 0000000..b17fa52 Binary files /dev/null and b/webapps/totsys/common/images/bt_pre.png differ diff --git a/webapps/totsys/common/images/bt_preb.gif b/webapps/totsys/common/images/bt_preb.gif new file mode 100644 index 0000000..bcbe331 Binary files /dev/null and b/webapps/totsys/common/images/bt_preb.gif differ diff --git a/webapps/totsys/common/images/bt_prev.png b/webapps/totsys/common/images/bt_prev.png new file mode 100644 index 0000000..cba673f Binary files /dev/null and b/webapps/totsys/common/images/bt_prev.png differ diff --git a/webapps/totsys/common/images/bt_print.gif b/webapps/totsys/common/images/bt_print.gif new file mode 100644 index 0000000..3b66eb7 Binary files /dev/null and b/webapps/totsys/common/images/bt_print.gif differ diff --git a/webapps/totsys/common/images/bt_print2.gif b/webapps/totsys/common/images/bt_print2.gif new file mode 100644 index 0000000..14c9514 Binary files /dev/null and b/webapps/totsys/common/images/bt_print2.gif differ diff --git a/webapps/totsys/common/images/bt_print_preview.gif b/webapps/totsys/common/images/bt_print_preview.gif new file mode 100644 index 0000000..0b50d1b Binary files /dev/null and b/webapps/totsys/common/images/bt_print_preview.gif differ diff --git a/webapps/totsys/common/images/bt_proposal.gif b/webapps/totsys/common/images/bt_proposal.gif new file mode 100644 index 0000000..24ed882 Binary files /dev/null and b/webapps/totsys/common/images/bt_proposal.gif differ diff --git a/webapps/totsys/common/images/bt_prove.jpg b/webapps/totsys/common/images/bt_prove.jpg new file mode 100644 index 0000000..19aed71 Binary files /dev/null and b/webapps/totsys/common/images/bt_prove.jpg differ diff --git a/webapps/totsys/common/images/bt_psd.gif b/webapps/totsys/common/images/bt_psd.gif new file mode 100644 index 0000000..2d063aa Binary files /dev/null and b/webapps/totsys/common/images/bt_psd.gif differ diff --git a/webapps/totsys/common/images/bt_reDocTotal.jpg b/webapps/totsys/common/images/bt_reDocTotal.jpg new file mode 100644 index 0000000..b25126a Binary files /dev/null and b/webapps/totsys/common/images/bt_reDocTotal.jpg differ diff --git a/webapps/totsys/common/images/bt_reassign.gif b/webapps/totsys/common/images/bt_reassign.gif new file mode 100644 index 0000000..3f29381 Binary files /dev/null and b/webapps/totsys/common/images/bt_reassign.gif differ diff --git a/webapps/totsys/common/images/bt_recall.gif b/webapps/totsys/common/images/bt_recall.gif new file mode 100644 index 0000000..599432f Binary files /dev/null and b/webapps/totsys/common/images/bt_recall.gif differ diff --git a/webapps/totsys/common/images/bt_recog_up.gif b/webapps/totsys/common/images/bt_recog_up.gif new file mode 100644 index 0000000..112456d Binary files /dev/null and b/webapps/totsys/common/images/bt_recog_up.gif differ diff --git a/webapps/totsys/common/images/bt_recog_up2.gif b/webapps/totsys/common/images/bt_recog_up2.gif new file mode 100644 index 0000000..021c6e7 Binary files /dev/null and b/webapps/totsys/common/images/bt_recog_up2.gif differ diff --git a/webapps/totsys/common/images/bt_recog_up2_bak.gif b/webapps/totsys/common/images/bt_recog_up2_bak.gif new file mode 100644 index 0000000..f86a4bb Binary files /dev/null and b/webapps/totsys/common/images/bt_recog_up2_bak.gif differ diff --git a/webapps/totsys/common/images/bt_redell.gif b/webapps/totsys/common/images/bt_redell.gif new file mode 100644 index 0000000..4b68ea5 Binary files /dev/null and b/webapps/totsys/common/images/bt_redell.gif differ diff --git a/webapps/totsys/common/images/bt_redoctotal.gif b/webapps/totsys/common/images/bt_redoctotal.gif new file mode 100644 index 0000000..95f896c Binary files /dev/null and b/webapps/totsys/common/images/bt_redoctotal.gif differ diff --git a/webapps/totsys/common/images/bt_reg_ues1.gif b/webapps/totsys/common/images/bt_reg_ues1.gif new file mode 100644 index 0000000..ed57399 Binary files /dev/null and b/webapps/totsys/common/images/bt_reg_ues1.gif differ diff --git a/webapps/totsys/common/images/bt_remove.gif b/webapps/totsys/common/images/bt_remove.gif new file mode 100644 index 0000000..bc57e52 Binary files /dev/null and b/webapps/totsys/common/images/bt_remove.gif differ diff --git a/webapps/totsys/common/images/bt_rep_end.gif b/webapps/totsys/common/images/bt_rep_end.gif new file mode 100644 index 0000000..07007ed Binary files /dev/null and b/webapps/totsys/common/images/bt_rep_end.gif differ diff --git a/webapps/totsys/common/images/bt_rep_list.gif b/webapps/totsys/common/images/bt_rep_list.gif new file mode 100644 index 0000000..f5ca12a Binary files /dev/null and b/webapps/totsys/common/images/bt_rep_list.gif differ diff --git a/webapps/totsys/common/images/bt_rep_transfer.gif b/webapps/totsys/common/images/bt_rep_transfer.gif new file mode 100644 index 0000000..2dea0a4 Binary files /dev/null and b/webapps/totsys/common/images/bt_rep_transfer.gif differ diff --git a/webapps/totsys/common/images/bt_report_cancel.gif b/webapps/totsys/common/images/bt_report_cancel.gif new file mode 100644 index 0000000..d11778e Binary files /dev/null and b/webapps/totsys/common/images/bt_report_cancel.gif differ diff --git a/webapps/totsys/common/images/bt_report_list.gif b/webapps/totsys/common/images/bt_report_list.gif new file mode 100644 index 0000000..2e5c445 Binary files /dev/null and b/webapps/totsys/common/images/bt_report_list.gif differ diff --git a/webapps/totsys/common/images/bt_report_list2.gif b/webapps/totsys/common/images/bt_report_list2.gif new file mode 100644 index 0000000..0a76a68 Binary files /dev/null and b/webapps/totsys/common/images/bt_report_list2.gif differ diff --git a/webapps/totsys/common/images/bt_report_ok.gif b/webapps/totsys/common/images/bt_report_ok.gif new file mode 100644 index 0000000..6792cab Binary files /dev/null and b/webapps/totsys/common/images/bt_report_ok.gif differ diff --git a/webapps/totsys/common/images/bt_reportsend.gif b/webapps/totsys/common/images/bt_reportsend.gif new file mode 100644 index 0000000..3c83709 Binary files /dev/null and b/webapps/totsys/common/images/bt_reportsend.gif differ diff --git a/webapps/totsys/common/images/bt_reportsend2.gif b/webapps/totsys/common/images/bt_reportsend2.gif new file mode 100644 index 0000000..06bb71e Binary files /dev/null and b/webapps/totsys/common/images/bt_reportsend2.gif differ diff --git a/webapps/totsys/common/images/bt_reprss.gif b/webapps/totsys/common/images/bt_reprss.gif new file mode 100644 index 0000000..5176f33 Binary files /dev/null and b/webapps/totsys/common/images/bt_reprss.gif differ diff --git a/webapps/totsys/common/images/bt_restore.jpg b/webapps/totsys/common/images/bt_restore.jpg new file mode 100644 index 0000000..51639fa Binary files /dev/null and b/webapps/totsys/common/images/bt_restore.jpg differ diff --git a/webapps/totsys/common/images/bt_restoresturecture.jpg b/webapps/totsys/common/images/bt_restoresturecture.jpg new file mode 100644 index 0000000..94cfe75 Binary files /dev/null and b/webapps/totsys/common/images/bt_restoresturecture.jpg differ diff --git a/webapps/totsys/common/images/bt_return.gif b/webapps/totsys/common/images/bt_return.gif new file mode 100644 index 0000000..af914fc Binary files /dev/null and b/webapps/totsys/common/images/bt_return.gif differ diff --git a/webapps/totsys/common/images/bt_return2.gif b/webapps/totsys/common/images/bt_return2.gif new file mode 100644 index 0000000..6dc34c0 Binary files /dev/null and b/webapps/totsys/common/images/bt_return2.gif differ diff --git a/webapps/totsys/common/images/bt_reuse_form.gif b/webapps/totsys/common/images/bt_reuse_form.gif new file mode 100644 index 0000000..21e8728 Binary files /dev/null and b/webapps/totsys/common/images/bt_reuse_form.gif differ diff --git a/webapps/totsys/common/images/bt_reuse_form_backup.gif b/webapps/totsys/common/images/bt_reuse_form_backup.gif new file mode 100644 index 0000000..745d71d Binary files /dev/null and b/webapps/totsys/common/images/bt_reuse_form_backup.gif differ diff --git a/webapps/totsys/common/images/bt_sangsin.jpg b/webapps/totsys/common/images/bt_sangsin.jpg new file mode 100644 index 0000000..6df26e8 Binary files /dev/null and b/webapps/totsys/common/images/bt_sangsin.jpg differ diff --git a/webapps/totsys/common/images/bt_save.gif b/webapps/totsys/common/images/bt_save.gif new file mode 100644 index 0000000..46be919 Binary files /dev/null and b/webapps/totsys/common/images/bt_save.gif differ diff --git a/webapps/totsys/common/images/bt_search.gif b/webapps/totsys/common/images/bt_search.gif new file mode 100644 index 0000000..bbaa0a5 Binary files /dev/null and b/webapps/totsys/common/images/bt_search.gif differ diff --git a/webapps/totsys/common/images/bt_search.jpg b/webapps/totsys/common/images/bt_search.jpg new file mode 100644 index 0000000..b09c986 Binary files /dev/null and b/webapps/totsys/common/images/bt_search.jpg differ diff --git a/webapps/totsys/common/images/bt_search_inquiry.gif b/webapps/totsys/common/images/bt_search_inquiry.gif new file mode 100644 index 0000000..b4d3057 Binary files /dev/null and b/webapps/totsys/common/images/bt_search_inquiry.gif differ diff --git a/webapps/totsys/common/images/bt_search_inquiry2.gif b/webapps/totsys/common/images/bt_search_inquiry2.gif new file mode 100644 index 0000000..324833a Binary files /dev/null and b/webapps/totsys/common/images/bt_search_inquiry2.gif differ diff --git a/webapps/totsys/common/images/bt_search_inquiry_backup1.gif b/webapps/totsys/common/images/bt_search_inquiry_backup1.gif new file mode 100644 index 0000000..324833a Binary files /dev/null and b/webapps/totsys/common/images/bt_search_inquiry_backup1.gif differ diff --git a/webapps/totsys/common/images/bt_secure_off.jpg b/webapps/totsys/common/images/bt_secure_off.jpg new file mode 100644 index 0000000..ed75d68 Binary files /dev/null and b/webapps/totsys/common/images/bt_secure_off.jpg differ diff --git a/webapps/totsys/common/images/bt_secure_on.jpg b/webapps/totsys/common/images/bt_secure_on.jpg new file mode 100644 index 0000000..ff066d7 Binary files /dev/null and b/webapps/totsys/common/images/bt_secure_on.jpg differ diff --git a/webapps/totsys/common/images/bt_selcancle.gif b/webapps/totsys/common/images/bt_selcancle.gif new file mode 100644 index 0000000..bc8b18b Binary files /dev/null and b/webapps/totsys/common/images/bt_selcancle.gif differ diff --git a/webapps/totsys/common/images/bt_select_all.gif b/webapps/totsys/common/images/bt_select_all.gif new file mode 100644 index 0000000..6466356 Binary files /dev/null and b/webapps/totsys/common/images/bt_select_all.gif differ diff --git a/webapps/totsys/common/images/bt_send_email.gif b/webapps/totsys/common/images/bt_send_email.gif new file mode 100644 index 0000000..5de84ab Binary files /dev/null and b/webapps/totsys/common/images/bt_send_email.gif differ diff --git a/webapps/totsys/common/images/bt_send_email.jpg b/webapps/totsys/common/images/bt_send_email.jpg new file mode 100644 index 0000000..6665169 Binary files /dev/null and b/webapps/totsys/common/images/bt_send_email.jpg differ diff --git a/webapps/totsys/common/images/bt_send_email.png b/webapps/totsys/common/images/bt_send_email.png new file mode 100644 index 0000000..013be3c Binary files /dev/null and b/webapps/totsys/common/images/bt_send_email.png differ diff --git a/webapps/totsys/common/images/bt_sesik.gif b/webapps/totsys/common/images/bt_sesik.gif new file mode 100644 index 0000000..7890c5e Binary files /dev/null and b/webapps/totsys/common/images/bt_sesik.gif differ diff --git a/webapps/totsys/common/images/bt_snext.gif b/webapps/totsys/common/images/bt_snext.gif new file mode 100644 index 0000000..4c9f601 Binary files /dev/null and b/webapps/totsys/common/images/bt_snext.gif differ diff --git a/webapps/totsys/common/images/bt_spre.gif b/webapps/totsys/common/images/bt_spre.gif new file mode 100644 index 0000000..5178bce Binary files /dev/null and b/webapps/totsys/common/images/bt_spre.gif differ diff --git a/webapps/totsys/common/images/bt_sub_form_modify.gif b/webapps/totsys/common/images/bt_sub_form_modify.gif new file mode 100644 index 0000000..75d92d7 Binary files /dev/null and b/webapps/totsys/common/images/bt_sub_form_modify.gif differ diff --git a/webapps/totsys/common/images/bt_temp_save.jpg b/webapps/totsys/common/images/bt_temp_save.jpg new file mode 100644 index 0000000..3b4cec7 Binary files /dev/null and b/webapps/totsys/common/images/bt_temp_save.jpg differ diff --git a/webapps/totsys/common/images/bt_timd.gif b/webapps/totsys/common/images/bt_timd.gif new file mode 100644 index 0000000..db61302 Binary files /dev/null and b/webapps/totsys/common/images/bt_timd.gif differ diff --git a/webapps/totsys/common/images/bt_timm.gif b/webapps/totsys/common/images/bt_timm.gif new file mode 100644 index 0000000..27ce617 Binary files /dev/null and b/webapps/totsys/common/images/bt_timm.gif differ diff --git a/webapps/totsys/common/images/bt_tot_cancel.gif b/webapps/totsys/common/images/bt_tot_cancel.gif new file mode 100644 index 0000000..286c180 Binary files /dev/null and b/webapps/totsys/common/images/bt_tot_cancel.gif differ diff --git a/webapps/totsys/common/images/bt_total_report.gif b/webapps/totsys/common/images/bt_total_report.gif new file mode 100644 index 0000000..a96f319 Binary files /dev/null and b/webapps/totsys/common/images/bt_total_report.gif differ diff --git a/webapps/totsys/common/images/bt_total_report2.gif b/webapps/totsys/common/images/bt_total_report2.gif new file mode 100644 index 0000000..de60656 Binary files /dev/null and b/webapps/totsys/common/images/bt_total_report2.gif differ diff --git a/webapps/totsys/common/images/bt_total_reports.gif b/webapps/totsys/common/images/bt_total_reports.gif new file mode 100644 index 0000000..daf1214 Binary files /dev/null and b/webapps/totsys/common/images/bt_total_reports.gif differ diff --git a/webapps/totsys/common/images/bt_total_reports2.gif b/webapps/totsys/common/images/bt_total_reports2.gif new file mode 100644 index 0000000..00754ab Binary files /dev/null and b/webapps/totsys/common/images/bt_total_reports2.gif differ diff --git a/webapps/totsys/common/images/bt_totalok.gif b/webapps/totsys/common/images/bt_totalok.gif new file mode 100644 index 0000000..1b4797a Binary files /dev/null and b/webapps/totsys/common/images/bt_totalok.gif differ diff --git a/webapps/totsys/common/images/bt_totdata.gif b/webapps/totsys/common/images/bt_totdata.gif new file mode 100644 index 0000000..0e3eeff Binary files /dev/null and b/webapps/totsys/common/images/bt_totdata.gif differ diff --git a/webapps/totsys/common/images/bt_trans_cancel.gif b/webapps/totsys/common/images/bt_trans_cancel.gif new file mode 100644 index 0000000..af338c5 Binary files /dev/null and b/webapps/totsys/common/images/bt_trans_cancel.gif differ diff --git a/webapps/totsys/common/images/bt_transfer_list.gif b/webapps/totsys/common/images/bt_transfer_list.gif new file mode 100644 index 0000000..dff9722 Binary files /dev/null and b/webapps/totsys/common/images/bt_transfer_list.gif differ diff --git a/webapps/totsys/common/images/bt_up.jpg b/webapps/totsys/common/images/bt_up.jpg new file mode 100644 index 0000000..c367e18 Binary files /dev/null and b/webapps/totsys/common/images/bt_up.jpg differ diff --git a/webapps/totsys/common/images/bt_user_share.jpg b/webapps/totsys/common/images/bt_user_share.jpg new file mode 100644 index 0000000..6b7e833 Binary files /dev/null and b/webapps/totsys/common/images/bt_user_share.jpg differ diff --git a/webapps/totsys/common/images/bt_userdel.gif b/webapps/totsys/common/images/bt_userdel.gif new file mode 100644 index 0000000..e68fb7e Binary files /dev/null and b/webapps/totsys/common/images/bt_userdel.gif differ diff --git a/webapps/totsys/common/images/bt_usermodi.gif b/webapps/totsys/common/images/bt_usermodi.gif new file mode 100644 index 0000000..b7afe9d Binary files /dev/null and b/webapps/totsys/common/images/bt_usermodi.gif differ diff --git a/webapps/totsys/common/images/bt_write.gif b/webapps/totsys/common/images/bt_write.gif new file mode 100644 index 0000000..9033b4a Binary files /dev/null and b/webapps/totsys/common/images/bt_write.gif differ diff --git a/webapps/totsys/common/images/btn_alls.gif b/webapps/totsys/common/images/btn_alls.gif new file mode 100644 index 0000000..3f7aa89 Binary files /dev/null and b/webapps/totsys/common/images/btn_alls.gif differ diff --git a/webapps/totsys/common/images/btn_alls2.gif b/webapps/totsys/common/images/btn_alls2.gif new file mode 100644 index 0000000..3f7aa89 Binary files /dev/null and b/webapps/totsys/common/images/btn_alls2.gif differ diff --git a/webapps/totsys/common/images/btn_cancel.gif b/webapps/totsys/common/images/btn_cancel.gif new file mode 100644 index 0000000..6460835 Binary files /dev/null and b/webapps/totsys/common/images/btn_cancel.gif differ diff --git a/webapps/totsys/common/images/btn_close.gif b/webapps/totsys/common/images/btn_close.gif new file mode 100644 index 0000000..f81f333 Binary files /dev/null and b/webapps/totsys/common/images/btn_close.gif differ diff --git a/webapps/totsys/common/images/btn_completed.gif b/webapps/totsys/common/images/btn_completed.gif new file mode 100644 index 0000000..437e6ad Binary files /dev/null and b/webapps/totsys/common/images/btn_completed.gif differ diff --git a/webapps/totsys/common/images/btn_completed2.gif b/webapps/totsys/common/images/btn_completed2.gif new file mode 100644 index 0000000..39f4cb8 Binary files /dev/null and b/webapps/totsys/common/images/btn_completed2.gif differ diff --git a/webapps/totsys/common/images/btn_decision2.gif b/webapps/totsys/common/images/btn_decision2.gif new file mode 100644 index 0000000..4b16369 Binary files /dev/null and b/webapps/totsys/common/images/btn_decision2.gif differ diff --git a/webapps/totsys/common/images/btn_decision_big.gif b/webapps/totsys/common/images/btn_decision_big.gif new file mode 100644 index 0000000..eb02fed Binary files /dev/null and b/webapps/totsys/common/images/btn_decision_big.gif differ diff --git a/webapps/totsys/common/images/btn_delete.gif b/webapps/totsys/common/images/btn_delete.gif new file mode 100644 index 0000000..7c8ed43 Binary files /dev/null and b/webapps/totsys/common/images/btn_delete.gif differ diff --git a/webapps/totsys/common/images/btn_enter.gif b/webapps/totsys/common/images/btn_enter.gif new file mode 100644 index 0000000..c4a5955 Binary files /dev/null and b/webapps/totsys/common/images/btn_enter.gif differ diff --git a/webapps/totsys/common/images/btn_modify_completed.gif b/webapps/totsys/common/images/btn_modify_completed.gif new file mode 100644 index 0000000..6cfebd0 Binary files /dev/null and b/webapps/totsys/common/images/btn_modify_completed.gif differ diff --git a/webapps/totsys/common/images/btn_no_takes.gif b/webapps/totsys/common/images/btn_no_takes.gif new file mode 100644 index 0000000..6dae7d9 Binary files /dev/null and b/webapps/totsys/common/images/btn_no_takes.gif differ diff --git a/webapps/totsys/common/images/btn_no_takes2.gif b/webapps/totsys/common/images/btn_no_takes2.gif new file mode 100644 index 0000000..6dae7d9 Binary files /dev/null and b/webapps/totsys/common/images/btn_no_takes2.gif differ diff --git a/webapps/totsys/common/images/btn_replace.gif b/webapps/totsys/common/images/btn_replace.gif new file mode 100644 index 0000000..28cc957 Binary files /dev/null and b/webapps/totsys/common/images/btn_replace.gif differ diff --git a/webapps/totsys/common/images/btn_takes.gif b/webapps/totsys/common/images/btn_takes.gif new file mode 100644 index 0000000..549617c Binary files /dev/null and b/webapps/totsys/common/images/btn_takes.gif differ diff --git a/webapps/totsys/common/images/btn_takes2.gif b/webapps/totsys/common/images/btn_takes2.gif new file mode 100644 index 0000000..549617c Binary files /dev/null and b/webapps/totsys/common/images/btn_takes2.gif differ diff --git a/webapps/totsys/common/images/bu_002.gif b/webapps/totsys/common/images/bu_002.gif new file mode 100644 index 0000000..4367717 Binary files /dev/null and b/webapps/totsys/common/images/bu_002.gif differ diff --git a/webapps/totsys/common/images/bullet.gif b/webapps/totsys/common/images/bullet.gif new file mode 100644 index 0000000..650b659 Binary files /dev/null and b/webapps/totsys/common/images/bullet.gif differ diff --git a/webapps/totsys/common/images/cancel.png b/webapps/totsys/common/images/cancel.png new file mode 100644 index 0000000..df7edd3 Binary files /dev/null and b/webapps/totsys/common/images/cancel.png differ diff --git a/webapps/totsys/common/images/cancel2.png b/webapps/totsys/common/images/cancel2.png new file mode 100644 index 0000000..fd3353e Binary files /dev/null and b/webapps/totsys/common/images/cancel2.png differ diff --git a/webapps/totsys/common/images/cancel_all.gif b/webapps/totsys/common/images/cancel_all.gif new file mode 100644 index 0000000..d0bc187 Binary files /dev/null and b/webapps/totsys/common/images/cancel_all.gif differ diff --git a/webapps/totsys/common/images/check.png b/webapps/totsys/common/images/check.png new file mode 100644 index 0000000..aefa1a7 Binary files /dev/null and b/webapps/totsys/common/images/check.png differ diff --git a/webapps/totsys/common/images/close.gif b/webapps/totsys/common/images/close.gif new file mode 100644 index 0000000..caa1388 Binary files /dev/null and b/webapps/totsys/common/images/close.gif differ diff --git a/webapps/totsys/common/images/close1.gif b/webapps/totsys/common/images/close1.gif new file mode 100644 index 0000000..f60f6c1 Binary files /dev/null and b/webapps/totsys/common/images/close1.gif differ diff --git a/webapps/totsys/common/images/date.gif b/webapps/totsys/common/images/date.gif new file mode 100644 index 0000000..d0dc349 Binary files /dev/null and b/webapps/totsys/common/images/date.gif differ diff --git a/webapps/totsys/common/images/dbbackup.gif b/webapps/totsys/common/images/dbbackup.gif new file mode 100644 index 0000000..30b56f8 Binary files /dev/null and b/webapps/totsys/common/images/dbbackup.gif differ diff --git a/webapps/totsys/common/images/dept_init.png b/webapps/totsys/common/images/dept_init.png new file mode 100644 index 0000000..5af105c Binary files /dev/null and b/webapps/totsys/common/images/dept_init.png differ diff --git a/webapps/totsys/common/images/dept_select.gif b/webapps/totsys/common/images/dept_select.gif new file mode 100644 index 0000000..217bf24 Binary files /dev/null and b/webapps/totsys/common/images/dept_select.gif differ diff --git a/webapps/totsys/common/images/disk3.png b/webapps/totsys/common/images/disk3.png new file mode 100644 index 0000000..44248fc Binary files /dev/null and b/webapps/totsys/common/images/disk3.png differ diff --git a/webapps/totsys/common/images/doc_title_name.gif b/webapps/totsys/common/images/doc_title_name.gif new file mode 100644 index 0000000..8a0a98e Binary files /dev/null and b/webapps/totsys/common/images/doc_title_name.gif differ diff --git a/webapps/totsys/common/images/excel.png b/webapps/totsys/common/images/excel.png new file mode 100644 index 0000000..7031497 Binary files /dev/null and b/webapps/totsys/common/images/excel.png differ diff --git a/webapps/totsys/common/images/folder.gif b/webapps/totsys/common/images/folder.gif new file mode 100644 index 0000000..ba41b8c Binary files /dev/null and b/webapps/totsys/common/images/folder.gif differ diff --git a/webapps/totsys/common/images/folder_origin.gif b/webapps/totsys/common/images/folder_origin.gif new file mode 100644 index 0000000..6bc5401 Binary files /dev/null and b/webapps/totsys/common/images/folder_origin.gif differ diff --git a/webapps/totsys/common/images/ft.gif b/webapps/totsys/common/images/ft.gif new file mode 100644 index 0000000..d6411bc Binary files /dev/null and b/webapps/totsys/common/images/ft.gif differ diff --git a/webapps/totsys/common/images/helper.gif b/webapps/totsys/common/images/helper.gif new file mode 100644 index 0000000..0d614d9 Binary files /dev/null and b/webapps/totsys/common/images/helper.gif differ diff --git a/webapps/totsys/common/images/hwp.png b/webapps/totsys/common/images/hwp.png new file mode 100644 index 0000000..d650563 Binary files /dev/null and b/webapps/totsys/common/images/hwp.png differ diff --git a/webapps/totsys/common/images/ico_1.gif b/webapps/totsys/common/images/ico_1.gif new file mode 100644 index 0000000..57c5260 Binary files /dev/null and b/webapps/totsys/common/images/ico_1.gif differ diff --git a/webapps/totsys/common/images/ico_3.gif b/webapps/totsys/common/images/ico_3.gif new file mode 100644 index 0000000..1d9e0a7 Binary files /dev/null and b/webapps/totsys/common/images/ico_3.gif differ diff --git a/webapps/totsys/common/images/icon.gif b/webapps/totsys/common/images/icon.gif new file mode 100644 index 0000000..ee75202 Binary files /dev/null and b/webapps/totsys/common/images/icon.gif differ diff --git a/webapps/totsys/common/images/icon_modify.jpg b/webapps/totsys/common/images/icon_modify.jpg new file mode 100644 index 0000000..d8c6dab Binary files /dev/null and b/webapps/totsys/common/images/icon_modify.jpg differ diff --git a/webapps/totsys/common/images/icon_new.gif b/webapps/totsys/common/images/icon_new.gif new file mode 100644 index 0000000..9bd8ab7 Binary files /dev/null and b/webapps/totsys/common/images/icon_new.gif differ diff --git a/webapps/totsys/common/images/icon_preview.jpg b/webapps/totsys/common/images/icon_preview.jpg new file mode 100644 index 0000000..6f48a69 Binary files /dev/null and b/webapps/totsys/common/images/icon_preview.jpg differ diff --git a/webapps/totsys/common/images/info.png b/webapps/totsys/common/images/info.png new file mode 100644 index 0000000..8dc23ba Binary files /dev/null and b/webapps/totsys/common/images/info.png differ diff --git a/webapps/totsys/common/images/info_modify.gif b/webapps/totsys/common/images/info_modify.gif new file mode 100644 index 0000000..1c6503d Binary files /dev/null and b/webapps/totsys/common/images/info_modify.gif differ diff --git a/webapps/totsys/common/images/input_write.png b/webapps/totsys/common/images/input_write.png new file mode 100644 index 0000000..24e0516 Binary files /dev/null and b/webapps/totsys/common/images/input_write.png differ diff --git a/webapps/totsys/common/images/left/Thumbs.db b/webapps/totsys/common/images/left/Thumbs.db new file mode 100644 index 0000000..ea331b3 Binary files /dev/null and b/webapps/totsys/common/images/left/Thumbs.db differ diff --git a/webapps/totsys/common/images/left/left_01.gif b/webapps/totsys/common/images/left/left_01.gif new file mode 100644 index 0000000..69cac95 Binary files /dev/null and b/webapps/totsys/common/images/left/left_01.gif differ diff --git a/webapps/totsys/common/images/left/left_02.gif b/webapps/totsys/common/images/left/left_02.gif new file mode 100644 index 0000000..b055bba Binary files /dev/null and b/webapps/totsys/common/images/left/left_02.gif differ diff --git a/webapps/totsys/common/images/left/left_03.gif b/webapps/totsys/common/images/left/left_03.gif new file mode 100644 index 0000000..dcfc80a Binary files /dev/null and b/webapps/totsys/common/images/left/left_03.gif differ diff --git a/webapps/totsys/common/images/left/left_04.gif b/webapps/totsys/common/images/left/left_04.gif new file mode 100644 index 0000000..1006935 Binary files /dev/null and b/webapps/totsys/common/images/left/left_04.gif differ diff --git a/webapps/totsys/common/images/left/left_05.gif b/webapps/totsys/common/images/left/left_05.gif new file mode 100644 index 0000000..51ca52f Binary files /dev/null and b/webapps/totsys/common/images/left/left_05.gif differ diff --git a/webapps/totsys/common/images/left/left_06.gif b/webapps/totsys/common/images/left/left_06.gif new file mode 100644 index 0000000..038b176 Binary files /dev/null and b/webapps/totsys/common/images/left/left_06.gif differ diff --git a/webapps/totsys/common/images/left/left_b.gif b/webapps/totsys/common/images/left/left_b.gif new file mode 100644 index 0000000..8165f4d Binary files /dev/null and b/webapps/totsys/common/images/left/left_b.gif differ diff --git a/webapps/totsys/common/images/left/left_bg.gif b/webapps/totsys/common/images/left/left_bg.gif new file mode 100644 index 0000000..8a6a3c6 Binary files /dev/null and b/webapps/totsys/common/images/left/left_bg.gif differ diff --git a/webapps/totsys/common/images/left/left_t.gif b/webapps/totsys/common/images/left/left_t.gif new file mode 100644 index 0000000..1068df2 Binary files /dev/null and b/webapps/totsys/common/images/left/left_t.gif differ diff --git a/webapps/totsys/common/images/left/left_titbg.gif b/webapps/totsys/common/images/left/left_titbg.gif new file mode 100644 index 0000000..4149a51 Binary files /dev/null and b/webapps/totsys/common/images/left/left_titbg.gif differ diff --git a/webapps/totsys/common/images/left/left_titbg2.gif b/webapps/totsys/common/images/left/left_titbg2.gif new file mode 100644 index 0000000..612ca88 Binary files /dev/null and b/webapps/totsys/common/images/left/left_titbg2.gif differ diff --git a/webapps/totsys/common/images/left01.jpg b/webapps/totsys/common/images/left01.jpg new file mode 100644 index 0000000..9b871c0 Binary files /dev/null and b/webapps/totsys/common/images/left01.jpg differ diff --git a/webapps/totsys/common/images/left_tit_bg.gif b/webapps/totsys/common/images/left_tit_bg.gif new file mode 100644 index 0000000..c536f0c Binary files /dev/null and b/webapps/totsys/common/images/left_tit_bg.gif differ diff --git a/webapps/totsys/common/images/login/Thumbs.db b/webapps/totsys/common/images/login/Thumbs.db new file mode 100644 index 0000000..44ee9ea Binary files /dev/null and b/webapps/totsys/common/images/login/Thumbs.db differ diff --git a/webapps/totsys/common/images/login/images/top_17.gif b/webapps/totsys/common/images/login/images/top_17.gif new file mode 100644 index 0000000..33ac114 Binary files /dev/null and b/webapps/totsys/common/images/login/images/top_17.gif differ diff --git a/webapps/totsys/common/images/login/login01.gif b/webapps/totsys/common/images/login/login01.gif new file mode 100644 index 0000000..33ac114 Binary files /dev/null and b/webapps/totsys/common/images/login/login01.gif differ diff --git a/webapps/totsys/common/images/login/login02.gif b/webapps/totsys/common/images/login/login02.gif new file mode 100644 index 0000000..a545c14 Binary files /dev/null and b/webapps/totsys/common/images/login/login02.gif differ diff --git a/webapps/totsys/common/images/login/login_09.jpg b/webapps/totsys/common/images/login/login_09.jpg new file mode 100644 index 0000000..3cdff21 Binary files /dev/null and b/webapps/totsys/common/images/login/login_09.jpg differ diff --git a/webapps/totsys/common/images/login/login_11.jpg b/webapps/totsys/common/images/login/login_11.jpg new file mode 100644 index 0000000..9df48e2 Binary files /dev/null and b/webapps/totsys/common/images/login/login_11.jpg differ diff --git a/webapps/totsys/common/images/login/login_14.jpg b/webapps/totsys/common/images/login/login_14.jpg new file mode 100644 index 0000000..9fe3c6a Binary files /dev/null and b/webapps/totsys/common/images/login/login_14.jpg differ diff --git a/webapps/totsys/common/images/login/login_17.jpg b/webapps/totsys/common/images/login/login_17.jpg new file mode 100644 index 0000000..c80c599 Binary files /dev/null and b/webapps/totsys/common/images/login/login_17.jpg differ diff --git a/webapps/totsys/common/images/ltree.gif b/webapps/totsys/common/images/ltree.gif new file mode 100644 index 0000000..d328ae4 Binary files /dev/null and b/webapps/totsys/common/images/ltree.gif differ diff --git a/webapps/totsys/common/images/m_box01_1.gif b/webapps/totsys/common/images/m_box01_1.gif new file mode 100644 index 0000000..9b67c48 Binary files /dev/null and b/webapps/totsys/common/images/m_box01_1.gif differ diff --git a/webapps/totsys/common/images/m_box01_2.gif b/webapps/totsys/common/images/m_box01_2.gif new file mode 100644 index 0000000..106752e Binary files /dev/null and b/webapps/totsys/common/images/m_box01_2.gif differ diff --git a/webapps/totsys/common/images/m_btn_go.gif b/webapps/totsys/common/images/m_btn_go.gif new file mode 100644 index 0000000..a293b07 Binary files /dev/null and b/webapps/totsys/common/images/m_btn_go.gif differ diff --git a/webapps/totsys/common/images/m_bu01.gif b/webapps/totsys/common/images/m_bu01.gif new file mode 100644 index 0000000..244d78c Binary files /dev/null and b/webapps/totsys/common/images/m_bu01.gif differ diff --git a/webapps/totsys/common/images/m_bu02.gif b/webapps/totsys/common/images/m_bu02.gif new file mode 100644 index 0000000..70032e5 Binary files /dev/null and b/webapps/totsys/common/images/m_bu02.gif differ diff --git a/webapps/totsys/common/images/m_img02.gif b/webapps/totsys/common/images/m_img02.gif new file mode 100644 index 0000000..5bd11a5 Binary files /dev/null and b/webapps/totsys/common/images/m_img02.gif differ diff --git a/webapps/totsys/common/images/m_img03.gif b/webapps/totsys/common/images/m_img03.gif new file mode 100644 index 0000000..0330367 Binary files /dev/null and b/webapps/totsys/common/images/m_img03.gif differ diff --git a/webapps/totsys/common/images/menu_Bg_01.png b/webapps/totsys/common/images/menu_Bg_01.png new file mode 100644 index 0000000..09970bd Binary files /dev/null and b/webapps/totsys/common/images/menu_Bg_01.png differ diff --git a/webapps/totsys/common/images/menu_Bg_02.png b/webapps/totsys/common/images/menu_Bg_02.png new file mode 100644 index 0000000..11c4c14 Binary files /dev/null and b/webapps/totsys/common/images/menu_Bg_02.png differ diff --git a/webapps/totsys/common/images/menu_bg_repeat.png b/webapps/totsys/common/images/menu_bg_repeat.png new file mode 100644 index 0000000..c0230ab Binary files /dev/null and b/webapps/totsys/common/images/menu_bg_repeat.png differ diff --git a/webapps/totsys/common/images/menu_on_01.png b/webapps/totsys/common/images/menu_on_01.png new file mode 100644 index 0000000..e0e6001 Binary files /dev/null and b/webapps/totsys/common/images/menu_on_01.png differ diff --git a/webapps/totsys/common/images/menu_on_02.png b/webapps/totsys/common/images/menu_on_02.png new file mode 100644 index 0000000..e0e6001 Binary files /dev/null and b/webapps/totsys/common/images/menu_on_02.png differ diff --git a/webapps/totsys/common/images/minus.gif b/webapps/totsys/common/images/minus.gif new file mode 100644 index 0000000..8bd13d2 Binary files /dev/null and b/webapps/totsys/common/images/minus.gif differ diff --git a/webapps/totsys/common/images/modify.png b/webapps/totsys/common/images/modify.png new file mode 100644 index 0000000..0a953b3 Binary files /dev/null and b/webapps/totsys/common/images/modify.png differ diff --git a/webapps/totsys/common/images/more.jpg b/webapps/totsys/common/images/more.jpg new file mode 100644 index 0000000..c1d3f6b Binary files /dev/null and b/webapps/totsys/common/images/more.jpg differ diff --git a/webapps/totsys/common/images/new_dept_del.gif b/webapps/totsys/common/images/new_dept_del.gif new file mode 100644 index 0000000..3ac20bc Binary files /dev/null and b/webapps/totsys/common/images/new_dept_del.gif differ diff --git a/webapps/totsys/common/images/next.png b/webapps/totsys/common/images/next.png new file mode 100644 index 0000000..4578d16 Binary files /dev/null and b/webapps/totsys/common/images/next.png differ diff --git a/webapps/totsys/common/images/next3.png b/webapps/totsys/common/images/next3.png new file mode 100644 index 0000000..ecd9d39 Binary files /dev/null and b/webapps/totsys/common/images/next3.png differ diff --git a/webapps/totsys/common/images/next_text.gif b/webapps/totsys/common/images/next_text.gif new file mode 100644 index 0000000..14e71b4 Binary files /dev/null and b/webapps/totsys/common/images/next_text.gif differ diff --git a/webapps/totsys/common/images/no.png b/webapps/totsys/common/images/no.png new file mode 100644 index 0000000..d223550 Binary files /dev/null and b/webapps/totsys/common/images/no.png differ diff --git a/webapps/totsys/common/images/no2.png b/webapps/totsys/common/images/no2.png new file mode 100644 index 0000000..509ca91 Binary files /dev/null and b/webapps/totsys/common/images/no2.png differ diff --git a/webapps/totsys/common/images/notebook.gif b/webapps/totsys/common/images/notebook.gif new file mode 100644 index 0000000..cfdb86b Binary files /dev/null and b/webapps/totsys/common/images/notebook.gif differ diff --git a/webapps/totsys/common/images/ok.png b/webapps/totsys/common/images/ok.png new file mode 100644 index 0000000..1758b6a Binary files /dev/null and b/webapps/totsys/common/images/ok.png differ diff --git a/webapps/totsys/common/images/open_minus.gif b/webapps/totsys/common/images/open_minus.gif new file mode 100644 index 0000000..645ede4 Binary files /dev/null and b/webapps/totsys/common/images/open_minus.gif differ diff --git a/webapps/totsys/common/images/open_plus.gif b/webapps/totsys/common/images/open_plus.gif new file mode 100644 index 0000000..1c3fc52 Binary files /dev/null and b/webapps/totsys/common/images/open_plus.gif differ diff --git a/webapps/totsys/common/images/own_form.gif b/webapps/totsys/common/images/own_form.gif new file mode 100644 index 0000000..519d32e Binary files /dev/null and b/webapps/totsys/common/images/own_form.gif differ diff --git a/webapps/totsys/common/images/p_box01_001.gif b/webapps/totsys/common/images/p_box01_001.gif new file mode 100644 index 0000000..e541305 Binary files /dev/null and b/webapps/totsys/common/images/p_box01_001.gif differ diff --git a/webapps/totsys/common/images/p_box01_002.gif b/webapps/totsys/common/images/p_box01_002.gif new file mode 100644 index 0000000..e61f4b2 Binary files /dev/null and b/webapps/totsys/common/images/p_box01_002.gif differ diff --git a/webapps/totsys/common/images/p_box01_003.gif b/webapps/totsys/common/images/p_box01_003.gif new file mode 100644 index 0000000..4544dd4 Binary files /dev/null and b/webapps/totsys/common/images/p_box01_003.gif differ diff --git a/webapps/totsys/common/images/p_box01_004.gif b/webapps/totsys/common/images/p_box01_004.gif new file mode 100644 index 0000000..26c7142 Binary files /dev/null and b/webapps/totsys/common/images/p_box01_004.gif differ diff --git a/webapps/totsys/common/images/p_box01_005.gif b/webapps/totsys/common/images/p_box01_005.gif new file mode 100644 index 0000000..f3d1e67 Binary files /dev/null and b/webapps/totsys/common/images/p_box01_005.gif differ diff --git a/webapps/totsys/common/images/p_box01_006.gif b/webapps/totsys/common/images/p_box01_006.gif new file mode 100644 index 0000000..910089d Binary files /dev/null and b/webapps/totsys/common/images/p_box01_006.gif differ diff --git a/webapps/totsys/common/images/p_box01_007.gif b/webapps/totsys/common/images/p_box01_007.gif new file mode 100644 index 0000000..8ba30d6 Binary files /dev/null and b/webapps/totsys/common/images/p_box01_007.gif differ diff --git a/webapps/totsys/common/images/p_box01_008.gif b/webapps/totsys/common/images/p_box01_008.gif new file mode 100644 index 0000000..f8d67e6 Binary files /dev/null and b/webapps/totsys/common/images/p_box01_008.gif differ diff --git a/webapps/totsys/common/images/pagebar.gif b/webapps/totsys/common/images/pagebar.gif new file mode 100644 index 0000000..888eca7 Binary files /dev/null and b/webapps/totsys/common/images/pagebar.gif differ diff --git a/webapps/totsys/common/images/pc-user.gif b/webapps/totsys/common/images/pc-user.gif new file mode 100644 index 0000000..1a1b6e2 Binary files /dev/null and b/webapps/totsys/common/images/pc-user.gif differ diff --git a/webapps/totsys/common/images/pencil.png b/webapps/totsys/common/images/pencil.png new file mode 100644 index 0000000..1203d60 Binary files /dev/null and b/webapps/totsys/common/images/pencil.png differ diff --git a/webapps/totsys/common/images/person.png b/webapps/totsys/common/images/person.png new file mode 100644 index 0000000..c565ec3 Binary files /dev/null and b/webapps/totsys/common/images/person.png differ diff --git a/webapps/totsys/common/images/plus.gif b/webapps/totsys/common/images/plus.gif new file mode 100644 index 0000000..7c2b219 Binary files /dev/null and b/webapps/totsys/common/images/plus.gif differ diff --git a/webapps/totsys/common/images/pop_bottom_center.gif b/webapps/totsys/common/images/pop_bottom_center.gif new file mode 100644 index 0000000..111862c Binary files /dev/null and b/webapps/totsys/common/images/pop_bottom_center.gif differ diff --git a/webapps/totsys/common/images/pop_bottom_left.gif b/webapps/totsys/common/images/pop_bottom_left.gif new file mode 100644 index 0000000..81eda75 Binary files /dev/null and b/webapps/totsys/common/images/pop_bottom_left.gif differ diff --git a/webapps/totsys/common/images/pop_bottom_right.gif b/webapps/totsys/common/images/pop_bottom_right.gif new file mode 100644 index 0000000..98f7c24 Binary files /dev/null and b/webapps/totsys/common/images/pop_bottom_right.gif differ diff --git a/webapps/totsys/common/images/pop_center_left.gif b/webapps/totsys/common/images/pop_center_left.gif new file mode 100644 index 0000000..14d6713 Binary files /dev/null and b/webapps/totsys/common/images/pop_center_left.gif differ diff --git a/webapps/totsys/common/images/pop_center_right.gif b/webapps/totsys/common/images/pop_center_right.gif new file mode 100644 index 0000000..6127f52 Binary files /dev/null and b/webapps/totsys/common/images/pop_center_right.gif differ diff --git a/webapps/totsys/common/images/pop_top_center.gif b/webapps/totsys/common/images/pop_top_center.gif new file mode 100644 index 0000000..3c5a1d8 Binary files /dev/null and b/webapps/totsys/common/images/pop_top_center.gif differ diff --git a/webapps/totsys/common/images/pop_top_left.gif b/webapps/totsys/common/images/pop_top_left.gif new file mode 100644 index 0000000..8afcf79 Binary files /dev/null and b/webapps/totsys/common/images/pop_top_left.gif differ diff --git a/webapps/totsys/common/images/pop_top_right.gif b/webapps/totsys/common/images/pop_top_right.gif new file mode 100644 index 0000000..315f857 Binary files /dev/null and b/webapps/totsys/common/images/pop_top_right.gif differ diff --git a/webapps/totsys/common/images/popup_receive_choice_titleb.gif b/webapps/totsys/common/images/popup_receive_choice_titleb.gif new file mode 100644 index 0000000..29a19e4 Binary files /dev/null and b/webapps/totsys/common/images/popup_receive_choice_titleb.gif differ diff --git a/webapps/totsys/common/images/popupk_bottom_center.gif b/webapps/totsys/common/images/popupk_bottom_center.gif new file mode 100644 index 0000000..e2be8a7 Binary files /dev/null and b/webapps/totsys/common/images/popupk_bottom_center.gif differ diff --git a/webapps/totsys/common/images/popupk_bottom_left.gif b/webapps/totsys/common/images/popupk_bottom_left.gif new file mode 100644 index 0000000..f78349c Binary files /dev/null and b/webapps/totsys/common/images/popupk_bottom_left.gif differ diff --git a/webapps/totsys/common/images/popupk_bottom_right.gif b/webapps/totsys/common/images/popupk_bottom_right.gif new file mode 100644 index 0000000..38805b1 Binary files /dev/null and b/webapps/totsys/common/images/popupk_bottom_right.gif differ diff --git a/webapps/totsys/common/images/popupk_center_left.gif b/webapps/totsys/common/images/popupk_center_left.gif new file mode 100644 index 0000000..aeed396 Binary files /dev/null and b/webapps/totsys/common/images/popupk_center_left.gif differ diff --git a/webapps/totsys/common/images/popupk_center_right.gif b/webapps/totsys/common/images/popupk_center_right.gif new file mode 100644 index 0000000..a1ea58f Binary files /dev/null and b/webapps/totsys/common/images/popupk_center_right.gif differ diff --git a/webapps/totsys/common/images/popupk_top_center.gif b/webapps/totsys/common/images/popupk_top_center.gif new file mode 100644 index 0000000..f06100b Binary files /dev/null and b/webapps/totsys/common/images/popupk_top_center.gif differ diff --git a/webapps/totsys/common/images/popupk_top_left.gif b/webapps/totsys/common/images/popupk_top_left.gif new file mode 100644 index 0000000..d6e4557 Binary files /dev/null and b/webapps/totsys/common/images/popupk_top_left.gif differ diff --git a/webapps/totsys/common/images/popupk_top_right.gif b/webapps/totsys/common/images/popupk_top_right.gif new file mode 100644 index 0000000..1baff49 Binary files /dev/null and b/webapps/totsys/common/images/popupk_top_right.gif differ diff --git a/webapps/totsys/common/images/popupt_bottom_center.gif b/webapps/totsys/common/images/popupt_bottom_center.gif new file mode 100644 index 0000000..111862c Binary files /dev/null and b/webapps/totsys/common/images/popupt_bottom_center.gif differ diff --git a/webapps/totsys/common/images/popupt_bottom_left.gif b/webapps/totsys/common/images/popupt_bottom_left.gif new file mode 100644 index 0000000..81eda75 Binary files /dev/null and b/webapps/totsys/common/images/popupt_bottom_left.gif differ diff --git a/webapps/totsys/common/images/popupt_bottom_right.gif b/webapps/totsys/common/images/popupt_bottom_right.gif new file mode 100644 index 0000000..98f7c24 Binary files /dev/null and b/webapps/totsys/common/images/popupt_bottom_right.gif differ diff --git a/webapps/totsys/common/images/popupt_center_left.gif b/webapps/totsys/common/images/popupt_center_left.gif new file mode 100644 index 0000000..14d6713 Binary files /dev/null and b/webapps/totsys/common/images/popupt_center_left.gif differ diff --git a/webapps/totsys/common/images/popupt_center_right.gif b/webapps/totsys/common/images/popupt_center_right.gif new file mode 100644 index 0000000..6127f52 Binary files /dev/null and b/webapps/totsys/common/images/popupt_center_right.gif differ diff --git a/webapps/totsys/common/images/popupt_top_center.gif b/webapps/totsys/common/images/popupt_top_center.gif new file mode 100644 index 0000000..3c5a1d8 Binary files /dev/null and b/webapps/totsys/common/images/popupt_top_center.gif differ diff --git a/webapps/totsys/common/images/popupt_top_left.gif b/webapps/totsys/common/images/popupt_top_left.gif new file mode 100644 index 0000000..8afcf79 Binary files /dev/null and b/webapps/totsys/common/images/popupt_top_left.gif differ diff --git a/webapps/totsys/common/images/popupt_top_right.gif b/webapps/totsys/common/images/popupt_top_right.gif new file mode 100644 index 0000000..315f857 Binary files /dev/null and b/webapps/totsys/common/images/popupt_top_right.gif differ diff --git a/webapps/totsys/common/images/prev_text.gif b/webapps/totsys/common/images/prev_text.gif new file mode 100644 index 0000000..150742e Binary files /dev/null and b/webapps/totsys/common/images/prev_text.gif differ diff --git a/webapps/totsys/common/images/previous.png b/webapps/totsys/common/images/previous.png new file mode 100644 index 0000000..f9a3308 Binary files /dev/null and b/webapps/totsys/common/images/previous.png differ diff --git a/webapps/totsys/common/images/print.png b/webapps/totsys/common/images/print.png new file mode 100644 index 0000000..4aae1c8 Binary files /dev/null and b/webapps/totsys/common/images/print.png differ diff --git a/webapps/totsys/common/images/pw_box01_1.gif b/webapps/totsys/common/images/pw_box01_1.gif new file mode 100644 index 0000000..d1bafd7 Binary files /dev/null and b/webapps/totsys/common/images/pw_box01_1.gif differ diff --git a/webapps/totsys/common/images/pw_box01_2.gif b/webapps/totsys/common/images/pw_box01_2.gif new file mode 100644 index 0000000..9efd11f Binary files /dev/null and b/webapps/totsys/common/images/pw_box01_2.gif differ diff --git a/webapps/totsys/common/images/pw_box01_3.gif b/webapps/totsys/common/images/pw_box01_3.gif new file mode 100644 index 0000000..c5c4895 Binary files /dev/null and b/webapps/totsys/common/images/pw_box01_3.gif differ diff --git a/webapps/totsys/common/images/pw_box01_4.gif b/webapps/totsys/common/images/pw_box01_4.gif new file mode 100644 index 0000000..0d36853 Binary files /dev/null and b/webapps/totsys/common/images/pw_box01_4.gif differ diff --git a/webapps/totsys/common/images/pw_box01_5.gif b/webapps/totsys/common/images/pw_box01_5.gif new file mode 100644 index 0000000..52f2fba Binary files /dev/null and b/webapps/totsys/common/images/pw_box01_5.gif differ diff --git a/webapps/totsys/common/images/pw_box01_6.gif b/webapps/totsys/common/images/pw_box01_6.gif new file mode 100644 index 0000000..ec8a2b2 Binary files /dev/null and b/webapps/totsys/common/images/pw_box01_6.gif differ diff --git a/webapps/totsys/common/images/pw_box01_7.gif b/webapps/totsys/common/images/pw_box01_7.gif new file mode 100644 index 0000000..c60250d Binary files /dev/null and b/webapps/totsys/common/images/pw_box01_7.gif differ diff --git a/webapps/totsys/common/images/pw_box01_8.gif b/webapps/totsys/common/images/pw_box01_8.gif new file mode 100644 index 0000000..fafe20d Binary files /dev/null and b/webapps/totsys/common/images/pw_box01_8.gif differ diff --git a/webapps/totsys/common/images/recall.png b/webapps/totsys/common/images/recall.png new file mode 100644 index 0000000..bb6eb7d Binary files /dev/null and b/webapps/totsys/common/images/recall.png differ diff --git a/webapps/totsys/common/images/reg_icon.gif b/webapps/totsys/common/images/reg_icon.gif new file mode 100644 index 0000000..437cd4a Binary files /dev/null and b/webapps/totsys/common/images/reg_icon.gif differ diff --git a/webapps/totsys/common/images/regist.png b/webapps/totsys/common/images/regist.png new file mode 100644 index 0000000..67da6b5 Binary files /dev/null and b/webapps/totsys/common/images/regist.png differ diff --git a/webapps/totsys/common/images/regist2.png b/webapps/totsys/common/images/regist2.png new file mode 100644 index 0000000..e3e0e0f Binary files /dev/null and b/webapps/totsys/common/images/regist2.png differ diff --git a/webapps/totsys/common/images/remove.png b/webapps/totsys/common/images/remove.png new file mode 100644 index 0000000..5eb9cf7 Binary files /dev/null and b/webapps/totsys/common/images/remove.png differ diff --git a/webapps/totsys/common/images/return.gif b/webapps/totsys/common/images/return.gif new file mode 100644 index 0000000..92991c9 Binary files /dev/null and b/webapps/totsys/common/images/return.gif differ diff --git a/webapps/totsys/common/images/s_button_bg.gif b/webapps/totsys/common/images/s_button_bg.gif new file mode 100644 index 0000000..ed55b11 Binary files /dev/null and b/webapps/totsys/common/images/s_button_bg.gif differ diff --git a/webapps/totsys/common/images/s_doc_info.gif b/webapps/totsys/common/images/s_doc_info.gif new file mode 100644 index 0000000..7a5f9a9 Binary files /dev/null and b/webapps/totsys/common/images/s_doc_info.gif differ diff --git a/webapps/totsys/common/images/s_menubg.jpg b/webapps/totsys/common/images/s_menubg.jpg new file mode 100644 index 0000000..70c3d24 Binary files /dev/null and b/webapps/totsys/common/images/s_menubg.jpg differ diff --git a/webapps/totsys/common/images/search_bg_L.gif b/webapps/totsys/common/images/search_bg_L.gif new file mode 100644 index 0000000..fa731bc Binary files /dev/null and b/webapps/totsys/common/images/search_bg_L.gif differ diff --git a/webapps/totsys/common/images/search_bg_R.gif b/webapps/totsys/common/images/search_bg_R.gif new file mode 100644 index 0000000..6ecae33 Binary files /dev/null and b/webapps/totsys/common/images/search_bg_R.gif differ diff --git a/webapps/totsys/common/images/select_all.gif b/webapps/totsys/common/images/select_all.gif new file mode 100644 index 0000000..796db01 Binary files /dev/null and b/webapps/totsys/common/images/select_all.gif differ diff --git a/webapps/totsys/common/images/sft.gif b/webapps/totsys/common/images/sft.gif new file mode 100644 index 0000000..0db3b7b Binary files /dev/null and b/webapps/totsys/common/images/sft.gif differ diff --git a/webapps/totsys/common/images/sky.png b/webapps/totsys/common/images/sky.png new file mode 100644 index 0000000..ab235a7 Binary files /dev/null and b/webapps/totsys/common/images/sky.png differ diff --git a/webapps/totsys/common/images/sky2.png b/webapps/totsys/common/images/sky2.png new file mode 100644 index 0000000..993344c Binary files /dev/null and b/webapps/totsys/common/images/sky2.png differ diff --git a/webapps/totsys/common/images/spacer.gif b/webapps/totsys/common/images/spacer.gif new file mode 100644 index 0000000..5bfd67a Binary files /dev/null and b/webapps/totsys/common/images/spacer.gif differ diff --git a/webapps/totsys/common/images/square-blue-medium-left.png b/webapps/totsys/common/images/square-blue-medium-left.png new file mode 100644 index 0000000..40ae87f Binary files /dev/null and b/webapps/totsys/common/images/square-blue-medium-left.png differ diff --git a/webapps/totsys/common/images/square-blue-medium-right.png b/webapps/totsys/common/images/square-blue-medium-right.png new file mode 100644 index 0000000..aab86b0 Binary files /dev/null and b/webapps/totsys/common/images/square-blue-medium-right.png differ diff --git a/webapps/totsys/common/images/square-white-large-left.png b/webapps/totsys/common/images/square-white-large-left.png new file mode 100644 index 0000000..1f58b15 Binary files /dev/null and b/webapps/totsys/common/images/square-white-large-left.png differ diff --git a/webapps/totsys/common/images/square-white-large-right.png b/webapps/totsys/common/images/square-white-large-right.png new file mode 100644 index 0000000..2f73287 Binary files /dev/null and b/webapps/totsys/common/images/square-white-large-right.png differ diff --git a/webapps/totsys/common/images/square-white-large-right2.png b/webapps/totsys/common/images/square-white-large-right2.png new file mode 100644 index 0000000..a1bdf66 Binary files /dev/null and b/webapps/totsys/common/images/square-white-large-right2.png differ diff --git a/webapps/totsys/common/images/sub_bt_pre.gif b/webapps/totsys/common/images/sub_bt_pre.gif new file mode 100644 index 0000000..bfa7a4e Binary files /dev/null and b/webapps/totsys/common/images/sub_bt_pre.gif differ diff --git a/webapps/totsys/common/images/sysadm_form.gif b/webapps/totsys/common/images/sysadm_form.gif new file mode 100644 index 0000000..f713696 Binary files /dev/null and b/webapps/totsys/common/images/sysadm_form.gif differ diff --git a/webapps/totsys/common/images/tab_off.gif b/webapps/totsys/common/images/tab_off.gif new file mode 100644 index 0000000..468401d Binary files /dev/null and b/webapps/totsys/common/images/tab_off.gif differ diff --git a/webapps/totsys/common/images/tab_off_orange.gif b/webapps/totsys/common/images/tab_off_orange.gif new file mode 100644 index 0000000..e1a047c Binary files /dev/null and b/webapps/totsys/common/images/tab_off_orange.gif differ diff --git a/webapps/totsys/common/images/tab_on.gif b/webapps/totsys/common/images/tab_on.gif new file mode 100644 index 0000000..330c3d4 Binary files /dev/null and b/webapps/totsys/common/images/tab_on.gif differ diff --git a/webapps/totsys/common/images/tab_on_orange.gif b/webapps/totsys/common/images/tab_on_orange.gif new file mode 100644 index 0000000..2cf64fa Binary files /dev/null and b/webapps/totsys/common/images/tab_on_orange.gif differ diff --git a/webapps/totsys/common/images/test.jpg b/webapps/totsys/common/images/test.jpg new file mode 100644 index 0000000..8c15a5e Binary files /dev/null and b/webapps/totsys/common/images/test.jpg differ diff --git a/webapps/totsys/common/images/title.jpg b/webapps/totsys/common/images/title.jpg new file mode 100644 index 0000000..507941a Binary files /dev/null and b/webapps/totsys/common/images/title.jpg differ diff --git a/webapps/totsys/common/images/title_circle.gif b/webapps/totsys/common/images/title_circle.gif new file mode 100644 index 0000000..1f2f8fb Binary files /dev/null and b/webapps/totsys/common/images/title_circle.gif differ diff --git a/webapps/totsys/common/images/title_circle_backup.gif b/webapps/totsys/common/images/title_circle_backup.gif new file mode 100644 index 0000000..54b0a90 Binary files /dev/null and b/webapps/totsys/common/images/title_circle_backup.gif differ diff --git a/webapps/totsys/common/images/top/Thumbs.db b/webapps/totsys/common/images/top/Thumbs.db new file mode 100644 index 0000000..e9e9f58 Binary files /dev/null and b/webapps/totsys/common/images/top/Thumbs.db differ diff --git a/webapps/totsys/common/images/top/logout_bt.gif b/webapps/totsys/common/images/top/logout_bt.gif new file mode 100644 index 0000000..937782c Binary files /dev/null and b/webapps/totsys/common/images/top/logout_bt.gif differ diff --git a/webapps/totsys/common/images/top/top_bg.gif b/webapps/totsys/common/images/top/top_bg.gif new file mode 100644 index 0000000..7f9a678 Binary files /dev/null and b/webapps/totsys/common/images/top/top_bg.gif differ diff --git a/webapps/totsys/common/images/top/top_off_01.gif b/webapps/totsys/common/images/top/top_off_01.gif new file mode 100644 index 0000000..a27e1b9 Binary files /dev/null and b/webapps/totsys/common/images/top/top_off_01.gif differ diff --git a/webapps/totsys/common/images/top/top_off_02.gif b/webapps/totsys/common/images/top/top_off_02.gif new file mode 100644 index 0000000..d3e6dbf Binary files /dev/null and b/webapps/totsys/common/images/top/top_off_02.gif differ diff --git a/webapps/totsys/common/images/top/top_off_03.gif b/webapps/totsys/common/images/top/top_off_03.gif new file mode 100644 index 0000000..3695c80 Binary files /dev/null and b/webapps/totsys/common/images/top/top_off_03.gif differ diff --git a/webapps/totsys/common/images/top/top_off_04.gif b/webapps/totsys/common/images/top/top_off_04.gif new file mode 100644 index 0000000..c09e0fe Binary files /dev/null and b/webapps/totsys/common/images/top/top_off_04.gif differ diff --git a/webapps/totsys/common/images/top/top_off_05.gif b/webapps/totsys/common/images/top/top_off_05.gif new file mode 100644 index 0000000..c52b3de Binary files /dev/null and b/webapps/totsys/common/images/top/top_off_05.gif differ diff --git a/webapps/totsys/common/images/top/top_off_06.gif b/webapps/totsys/common/images/top/top_off_06.gif new file mode 100644 index 0000000..d09c3fb Binary files /dev/null and b/webapps/totsys/common/images/top/top_off_06.gif differ diff --git a/webapps/totsys/common/images/top/top_off_13.gif b/webapps/totsys/common/images/top/top_off_13.gif new file mode 100644 index 0000000..937782c Binary files /dev/null and b/webapps/totsys/common/images/top/top_off_13.gif differ diff --git a/webapps/totsys/common/images/top/top_off_f.gif b/webapps/totsys/common/images/top/top_off_f.gif new file mode 100644 index 0000000..cab6e19 Binary files /dev/null and b/webapps/totsys/common/images/top/top_off_f.gif differ diff --git a/webapps/totsys/common/images/top/top_on_01.gif b/webapps/totsys/common/images/top/top_on_01.gif new file mode 100644 index 0000000..2f8f78e Binary files /dev/null and b/webapps/totsys/common/images/top/top_on_01.gif differ diff --git a/webapps/totsys/common/images/top/top_on_02.gif b/webapps/totsys/common/images/top/top_on_02.gif new file mode 100644 index 0000000..29267c9 Binary files /dev/null and b/webapps/totsys/common/images/top/top_on_02.gif differ diff --git a/webapps/totsys/common/images/top/top_on_03.gif b/webapps/totsys/common/images/top/top_on_03.gif new file mode 100644 index 0000000..26478d8 Binary files /dev/null and b/webapps/totsys/common/images/top/top_on_03.gif differ diff --git a/webapps/totsys/common/images/top/top_on_04.gif b/webapps/totsys/common/images/top/top_on_04.gif new file mode 100644 index 0000000..87bda00 Binary files /dev/null and b/webapps/totsys/common/images/top/top_on_04.gif differ diff --git a/webapps/totsys/common/images/top/top_on_05.gif b/webapps/totsys/common/images/top/top_on_05.gif new file mode 100644 index 0000000..fa1f8fb Binary files /dev/null and b/webapps/totsys/common/images/top/top_on_05.gif differ diff --git a/webapps/totsys/common/images/top/top_on_06.gif b/webapps/totsys/common/images/top/top_on_06.gif new file mode 100644 index 0000000..99825e1 Binary files /dev/null and b/webapps/totsys/common/images/top/top_on_06.gif differ diff --git a/webapps/totsys/common/images/topbar_bg.jpg b/webapps/totsys/common/images/topbar_bg.jpg new file mode 100644 index 0000000..2ba1ac0 Binary files /dev/null and b/webapps/totsys/common/images/topbar_bg.jpg differ diff --git a/webapps/totsys/common/images/tot_info_bg2.gif b/webapps/totsys/common/images/tot_info_bg2.gif new file mode 100644 index 0000000..128664b Binary files /dev/null and b/webapps/totsys/common/images/tot_info_bg2.gif differ diff --git a/webapps/totsys/common/images/tree.gif b/webapps/totsys/common/images/tree.gif new file mode 100644 index 0000000..e96903f Binary files /dev/null and b/webapps/totsys/common/images/tree.gif differ diff --git a/webapps/totsys/common/images/ttree.gif b/webapps/totsys/common/images/ttree.gif new file mode 100644 index 0000000..eef909f Binary files /dev/null and b/webapps/totsys/common/images/ttree.gif differ diff --git a/webapps/totsys/common/images/ttree2.gif b/webapps/totsys/common/images/ttree2.gif new file mode 100644 index 0000000..de5e760 Binary files /dev/null and b/webapps/totsys/common/images/ttree2.gif differ diff --git a/webapps/totsys/common/images/type_file.gif b/webapps/totsys/common/images/type_file.gif new file mode 100644 index 0000000..d651ada Binary files /dev/null and b/webapps/totsys/common/images/type_file.gif differ diff --git a/webapps/totsys/common/images/type_file.png b/webapps/totsys/common/images/type_file.png new file mode 100644 index 0000000..1236eb3 Binary files /dev/null and b/webapps/totsys/common/images/type_file.png differ diff --git a/webapps/totsys/common/images/type_repeat.png b/webapps/totsys/common/images/type_repeat.png new file mode 100644 index 0000000..7d66d0b Binary files /dev/null and b/webapps/totsys/common/images/type_repeat.png differ diff --git a/webapps/totsys/common/images/type_tot.gif b/webapps/totsys/common/images/type_tot.gif new file mode 100644 index 0000000..d7b4913 Binary files /dev/null and b/webapps/totsys/common/images/type_tot.gif differ diff --git a/webapps/totsys/common/images/type_tot.png b/webapps/totsys/common/images/type_tot.png new file mode 100644 index 0000000..d95714e Binary files /dev/null and b/webapps/totsys/common/images/type_tot.png differ diff --git a/webapps/totsys/common/images/uminus.gif b/webapps/totsys/common/images/uminus.gif new file mode 100644 index 0000000..73ddc5d Binary files /dev/null and b/webapps/totsys/common/images/uminus.gif differ diff --git a/webapps/totsys/common/images/uplus.gif b/webapps/totsys/common/images/uplus.gif new file mode 100644 index 0000000..9c301e9 Binary files /dev/null and b/webapps/totsys/common/images/uplus.gif differ diff --git a/webapps/totsys/common/inc/board/doc/images/bt_close.gif b/webapps/totsys/common/inc/board/doc/images/bt_close.gif new file mode 100644 index 0000000..8aeb90d Binary files /dev/null and b/webapps/totsys/common/inc/board/doc/images/bt_close.gif differ diff --git a/webapps/totsys/common/inc/board/doc/images/bt_doc_list.gif b/webapps/totsys/common/inc/board/doc/images/bt_doc_list.gif new file mode 100644 index 0000000..16ce3e9 Binary files /dev/null and b/webapps/totsys/common/inc/board/doc/images/bt_doc_list.gif differ diff --git a/webapps/totsys/common/inc/board/doc/images/bt_file_append.gif b/webapps/totsys/common/inc/board/doc/images/bt_file_append.gif new file mode 100644 index 0000000..d639156 Binary files /dev/null and b/webapps/totsys/common/inc/board/doc/images/bt_file_append.gif differ diff --git a/webapps/totsys/common/inc/board/doc/images/bt_file_del.gif b/webapps/totsys/common/inc/board/doc/images/bt_file_del.gif new file mode 100644 index 0000000..8da8076 Binary files /dev/null and b/webapps/totsys/common/inc/board/doc/images/bt_file_del.gif differ diff --git a/webapps/totsys/common/inc/board/doc/images/bt_notice_write.gif b/webapps/totsys/common/inc/board/doc/images/bt_notice_write.gif new file mode 100644 index 0000000..0744f45 Binary files /dev/null and b/webapps/totsys/common/inc/board/doc/images/bt_notice_write.gif differ diff --git a/webapps/totsys/common/inc/board/doc/images/bt_pre.gif b/webapps/totsys/common/inc/board/doc/images/bt_pre.gif new file mode 100644 index 0000000..e58d3a0 Binary files /dev/null and b/webapps/totsys/common/inc/board/doc/images/bt_pre.gif differ diff --git a/webapps/totsys/common/inc/board/doc/images/btn_completed.gif b/webapps/totsys/common/inc/board/doc/images/btn_completed.gif new file mode 100644 index 0000000..ab83c53 Binary files /dev/null and b/webapps/totsys/common/inc/board/doc/images/btn_completed.gif differ diff --git a/webapps/totsys/common/inc/board/doc/images/notice_del.gif b/webapps/totsys/common/inc/board/doc/images/notice_del.gif new file mode 100644 index 0000000..f7cfeca Binary files /dev/null and b/webapps/totsys/common/inc/board/doc/images/notice_del.gif differ diff --git a/webapps/totsys/common/inc/board/doc/images/notice_icon.gif b/webapps/totsys/common/inc/board/doc/images/notice_icon.gif new file mode 100644 index 0000000..02af79a Binary files /dev/null and b/webapps/totsys/common/inc/board/doc/images/notice_icon.gif differ diff --git a/webapps/totsys/common/inc/board/doc/images/notice_modify.gif b/webapps/totsys/common/inc/board/doc/images/notice_modify.gif new file mode 100644 index 0000000..0a3ba9e Binary files /dev/null and b/webapps/totsys/common/inc/board/doc/images/notice_modify.gif differ diff --git a/webapps/totsys/common/inc/board/doc/images/notice_view_list.gif b/webapps/totsys/common/inc/board/doc/images/notice_view_list.gif new file mode 100644 index 0000000..8aeb90d Binary files /dev/null and b/webapps/totsys/common/inc/board/doc/images/notice_view_list.gif differ diff --git a/webapps/totsys/common/inc/board/doc/images/reg_icon.gif b/webapps/totsys/common/inc/board/doc/images/reg_icon.gif new file mode 100644 index 0000000..2663e20 Binary files /dev/null and b/webapps/totsys/common/inc/board/doc/images/reg_icon.gif differ diff --git a/webapps/totsys/common/inc/board/doc/list.jsp b/webapps/totsys/common/inc/board/doc/list.jsp new file mode 100644 index 0000000..6b35d34 --- /dev/null +++ b/webapps/totsys/common/inc/board/doc/list.jsp @@ -0,0 +1,352 @@ + +<% + /************************************************************@@ + * Program Name : list.jsp + * Description : // + * Author : + * Create Date : 2004.10.11 + * History : + @@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.util.Date" + import="java.net.URLEncoder" + import="java.util.List" + import="java.text.SimpleDateFormat" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.util.MDate" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.lang.MLong" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*"%> +<%@ page import="java.util.Map.Entry"%> +<%@ page import="java.util.List"%> +<%@ page import="kr.co.kihyun.text.html.ServletUtil"%> +<%@ page import="kr.co.kihyun.moumi.Moumi"%> +<%@ page import="kr.co.kihyun.lang.StringConverter"%> +<%@ page import="kr.co.kihyun.beans.user.HttpSSOLogin"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + /****** Parameter ******/ + Long docID = MLong.parseLong(request.getParameter("docID"), null); + String boardGroupID = Category.ID_TOT_DOC_COMMENT; + String url = clearXSS(request.getParameter("url"), ""); + + if (url == null) { + url = ""; + } + + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + Category category = pm.getObjectById(Category.class, boardGroupID); + List boardList = totDoc.getBoards(pm, category); + + if (boardList.size() < 1) { +// return; + } + + /*********** User HttpSSOLogin check ***********/ + if (!HttpSSOLogin.isLogin(request)) { + String connURL = "opener.location='/totsys/login/login.jsp';"; + out.println(ServletUtil.getJavaScript(connURL)); + out.println(ServletUtil.getJavaScript("window.close();")); + return; + } + + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + + /*********** Parameter values ***********/ + Long boardID = null; + if (boardList.size() > 0) { + boardID = boardList.get(0).getId(); + } + /*********** Board View vlaues ***********/ + Board board = null; + String regID = ""; + String boardTitle = ""; + String boardContents = ""; + String usrFilenames = ""; + String svrFilenames = ""; + int visit = 0; + + tx.begin(); + + if (boardList.size() > 0) { + board = boardID == null ? null : pm.getObjectById(Board.class, boardID); + regID = board.getUser(pm) == null ? null : board.getUser(pm).getId(); + boardTitle = board.getTitle(); + boardContents = TagFilter.convertSpace(board.getContents()); + for (Entry> entry : board.getAttachments().entrySet()) { + usrFilenames += entry.getKey() + ";"; + svrFilenames += entry.getKey() + ";"; + } + docID = board.getTotDoc() == null ? null : board.getTotDoc().getId(); + boardGroupID = board.getCategory().getId(); + visit = board.getVisit(); + board.setVisit(visit + 1); + pm.makePersistent(board); + } + + /*********** append file name vlaues ***********/ + String[] usrFilenameList = usrFilenames.split(";"); + String[] svrFilenameList = svrFilenames.split(";"); + + /****** ó ******/ + boolean isManager = false; + if (usID.equals(regID)) { + isManager = true; + } + + /***** ư ó ******/ + String buttonPrss = (String) session.getAttribute("homeTagetURL"); +%> + + + + + + + + + + + + + +
    Է¿ / ڷ  
    + + + + + + + + + + + + + <% + if (boardList.size() > 0) { + for (int i = 0; i < 20; i++) { + Board b = boardList.get(i); + if (i < boardList.size()) { + %> + + + + + + + + <%} + }%> + + + + + + + + + + +
    ¥ۼ÷ȸ
    <%= new SimpleDateFormat("yy/MM/dd").format(b.getWriteDate())%><%= b.getUser(pm).getName()%> + - <%= MString.getEllipsis(b.getTitle(), 26)%>+ + <% + if (MString.isNull(usrFilenames)) { + out.write(""); + } else { + out.write(usrFilenames); + } + %> + <%= b.getVisit()%>
    + + + + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + + + + + + + + +
    + + + + + + +
    <%= boardTitle%>
    +
    + + + + + + + + + +
     
    <%= boardContents%>
    +
    + + <% + int i = 0; + for (i = 0; i < svrFilenameList.length; i++) { + %> + + + + <% + } + for (; i < 5; i++) { + %> + + + + <% } + %> +
    + +<%= Moumi.getMessageBundle().getString("moumi.message.file")%> + <%= (i + 1)%> :  &fileName=<%=URLEncoder.encode(svrFilenameList[i], "UTF-8")%>&docID=<%=docID%>" + target="hiddenIframe"><%= usrFilenameList[i]%>
    +  
    +
    +
    + + + + + + +
    + <%if (buttonPrss.equals("/totsys/repoper/main.jsp") || buttonPrss.equals("/totsys/repoadm/main.jsp")) {%> + + + + +
    + <%} else {%> + + + + <% + if (isManager) { + %> + + + <% } else { + %> + + + <% } + %> + +
    + <% }%> +
    +
    +
    +
    + + <% + } else { + %> +
    ϵ ϴ.
    + <% } + %> +
    + + +<% + tx.commit(); + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> + \ No newline at end of file diff --git a/webapps/totsys/common/inc/board/doc/list2.jsp b/webapps/totsys/common/inc/board/doc/list2.jsp new file mode 100644 index 0000000..e70bc10 --- /dev/null +++ b/webapps/totsys/common/inc/board/doc/list2.jsp @@ -0,0 +1,262 @@ + +<% + /************************************************************@@ + * Program Name : list.jsp + * Description : // + * Author : + * Create Date : 2004.10.11 + * History : + @@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" import="java.util.Date" + import="java.net.URLEncoder" import="java.util.List" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.util.MDate" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.lang.MLong" import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*"%> +<%@ page import="java.util.Map.Entry"%> +<%@ page import="java.util.List"%> +<%@ page import="kr.co.kihyun.text.html.ServletUtil"%> +<%@ page import="kr.co.kihyun.moumi.Moumi"%> +<%@ page import="kr.co.kihyun.lang.StringConverter"%> +<%@ page import="kr.co.kihyun.beans.user.HttpSSOLogin"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + /****** Parameter ******/ + Long docID = MLong.parseLong(request.getParameter("docID")); + String boardGroupID = Category.ID_TOT_DOC_COMMENT; + String url = clearXSS(request.getParameter("url"), ""); + int sysAuth; + + if (url == null) { + url = ""; + } + + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + Category category = pm.getObjectById(Category.class, boardGroupID); + List boardList = totDoc.getBoards(pm, category); + + if (boardList.size() < 1) { +// return; + } +%> +<% + /*********** User HttpSSOLogin check ***********/ + if (!HttpSSOLogin.isLogin(request)) { + String connURL = "opener.location='/totsys/login/login.jsp';"; + out.println(ServletUtil.getJavaScript(connURL)); + out.println(ServletUtil.getJavaScript("window.close();")); + return; + } + + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + + /*********** Parameter values ***********/ + Long boardID = null; + + if (boardList.size() > 0) { + boardID = boardList.get(0).getId(); + } + /*********** Board View vlaues ***********/ + Board board = null; + String regID = ""; + String boardContents = ""; + String usrFilenames = ""; + String svrFilenames = ""; + int visit = 0; + + if (boardList.size() > 0) { + tx.begin(); + board = boardID == null ? null : pm.getObjectById(Board.class, boardID); + regID = board.getUser(pm) == null ? null : board.getUser(pm).getId(); + boardContents = TagFilter.convertSpace(board.getContents()); + for (Entry> entry : board.getAttachments().entrySet()) { + usrFilenames += entry.getKey() + ";"; + svrFilenames += entry.getKey() + ";"; + } + docID = board.getTotDoc() == null ? null : board.getTotDoc().getId(); + boardGroupID = board.getCategory().getId(); + visit = board.getVisit(); + board.setVisit(visit + 1); + pm.makePersistent(board); + tx.commit(); + } + /****** Doc list data get ******/ + String docName = totDoc.getName(); + + /*********** append file name vlaues ***********/ + String[] usrFilenameList = usrFilenames.split(";"); + String[] svrFilenameList = svrFilenames.split(";"); + + /****** ó ******/ + boolean isManager = false; + if (usID.equals(regID)) { + isManager = true; + } + + /***** ư ó ******/ + String buttonPrss = (String) session.getAttribute("homeTagetURL"); +%> + + + + + + + + + + +
    [Է¿ <%=Moumi.getMessageBundle().getString("moumi.message.doc")%>] 
    + + + + + +
    + + <% + int i = 0; + for (i = 0; i < svrFilenameList.length; i++) { + if (svrFilenameList[i] != null && !svrFilenameList[i].equals("")) { + %> + + + + <% + } + } + %> +
    +<%= Moumi.getMessageBundle().getString("moumi.message.file")%> + <%= (i + 1)%>   &fileName=<%=URLEncoder.encode(svrFilenameList[i], "UTF-8")%>&docID=<%=docID%>" + target="hiddenIframe"><%= usrFilenameList[i]%>
    +
    + + + + + + + <% + if (boardList.size() > 0) { + + %> + + + + + + + + + + +
    + <% if (url.equals("prss") | url.equals("reg")) {%> + <% }%> + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + + +
    <%= boardContents%>
    +
    +
    +
    +
    + + <%} else {%> +
    ϵ ϴ.
    + <% } + %> +
    + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> + \ No newline at end of file diff --git a/webapps/totsys/common/inc/board/doc/regist_write.jsp b/webapps/totsys/common/inc/board/doc/regist_write.jsp new file mode 100644 index 0000000..b2458ff --- /dev/null +++ b/webapps/totsys/common/inc/board/doc/regist_write.jsp @@ -0,0 +1,365 @@ +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.beans.entity.Category" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MInteger" import="java.net.URLEncoder" + import="java.net.URLDecoder" import="kr.co.kihyun.lang.MString"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% + try { + /*********** User HttpSSOLogin check ***********/ + if (!HttpSSOLogin.isLogin(request)) { + //login ǵƿ ּ + String connURL = "location='/totsys/login/login.jsp';"; + out.println(ServletUtil.getJavaScript(connURL)); + out.println(ServletUtil.getJavaScript("window.close();")); + return; + } + + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + String reuseDocID = clearXSS(MString.checkNull(request.getParameter("reuseDocID")), ""); + + /****** Parameter ******/ + String docID = clearXSS(request.getParameter("docID"), ""); + String docName = clearXSS(URLDecoder.decode(request.getParameter("docName"), "UTF-8"), ""); + String handyName = clearXSS(URLDecoder.decode(request.getParameter("handyName"), "UTF-8"), ""); + String accAuth = clearXSS(request.getParameter("accAuth"), ""); + String totRange = clearXSS(request.getParameter("totRange"), ""); + String stDate = clearXSS(request.getParameter("stDate"), ""); + String edDate = clearXSS(request.getParameter("edDate"), ""); + String deptIDs = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("deptIDs")), "UTF-8"), ""); + String userIDs = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("userIDs")), "UTF-8"), ""); + String repDocID = clearXSS(request.getParameter("repDocID"), ""); + String docGroupID = clearXSS(request.getParameter("docGroupID"), ""); + String isFromFormBox = clearXSS(request.getParameter("isFromFormBox"), ""); + + String choice = clearXSS(request.getParameter("choice"), ""); + String deptNames = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("deptNames")), "UTF-8"), ""); + String userNames = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("userNames")), "UTF-8"), ""); + + String deptTypes = clearXSS(MString.checkNull(request.getParameter("deptTypes")), ""); + + String tableCount = clearXSS(request.getParameter("tableCount"), ""); + String isDynaTable = clearXSS(request.getParameter("isDynaTable"), ""); + String mode = clearXSS(request.getParameter("mode"), ""); + String tableDefines = clearXSS(request.getParameter("tableDefines"), ""); + String itemNames = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemNames")), "UTF-8"), ""); + String tableNums = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("tableNums")), "UTF-8"), ""); + String colNums = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("colNums")), "UTF-8"), ""); + String rowNums = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("rowNums")), "UTF-8"), ""); + String itemSizes = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemSizes")), "UTF-8"), ""); + String itemDescs = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemDescs")), "UTF-8"), ""); + String itemExprs = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemExprs")), "UTF-8"), ""); + String itemTypes = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemTypes")), "UTF-8"), ""); + String docForm = clearXSS(request.getParameter("docForm"), ""); + String tableType = clearXSS(request.getParameter("tableType"), ""); + String defItemSize = clearXSS(request.getParameter("defItemSize"), ""); + String tableTypes = clearXSS(request.getParameter("tableTypes"), ""); + +%> + + + <%=Moumi.getTitle()%> + + + + + + + + + + + + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + ڷ ÷ +
    + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + + + + +
    + + +
    + +
    + + + + + + + + + + +
    +
    + + + + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + } +%> diff --git a/webapps/totsys/common/inc/board/doc/write_file_upload.jsp b/webapps/totsys/common/inc/board/doc/write_file_upload.jsp new file mode 100644 index 0000000..321d4e7 --- /dev/null +++ b/webapps/totsys/common/inc/board/doc/write_file_upload.jsp @@ -0,0 +1,415 @@ + +<% + /********************************************************************************** + α׷ : write_file_upload.jsp + α׷ : ε + : ũ + : 2003. 5.28 + ֽź : 2010. 11.24 + ***********************************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr"%> + +<%@ page import="java.net.*"%> +<%@ page import="kr.co.kihyun.lang.Encoder"%> +<%@ page import="kr.co.kihyun.lang.MString"%> +<%@ page import="java.util.ResourceBundle"%> +<%@ page import="kr.co.kihyun.moumi.Moumi"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% + try { + /****** Parameter ******/ + String execMode = ""; + String svrFilename = ""; + String usrFilename = ""; + String boardGroupID = ""; + String mode = ""; + String docID = ""; + String reportID = ""; + String boardID = ""; + String path = ""; + + execMode = request.getParameter("execMode"); + svrFilename = URLDecoder.decode(MString.checkNull(request.getParameter("svrFilename")), "UTF-8"); + usrFilename = URLDecoder.decode(MString.checkNull(request.getParameter("usrFilename")), "UTF-8"); + boardGroupID = request.getParameter("boardGroupID"); + mode = MString.checkNull(request.getParameter("mode")); + docID = MString.checkNull(request.getParameter("docID")); + reportID = MString.checkNull(request.getParameter("reportID")); + boardID = MString.checkNull(request.getParameter("boardID")); + path = MString.checkNull(request.getParameter("path")); + String MSG = request.getParameter("MSG"); + //System.out.print("MSG::::" + MSG); + String maxSize = request.getParameter("maxSize"); + if (maxSize == null || maxSize.equals("")) { + maxSize = "10"; + } + + String tmpMsg = ""; + String pageFlag = clearXSS(request.getParameter("pageFlag"), "1"); + if (pageFlag.equals("1")) { + tmpMsg = "- ڷ ߰ư"; + } else if (pageFlag.equals("2")) { + tmpMsg = "- Ϸ 쿡 ߰ϼ"; + } +%> +<% if (MSG != null) {%> + +<% }%> +<% + String chkExt = ""; + if (execMode != "init") { + chkExt = checkext(svrFilename, ""); + if (chkExt.equals("false")) { + execMode = "error"; + } + + chkExt = checkext(usrFilename, ""); + if (chkExt.equals("false")) { + execMode = "error"; + } + } +%> + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + <%----%> +
    + + + + + + +
    + +
    + + <%=tmpMsg%>(Ͽ뷮 <%=maxSize%>M ) + +
    +
    +
    + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + } +%> diff --git a/webapps/totsys/common/inc/board/doc/write_file_upload_1.jsp b/webapps/totsys/common/inc/board/doc/write_file_upload_1.jsp new file mode 100644 index 0000000..437779d --- /dev/null +++ b/webapps/totsys/common/inc/board/doc/write_file_upload_1.jsp @@ -0,0 +1,483 @@ + +<% /** + * ******************************************************************************** + * α׷ : write_file_upload1.jsp α׷ : ε : ũ(jskim) + * : 2003. 5.28 ֽź : 2013. 4.24 + * ********************************************************************************* + */ +%> +<%@ page contentType="text/html; charset=euc-kr"%> + +<%@ page import="java.net.*"%> +<%@ page import="kr.co.kihyun.lang.Encoder"%> +<%@ page import="kr.co.kihyun.lang.MString"%> +<%@ page import="java.util.ResourceBundle"%> +<%@ page import="kr.co.kihyun.moumi.Moumi"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% try { + /** + * **** Parameter ***** + */ + String execMode = ""; + String svrFilename = ""; + String usrFilename = ""; + String boardGroupID = ""; + String mode = ""; + String docID = ""; + String reportID = ""; + String boardID = ""; + String path = ""; + String currentFileSize = ""; + + execMode = request.getParameter("execMode"); + svrFilename = URLDecoder.decode(MString.checkNull(request.getParameter("svrFilename")), "UTF-8"); + usrFilename = URLDecoder.decode(MString.checkNull(request.getParameter("usrFilename")), "UTF-8"); + boardGroupID = request.getParameter("boardGroupID"); + mode = MString.checkNull(request.getParameter("mode")); + docID = MString.checkNull(request.getParameter("docID")); + reportID = MString.checkNull(request.getParameter("reportID")); + boardID = MString.checkNull(request.getParameter("boardID")); + path = MString.checkNull(request.getParameter("path")); + String MSG = request.getParameter("MSG"); + //System.out.print("MSG::::" + MSG); + String maxSize = request.getParameter("maxSize"); + if (maxSize == null || maxSize.equals("")) { + maxSize = "5"; + } + + String tmpMsg = ""; + String pageFlag = clearXSS(request.getParameter("pageFlag"), "1"); + if (pageFlag.equals("1")) { + tmpMsg = "- ڷ ߰ư"; + } else if (pageFlag.equals("2")) { + tmpMsg = "- Ϸ 쿡 ߰ϼ"; + } + + // ε尡 ϸ ε ũ(byte) Ķͷ ޴´. (2014.09.02 by youngjun cho.) + currentFileSize = MString.checkNull(request.getParameter("currentFileSize")); +%> +<% if (MSG != null) {%> + +<% }%> +<% + String chkExt = ""; + if (execMode != "init") { + chkExt = checkext(svrFilename, ""); + if (chkExt.equals("false")) { + execMode = "error"; + } + + chkExt = checkext(usrFilename, ""); + if (chkExt.equals("false")) { + execMode = "error"; + } + } +%> + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + + <%----%> +
    + + + + + + +
    + +
    + <%=tmpMsg%>(Ͽ뷮 <%=maxSize%>M ) +
    +
    +
    + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + } +%> diff --git a/webapps/totsys/common/inc/board/doc/write_file_upload_1.jsp_org b/webapps/totsys/common/inc/board/doc/write_file_upload_1.jsp_org new file mode 100644 index 0000000..30aa265 --- /dev/null +++ b/webapps/totsys/common/inc/board/doc/write_file_upload_1.jsp_org @@ -0,0 +1,483 @@ + +<% /** + * ******************************************************************************** + * α׷ : write_file_upload1.jsp α׷ : ε : ũ(jskim) + * : 2003. 5.28 ֽź : 2013. 4.24 + * ********************************************************************************* + */ +%> +<%@ page contentType="text/html; charset=euc-kr"%> + +<%@ page import="java.net.*"%> +<%@ page import="kr.co.kihyun.lang.Encoder"%> +<%@ page import="kr.co.kihyun.lang.MString"%> +<%@ page import="java.util.ResourceBundle"%> +<%@ page import="kr.co.kihyun.moumi.Moumi"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% try { + /** + * **** Parameter ***** + */ + String execMode = ""; + String svrFilename = ""; + String usrFilename = ""; + String boardGroupID = ""; + String mode = ""; + String docID = ""; + String reportID = ""; + String boardID = ""; + String path = ""; + String currentFileSize = ""; + + execMode = request.getParameter("execMode"); + svrFilename = URLDecoder.decode(MString.checkNull(request.getParameter("svrFilename")), "UTF-8"); + usrFilename = URLDecoder.decode(MString.checkNull(request.getParameter("usrFilename")), "UTF-8"); + boardGroupID = request.getParameter("boardGroupID"); + mode = MString.checkNull(request.getParameter("mode")); + docID = MString.checkNull(request.getParameter("docID")); + reportID = MString.checkNull(request.getParameter("reportID")); + boardID = MString.checkNull(request.getParameter("boardID")); + path = MString.checkNull(request.getParameter("path")); + String MSG = request.getParameter("MSG"); + //System.out.print("MSG::::" + MSG); + String maxSize = request.getParameter("maxSize"); + if (maxSize == null || maxSize.equals("")) { + maxSize = "1"; + } + + String tmpMsg = ""; + String pageFlag = clearXSS(request.getParameter("pageFlag"), "1"); + if (pageFlag.equals("1")) { + tmpMsg = "- ڷ ߰ư"; + } else if (pageFlag.equals("2")) { + tmpMsg = "- Ϸ 쿡 ߰ϼ"; + } + + // ε尡 ϸ ε ũ(byte) Ķͷ ޴´. (2014.09.02 by youngjun cho.) + currentFileSize = MString.checkNull(request.getParameter("currentFileSize")); +%> +<% if (MSG != null) {%> + +<% }%> +<% + String chkExt = ""; + if (execMode != "init") { + chkExt = checkext(svrFilename, ""); + if (chkExt.equals("false")) { + execMode = "error"; + } + + chkExt = checkext(usrFilename, ""); + if (chkExt.equals("false")) { + execMode = "error"; + } + } +%> + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + + <%----%> +
    + + + + + + +
    + +
    + <%=tmpMsg%>(Ͽ뷮 <%=maxSize%>M ) +
    +
    +
    + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + } +%> diff --git a/webapps/totsys/common/inc/board/page.jsp b/webapps/totsys/common/inc/board/page.jsp new file mode 100644 index 0000000..ea7fc28 --- /dev/null +++ b/webapps/totsys/common/inc/board/page.jsp @@ -0,0 +1,91 @@ +<%@page import="java.net.URLEncoder"%> +<% + /************************************************************@@ + * Program Name : doc_list.jsp + * Description : //// + * Author : + * Create Date : 2004.10.11 + * History : + @@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MInteger"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% + try { + /******* Parameter *********/ + request.setCharacterEncoding("euc-kr"); + String uri = URLDecoder.decode(MString.checkNull(request.getParameter("uri")), "UTF-8"); + String findWord = MString.checkNull(request.getParameter("findWord")); + uri += "&findWord=" + findWord; + int pageSize = MInteger.parseInt(request.getParameter("pageSize")); + int currentPage = MInteger.parseInt(request.getParameter("currentPage")); + int currentPageSetUp = MInteger.parseInt(request.getParameter("currentPageSetUp"));%> + + + + <% // + //System.out.println("pageSize:::::" + pageSize); + for (int i = (currentPageSetUp + 1); i <= pageSize && i <= (currentPageSetUp + 10); i++) { + if (i != 1) {%> + + <% } + if (i != currentPage) {%> + + <% } else {%> + + <% + } + } + %> + + +
    + <% // 40 + //System.out.println("currentPageSetUp::::::" + currentPageSetUp + ":::currentPage::" + currentPage + ":::::pageSize:::" + pageSize); + if (currentPage > 10) {%> + + + + <%} else {%> + + <%}%> + <%if (currentPage > 10) {// 10%> + + + + <%} else {%> + + <%}%> +   + + <%= i%> +   +   + <%= i%>   + + <%if ((pageSize - currentPageSetUp) > 10) {// 10%> + + + + <%} else {%> + + <%}%> + <% // 40 + //System.out.println("currentPageSetUp End::::::" + currentPageSetUp + ":::currentPage::" + currentPage + ":::pageSize:::" + pageSize); + if ((pageSize - currentPageSetUp) > 20) {%> + + + + <%} else {%> + + <%}%> +
    +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + } +%> diff --git a/webapps/totsys/common/inc/board/page_module.jsp b/webapps/totsys/common/inc/board/page_module.jsp new file mode 100644 index 0000000..cb819aa --- /dev/null +++ b/webapps/totsys/common/inc/board/page_module.jsp @@ -0,0 +1,95 @@ + +<%@page import="java.net.URLEncoder"%> +<% + /************************************************************@@ + * Program Name : doc_list.jsp + * Description : //// + * Author : + * Create Date : 2004.10.11 + * History : + @@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MInteger"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% try { + /******* Parameter *********/ + request.setCharacterEncoding("euc-kr"); + //String uri = URLDecoder.decode(MString.checkNull(request.getParameter("uri")), "UTF-8"); + String pageFunction = MString.checkNull(request.getParameter("pageFunction")); + //uri += "&findWord=" + findWord; + int pageSize = MInteger.parseInt(request.getParameter("pageSize")); + int currentPage = MInteger.parseInt(request.getParameter("currentPage")); + int currentPageSetUp = MInteger.parseInt(request.getParameter("currentPageSetUp"));%> + + + + <% // + //System.out.println("pageSize:::::" + pageSize); + for (int i = (currentPageSetUp + 1); i <= pageSize && i <= (currentPageSetUp + 10); i++) { + if (i != 1) {%> + + <%} + if (i != currentPage) {%> + + <% + } else {%> + + <% + } + } + %> + + +
    + <% // 40 + //System.out.println("currentPageSetUp::::::" + currentPageSetUp + ":::currentPage::" + currentPage + ":::::pageSize:::" + pageSize); + if (currentPage > 10) {%> + + + + <%} else {%> + + <%}%> + <%if (currentPage > 10) {// 10%> + + + + <%} else {%> + + <%}%> +   + + <%= i%> +   +   + <%= i%>   + + <%if ((pageSize - currentPageSetUp) > 10) {// 10%> + + + + <%} else {%> + + <%}%> + <% // 40 + //System.out.println("currentPageSetUp End::::::" + currentPageSetUp + ":::currentPage::" + currentPage + ":::pageSize:::" + pageSize); + if ((pageSize - currentPageSetUp) > 20) {%> + + + + <%} else {%> + + <%}%> +
    +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + } +%> diff --git a/webapps/totsys/common/inc/board/sub_page.jsp b/webapps/totsys/common/inc/board/sub_page.jsp new file mode 100644 index 0000000..ae11d73 --- /dev/null +++ b/webapps/totsys/common/inc/board/sub_page.jsp @@ -0,0 +1,95 @@ + +<% /** + * **********************************************************@@ Program Name + * : doc_list.jsp Description : //// Author : ũ Create + * Date : 2010.11.23 History : + * @@*********************************************************** + */ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" import="kr.co.kihyun.lang.MInteger"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% try { + /** + * ***** Parameter ******** + */ + String uri = URLDecoder.decode(request.getParameter("uri"), "UTF-8"); + int pageSize = MInteger.parseInt(request.getParameter("pageSize")); + int currentPage = MInteger.parseInt(request.getParameter("currentPage")); + int currentPageSetUp = MInteger.parseInt(request.getParameter("currentPageSetUp")); + int listNum = MInteger.parseInt(request.getParameter("listNum")); + if (listNum == 0) { + listNum = 30; + } + String sort = request.getParameter("sort"); +%> + + + + + + <% + // + for (int i = (currentPageSetUp + 1); i <= pageSize && i <= (currentPageSetUp + 10); i++) { + if (i != 1) {%> + + <%} + if (i != currentPage) {%> + + <% } else {%> + + <%} + }%> + + +
    + <% + // 40 + //System.out.println("currentPageSetUp::::::"+currentPageSetUp+":::currentPage::"+currentPage+":::::pageSize:::"+pageSize); + if (currentPage > 10) { + %> + + + + <%} else {%> + + <%}%> + <%if (currentPage > 10) {// 10%> + + + + <%} else {%> + + <%}%> +   + + <%= i%> +   +   + <%= i%>   + + <%if ((pageSize - currentPageSetUp) > 10) {// 10%> + + + + <%} else {%> + + <%}%> + <% // 40 + //System.out.println("currentPageSetUp End::::::"+currentPageSetUp+":::currentPage::"+currentPage+":::pageSize:::"+pageSize); + if ((pageSize - currentPageSetUp) > 10) {%> + + + + <%} else {%> + + <%}%> +
    +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + } +%> diff --git a/webapps/totsys/common/inc/board/whole/board_list.jsp b/webapps/totsys/common/inc/board/whole/board_list.jsp new file mode 100644 index 0000000..e2eb7aa --- /dev/null +++ b/webapps/totsys/common/inc/board/whole/board_list.jsp @@ -0,0 +1,127 @@ + +<% +/************************************************************@@ + * Program Name : board_list.jsp + * Description : / + * Author : + * Create Date : 2004.11.08 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.text.SimpleDateFormat" import="java.util.Date" + import="java.util.List" import="javax.jdo.Extent" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="javax.jdo.Query" import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.util.MDate"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + + int titleLengthLimit = 15; + Long boardCountLimit = 3L; + + Category category = pm.getObjectById(Category.class, request.getParameter("boardGroupID")); + + List boardList; + Query q = pm.newQuery(Board.class); + q.setFilter("category == board_category"); + q.declareParameters("kr.co.kihyun.beans.entity.Category board_category"); + q.setRange(0L, boardCountLimit); + //v2. 13.SQL : JDO̹Ƿ ذå prepare SQL + boardList = (List) q.execute(category); + //================ +%> + + + + + + + + + + +
    +   <%= category.getName() %> + + + go
    + + + + + + + + + + + + + + + + +
      + + + + +
    + + <% + int blank=0; + tx.begin(); + for(int i=0; i < boardCountLimit; i++, blank++){ + %> + "> + + + + <% + } + tx.rollback(); + %> +
    + <% if(i < boardList.size()) { %> <%= MString.getEllipsis(boardList.get(i).getTitle(), titleLengthLimit) %> + <% } else { %>   <% } %> + + <% if(i < boardList.size()) { %> <%= new SimpleDateFormat("yyyy-MM-dd").format(boardList.get(i).getWriteDate()) %> + <% } else { %>   <% } %> +
    +
    +
     
    + + +<% +}catch(Exception e){ + System.err.println("param: "+request.getParameter("boardGroupID")); + e.printStackTrace(); +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/totsys/common/inc/buttom/buttom.jsp b/webapps/totsys/common/inc/buttom/buttom.jsp new file mode 100644 index 0000000..d74cc6f --- /dev/null +++ b/webapps/totsys/common/inc/buttom/buttom.jsp @@ -0,0 +1,33 @@ + +<% +/************************************************************@@ + * Program Name : doc_list.jsp + * Description : + * Author : + * Create Date : 2004.10.11 + * History : +@@************************************************************/ +%> + \ No newline at end of file diff --git a/webapps/totsys/common/inc/buttom/images/bottom_bg.gif b/webapps/totsys/common/inc/buttom/images/bottom_bg.gif new file mode 100644 index 0000000..4368a82 Binary files /dev/null and b/webapps/totsys/common/inc/buttom/images/bottom_bg.gif differ diff --git a/webapps/totsys/common/inc/buttom/images/bottom_location_home.gif b/webapps/totsys/common/inc/buttom/images/bottom_location_home.gif new file mode 100644 index 0000000..c43394f Binary files /dev/null and b/webapps/totsys/common/inc/buttom/images/bottom_location_home.gif differ diff --git a/webapps/totsys/common/inc/buttom/images/bottom_location_pre.gif b/webapps/totsys/common/inc/buttom/images/bottom_location_pre.gif new file mode 100644 index 0000000..a143520 Binary files /dev/null and b/webapps/totsys/common/inc/buttom/images/bottom_location_pre.gif differ diff --git a/webapps/totsys/common/inc/buttom/images/bottom_location_top.gif b/webapps/totsys/common/inc/buttom/images/bottom_location_top.gif new file mode 100644 index 0000000..028a1e0 Binary files /dev/null and b/webapps/totsys/common/inc/buttom/images/bottom_location_top.gif differ diff --git a/webapps/totsys/common/inc/documents/form_doc/base_info_modify.jsp b/webapps/totsys/common/inc/documents/form_doc/base_info_modify.jsp new file mode 100644 index 0000000..78bd389 --- /dev/null +++ b/webapps/totsys/common/inc/documents/form_doc/base_info_modify.jsp @@ -0,0 +1,138 @@ + +<% + /************************************************************@@ + * Program Name : base_info_modify.jsp + * Description : 蹮 ⺻ + * Author : + * Create Date : 2004-11-11 + * History : + @@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" import="java.util.Date" + import="java.text.SimpleDateFormat" import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.totsys.report.ReportList" + import="kr.co.kihyun.lang.MLong" import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + try { + /****** Parameter ******/ + Long docID = MLong.parseLong(request.getParameter("docID"), null); + + /****** Doc list data get ******/ + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String docName = totDoc.getName(); + Date regDate = totDoc.getRegDate(); + AccessAuth accAuth = totDoc.getAccessAuth(); + int groupID = totDoc.getType().ordinal(); + +%> + + + + +
    + + + + + + +   +   +   + + + + + + + + + + + + + + + + +
    + ĸ + + ı + checked <%}%>> + checked <%}%>>μ + checked <%}%>>ü
    + <%= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(regDate)%> + Ÿ 
    + + + + + + + + + + + + +
    +   +
    + + +
    + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/documents/report/back/report_list.jsp b/webapps/totsys/common/inc/documents/report/back/report_list.jsp new file mode 100644 index 0000000..1b58772 --- /dev/null +++ b/webapps/totsys/common/inc/documents/report/back/report_list.jsp @@ -0,0 +1,942 @@ + +<%@page import="java.util.ArrayList"%> +<% +/************************************************************@@ + * Program Name : doc_list.jsp + * Description : // + * Author : ũ + * Create Date : 2010.11.21 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" import="java.util.Date" + import="java.util.List" import="java.text.SimpleDateFormat" + import="java.net.URLEncoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.util.MDate" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.moumi.doc.MDoc" import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*" import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" import="javax.jdo.Query"%> +<%@page import="java.net.URLDecoder"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + request.setCharacterEncoding("euc-kr"); + Logger LOG = LoggerFactory.getLogger(this.getClass()); + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + String dpID = HttpSSOLogin.getDeptID(request); + String docType = clearXSS(request.getParameter("docType"),null); + + /****** Parameter ******/ + Long docID = MLong.parseLong(request.getParameter("docID"),null); + String accAuth = clearXSS(request.getParameter("accAuth"),""); + String strPage = clearXSS(request.getParameter("strPage"),""); + String findOption = clearXSS(URLDecoder.decode(request.getParameter("findOption"), "UTF-8"),""); + String findWord = clearXSS(URLDecoder.decode(request.getParameter("findWord"), "UTF-8"),""); + String howSort = clearXSS(request.getParameter("howSort"),""); + + int listType = MInteger.parseInt(request.getParameter("listType")); + int prssENG = MInteger.parseInt(request.getParameter("prssENG")); + int listNum = MInteger.parseInt(request.getParameter("listNum"),10); + + int subStrPage = MInteger.parseInt(request.getParameter("subStrPage"), 1); + int recog = MInteger.parseInt(request.getParameter("recog"), -1); + tx.begin(); + + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String docName = totDoc.getName(); + String regID = totDoc.getUser(pm).getId(); + String deptID = totDoc.getDept(pm).getId(); + Date endDate = totDoc.getEndDate(); + + tx.rollback(); +//System.out.println("**************************************************************************************************8"); +//String tmpStr=URLEncoder.encode(totDoc.getName()+"_"+new SimpleDateFormat("yyyy-MM-dd").format(endDate), "UTF-8"); + //LJH +String tmpStr=totDoc.getName()+"_"+new SimpleDateFormat("yyyy-MM-dd").format(endDate); +//System.out.println("**************************************************************************************************8"); + + + /****** all, send report ******/ + int allReportCount = 0; + int sendReportCount = 0; + int notReportCount = 0; + Report report = new Report(); + allReportCount = report.getAllCount(docID); + sendReportCount = report.getSendCount(docID); + notReportCount = report.getNotCount(docID); + tx.begin(); + + + +System.out.println("howsort=>"+howSort); +// if(findWord == null) + List reportList = totDoc.getPrssReports(pm, listType, findOption, findWord, howSort); + + Query q = null; + if(recog != -1){ + q = pm.newQuery(TotReport.class, reportList); + StringBuilder filter = new StringBuilder(150) + .append("this.recog.ordinal() == recog"); + q.setFilter(filter.toString()); LOG.debug("filter: {}", filter.toString()); + q.declareParameters("int recog"); + q.setOrdering("id DESC"); + reportList = (List) q.execute(recog); + } + pm.refreshAll(reportList); + pm.makePersistentAll(reportList); + //tx.commit(); + + + + + String tmp1="",tmp2="",tmp3="",tmp4=""; + int count=reportList.size(); + List reports2 = new ArrayList(); + if(count>0 && findOption!=null && findOption.equals("mDept.name") && findWord!=null && findWord.length()>1) + { + for(int index=0;index=0) reports2.add(reportList.get(index)); + } + reportList=reports2; + } + + +tx.commit(); + + + + + + /************ Ʈ ************/ + int endPage = 0; + int pageSize =0 ; + int currentPage = 0; + int absolutePage = 0; + int currentPageSetUp = 0; + int recordSize = listNum; + + currentPage=subStrPage; + + if((reportList.size()%recordSize) == 0){ + pageSize = (int)(reportList.size()/recordSize); + }else{ + pageSize = (int)(reportList.size()/recordSize)+1; + } + + currentPageSetUp = (int)(currentPage/10)*10; + if (currentPage%10 == 0){ + currentPageSetUp-=10; + } + + //page link + String uri = URLEncoder.encode("report_list.jsp?docID="+docID+"&accAuth="+accAuth+"&strPage="+strPage+"&findOption="+MString.checkNull(findOption)+"&findWord="+MString.checkNull(findWord)+"&listType="+listType+"&recog="+recog+"&docType="+MString.checkNull(docType)+"&howSort="+howSort, "UTF-8"); + String savePath = MoumiConfig.getRepoPerRoot().getPath() + "/fileUpload"; +%> + + + + + + + +
    + + + +
    + + + + + + + + + + + + + + + + <%if(reportList.size() > 0){%> + + + + + <%}else{%> + + + <%}%> + +
    + + + + + + + + + <%-- + + --%> + + + + + + + + + + + + +
    + + +<%-- + +--%> + + + + <%if("PRSS".equals(docType)){%> + + + <%if(listType == MReport.ALL_LIST || listType == MReport.COMP_LIST){%> + + <%}%> + <%if(listType == MReport.ALL_LIST || listType == MReport.COMP_LIST || listType == MReport.TEMP_LIST || listType == MReport.RETURN_LIST || listType == MReport.NOT_LIST){//Ϲ ü %> + + <%}%> + <%}%> + + + + + <%if(MoumiConfig.getUseRecog()){ %> + + <%}else{%> + + <%}%> + +
    + + + + + <%if(MoumiConfig.getUseRecog()){ %> +      <%}%> + <%= Moumi.getMessageBundle().getString("moumi.message.button_small.selectAll") %> + <%= Moumi.getMessageBundle().getString("moumi.message.button_small.selectCancel") %> + <%= MoumiConfig.getMessageBundle().getString("moumi.message.button_small.return") %> + + <%=MoumiConfig.getMessageBundle().getString("moumi.message.button_small.deptInit")%> + <%= MoumiConfig.getMessageBundle().getString("moumi.message.button_small.downloadAllFiles") %> + + <%= Moumi.getMessageBundle().getString("moumi.message.button.excel") %> + +
    +
    + + <%=TotReportProcess.ALL%> : <%= allReportCount %>  + <%=TotReportProcess.COMP%>: <%= sendReportCount %>  + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.not_reportStatus") %> + : <%= (allReportCount-sendReportCount) %> + + <%=TotReportProcess.ALL%> : <%= allReportCount %>  + <%=TotReportProcess.COMP%>: <%= (sendReportCount - notReportCount) %>  + <%=TotReportProcess.NOT%>: <%=notReportCount%>  + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.not_reportStatus") %> + : <%= (allReportCount-sendReportCount) %>
    + +
    + + + + + + + + + + <%if(MoumiConfig.is2Step()){ %> + + <%} %> + <%if(MoumiConfig.getUseRecog()){ %> + + <%} %> + + + + + <% + int index = 0; //迭 Ű + int nextCount = 0; // + + if(currentPage > 1){ + nextCount = ((currentPage-1)*recordSize); + } + tx.begin(); + for(int i = 0; (i < recordSize) && ((nextCount+i) < reportList.size()); i++){ + index = nextCount+i;%> + + + + + + + + + <%if(MoumiConfig.is2Step()){ %> + + <%}%> + + <%if(MoumiConfig.getUseRecog()){ %> + + <%}%> + + + + <% + } + tx.rollback(); + %> +
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.select")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.number")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.devision")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.telNumber")%><%=TotDocProcess.SUBMIT%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.dateTime")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.progressStatus")%><%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.subdoc") %><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.approval")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.opinion")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.add")%>
    + <%if(MoumiConfig.getUseRecog()){ %> + disabled <%}%> /> <%} else {%> + <%}%> "> + +  <%= index+1 %>  + <%if(reportList.get(index).getProcess() == TotReportProcess.READ || reportList.get(index).getProcess() == TotReportProcess.COMP || reportList.get(index).getProcess() == TotReportProcess.RETURN){%> + <%}%><%=reportList.get(index).getDept(pm).getUpperDept(pm) == null ? "" : reportList.get(index).getDept(pm).getOrgan(pm).getName()+" - "+reportList.get(index).getDept(pm).getUpperDept(pm).getName()+" - "%><%= reportList.get(index).getDept(pm).getName() %> +   + <%if(reportList.get(index).getProcess() == TotReportProcess.READ || reportList.get(index).getProcess() == TotReportProcess.COMP){%> + <%}%><%= MString.checkNull(reportList.get(index).getOwnerName(pm)) %><%if(reportList.get(index).getUser(pm).getId()!=null){%>(<%= MString.checkNull(reportList.get(index).getUser(pm).getId()) %>) <%}%> + <%if(reportList.get(index).getProcess() == TotReportProcess.READ || reportList.get(index).getProcess() == TotReportProcess.COMP || reportList.get(index).getProcess() == TotReportProcess.RETURN){%> + <%}%> +   +  <%= MString.checkNull(reportList.get(index).getDept(pm).getPhone()) %>  + <%if(reportList.get(index).getProcess() == TotReportProcess.RETURN || reportList.get(index).getProcess() == TotReportProcess.COMP || reportList.get(index).getProcess() == TotReportProcess.NOT){%> + <%= reportList.get(index).getSubmitDate() == null ? "" : new SimpleDateFormat("yy/MM/dd HH:mm:ss").format(reportList.get(index).getSubmitDate()) %> + <%}%> + + <% + if(TotReportProcess.ACCEPT == reportList.get(index).getProcess() && TotReportType.NOT_REPORT_REQ == reportList.get(index).getType()){ + %> <% + }else{ + if(reportList.get(index).isDeleted()){ + out.write(MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.reportDocDelete")); + }else{ + //v2. 14.丮 (getParameter)_CWE-22/23 : Ž + out.write(reportList.get(index).getProcess().toString()); + } + } + %> + + <%if(reportList.get(index).getSlaveTotDoc()==null){%>   <%}else{%> + + <%}%> + + <%if(reportList.get(index).getProcess() == TotReportProcess.COMP || reportList.get(index).getProcess() == TotReportProcess.TEMP || reportList.get(index).getProcess() == TotReportProcess.APPROVE){%> + <%= reportList.get(index).getRecog().toString() %> <%}else{%>   + <%}%> + + <%if(MString.isNull(reportList.get(index).getNote())){%>   <%}else{%> + <%if(reportList.get(index).getProcess()== TotReportProcess.COMP){%> <%if(reportList.get(index).getProcess() == TotReportProcess.READ || reportList.get(index).getProcess() == TotReportProcess.COMP || reportList.get(index).getProcess() == TotReportProcess.RETURN){%> + + + <%}%> <%}else{%>   <%}%> <%}%> + + <%if(reportList.get(index).getAttachments().isEmpty()){%>   <%}else{%> + <%if(reportList.get(index).getProcess() == TotReportProcess.COMP){%> + <%if(reportList.get(index).getProcess() == TotReportProcess.READ || reportList.get(index).getProcess() == TotReportProcess.COMP || reportList.get(index).getProcess() == TotReportProcess.RETURN){%> + + + <%}%> <%}else{%>   <%}%> <%}%> +
    +
    + + + + + +
    <%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.reportDocNot") %>
    + + +<%if(MoumiConfig.getUseRecog()){ %> + +<%}%> + + +<% +}catch(Exception ex){ + ex.printStackTrace(); +// out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/totsys/common/inc/documents/report/back/report_list_excel.jsp b/webapps/totsys/common/inc/documents/report/back/report_list_excel.jsp new file mode 100644 index 0000000..901da22 --- /dev/null +++ b/webapps/totsys/common/inc/documents/report/back/report_list_excel.jsp @@ -0,0 +1,228 @@ + +<%@page import="java.net.URLDecoder"%> +<% +/************************************************************@@ + * Program Name : doc_list.jsp + * Description : // + * Author : + * Create Date : 2004.10.11 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" import="java.util.Date" + import="java.util.List" import="java.text.SimpleDateFormat" + import="java.net.URLEncoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.util.MDate" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*" import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" import="javax.jdo.Query"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + Logger LOG = LoggerFactory.getLogger(this.getClass()); + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + String dpID = HttpSSOLogin.getDeptID(request); + + /****** Parameter ******/ + Long docID = MLong.parseLong(request.getParameter("docID"),null); + String accAuth = clearXSS(request.getParameter("accAuth"),""); + String strPage = clearXSS(request.getParameter("strPage"),""); + String findOption = clearXSS(request.getParameter("findOption"),""); + //String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")),""); + String findWord = clearXSS(URLDecoder.decode(request.getParameter("findWord"), "UTF-8"),""); + int listType = MInteger.parseInt(request.getParameter("listType")); + int prssENG = MInteger.parseInt(request.getParameter("prssENG")); + int recog = MInteger.parseInt(request.getParameter("recog"), -1); + + tx.begin(); + + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String docName = totDoc.getName(); + + tx.rollback(); + + /****** all, send report ******/ + int allReportCount = 0; + int sendReportCount = 0; + Report report = new Report(); + allReportCount = report.getAllCount(docID); + sendReportCount = report.getSendCount(docID); + + + List reportList = totDoc.getPrssReports(pm, listType, findOption, findWord,null); + + Query q = null; + if(recog != -1){ + q = pm.newQuery(TotReport.class, reportList); + StringBuilder filter = new StringBuilder(150) + .append("this.recog.ordinal() == recog"); + q.setFilter(filter.toString()); LOG.debug("filter: {}", filter.toString()); + q.declareParameters("int recog"); + q.setOrdering("id DESC"); + reportList = (List) q.execute(recog); + } + + response.setHeader("Accept-Ranges", "bytes"); + //response.setHeader("Content-Disposition","attachment; filename="+(URLEncoder.encode(docName, "UTF-8")).replaceAll(":","_").replace("+","%20" )+".xls;"); + //LJH + response.setHeader("Content-Disposition","attachment; filename="+(URLEncoder.encode(docName, "UTF-8")).replaceAll(":","_").replace("+"," " )+".xls;"); +%> + + + + + + + + + + + + + + + <%if(reportList.size() <= 0){%> + + + <%}%> + +
    + + + + +
    <%=TotReportProcess.ALL%> : <%= allReportCount %>  + <%=TotReportProcess.COMP%>: <%= sendReportCount %>  + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.process.not_report") %> + : <%= (allReportCount-sendReportCount) %>
    +
    + + + + + + + + + + + + + + <%if(MoumiConfig.is2Step()){ %> + + <%} %> + <%if(MoumiConfig.getUseRecog()){ %> + + <%} %> + + + + + <% + tx.begin(); + for(int index = 0; index < reportList.size(); index++){%> + + + + + + + + <%if(MoumiConfig.is2Step()){ %> + + <%}%> + + <%if(MoumiConfig.getUseRecog()){ %> + + <%}%> + + + + <% + } + tx.rollback(); + %> +
    ȣȭȣ<%=TotDocProcess.PRSS%>Ͻ<%=TotDocProcess.PRSS%> + "4"<%}else if(MoumiConfig.is2Step() || MoumiConfig.getUseRecog()){%>"3"<%}else{%>"2"<%}%>>
    μ<%=TotDocType.SUB_DOC %>ǰ÷
     <%= index+1 %> <%if(reportList.get(index).getProcess() == TotReportProcess.READ || reportList.get(index).getProcess() == TotReportProcess.COMP || reportList.get(index).getProcess() == TotReportProcess.RETURN){%> + <%}%><%=reportList.get(index).getDept(pm).getUpperDept(pm) == null ? "" : reportList.get(index).getDept(pm).getUpperDept(pm).getName()+" - "%><%= reportList.get(index).getDept(pm).getName() %> <%= MString.checkNull(reportList.get(index).getOwnerName(pm)) %>  <%= MString.checkNull(reportList.get(index).getDept(pm).getPhone()) %>  + <%if(reportList.get(index).getProcess() == TotReportProcess.RETURN || reportList.get(index).getProcess() == TotReportProcess.COMP || reportList.get(index).getProcess() == TotReportProcess.NOT){%> + <%= reportList.get(index).getSubmitDate() == null ? "" : new SimpleDateFormat("yy/MM/dd HH:mm:ss").format(reportList.get(index).getSubmitDate()) %> + <%}%> + + <% + if(TotReportProcess.ACCEPT == reportList.get(index).getProcess() && TotReportType.NOT_REPORT_REQ == reportList.get(index).getType()){%> + <%}else{ + if(reportList.get(index).isDeleted()){ + out.write(""+MoumiConfig.getMessageBundle().getString("moumi.message.doc")+" "); + }else{ + //v2. 14.丮 (getParameter)_CWE-22/23 : Ž + out.write(reportList.get(index).getProcess().toString()); + } + } + %> + + <%if(reportList.get(index).getSlaveTotDoc()==null){%>   <%}else{%> + 蹮 <%}%> + + <%if(reportList.get(index).getProcess() == TotReportProcess.COMP || reportList.get(index).getProcess() == TotReportProcess.TEMP || reportList.get(index).getProcess() == TotReportProcess.APPROVE){%> + <%= reportList.get(index).getRecog().toString() %> <%}else{%>   <%}%> + + <%if(MString.isNull(reportList.get(index).getNote())){%>   <%}else{%> + ǰ <%}%> +   + <%if (!reportList.get(index).getAttachments().isEmpty()){%> + ÷ + <%}%> +
    +
    ش <%= MoumiConfig.getMessageBundle().getString("moumi.message.doc") %> + ϴ.
    + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/totsys/common/inc/documents/report/images/rollover.js b/webapps/totsys/common/inc/documents/report/images/rollover.js new file mode 100644 index 0000000..a8e237a --- /dev/null +++ b/webapps/totsys/common/inc/documents/report/images/rollover.js @@ -0,0 +1,38 @@ +function MM_swapImgRestore() { //v3.0 + var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { + d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} + if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i + +function MM_showHideLayers() { //v3.0 + var i,p,v,obj,args=MM_showHideLayers.arguments; + for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2]; + if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; } + obj.visibility=v; } +} \ No newline at end of file diff --git a/webapps/totsys/common/inc/documents/report/images/text.css b/webapps/totsys/common/inc/documents/report/images/text.css new file mode 100644 index 0000000..991a961 --- /dev/null +++ b/webapps/totsys/common/inc/documents/report/images/text.css @@ -0,0 +1,157 @@ +body { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #666666; + text-decoration: none; +} + +table { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #666666; + text-decoration: none +} + +a:link { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #666666; + text-decoration: none; +} + +a:visited { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #336666; + text-decoration: none; +} + +a:active { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #666666; + text-decoration: none; +} + +a:hover { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #FF9900;; + text-decoration: underline; +} + +a.dtable:link { + font-family: "Dotum"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #006666; + text-decoration: none; +} + +a.dtable:visited { + font-family: "Dotum"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #666666; + text-decoration: none; +} + +a.dtable:active { + font-family: "Dotum"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #006666; + text-decoration: none; +} + +a.dtable:hover { + font-family: "Dotum"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #666666; + text-decoration: underline; +} + +.d11_gray { + font-family: "Dotum"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #666666; + text-decoration: none; +} + +.d11_green { + font-family: "Dotum"; + font-size: 11px; + font-style: normal; + line-height: normal; + color: #006666; + text-decoration: none; +} + +.sub_title { + font-family: "Dotum"; + font-size: 13px; + font-style: normal; + line-height: normal; + font-weight: bold; + font-variant: normal; + text-transform: capitalize; + color: #666666; + text-decoration: none +} + +.d12gray { + font-family: "Dotum"; + font-size: 12px; + font-style: normal; + line-height: normal; + color: #666666; + text-decoration: none +} + +.d16red { + font-family: "Dotum"; + font-size: 16px; + font-style: normal; + line-height: normal; + color: #990000; + text-decoration: none; + font-weight: bold +} + +.box { + background-color: #ffffff; + font-family: Dotum, Gulim; + font-size: 12px; + color: #636163; + border: 1px solid #cccccc +} + +.inputtxt { + BORDER-RIGHT: #999999 1px solid; + BORDER-TOP: #999999 1px solid; + FONT-SIZE: 9pt; + BORDER-LEFT: #999999 1px solid; + BORDER-BOTTOM: #999999 1px solid; + FONT-FAMILY: Dotum, Tahoma, Verdana; + BACKGROUND-COLOR: #ffffff; + ime-mode: active; +} \ No newline at end of file diff --git a/webapps/totsys/common/inc/documents/report/report_list.jsp b/webapps/totsys/common/inc/documents/report/report_list.jsp new file mode 100644 index 0000000..a997430 --- /dev/null +++ b/webapps/totsys/common/inc/documents/report/report_list.jsp @@ -0,0 +1,1549 @@ +<%@page import="kr.co.kihyun.service.vo.TotDocVO"%> +<% /** + * ********************************************************** + * @@ Program Name : report_list.jsp + * @@ Description : // + * @@ Author : ũ + * @@ Create Date : 2010.11.21 + * @@ History : 2014.10.14 Update by KWON,HAN + * @@*********************************************************** + */ +%> +<%@ page contentType="text/html; charset=utf-8" + import="java.util.Date" + import="java.util.List" + import="java.util.ArrayList" + import="java.util.Map" + import="java.util.HashMap" + import="java.text.SimpleDateFormat" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.util.MDate" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*" + import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" + import="kr.co.kihyun.service.TotDocService" + import="kr.co.kihyun.service.PrssReportsService" + import="kr.co.kihyun.service.vo.PrssReportsVO" + import="kr.co.kihyun.service.vo.ReportCountVO" + import="javax.jdo.Query"%> +<%@page import="kr.co.kihyun.beans.entity.TotReportProcess"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + + try { + //request.setCharacterEncoding("utf-8"); + Logger LOG = LoggerFactory.getLogger(this.getClass()); + /** + * ******** session userId ********* + */ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + String dpID = HttpSSOLogin.getDeptID(request); + String docType = clearXSS(request.getParameter("docType"), null); + + /** + * **** Parameter ***** + */ + Long docID = MLong.parseLong(request.getParameter("docID"), null); + String accAuth = clearXSS(request.getParameter("accAuth"), ""); + + String searchDepth = clearXSS(request.getParameter("searchDepth"), ""); + String strPage = clearXSS(request.getParameter("strPage"), ""); + String findOption = clearXSS(request.getParameter("findOption"), ""); + String findWord = URLDecoder.decode(MString.checkNull(request.getParameter("findWord")), "UTF-8"); + String stDate = clearXSS(request.getParameter("stDate"), ""); + String edDate = clearXSS(request.getParameter("edDate"), ""); + + int innerStrPage = 0; + String innerFindOption = ""; + String innerFindWord = ""; + + if ("inner".equals(searchDepth)) { + innerStrPage = MInteger.parseInt(request.getParameter("innerStrPage"), 1); + innerFindOption = clearXSS(request.getParameter("innerFindOption"), ""); + innerFindWord = URLDecoder.decode(MString.checkNull(request.getParameter("innerFindWord")), "UTF-8"); + } else { + innerStrPage = MInteger.parseInt(request.getParameter("innerStrPage"), 1); + innerFindOption = clearXSS(request.getParameter("innerFindOption"), ""); + //˻ ذ + //innerFindWord = clearXSS(Encoder.toJava(request.getParameter("innerFindWord")), ""); + innerFindWord = URLDecoder.decode(MString.checkNull(request.getParameter("innerFindWord")), "UTF-8"); + } + if (innerStrPage <= 0) { + innerStrPage = 1; + } + + String howSort = clearXSS(request.getParameter("howSort"), ""); + String procMode = request.getParameter("proc_mode"); + + //ڵȸ + if (!MString.isNull(procMode)) { + tx.begin(); + TotDocService docService = new TotDocService(pm); + if (procMode.equals("auto_return")) { + String autoRtnYn = MString.checkNull(request.getParameter("autoRtnYn"), "N"); + docService.updateAutoRtnYnForDoc(docID, autoRtnYn); + } + tx.commit(); + } + + int listType = MInteger.parseInt(request.getParameter("listType")); + int prssENG = MInteger.parseInt(request.getParameter("prssENG")); + String listNum = clearXSS(request.getParameter("listNum"), ""); + + //¡ ⺻ ִ Ķ + int intlistNum = 30; + if (!"".equals(listNum)) { + intlistNum = MInteger.parseInt(request.getParameter("listNum"), 30); + } + //============================== + +// int subStrPage = MInteger.parseInt(request.getParameter("subStrPage"), 1); + int recog = MInteger.parseInt(request.getParameter("recog"), -1); + tx.begin(); + + String sort = clearXSS(request.getParameter("sort"), ""); + + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String userId = totDoc.getUser(); + String regDocYN = totDoc.getRegularDocYn(); + AccessAuth docAccAuth = totDoc.getAccessAuth(); +// String docName = totDoc.getName(); + String regID = totDoc.getUser(pm).getId(); + String deptID = totDoc.getDept(pm).getId(); + Date endDate = totDoc.getEndDate(); + + tx.rollback(); + String tmpStr = totDoc.getName() + "_" + new SimpleDateFormat("yyyy-MM-dd").format(endDate); + System.out.println("docName === " +totDoc.getName()); + System.out.println("tmp ==== " + tmpStr); + + /** + * **** all, send report ***** + */ + int allReportCount = 0; + int sendReportCount = 0; + int notReportCount = 0; + int noteReportCount = 0; + + /** + * ********** Ʈ *********** + */ + int pageSize = 0; + int currentPage = 0; + int currentPageSetUp = 0; + //int recordSize = listNum; + int recordSize = intlistNum; + + //currentPage = subStrPage; + currentPage = innerStrPage; + + currentPageSetUp = (int) (currentPage / 10) * 10; + if (currentPage % 10 == 0) { + currentPageSetUp -= 10; + } + + //====================================================================== + PrssReportsService prssService = new PrssReportsService(pm); + //˻Ķ + Map params = new HashMap(); + params.put("docId", docID); + params.put("listType", listType); + params.put("findOption", innerFindOption); + params.put("filterValue", innerFindWord); + params.put("howSort", howSort); + params.put("sort", sort); + params.put("regDocYN", regDocYN); + + //˻ ڵ尹ȸ + prssService.createPrssReportListSearchQuery(params); + + //ڵ尹ȸ Ͽ ڵ尹 + int count = prssService.getCountFromMainQuery(); + + if ((count % recordSize) == 0) { + pageSize = (int) (count / recordSize); + } else { + pageSize = (int) (count / recordSize) + 1; + } + + if (currentPage > pageSize) { + currentPage = pageSize; + } + + innerStrPage = currentPage; //Ķͷ ѱ Ѵ. + + int startNo = (currentPage - 1) * recordSize + 1; + int endNo = currentPage * recordSize; + + List list = null; + + //˻ȸ + if (count > 0) { + //¡ó ߰Ķ + prssService.getParams().put("startNo", startNo); + prssService.getParams().put("endNo", endNo); + + //˻ ¡ó ȯ + prssService.convertToPagenatingQuery(); + + //ϴ ڵ尡 ϸ ȸ + list = prssService.executeQuery(PrssReportsVO.class); + } + //====================================================================== + List reportList = null; + reportList = prssService.getReportDeptListByDocId(docID); + + List prssList = null; + prssList = prssService.getReportCountByDocId(docID,regDocYN); + + if (prssList != null && prssList.size() > 0) { + for (Object obj : prssList) { + ReportCountVO countVO = (ReportCountVO) obj; + + allReportCount = MInteger.parseInt(countVO.getAllCount().toString(), 0); + sendReportCount = MInteger.parseInt(countVO.getSendCount().toString(), 0); + notReportCount = MInteger.parseInt(countVO.getNotCount().toString(), 0); + noteReportCount = MInteger.parseInt(countVO.getNoteCount().toString(), 0); + } + } + //====================================================================== + +// //page link +// String uri = "report_list.jsp?docID=" + docID +// + "&accAuth=" + accAuth +// + "&strPage=" + strPage +// + "&findOption=" + MString.checkNull(findOption) +// + "&findWord=" + MString.checkNull(findWord) +// + "&searchDepth=" + "none" +// + "&innerStrPage=" + innerStrPage +// + "&innerFindOption=" + MString.checkNull(innerFindOption) +// + "&innerFindWord=" + MString.checkNull(innerFindWord) +// + "&listType=" + listType +// + "&recog=" + recog +// + "&docType=" + MString.checkNull(docType) +// + "&listNum=" + listNum +// + "&sort=" + sort +// + "&howSort=" + howSort; +////System.out.println("uri::" + uri.toString()); +// String savePath = MoumiConfig.getRepoPerRoot().getPath() + "/fileUpload"; + +%> + + + <%=Moumi.getTitle()%> + + + + + + + + + + + + + +
    + + + + + + +
    + +
    + + + + + + + + + +
    +
    + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + <%if (count > 0) {%> + + + + <%} else {%> + + + <%}%> + +
    + + + + + + + + + + + + + +
    + + + + + + + <%--if (MoumiConfig.getUseRecog()) { // moumi.properties moumi.use.recog = false %> + + <%}--%> + + + + + + + + + <%if("Y".equals(totDoc.getRegularDocYn())){%> + + <%}%> + +
    + + + + + + + <%if ("PRSS".equals(docType)) {%> + <% + if (listType == MReport.ALL_LIST || listType == MReport.COMP_LIST) { + if (!(sysAuth == 2 && !usID.equals(userId) && docAccAuth == AccessAuth.ALL)) { + %> + + + <%= MoumiConfig.getMessageBundle().getString(" /> + + <%} + }%> + + <%if (listType == MReport.ALL_LIST || listType == MReport.COMP_LIST || listType == MReport.TEMP_LIST || listType == MReport.RETURN_LIST || listType == MReport.NOT_LIST) {//Ϲ ü + if (!(sysAuth == 2 && !usID.equals(userId) && docAccAuth == AccessAuth.ALL)) { + %> + + <%=MoumiConfig.getMessageBundle().getString(" /> + + <%} + }%> + <%}%> + + ÷ϴٿε + + <%= Moumi.getMessageBundle().getString(" /> + + + <%= Moumi.getMessageBundle().getString(" /> + + ڷ
    +
    + + + + <%if ("PRSS".equals(docType)) {%> + <% + if (!(sysAuth == 2 && !usID.equals(userId))) { + %> + + <%}%> + <%}%> + + + + +
    +
    + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + <%=TotReportProcess.ALL%>: <%= allReportCount%> +   + + + <%=TotReportProcess.COMP%>: <%= sendReportCount%> +   + + + <%=TotReportProcess.NOT%>: <%= notReportCount%> +   + + + <%=TotReportProcess.NOT_REPORT%>: <%= (allReportCount - sendReportCount - notReportCount)%> +   + + + ( <%=TotReportProcess.NOTE%>: <%= noteReportCount%> ) + + +
    +
    + +
    +
    + + + + + + + + + + <%if (MoumiConfig.is2Step()) {%> + + <%}%> + <%if (MoumiConfig.getUseRecog()) {%> + + <%}%> + + + + + <% + + int index = 0; //迭 Ű + int nextCount = 0; // + + if (currentPage > 1) { + nextCount = ((currentPage - 1) * recordSize); + } + //tx.begin(); + //for (int i = 0; (i < recordSize) && ((nextCount + i) < reportList.size()); i++) { + + if (count > 0 && list != null ) { + int listCount = list.size(); + + for (int i = 0; i < listCount; i++) { + index = nextCount + i; + + PrssReportsVO prssVO = (PrssReportsVO) list.get(i); + TotReportProcess prss = (TotReportProcess) prssVO.getProcess(); + + TotDoc slaveTotDoc = prssVO.getSlaveTotDoc(pm); + + %> + + + + + + + + + + + + + <%if (MoumiConfig.is2Step()) {%> + + <%}%> + <%if (MoumiConfig.getUseRecog()) {%> + + <%}%> + + + + + + <% + } //end of for list + } //end of if( count > 0) + //tx.rollback(); + %> +
    + + + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.number")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.devision")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.telNumber")%> (<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.depart")%>/<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.person")%>)<%=TotDocProcess.SUBMIT%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.dateTime")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.progressStatus")%><%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.subdoc")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.approval")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.opinion")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.add")%>
    + <%if (MoumiConfig.getUseRecog()) {%> disabled <%}%> > + <%} else {%> + + <%}%> + + "> + + + +  <%= index + 1%> <%=prssVO.getUpperDeptName() == null ? "" : prssVO.getUpperDeptName() + " - "%><%= prssVO.getDeptName()%> +   + <%if (prss == TotReportProcess.READ || prss == TotReportProcess.COMP || prss == TotReportProcess.NOTE || (prss == TotReportProcess.TEMP && "Y".equals(totDoc.getRegularDocYn()))) {%> + + <%}%><%= MString.checkNull(prssVO.getOwnerName())%><%if (prssVO.getUserId() != null) {%>(<%= MString.checkNull(prssVO.getUserId())%>) <%}%> + <%if (prss == TotReportProcess.READ || prss == TotReportProcess.COMP || prss == TotReportProcess.NOTE || prss == TotReportProcess.RETURN) {%> + <%}%>   +  <%= MString.checkNull(prssVO.getDeptPhone())%>/<%= MString.checkNull(prssVO.getUserPhone())%>  + <%if (prss == TotReportProcess.RETURN || prss == TotReportProcess.COMP || prss == TotReportProcess.NOT) {%> + <%= prssVO.getSubmitDate() == null ? "" : new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(prssVO.getSubmitDate())%> + <%}%> + + <% + if (TotReportProcess.ACCEPT == prss && TotReportType.NOT_REPORT_REQ == prssVO.getReportType()) { + %> + + <% + } else { + // if (prssVO.isDeleted()) { + // out.write(MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.reportDocDelete")); + // } else { + out.write(prssVO.getProcess().toString()); + //} + } + %> + + <%if (slaveTotDoc == null) {%> +   + <%} else {%> + + <%}%> + + <%if (prss == TotReportProcess.COMP || prss == TotReportProcess.TEMP || prss == TotReportProcess.APPROVE) {%> + <%= prssVO.getRecogType().toString()%> <%} else {%>   + <%}%> + + + <%if (prss == TotReportProcess.NOTE) {%> + + + + + <%} else {%>   + <%}%> + + + <% if (!"Y".equals(prssVO.getIsAttachments())) { /*if (attachmentsMap == null || attachmentsMap.isEmpty()) {*/%>   <%} else {%> + + <%if (prss == TotReportProcess.COMP || prss == TotReportProcess.NOTE || (prss == TotReportProcess.TEMP && "Y".equals(totDoc.getRegularDocYn()))) {%> + <%-- --%> + + + <%} else {%>   <%}%> + <%}%> +
    +
    + + <%-- + + + + + + " /> + " /> + + --%> + + + + + + + + +
    <%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.reportDocNot")%>
    + + + + + <%if (MoumiConfig.getUseRecog()) {%> + + <%}%> + + + + +<% + } catch (Exception ex) { + ex.printStackTrace(); +// out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/documents/report/report_list.jsp.202209 b/webapps/totsys/common/inc/documents/report/report_list.jsp.202209 new file mode 100644 index 0000000..3a42dfa --- /dev/null +++ b/webapps/totsys/common/inc/documents/report/report_list.jsp.202209 @@ -0,0 +1,1557 @@ + +<%@page import="kr.co.kihyun.service.vo.TotDocVO"%> +<% /** + * ********************************************************** + * @@ Program Name : report_list.jsp + * @@ Description : // + * @@ Author : ũ + * @@ Create Date : 2010.11.21 + * @@ History : 2014.10.14 Update by KWON,HAN + * @@*********************************************************** + */ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.util.Date" + import="java.util.List" + import="java.util.ArrayList" + import="java.util.Map" + import="java.util.HashMap" + import="java.text.SimpleDateFormat" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.util.MDate" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*" + import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" + import="kr.co.kihyun.service.TotDocService" + import="kr.co.kihyun.service.PrssReportsService" + import="kr.co.kihyun.service.vo.PrssReportsVO" + import="kr.co.kihyun.service.vo.ReportCountVO" + import="javax.jdo.Query"%> +<%@page import="kr.co.kihyun.beans.entity.TotReportProcess"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + //request.setCharacterEncoding("euc-kr"); + Logger LOG = LoggerFactory.getLogger(this.getClass()); + /** + * ******** session userId ********* + */ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + String dpID = HttpSSOLogin.getDeptID(request); + String docType = clearXSS(request.getParameter("docType"), null); + + /** + * **** Parameter ***** + */ + Long docID = MLong.parseLong(request.getParameter("docID"), null); + String accAuth = clearXSS(request.getParameter("accAuth"), ""); + + String searchDepth = clearXSS(request.getParameter("searchDepth"), ""); + String strPage = clearXSS(request.getParameter("strPage"), ""); + String findOption = clearXSS(request.getParameter("findOption"), ""); + String findWord = URLDecoder.decode(MString.checkNull(request.getParameter("findWord")), "UTF-8"); + String stDate = clearXSS(request.getParameter("stDate"), ""); + String edDate = clearXSS(request.getParameter("edDate"), ""); + + int innerStrPage = 0; + String innerFindOption = ""; + String innerFindWord = ""; + + if ("inner".equals(searchDepth)) { + innerStrPage = MInteger.parseInt(request.getParameter("innerStrPage"), 1); + innerFindOption = clearXSS(request.getParameter("innerFindOption"), ""); + innerFindWord = URLDecoder.decode(MString.checkNull(request.getParameter("innerFindWord")), "UTF-8"); + } else { + innerStrPage = MInteger.parseInt(request.getParameter("innerStrPage"), 1); + innerFindOption = clearXSS(request.getParameter("innerFindOption"), ""); + //˻ ذ + //innerFindWord = clearXSS(Encoder.toJava(request.getParameter("innerFindWord")), ""); + innerFindWord = URLDecoder.decode(MString.checkNull(request.getParameter("innerFindWord")), "UTF-8"); + } + if (innerStrPage <= 0) { + innerStrPage = 1; + } + + String howSort = clearXSS(request.getParameter("howSort"), ""); + String procMode = request.getParameter("proc_mode"); + + //ڵȸ +/* if (!MString.isNull(procMode)) { + tx.begin(); + TotDocService docService = new TotDocService(pm); + if (procMode.equals("auto_return")) { + String autoRtnYn = MString.checkNull(request.getParameter("autoRtnYn"), "N"); + docService.updateAutoRtnYnForDoc(docID, autoRtnYn); + } + tx.commit(); + } +*/ + int listType = MInteger.parseInt(request.getParameter("listType")); + int prssENG = MInteger.parseInt(request.getParameter("prssENG")); + String listNum = clearXSS(request.getParameter("listNum"), ""); + + //¡ ⺻ ִ Ķ + int intlistNum = 30; + if (!"".equals(listNum)) { + intlistNum = MInteger.parseInt(request.getParameter("listNum"), 30); + } + //============================== + +// int subStrPage = MInteger.parseInt(request.getParameter("subStrPage"), 1); + int recog = MInteger.parseInt(request.getParameter("recog"), -1); + tx.begin(); + + String sort = clearXSS(request.getParameter("sort"), ""); + + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String userId = totDoc.getUser(); + String regDocYN = totDoc.getRegularDocYn(); + AccessAuth docAccAuth = totDoc.getAccessAuth(); +// String docName = totDoc.getName(); + String regID = totDoc.getUser(pm).getId(); + String deptID = totDoc.getDept(pm).getId(); + Date endDate = totDoc.getEndDate(); + + tx.rollback(); + String tmpStr = totDoc.getName() + "_" + new SimpleDateFormat("yyyy-MM-dd").format(endDate); + + /** + * **** all, send report ***** + */ + int allReportCount = 0; + int sendReportCount = 0; + int notReportCount = 0; + int noteReportCount = 0; + + /** + * ********** Ʈ *********** + */ + int pageSize = 0; + int currentPage = 0; + int currentPageSetUp = 0; + //int recordSize = listNum; + int recordSize = intlistNum; + + //currentPage = subStrPage; + currentPage = innerStrPage; + + currentPageSetUp = (int) (currentPage / 10) * 10; + if (currentPage % 10 == 0) { + currentPageSetUp -= 10; + } + + //====================================================================== + PrssReportsService prssService = new PrssReportsService(pm); + //˻Ķ + Map params = new HashMap(); + params.put("docId", docID); + params.put("listType", listType); + params.put("findOption", innerFindOption); + params.put("filterValue", innerFindWord); + params.put("howSort", howSort); + params.put("sort", sort); + params.put("regDocYN", regDocYN); + + //˻ ڵ尹ȸ + prssService.createPrssReportListSearchQuery(params); + + //ڵ尹ȸ Ͽ ڵ尹 + int count = prssService.getCountFromMainQuery(); + + if ((count % recordSize) == 0) { + pageSize = (int) (count / recordSize); + } else { + pageSize = (int) (count / recordSize) + 1; + } + + if (currentPage > pageSize) { + currentPage = pageSize; + } + + innerStrPage = currentPage; //Ķͷ ѱ Ѵ. + + int startNo = (currentPage - 1) * recordSize + 1; + int endNo = currentPage * recordSize; + + List list = null; + + //˻ȸ + if (count > 0) { + //¡ó ߰Ķ + prssService.getParams().put("startNo", startNo); + prssService.getParams().put("endNo", endNo); + + //˻ ¡ó ȯ + prssService.convertToPagenatingQuery(); + + //ϴ ڵ尡 ϸ ȸ + list = prssService.executeQuery(PrssReportsVO.class); + } + //====================================================================== + List reportList = null; + reportList = prssService.getReportDeptListByDocId(docID); + + List prssList = null; + prssList = prssService.getReportCountByDocId(docID,regDocYN); + + if (prssList != null && prssList.size() > 0) { + for (Object obj : prssList) { + ReportCountVO countVO = (ReportCountVO) obj; + + allReportCount = MInteger.parseInt(countVO.getAllCount().toString(), 0); + sendReportCount = MInteger.parseInt(countVO.getSendCount().toString(), 0); + notReportCount = MInteger.parseInt(countVO.getNotCount().toString(), 0); + noteReportCount = MInteger.parseInt(countVO.getNoteCount().toString(), 0); + } + } + //====================================================================== + +// //page link +// String uri = "report_list.jsp?docID=" + docID +// + "&accAuth=" + accAuth +// + "&strPage=" + strPage +// + "&findOption=" + MString.checkNull(findOption) +// + "&findWord=" + MString.checkNull(findWord) +// + "&searchDepth=" + "none" +// + "&innerStrPage=" + innerStrPage +// + "&innerFindOption=" + MString.checkNull(innerFindOption) +// + "&innerFindWord=" + MString.checkNull(innerFindWord) +// + "&listType=" + listType +// + "&recog=" + recog +// + "&docType=" + MString.checkNull(docType) +// + "&listNum=" + listNum +// + "&sort=" + sort +// + "&howSort=" + howSort; +////System.out.println("uri::" + uri.toString()); +// String savePath = MoumiConfig.getRepoPerRoot().getPath() + "/fileUpload"; + +%> + + + <%=Moumi.getTitle()%> + + + + + + + + + + + + + +
    + + + + + + +
    + +
    + + + + + + + + + +
    +
    + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + <%if (count > 0) {%> + + + + <%} else {%> + + + <%}%> + +
    + + + + + + + + + + + + + +
    + + + + + + + <%--if (MoumiConfig.getUseRecog()) { // moumi.properties moumi.use.recog = false %> + + <%}--%> + + + + + + + + + <%if("Y".equals(totDoc.getRegularDocYn())){%> + + <%}%> + +
    + + + + + + + <%if ("PRSS".equals(docType)) {%> + <% + if (listType == MReport.ALL_LIST || listType == MReport.COMP_LIST) { + if (!(sysAuth == 2 && !usID.equals(userId) && docAccAuth == AccessAuth.ALL)) { + %> + + + <%= MoumiConfig.getMessageBundle().getString(" /> + + <%} + }%> + + <%if (listType == MReport.ALL_LIST || listType == MReport.COMP_LIST || listType == MReport.TEMP_LIST || listType == MReport.RETURN_LIST || listType == MReport.NOT_LIST) {//Ϲ ü + if (!(sysAuth == 2 && !usID.equals(userId) && docAccAuth == AccessAuth.ALL)) { + %> + + <%=MoumiConfig.getMessageBundle().getString(" /> + + <%} + }%> + <%}%> + + ÷ϴٿε + + <%= Moumi.getMessageBundle().getString(" /> + + + <%= Moumi.getMessageBundle().getString(" /> + + ڷ
    +
    + + + + <%--if ("PRSS".equals(docType)) {%> + <% + if (!(sysAuth == 2 && !usID.equals(userId))) { + %> + + <%}%> + <%}--%> + + + + +
    +
    + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + <%=TotReportProcess.ALL%>: <%= allReportCount%> +   + + + <%=TotReportProcess.COMP%>: <%= sendReportCount%> +   + + + <%=TotReportProcess.NOT%>: <%= notReportCount%> +   + + + <%=TotReportProcess.NOT_REPORT%>: <%= (allReportCount - sendReportCount - notReportCount)%> +   + + + ( <%=TotReportProcess.NOTE%>: <%= noteReportCount%> ) + + +
    +
    + +
    +
    + + + + + + + + + + <%if (MoumiConfig.is2Step()) {%> + + <%}%> + <%if (MoumiConfig.getUseRecog()) {%> + + <%}%> + + + + + <% + int index = 0; //迭 Ű + int nextCount = 0; // + + if (currentPage > 1) { + nextCount = ((currentPage - 1) * recordSize); + } + //tx.begin(); + //for (int i = 0; (i < recordSize) && ((nextCount + i) < reportList.size()); i++) { + + if (count > 0) { + int listCount = list.size(); + + for (int i = 0; i < listCount; i++) { + index = nextCount + i; + + PrssReportsVO prssVO = (PrssReportsVO) list.get(i); + TotReportProcess prss = (TotReportProcess) prssVO.getProcess(); + + TotDoc slaveTotDoc = prssVO.getSlaveTotDoc(pm); + + //Map> attachmentsMap = null; + //if (prss == TotReportProcess.COMP || prss == TotReportProcess.NOTE) { + // attachmentsMap = prssVO.getAttachmentsMap(pm); + //} + %> + + + + + + + + + + + + + <%if (MoumiConfig.is2Step()) {%> + + <%}%> + <%if (MoumiConfig.getUseRecog()) {%> + + <%}%> + + + + + + <% + } //end of for list + } //end of if( count > 0) + //tx.rollback(); + %> +
    + + + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.number")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.devision")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.telNumber")%> (<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.depart")%>/<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.person")%>)<%=TotDocProcess.SUBMIT%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.dateTime")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.progressStatus")%><%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.subdoc")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.approval")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.opinion")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.add")%>
    + <%if (MoumiConfig.getUseRecog()) {%> disabled <%}%> > + <%} else {%> + + <%}%> + + "> + + + +  <%= index + 1%> <%=prssVO.getUpperDeptName() == null ? "" : prssVO.getUpperDeptName() + " - "%><%= prssVO.getDeptName()%> +   + <%if (prss == TotReportProcess.READ || prss == TotReportProcess.COMP || prss == TotReportProcess.NOTE || (prss == TotReportProcess.TEMP && "Y".equals(totDoc.getRegularDocYn()))) {%> + + <%}%><%= MString.checkNull(prssVO.getOwnerName())%><%if (prssVO.getUserId() != null) {%>(<%= MString.checkNull(prssVO.getUserId())%>) <%}%> + <%if (prss == TotReportProcess.READ || prss == TotReportProcess.COMP || prss == TotReportProcess.NOTE || prss == TotReportProcess.RETURN) {%> + <%}%>   +  <%= MString.checkNull(prssVO.getDeptPhone())%>/<%= MString.checkNull(prssVO.getUserPhone())%>  + <%if (prss == TotReportProcess.RETURN || prss == TotReportProcess.COMP || prss == TotReportProcess.NOT) {%> + <%= prssVO.getSubmitDate() == null ? "" : new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(prssVO.getSubmitDate())%> + <%}%> + + <% + if (TotReportProcess.ACCEPT == prss && TotReportType.NOT_REPORT_REQ == prssVO.getReportType()) { + %> + + <% + } else { + // if (prssVO.isDeleted()) { + // out.write(MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.reportDocDelete")); + // } else { + out.write(prssVO.getProcess().toString()); + //} + } + %> + + <%if (slaveTotDoc == null) {%> +   + <%} else {%> + + <%}%> + + <%if (prss == TotReportProcess.COMP || prss == TotReportProcess.TEMP || prss == TotReportProcess.APPROVE) {%> + <%= prssVO.getRecogType().toString()%> <%} else {%>   + <%}%> + + + <%if (prss == TotReportProcess.NOTE) {%> + + + + + <%} else {%>   + <%}%> + + + <% if (!"Y".equals(prssVO.getIsAttachments())) { /*if (attachmentsMap == null || attachmentsMap.isEmpty()) {*/%>   <%} else {%> + + <%if (prss == TotReportProcess.COMP || prss == TotReportProcess.NOTE || (prss == TotReportProcess.TEMP && "Y".equals(totDoc.getRegularDocYn()))) {%> + <%-- --%> + + + <%} else {%>   <%}%> + <%}%> +
    +
    + + <%-- + + + + + + " /> + " /> + + --%> + + + + + + + + +
    <%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.reportDocNot")%>
    + + + + + <%if (MoumiConfig.getUseRecog()) {%> + + <%}%> + + + + +<% + } catch (Exception ex) { + ex.printStackTrace(); +// out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/documents/report/report_list.jsp_org b/webapps/totsys/common/inc/documents/report/report_list.jsp_org new file mode 100644 index 0000000..46d0ddc --- /dev/null +++ b/webapps/totsys/common/inc/documents/report/report_list.jsp_org @@ -0,0 +1,1557 @@ + +<%@page import="kr.co.kihyun.service.vo.TotDocVO"%> +<% /** + * ********************************************************** + * @@ Program Name : report_list.jsp + * @@ Description : // + * @@ Author : ũ + * @@ Create Date : 2010.11.21 + * @@ History : 2014.10.14 Update by KWON,HAN + * @@*********************************************************** + */ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.util.Date" + import="java.util.List" + import="java.util.ArrayList" + import="java.util.Map" + import="java.util.HashMap" + import="java.text.SimpleDateFormat" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.util.MDate" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*" + import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" + import="kr.co.kihyun.service.TotDocService" + import="kr.co.kihyun.service.PrssReportsService" + import="kr.co.kihyun.service.vo.PrssReportsVO" + import="kr.co.kihyun.service.vo.ReportCountVO" + import="javax.jdo.Query"%> +<%@page import="kr.co.kihyun.beans.entity.TotReportProcess"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + //request.setCharacterEncoding("euc-kr"); + Logger LOG = LoggerFactory.getLogger(this.getClass()); + /** + * ******** session userId ********* + */ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + String dpID = HttpSSOLogin.getDeptID(request); + String docType = clearXSS(request.getParameter("docType"), null); + + /** + * **** Parameter ***** + */ + Long docID = MLong.parseLong(request.getParameter("docID"), null); + String accAuth = clearXSS(request.getParameter("accAuth"), ""); + + String searchDepth = clearXSS(request.getParameter("searchDepth"), ""); + String strPage = clearXSS(request.getParameter("strPage"), ""); + String findOption = clearXSS(request.getParameter("findOption"), ""); + String findWord = URLDecoder.decode(MString.checkNull(request.getParameter("findWord")), "UTF-8"); + String stDate = clearXSS(request.getParameter("stDate"), ""); + String edDate = clearXSS(request.getParameter("edDate"), ""); + + int innerStrPage = 0; + String innerFindOption = ""; + String innerFindWord = ""; + + if ("inner".equals(searchDepth)) { + innerStrPage = MInteger.parseInt(request.getParameter("innerStrPage"), 1); + innerFindOption = clearXSS(request.getParameter("innerFindOption"), ""); + innerFindWord = URLDecoder.decode(MString.checkNull(request.getParameter("innerFindWord")), "UTF-8"); + } else { + innerStrPage = MInteger.parseInt(request.getParameter("innerStrPage"), 1); + innerFindOption = clearXSS(request.getParameter("innerFindOption"), ""); + //˻ ذ + //innerFindWord = clearXSS(Encoder.toJava(request.getParameter("innerFindWord")), ""); + innerFindWord = URLDecoder.decode(MString.checkNull(request.getParameter("innerFindWord")), "UTF-8"); + } + if (innerStrPage <= 0) { + innerStrPage = 1; + } + + String howSort = clearXSS(request.getParameter("howSort"), ""); + String procMode = request.getParameter("proc_mode"); + + //ڵȸ + if (!MString.isNull(procMode)) { + tx.begin(); + TotDocService docService = new TotDocService(pm); + if (procMode.equals("auto_return")) { + String autoRtnYn = MString.checkNull(request.getParameter("autoRtnYn"), "N"); + docService.updateAutoRtnYnForDoc(docID, autoRtnYn); + } + tx.commit(); + } + + int listType = MInteger.parseInt(request.getParameter("listType")); + int prssENG = MInteger.parseInt(request.getParameter("prssENG")); + String listNum = clearXSS(request.getParameter("listNum"), ""); + + //¡ ⺻ ִ Ķ + int intlistNum = 30; + if (!"".equals(listNum)) { + intlistNum = MInteger.parseInt(request.getParameter("listNum"), 30); + } + //============================== + +// int subStrPage = MInteger.parseInt(request.getParameter("subStrPage"), 1); + int recog = MInteger.parseInt(request.getParameter("recog"), -1); + tx.begin(); + + String sort = clearXSS(request.getParameter("sort"), ""); + + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String userId = totDoc.getUser(); + String regDocYN = totDoc.getRegularDocYn(); + AccessAuth docAccAuth = totDoc.getAccessAuth(); +// String docName = totDoc.getName(); + String regID = totDoc.getUser(pm).getId(); + String deptID = totDoc.getDept(pm).getId(); + Date endDate = totDoc.getEndDate(); + + tx.rollback(); + String tmpStr = totDoc.getName() + "_" + new SimpleDateFormat("yyyy-MM-dd").format(endDate); + + /** + * **** all, send report ***** + */ + int allReportCount = 0; + int sendReportCount = 0; + int notReportCount = 0; + int noteReportCount = 0; + + /** + * ********** Ʈ *********** + */ + int pageSize = 0; + int currentPage = 0; + int currentPageSetUp = 0; + //int recordSize = listNum; + int recordSize = intlistNum; + + //currentPage = subStrPage; + currentPage = innerStrPage; + + currentPageSetUp = (int) (currentPage / 10) * 10; + if (currentPage % 10 == 0) { + currentPageSetUp -= 10; + } + + //====================================================================== + PrssReportsService prssService = new PrssReportsService(pm); + //˻Ķ + Map params = new HashMap(); + params.put("docId", docID); + params.put("listType", listType); + params.put("findOption", innerFindOption); + params.put("filterValue", innerFindWord); + params.put("howSort", howSort); + params.put("sort", sort); + params.put("regDocYN", regDocYN); + + //˻ ڵ尹ȸ + prssService.createPrssReportListSearchQuery(params); + + //ڵ尹ȸ Ͽ ڵ尹 + int count = prssService.getCountFromMainQuery(); + + if ((count % recordSize) == 0) { + pageSize = (int) (count / recordSize); + } else { + pageSize = (int) (count / recordSize) + 1; + } + + if (currentPage > pageSize) { + currentPage = pageSize; + } + + innerStrPage = currentPage; //Ķͷ ѱ Ѵ. + + int startNo = (currentPage - 1) * recordSize + 1; + int endNo = currentPage * recordSize; + + List list = null; + + //˻ȸ + if (count > 0) { + //¡ó ߰Ķ + prssService.getParams().put("startNo", startNo); + prssService.getParams().put("endNo", endNo); + + //˻ ¡ó ȯ + prssService.convertToPagenatingQuery(); + + //ϴ ڵ尡 ϸ ȸ + list = prssService.executeQuery(PrssReportsVO.class); + } + //====================================================================== + List reportList = null; + reportList = prssService.getReportDeptListByDocId(docID); + + List prssList = null; + prssList = prssService.getReportCountByDocId(docID,regDocYN); + + if (prssList != null && prssList.size() > 0) { + for (Object obj : prssList) { + ReportCountVO countVO = (ReportCountVO) obj; + + allReportCount = MInteger.parseInt(countVO.getAllCount().toString(), 0); + sendReportCount = MInteger.parseInt(countVO.getSendCount().toString(), 0); + notReportCount = MInteger.parseInt(countVO.getNotCount().toString(), 0); + noteReportCount = MInteger.parseInt(countVO.getNoteCount().toString(), 0); + } + } + //====================================================================== + +// //page link +// String uri = "report_list.jsp?docID=" + docID +// + "&accAuth=" + accAuth +// + "&strPage=" + strPage +// + "&findOption=" + MString.checkNull(findOption) +// + "&findWord=" + MString.checkNull(findWord) +// + "&searchDepth=" + "none" +// + "&innerStrPage=" + innerStrPage +// + "&innerFindOption=" + MString.checkNull(innerFindOption) +// + "&innerFindWord=" + MString.checkNull(innerFindWord) +// + "&listType=" + listType +// + "&recog=" + recog +// + "&docType=" + MString.checkNull(docType) +// + "&listNum=" + listNum +// + "&sort=" + sort +// + "&howSort=" + howSort; +////System.out.println("uri::" + uri.toString()); +// String savePath = MoumiConfig.getRepoPerRoot().getPath() + "/fileUpload"; + +%> + + + <%=Moumi.getTitle()%> + + + + + + + + + + + + + +
    + + + + + + +
    + +
    + + + + + + + + + +
    +
    + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + <%if (count > 0) {%> + + + + <%} else {%> + + + <%}%> + +
    + + + + + + + + + + + + + +
    + + + + + + + <%--if (MoumiConfig.getUseRecog()) { // moumi.properties moumi.use.recog = false %> + + <%}--%> + + + + + + + + + <%if("Y".equals(totDoc.getRegularDocYn())){%> + + <%}%> + +
    + + + + + + + <%if ("PRSS".equals(docType)) {%> + <% + if (listType == MReport.ALL_LIST || listType == MReport.COMP_LIST) { + if (!(sysAuth == 2 && !usID.equals(userId) && docAccAuth == AccessAuth.ALL)) { + %> + + + <%= MoumiConfig.getMessageBundle().getString(" /> + + <%} + }%> + + <%if (listType == MReport.ALL_LIST || listType == MReport.COMP_LIST || listType == MReport.TEMP_LIST || listType == MReport.RETURN_LIST || listType == MReport.NOT_LIST) {//Ϲ ü + if (!(sysAuth == 2 && !usID.equals(userId) && docAccAuth == AccessAuth.ALL)) { + %> + + <%=MoumiConfig.getMessageBundle().getString(" /> + + <%} + }%> + <%}%> + + ÷ϴٿε + + <%= Moumi.getMessageBundle().getString(" /> + + + <%= Moumi.getMessageBundle().getString(" /> + + ڷ
    +
    + + + + <%if ("PRSS".equals(docType)) {%> + <% + if (!(sysAuth == 2 && !usID.equals(userId))) { + %> + + <%}%> + <%}%> + + + + +
    +
    + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + <%=TotReportProcess.ALL%>: <%= allReportCount%> +   + + + <%=TotReportProcess.COMP%>: <%= sendReportCount%> +   + + + <%=TotReportProcess.NOT%>: <%= notReportCount%> +   + + + <%=TotReportProcess.NOT_REPORT%>: <%= (allReportCount - sendReportCount - notReportCount)%> +   + + + ( <%=TotReportProcess.NOTE%>: <%= noteReportCount%> ) + + +
    +
    + +
    +
    + + + + + + + + + + <%if (MoumiConfig.is2Step()) {%> + + <%}%> + <%if (MoumiConfig.getUseRecog()) {%> + + <%}%> + + + + + <% + int index = 0; //迭 Ű + int nextCount = 0; // + + if (currentPage > 1) { + nextCount = ((currentPage - 1) * recordSize); + } + //tx.begin(); + //for (int i = 0; (i < recordSize) && ((nextCount + i) < reportList.size()); i++) { + + if (count > 0) { + int listCount = list.size(); + + for (int i = 0; i < listCount; i++) { + index = nextCount + i; + + PrssReportsVO prssVO = (PrssReportsVO) list.get(i); + TotReportProcess prss = (TotReportProcess) prssVO.getProcess(); + + TotDoc slaveTotDoc = prssVO.getSlaveTotDoc(pm); + + //Map> attachmentsMap = null; + //if (prss == TotReportProcess.COMP || prss == TotReportProcess.NOTE) { + // attachmentsMap = prssVO.getAttachmentsMap(pm); + //} + %> + + + + + + + + + + + + + <%if (MoumiConfig.is2Step()) {%> + + <%}%> + <%if (MoumiConfig.getUseRecog()) {%> + + <%}%> + + + + + + <% + } //end of for list + } //end of if( count > 0) + //tx.rollback(); + %> +
    + + + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.number")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.devision")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.telNumber")%> (<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.depart")%>/<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.person")%>)<%=TotDocProcess.SUBMIT%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.dateTime")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.progressStatus")%><%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.subdoc")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.approval")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.opinion")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.add")%>
    + <%if (MoumiConfig.getUseRecog()) {%> disabled <%}%> > + <%} else {%> + + <%}%> + + "> + + + +  <%= index + 1%> <%=prssVO.getUpperDeptName() == null ? "" : prssVO.getUpperDeptName() + " - "%><%= prssVO.getDeptName()%> +   + <%if (prss == TotReportProcess.READ || prss == TotReportProcess.COMP || prss == TotReportProcess.NOTE || (prss == TotReportProcess.TEMP && "Y".equals(totDoc.getRegularDocYn()))) {%> + + <%}%><%= MString.checkNull(prssVO.getOwnerName())%><%if (prssVO.getUserId() != null) {%>(<%= MString.checkNull(prssVO.getUserId())%>) <%}%> + <%if (prss == TotReportProcess.READ || prss == TotReportProcess.COMP || prss == TotReportProcess.NOTE || prss == TotReportProcess.RETURN) {%> + <%}%>   +  <%= MString.checkNull(prssVO.getDeptPhone())%>/<%= MString.checkNull(prssVO.getUserPhone())%>  + <%if (prss == TotReportProcess.RETURN || prss == TotReportProcess.COMP || prss == TotReportProcess.NOT) {%> + <%= prssVO.getSubmitDate() == null ? "" : new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(prssVO.getSubmitDate())%> + <%}%> + + <% + if (TotReportProcess.ACCEPT == prss && TotReportType.NOT_REPORT_REQ == prssVO.getReportType()) { + %> + + <% + } else { + // if (prssVO.isDeleted()) { + // out.write(MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.reportDocDelete")); + // } else { + out.write(prssVO.getProcess().toString()); + //} + } + %> + + <%if (slaveTotDoc == null) {%> +   + <%} else {%> + + <%}%> + + <%if (prss == TotReportProcess.COMP || prss == TotReportProcess.TEMP || prss == TotReportProcess.APPROVE) {%> + <%= prssVO.getRecogType().toString()%> <%} else {%>   + <%}%> + + + <%if (prss == TotReportProcess.NOTE) {%> + + + + + <%} else {%>   + <%}%> + + + <% if (!"Y".equals(prssVO.getIsAttachments())) { /*if (attachmentsMap == null || attachmentsMap.isEmpty()) {*/%>   <%} else {%> + + <%if (prss == TotReportProcess.COMP || prss == TotReportProcess.NOTE || (prss == TotReportProcess.TEMP && "Y".equals(totDoc.getRegularDocYn()))) {%> + <%-- --%> + + + <%} else {%>   <%}%> + <%}%> +
    +
    + + <%-- + + + + + + " /> + " /> + + --%> + + + + + + + + +
    <%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.reportDocNot")%>
    + + + + + <%if (MoumiConfig.getUseRecog()) {%> + + <%}%> + + + + +<% + } catch (Exception ex) { + ex.printStackTrace(); +// out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/documents/report/report_list_excel.jsp b/webapps/totsys/common/inc/documents/report/report_list_excel.jsp new file mode 100644 index 0000000..04f65d5 --- /dev/null +++ b/webapps/totsys/common/inc/documents/report/report_list_excel.jsp @@ -0,0 +1,297 @@ + +<% /** + * ********************************************************** + * @@ Program Name : report_list_excel.jsp + * @@ Description : // + * @@ Author : + * @@ Create Date : 2004.10.11 + * @@ History : 2014.10.01 Update By KWON,HAN + * @@*********************************************************** + */ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.util.Date" + import="java.util.List" + import="java.util.Map" + import="java.util.HashMap" + import="java.text.SimpleDateFormat" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.util.MDate" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*" + import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" + import="kr.co.kihyun.service.PrssReportsService" + import="kr.co.kihyun.service.vo.PrssReportsVO" + import="javax.jdo.Query"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% request.setCharacterEncoding("euc-kr");%> +<% + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + Logger LOG = LoggerFactory.getLogger(this.getClass()); + /** + * ******** session userId ********* + */ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + String dpID = HttpSSOLogin.getDeptID(request); + + /** + * **** Parameter ***** + */ + Long docID = MLong.parseLong(request.getParameter("docID"), null); + String accAuth = clearXSS(request.getParameter("accAuth"), ""); + String strPage = clearXSS(request.getParameter("strPage"), ""); + String findOption = clearXSS(request.getParameter("findOption"), ""); + //String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")),""); + String findWord = clearXSS(URLDecoder.decode(request.getParameter("findWord"), "UTF-16"), ""); + int listType = MInteger.parseInt(request.getParameter("listType")); + int prssENG = MInteger.parseInt(request.getParameter("prssENG")); + int recog = MInteger.parseInt(request.getParameter("recog"), -1); + String sort = clearXSS(request.getParameter("sort"), ""); + String howSort = clearXSS(request.getParameter("howSort"), ""); + +// System.out.println(" Ѿ howSort = " + howSort); + + tx.begin(); + + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String docName = totDoc.getName(); + + + + /** + * **** all, send report ***** + */ + int allReportCount = 0; + int sendReportCount = 0; + int notReportCount = 0; + int noteReportCount = 0; + Report report = new Report(); + allReportCount = report.getAllCount(docID); //üƮīƮ ؿ ҷ Լ + sendReportCount = report.getSendCount(docID); //ⷹƮīƮ ؿ ҷ Լ + notReportCount = report.getNotCount(docID); //شīƮ ؿ ҷ Լ + noteReportCount = report.getNoteCount(docID); //ڷȸ û Ƚ ī + + +/* + //List reportList = totDoc.getPrssReports(pm, listType, findOption, findWord,null); + List reportList = null; + //if(findWord == null) + if (sort.equals("1")) { + reportList = totDoc.getPrssReports(pm, listType, findOption, findWord, null); + + } else if (sort.equals("2")) { + reportList = totDoc.getPrssFoundReports(pm, listType, findOption, findWord, null); + } else { + reportList = totDoc.getPrssReports(pm, listType, findOption, findWord, null); + } + + Query q = null; + if (recog != -1) { + q = pm.newQuery(TotReport.class, reportList); + StringBuilder filter = new StringBuilder(150).append("this.recog.ordinal() == recog"); + q.setFilter(filter.toString()); + LOG.debug("filter: {}", filter.toString()); + q.declareParameters("int recog"); + q.setOrdering("id DESC"); + reportList = (List) q.execute(recog); + } +*/ + + //====================================================================== + int count = 0; + + PrssReportsService prssService = new PrssReportsService(pm); + //˻Ķ + Map params = new HashMap(); + params.put("docId", docID); + params.put("listType", listType); + params.put("findOption", findOption); + params.put("filterValue", findWord); + params.put("howSort", howSort); + params.put("sort", sort); + + //˻ ڵ尹ȸ + prssService.createPrssReportListSearchQuery(params); + + List list = null; + + //ϴ ڵ尡 ϸ ȸ + list = prssService.executeQuery(PrssReportsVO.class); + + count = list.size(); + //====================================================================== + + tx.rollback(); + + response.setHeader("Accept-Ranges", "bytes"); + //response.setHeader("Content-Disposition","attachment; filename="+(URLEncoder.encode(docName, "UTF-8")).replaceAll(":","_").replace("+","%20" )+".xls;"); + //LJH + response.setHeader("Content-Disposition", "attachment; filename=" + (URLEncoder.encode(docName, "UTF-8")).replaceAll(":", "_").replace("+", " ") + ".xls;"); +%> + + + + + + + + + + + + + + + + <%if (count <= 0) {%> + + + + <%}%> +
    + + + + +
    + <%=TotReportProcess.ALL%>: <%= allReportCount%>  + <%=TotReportProcess.COMP%>: <%= sendReportCount%>  + <%=TotReportProcess.NOT%>: <%= notReportCount%>  + <%=TotReportProcess.NOT_REPORT%>: <%= (allReportCount - sendReportCount - notReportCount)%>  + ( <%=TotReportProcess.NOTE%>: <%= noteReportCount%> ) +
    +
    + + + + + + + + + + <%if (MoumiConfig.is2Step()) {%> + + <%}%> + <%if (MoumiConfig.getUseRecog()) {%> + + <%}%> + + + + + <% + //tx.begin(); + //for (int index = 0; index < reportList.size(); index++) { + + int index = 0; //迭 Ű + + if( count > 0 ) { + int listCount = list.size(); + + for (int i = 0; i < listCount; i++) { + index = i; + + PrssReportsVO prssVO = (PrssReportsVO)list.get(i); + TotReportProcess prss = (TotReportProcess) prssVO.getProcess(); + + TotDoc slaveTotDoc = prssVO.getSlaveTotDoc(pm); + + Map> attachmentsMap = prssVO.getAttachmentsMap(pm); + %> + + + + + + + + <%if (MoumiConfig.is2Step()) {%> + + <%}%> + + <%if (MoumiConfig.getUseRecog()) {%> + + <%}%> + + + + <% + + } //end of for list + } //end of if( count > 0) + //tx.rollback(); + %> +
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.number")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.devision")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.telNumber")%> (<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.depart")%>/<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.person")%>)<%=TotDocProcess.SUBMIT%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.dateTime")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.progressStatus")%><%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.subdoc")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.approval")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.opinion")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.add")%>
     <%= index + 1%> <%=prssVO.getUpperDept() == null ? "" : prssVO.getUpperDeptName() + " - "%><%= prssVO.getDeptName()%> +  <%= MString.checkNull(prssVO.getOwnerName())%><%if (prssVO.getUserId() != null) {%>(<%= MString.checkNull(prssVO.getUserId())%>) <%}%>  <%= MString.checkNull(prssVO.getDeptPhone())%>/<%= MString.checkNull(prssVO.getUserPhone())%>  + <%if (prssVO.getProcess() == TotReportProcess.RETURN || prssVO.getProcess() == TotReportProcess.COMP || prssVO.getProcess() == TotReportProcess.NOT) {%> + <%= prssVO.getSubmitDate() == null ? "" : new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(prssVO.getSubmitDate())%> + <%}%> + + <% + if (TotReportProcess.ACCEPT == prssVO.getProcess() && TotReportType.NOT_REPORT_REQ == prssVO.getReportType()) {%> + <%} else { +// if (prssVO.isDeleted()) { +// out.write("" + MoumiConfig.getMessageBundle().getString("moumi.message.doc") + " "); +// } else {C + out.write(prssVO.getProcess().toString()); +// } + } + %> + + <%if (slaveTotDoc == null) {%>   <%} else {%> + 蹮 <%}%> + + <%if (prssVO.getProcess() == TotReportProcess.COMP || prssVO.getProcess() == TotReportProcess.TEMP || prssVO.getProcess() == TotReportProcess.APPROVE) {%> + <%= prssVO.getRecogType().toString()%> <%} else {%>   <%}%> + + <%if (prss != TotReportProcess.NOTE) {%>   <%} else {%> + ȸû <%}%> +   + <%if (attachmentsMap.isEmpty()) {%>  <%} else {%> + + <%if (prss == TotReportProcess.COMP || prss == TotReportProcess.NOTE) {%> + <%if (prssVO.getProcess() == TotReportProcess.READ || prssVO.getProcess() == TotReportProcess.COMP || prss == TotReportProcess.NOTE || prssVO.getProcess() == TotReportProcess.RETURN) {%> + ÷ + <%}%> + <%} else {%>  <%}%> + <%}%> +
    +
    ش <%= MoumiConfig.getMessageBundle().getString("moumi.message.doc")%> ϴ.
    + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/documents/report/report_list_excel.jsp_org b/webapps/totsys/common/inc/documents/report/report_list_excel.jsp_org new file mode 100644 index 0000000..635b22b --- /dev/null +++ b/webapps/totsys/common/inc/documents/report/report_list_excel.jsp_org @@ -0,0 +1,297 @@ + +<% /** + * ********************************************************** + * @@ Program Name : report_list_excel.jsp + * @@ Description : // + * @@ Author : + * @@ Create Date : 2004.10.11 + * @@ History : 2014.10.01 Update By KWON,HAN + * @@*********************************************************** + */ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.util.Date" + import="java.util.List" + import="java.util.Map" + import="java.util.HashMap" + import="java.text.SimpleDateFormat" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.util.MDate" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*" + import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" + import="kr.co.kihyun.service.PrssReportsService" + import="kr.co.kihyun.service.vo.PrssReportsVO" + import="javax.jdo.Query"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% request.setCharacterEncoding("euc-kr");%> +<% + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + Logger LOG = LoggerFactory.getLogger(this.getClass()); + /** + * ******** session userId ********* + */ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + String dpID = HttpSSOLogin.getDeptID(request); + + /** + * **** Parameter ***** + */ + Long docID = MLong.parseLong(request.getParameter("docID"), null); + String accAuth = clearXSS(request.getParameter("accAuth"), ""); + String strPage = clearXSS(request.getParameter("strPage"), ""); + String findOption = clearXSS(request.getParameter("findOption"), ""); + //String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")),""); + String findWord = clearXSS(URLDecoder.decode(request.getParameter("findWord"), "UTF-16"), ""); + int listType = MInteger.parseInt(request.getParameter("listType")); + int prssENG = MInteger.parseInt(request.getParameter("prssENG")); + int recog = MInteger.parseInt(request.getParameter("recog"), -1); + String sort = clearXSS(request.getParameter("sort"), ""); + String howSort = clearXSS(request.getParameter("howSort"), ""); + +// System.out.println(" Ѿ howSort = " + howSort); + + tx.begin(); + + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String docName = totDoc.getName(); + + + + /** + * **** all, send report ***** + */ + int allReportCount = 0; + int sendReportCount = 0; + int notReportCount = 0; + int noteReportCount = 0; + Report report = new Report(); + allReportCount = report.getAllCount(docID); //üƮīƮ ؿ ҷ Լ + sendReportCount = report.getSendCount(docID); //ⷹƮīƮ ؿ ҷ Լ + notReportCount = report.getNotCount(docID); //شīƮ ؿ ҷ Լ + noteReportCount = report.getNoteCount(docID); //ڷȸ û Ƚ ī + + +/* + //List reportList = totDoc.getPrssReports(pm, listType, findOption, findWord,null); + List reportList = null; + //if(findWord == null) + if (sort.equals("1")) { + reportList = totDoc.getPrssReports(pm, listType, findOption, findWord, null); + + } else if (sort.equals("2")) { + reportList = totDoc.getPrssFoundReports(pm, listType, findOption, findWord, null); + } else { + reportList = totDoc.getPrssReports(pm, listType, findOption, findWord, null); + } + + Query q = null; + if (recog != -1) { + q = pm.newQuery(TotReport.class, reportList); + StringBuilder filter = new StringBuilder(150).append("this.recog.ordinal() == recog"); + q.setFilter(filter.toString()); + LOG.debug("filter: {}", filter.toString()); + q.declareParameters("int recog"); + q.setOrdering("id DESC"); + reportList = (List) q.execute(recog); + } +*/ + + //====================================================================== + int count = 0; + + PrssReportsService prssService = new PrssReportsService(pm); + //˻Ķ + Map params = new HashMap(); + params.put("docId", docID); + params.put("listType", listType); + params.put("findOption", findOption); + params.put("filterValue", findWord); + params.put("howSort", howSort); + params.put("sort", sort); + + //˻ ڵ尹ȸ + prssService.createPrssReportListSearchQuery(params); + + List list = null; + + //ϴ ڵ尡 ϸ ȸ + list = prssService.executeQuery(PrssReportsVO.class); + + count = list.size(); + //====================================================================== + + tx.rollback(); + + response.setHeader("Accept-Ranges", "bytes"); + //response.setHeader("Content-Disposition","attachment; filename="+(URLEncoder.encode(docName, "UTF-8")).replaceAll(":","_").replace("+","%20" )+".xls;"); + //LJH + response.setHeader("Content-Disposition", "attachment; filename=" + (URLEncoder.encode(docName, "UTF-8")).replaceAll(":", "_").replace("+", " ") + ".xls;"); +%> + + + + + + + + + + + + + + + + <%if (count <= 0) {%> + + + + <%}%> +
    + + + + +
    + <%=TotReportProcess.ALL%>: <%= allReportCount%>  + <%=TotReportProcess.COMP%>: <%= sendReportCount%>  + <%=TotReportProcess.NOT%>: <%= notReportCount%>  + <%=TotReportProcess.NOT_REPORT%>: <%= (allReportCount - sendReportCount - notReportCount)%>  + ( <%=TotReportProcess.NOTE%>: <%= noteReportCount%> ) +
    +
    + + + + + + + + + + <%if (MoumiConfig.is2Step()) {%> + + <%}%> + <%if (MoumiConfig.getUseRecog()) {%> + + <%}%> + + + + + <% + //tx.begin(); + //for (int index = 0; index < reportList.size(); index++) { + + int index = 0; //迭 Ű + + if( count > 0 ) { + int listCount = list.size(); + + for (int i = 0; i < listCount; i++) { + index = i; + + PrssReportsVO prssVO = (PrssReportsVO)list.get(i); + TotReportProcess prss = (TotReportProcess) prssVO.getProcess(); + + TotDoc slaveTotDoc = prssVO.getSlaveTotDoc(pm); + + Map> attachmentsMap = prssVO.getAttachmentsMap(pm); + %> + + + + + + + + <%if (MoumiConfig.is2Step()) {%> + + <%}%> + + <%if (MoumiConfig.getUseRecog()) {%> + + <%}%> + + + + <% + + } //end of for list + } //end of if( count > 0) + //tx.rollback(); + %> +
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.number")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.devision")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.telNumber")%> (<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.depart")%>/<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.person")%>)<%=TotDocProcess.SUBMIT%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.dateTime")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.progressStatus")%><%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.subdoc")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.approval")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.opinion")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.add")%>
     <%= index + 1%> <%=prssVO.getUpperDept() == null ? "" : prssVO.getUpperDeptName() + " - "%><%= prssVO.getDeptName()%> +  <%= MString.checkNull(prssVO.getOwnerName())%><%if (prssVO.getUserId() != null) {%>(<%= MString.checkNull(prssVO.getUserId())%>) <%}%>  <%= MString.checkNull(prssVO.getDeptPhone())%>/<%= MString.checkNull(prssVO.getUserPhone())%>  + <%if (prssVO.getProcess() == TotReportProcess.RETURN || prssVO.getProcess() == TotReportProcess.COMP || prssVO.getProcess() == TotReportProcess.NOT) {%> + <%= prssVO.getSubmitDate() == null ? "" : new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(prssVO.getSubmitDate())%> + <%}%> + + <% + if (TotReportProcess.ACCEPT == prssVO.getProcess() && TotReportType.NOT_REPORT_REQ == prssVO.getReportType()) {%> + <%} else { + if (prssVO.isDeleted()) { + out.write("" + MoumiConfig.getMessageBundle().getString("moumi.message.doc") + " "); + } else { + out.write(prssVO.getProcess().toString()); + } + } + %> + + <%if (slaveTotDoc == null) {%>   <%} else {%> + 蹮 <%}%> + + <%if (prssVO.getProcess() == TotReportProcess.COMP || prssVO.getProcess() == TotReportProcess.TEMP || prssVO.getProcess() == TotReportProcess.APPROVE) {%> + <%= prssVO.getRecogType().toString()%> <%} else {%>   <%}%> + + <%if (prss != TotReportProcess.NOTE) {%>   <%} else {%> + ȸû <%}%> +   + <%if (attachmentsMap.isEmpty()) {%>  <%} else {%> + + <%if (prss == TotReportProcess.COMP || prss == TotReportProcess.NOTE) {%> + <%if (prssVO.getProcess() == TotReportProcess.READ || prssVO.getProcess() == TotReportProcess.COMP || prss == TotReportProcess.NOTE || prssVO.getProcess() == TotReportProcess.RETURN) {%> + ÷ + <%}%> + <%} else {%>  <%}%> + <%}%> +
    +
    ش <%= MoumiConfig.getMessageBundle().getString("moumi.message.doc")%> ϴ.
    + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/documents/report/report_subdoc_view.jsp b/webapps/totsys/common/inc/documents/report/report_subdoc_view.jsp new file mode 100644 index 0000000..9066a70 --- /dev/null +++ b/webapps/totsys/common/inc/documents/report/report_subdoc_view.jsp @@ -0,0 +1,328 @@ +<%-- + Document : report_subdoc_view.jsp + Description: ڰ ڷḦ Ȯ ִ ȭ + Created on : 2015. 5. 13, 9:56:58 + Author : jskim +--%> + + + +<%@page import="kr.co.kihyun.service.vo.PrssReportsVO"%> +<%@page import="java.util.HashMap"%> +<%@page import="java.util.Map"%> +<%@page import="kr.co.kihyun.service.PrssReportsService"%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.text.html.HtmlUtil" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.user.UserView" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.report.ReportView" + import="kr.co.kihyun.beans.totsys.report.ReportViewManager" + import="kr.co.kihyun.text.hml.Hwp" + import="kr.co.kihyun.text.html.HtmlUtil" + import="kr.co.kihyun.beans.totsys.report.tots.ReportsViewer" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.beans.totsys.doc.table.Table" + import="kr.co.kihyun.beans.totsys.doc.table.item.Item" + import="kr.co.kihyun.text.excel.Excel" + import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.lang.MLong" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*"%> +<%@page import="java.util.List"%> +<%@ page import="java.util.Map.Entry"%> +<%@page import="javax.jdo.Query"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% Logger LOG = LoggerFactory.getLogger(this.getClass()); + + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + /********* Parameter *********/ +// Long reportID = MLong.parseLong(request.getParameter("reportID"), null); + Long docID = MLong.parseLong(request.getParameter("docID"), null); + String usID = MString.checkNull(request.getParameter("usID")); + String tmpStrMagam = MString.checkNull(request.getParameter("tmpStrMagam")); + /*String tmpMagamGubun = MString.checkNull(request.getParameter("tmpMagamGubun")); + tmpMagamGubun = tmpMagamGubun.replaceAll(" ",""); + tmpMagamGubun = tmpMagamGubun.substring(0, 8);*/ + +// TotReport totReport = pm.getObjectById(TotReport.class, reportID); + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String Magam; + String docName = totDoc.getName(); + Long downDocId = totDoc.getId(); + + /* if(tmpMagamGubun.equals("99991230")){ + Magam=""; + }else{ + Magam=tmpStrMagam; + }*/ + + // System.out.println(" tmpStrMagam:::::::"+tmpStrMagam); + + // TODO: extract method. + String report = null; + + TotDoc slaveDoc = pm.getObjectById(TotDoc.class, docID); +// if (!slaveDoc.getCompReports(pm).isEmpty()) +// report = TotReportUtil.toHTML(slaveDoc, slaveDoc.getCompReports(pm)); + //report  ڷ +// + /********* report view *******/ +// String realFileName = ""; +// String viewFileName = ""; +// for (String fileName : totReport.getAttachments().keySet()) { +// viewFileName += fileName + ";"; +// realFileName += fileName + ";"; +// } +// Long downDocID = totReport.getSlaveTotDoc() == null ? null : totReport.getTotDoc().getId(); + Long downDocID = totDoc.getId() == null ? null : totDoc.getId(); + +// String[] realFileNameList = realFileName.split(";"); +// String[] viewFileNameList = viewFileName.split(";"); + + // + + String url = clearXSS(request.getParameter("url"), ""); + + if (url == null) { + url = ""; + } + + +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + <% + StringBuffer htm = null; + htm = new StringBuffer(); + htm.append(report); + + int tag_textinput_idx = 0; + + while (true) { //ڷԷâ ѱۿ ڽ ȹ̰ ̰ ϱ. + tag_textinput_idx = htm.indexOf("
    "); + if (tag_textinput_idx != -1) { + int serch_textinput = htm.indexOf("
    ", + tag_textinput_idx); + htm = htm.replace(serch_textinput, + serch_textinput + 18, + "

    "); + htm = htm.replace(tag_textinput_idx, + tag_textinput_idx + 58, + "

    "); + } else { + break; + } + } + + tag_textinput_idx = 0; + + while (true) { + tag_textinput_idx = htm.indexOf(""); + if (tag_textinput_idx != -1) { + int serch_textinput = htm.indexOf("
    ", + tag_textinput_idx); + htm = htm.replace(serch_textinput, + serch_textinput + 18, + "

    "); + htm = htm.replace(tag_textinput_idx, + tag_textinput_idx + 71, + "

    "); + } else { + break; + } + } + %> + <% + tx.begin(); +// TotDoc totDoc = pm.getObjectById(TotDoc.class, downDocID); +// int searchType = MInteger.parseInt(request.getParameter("searchType"), -1); + +// Long docID = totDoc.getId(); + int listType = TotReportProcess.ALL.ordinal(); + String innerFindOption = ""; + String innerFindWord = ""; + String howSort = ""; + String sort = "2"; + +// if (searchType >= 0) { +// if (searchType == TotReportProcess.COMP.ordinal()) { +// listType = TotReportProcess.COMP.ordinal(); +// } else if (searchType == TotReportProcess.ACCEPT.ordinal()) { +// listType = TotReportProcess.ACCEPT.ordinal(); +// } else { +// listType = TotReportProcess.ALL.ordinal(); +// } +// } + + int count = 0; + + PrssReportsService prssService = new PrssReportsService(pm); + + Map params = new HashMap(); + params.put("docId", docID); + params.put("listType", listType); + params.put("findOption", innerFindOption); + params.put("filterValue", innerFindWord); + params.put("howSort", howSort); + params.put("sort", sort); + params.put("userId", usID); + + //˻ ڵ尹ȸ + prssService.createPrssOrganReportsSearchQuery(params); + + List list = null; + //ϴ ڵ尡 ϸ ȸ + list = prssService.executeQuery(PrssReportsVO.class); + + count = list.size(); + + int index = -1; + int slavePaddingLeft = 0; + for (int i = 0; i < count; i++) { + index = i; + + PrssReportsVO prssVO = (PrssReportsVO) list.get(i); + TotReportProcess process = (TotReportProcess) prssVO.getProcess(); + + if ("2".equals(prssVO.getDeptNo())) { + slavePaddingLeft = 30; + } else { + slavePaddingLeft = 0; + } + + int kkk = prssVO.getProcess().ordinal(); + String html = null; + if (process == TotReportProcess.COMP || process == TotReportProcess.TEMP) { + TotReport totReportVO = pm.getObjectById(TotReport.class, prssVO.getId()); + html = Excel.adjustFmlaToExcel(TagFilter.removeBlankPara(TotReportUtil.toHTML(totReportVO))); //ǥ ִ κ + } + %> + + + + + + + + + <% if ("Y".equals(prssVO.getIsAttachments())) { + %> + + + + + <%}%> + + +
    + + <%= prssVO.getOrganName() == null ? "" : prssVO.getOrganName()%>   + <%= prssVO.getDeptName() == null ? "" : prssVO.getDeptName()%>   + <%= prssVO.getOwnerName() == null ? "" : prssVO.getOwnerName()%>   + <%= prssVO.getProcess() == null ? "" : prssVO.getProcess()%> +
    +
    + <%= (process == TotReportProcess.COMP || process == TotReportProcess.TEMP) ? html : ""%> +
    +
    + <% + for (String fileName : prssVO.getAttachmentsMap(pm).keySet()) { + %> + &fileName=<%=URLEncoder.encode(fileName, "UTF-8")%>&reportID=<%=prssVO.getId()%>')"> + <%= MString.checkNull(fileName)%> + + + + <%}%> +
    + ---------------------------------------------------------------------------------------------------------------------------------------------------------- + <%} + tx.rollback(); + %> + +

    + + + + + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("alert('" + Moumi.getMessageBundle().getString("moumi.message.popup.requestAdmin") + "');")); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("history.back(-1);")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/documents/report/report_view_pop.jsp_org b/webapps/totsys/common/inc/documents/report/report_view_pop.jsp_org new file mode 100644 index 0000000..ce00c4b --- /dev/null +++ b/webapps/totsys/common/inc/documents/report/report_view_pop.jsp_org @@ -0,0 +1,367 @@ + +<% + /************************************************************@@ + * Program Name : doc_list.jsp + * Description : //// + * Author : ũ + * Create Date : 2010.11.25 + * History : + @@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.text.html.HtmlUtil" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.user.UserView" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.report.ReportView" + import="kr.co.kihyun.beans.totsys.report.ReportViewManager" + import="kr.co.kihyun.text.hml.Hwp" + import="kr.co.kihyun.text.html.HtmlUtil" + import="kr.co.kihyun.beans.totsys.report.tots.ReportsViewer" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.beans.totsys.doc.table.Table" + import="kr.co.kihyun.beans.totsys.doc.table.item.Item" + import="kr.co.kihyun.text.excel.Excel" + import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.lang.MLong" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*"%> +<%@page import="java.util.List"%> +<%@ page import="java.util.Map.Entry"%> +<%@page import="javax.jdo.Query"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% Logger LOG = LoggerFactory.getLogger(this.getClass()); + + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + /********* Parameter *********/ + Long reportID = MLong.parseLong(request.getParameter("reportID"), null); + TotReport totReport = pm.getObjectById(TotReport.class, reportID); + + // TODO: extract method. + String report = null; + if (totReport.getSlaveTotDoc() == null) { + report = TotReportUtil.toHTML(totReport); + } else { + TotDoc slaveDoc = totReport.getSlaveTotDoc(); + if (!slaveDoc.getCompReports(pm).isEmpty()) + report = TotReportUtil.toHTML(totReport.getTotDoc(), slaveDoc.getCompReports(pm)); + } + //report  ڷ + if (report == null) { + // out.println(ServletUtil.alert(Moumi.getMessageBundle().getString("moumi.message.popup.notReport"))); + // out.println(ServletUtil.getJavaScript("")); + return; + } + /********* report view *******/ + String note = MString.checkNull(totReport.getNote()); + String realFileName = ""; + String viewFileName = ""; + for (String fileName : totReport.getAttachments().keySet()) { + viewFileName += fileName + ";"; + realFileName += fileName + ";"; + } + Long downDocID = totReport.getSlaveTotDoc() == null ? null : totReport.getSlaveTotDoc().getId(); + + String[] realFileNameList = realFileName.split(";"); + String[] viewFileNameList = viewFileName.split(";"); + + // + String memo = MString.checkNull(totReport.getRecentHistory() == null ? null : totReport.getRecentHistory().getMemo()); + + String url = clearXSS(request.getParameter("url"), ""); + + if (url == null) { + url = ""; + } + int visit = 0; + + Board totperComment = totReport.getTotDoc().getBoard(); + + if (totperComment != null) { + tx.begin(); + visit = totperComment.getVisit(); + totperComment.setVisit(visit + 1); + pm.makePersistent(totperComment); + tx.commit(); + } +%> + + + + + + + + + + + + + + + + + + + + + + + + + <%if (downDocID != null && !MString.isNull(memo)) {%> + + + + <%}%> + + <% + if (realFileNameList.length != 0 && !MString.isNull(realFileNameList[0])) { + %> + + + + + + + + <% + } + %> +
    + <% + StringBuffer htm = null; + htm = new StringBuffer(); + htm.append(report); + + int tag_textinput_idx = 0; + + while (true) { //ڷԷâ ѱۿ ڽ ȹ̰ ̰ ϱ. + tag_textinput_idx = htm.indexOf("
    "); + if (tag_textinput_idx != -1) { + int serch_textinput = htm.indexOf("
    ", + tag_textinput_idx); + htm = htm.replace(serch_textinput, + serch_textinput + 18, + "

    "); + htm = htm.replace(tag_textinput_idx, + tag_textinput_idx + 58, + "

    "); + } else { + break; + } + } + + tag_textinput_idx = 0; + + while (true) { + tag_textinput_idx = htm.indexOf(""); + if (tag_textinput_idx != -1) { + int serch_textinput = htm.indexOf("
    ", + tag_textinput_idx); + htm = htm.replace(serch_textinput, + serch_textinput + 18, + "

    "); + htm = htm.replace(tag_textinput_idx, + tag_textinput_idx + 71, + "

    "); + } else { + break; + } + } + %> <% + if (downDocID != null) { + tx.begin(); + TotDoc totDoc = pm.getObjectById(TotDoc.class, downDocID); + String partID = totDoc.getDept(pm).getOrgan(pm) == null ? null : totDoc.getDept(pm).getOrgan(pm).getId(); + MDept organ = partID == null ? null : pm.getObjectById(MDept.class, partID); + int searchType = MInteger.parseInt(request.getParameter("searchType"), -1); + + List reportList = totDoc.getAllReports(pm); + List compReportList; + Query q = pm.newNamedQuery(TotReport.class, "CompReports"); + q.setFilter("totDoc == tot_doc"); + q.declareParameters("kr.co.kihyun.beans.entity.TotDoc tot_doc"); + q.setOrdering("mDept"); + compReportList = (List) q.execute(totDoc); + if (searchType >= 0) { + if (searchType == TotReportProcess.COMP.ordinal()) { + reportList = compReportList; + } else if (searchType == TotReportProcess.ACCEPT.ordinal()) { + q = pm.newQuery(TotReport.class, reportList); + q.setFilter("process == kr.co.kihyun.beans.entity.TotReportProcess.ACCEPT"); + q = pm.newQuery(TotReport.class, (List) q.execute()); + q.setFilter("totDoc == tot_doc"); + q.declareParameters("kr.co.kihyun.beans.entity.TotDoc tot_doc"); + q.setOrdering("mDept"); + reportList = (List) q.execute(totDoc); + } else { + q = pm.newQuery(TotReport.class, reportList); + q.setFilter("totDoc == tot_doc"); + q.declareParameters("kr.co.kihyun.beans.entity.TotDoc tot_doc"); + q.setOrdering("mDept"); + reportList = (List) q.execute(totDoc); + } + } + + int reportCount = reportList.size(); + for (int d = 0; d < reportCount; d++) { + %> + + + + + + + + + + + + + + <% if(!reportList.get(d).getAttachments().isEmpty()) { %> + + + + + + + <% } %> + + + + + + +
    + <%= reportList.get(d).getDept(pm).getOrgan(pm) == null ? "" : reportList.get(d).getDept(pm).getOrgan(pm).getName()%>   + <%= reportList.get(d).getDept(pm) == null ? "" : reportList.get(d).getDept(pm).getName()%>   + <%= reportList.get(d).getDept(pm) == null ? "" : reportList.get(d).getDept(pm).getName()%>
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.add")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.file")%>
    + <% + for (String fileName : reportList.get(d).getAttachments().keySet()) { + %> &fileName=<%=URLEncoder.encode(MString.checkNull(fileName), "UTF-8")%>&reportID=<%=reportList.get(d).getId() %>" + target="new"><%= MString.checkNull(fileName)%> + <% + } + %> +
    +
    + <%=Excel.adjustFmlaToExcel(TagFilter.removeBlankPara(TotReportUtil.toHTML(reportList.get(d))))%>
    +
    + <% + } + tx.rollback(); + } else { + %> +

    + <%=report.replaceAll("
    + <% + } + %> +
    + + + <%if (downDocID != null && !MString.isNull(memo)) {%> + + + + + <%}%> + +
    <%=TotDocType.SUB_DOC%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.modify")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.content")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.view")%>
    +
    + +
    + + + + + +
    [<%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.add")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.file")%>]
    +
    +
    + + <%if (realFileNameList[0] != null && realFileNameList[0] != "") { + for (int i = 0; i < realFileNameList.length; i++) { + if (i == 0) {%> + <%}%> + + + + <%} + }%> + + + +
    +<%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.add")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.file")%> + <%=(i + 1)%>   &fileName=<%=URLEncoder.encode(realFileNameList[i], "UTF-8")%>&reportID=<%=totReport.getId()%>" + target="hiddenFrame"><%= viewFileNameList[i]%>
    +

    <%=HtmlUtil.toHtml(note)%>

    +
    +
    +
    + + + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("alert('" + Moumi.getMessageBundle().getString("moumi.message.popup.requestAdmin") + "');")); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("history.back(-1);")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/documents/report/report_view_print.jsp b/webapps/totsys/common/inc/documents/report/report_view_print.jsp new file mode 100644 index 0000000..2de6bcc --- /dev/null +++ b/webapps/totsys/common/inc/documents/report/report_view_print.jsp @@ -0,0 +1,124 @@ +<% /** + * **********************************************************@@ Program Name + * : doc_list.jsp Description : //// Author : ũ Create + * Date : 2010.11.27 History : + * @@*********************************************************** + */ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.text.html.HtmlUtil" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.user.UserView" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.report.ReportView" + import="kr.co.kihyun.beans.totsys.report.ReportViewManager" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + /** + * ******* Parameter ******** + */ + Long reportID = MLong.parseLong(request.getParameter("reportID"), null); + TotReport totReport = pm.getObjectById(TotReport.class, reportID); + + tx.begin(); + + /** + * ******* report ******** + */ + ReportViewManager reportViewManager = new ReportViewManager(totReport.getTotDoc()); + reportViewManager.setReportData(totReport.getDept(pm).getId(), totReport.getUser(pm).getId()); + + tx.rollback(); + + String docName = reportViewManager.getDocName(); + + String report = reportViewManager.getReport(); + String savePath = Moumi.getRepoPerRoot().getPath() + "/fileUpload";//// ε ӽ + + if (report == null) { + out.println(ServletUtil.alert(Moumi.getMessageBundle().getString("moumi.message.popup.notReportDoc"))); + out.println(ServletUtil.getJavaScript("history.go(-1);")); + return; + } +%> + + + <%=docName%> + + + + + + + + +
    <%= TagFilter.borderFilter(report.replaceAll(" +
    + + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/documents/tot_doc/base_info_modify.jsp b/webapps/totsys/common/inc/documents/tot_doc/base_info_modify.jsp new file mode 100644 index 0000000..86c3ff9 --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_doc/base_info_modify.jsp @@ -0,0 +1,1176 @@ +<% /** + * ********************************************************** + * @@ Program Name : base_info_modify.jsp + * @@ Description : 蹮 ⺻ + * @@ Author : ũ + * @@ Create Date : 2010-11-24 + * @@ History : + * @@*********************************************************** + */ +%> + +<%@ page contentType="text/html; charset=UTF-8" + import="java.util.Date" + import="java.util.List" + import="java.text.SimpleDateFormat" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Query" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.report.ReportList" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MInteger" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.beans.user.DeptView" + import="kr.co.kihyun.util.MDate" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.service.PrssReportsService" + import="kr.co.kihyun.service.vo.CodeVO" + import="kr.co.kihyun.beans.entity.Board" + import="kr.co.kihyun.beans.entity.TotDocAppendType" + import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory"%> +<%@ page import="java.util.Map.Entry"%> +<%@ page import="kr.co.kihyun.moumi.Moumi"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% Logger LOG = LoggerFactory.getLogger(this.getClass()); + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + /** + * ******** session userId ********* + */ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); +// Ƿ ּó, +// String deptID = HttpSSOLogin.getDeptID(request); +//-------------------------- + + /** + * ******** ÷ ߰ ********* + */ + String notify = ""; + if ((String) session.getAttribute("notify") != "" || (String) session.getAttribute("notify") != null) { + notify = (String) session.getAttribute("notify"); + } + notify = MString.checkNull(request.getParameter("notify"), ""); + +// Ƿ ּó, +// Long boardID = MLong.parseLong(request.getParameter("boardID")); +//-------------------------- + /** + * **߰** + */ + + + /** + * **** Parameter ***** + */ + String url_sysadm = clearXSS(request.getParameter("url"), ""); + Long docID = MLong.parseLong(request.getParameter("docID"), null); + String redirectURI = clearXSS(request.getParameter("redirectURI"), ""); + //LJH + //String deptListView = clearXSS(request.getParameter("deptListView"),""); + String deptListView = clearXSS(request.getParameter("deptListView"), "true"); + String docType = clearXSS(request.getParameter("docType"), null); + + tx.begin(); + /** + * **** Doc list data get ***** + */ + TotDoc pc = pm.getObjectById(TotDoc.class, docID); + TotDoc totDoc = pm.detachCopy(pc); + totDoc = pm.getObjectById(TotDoc.class, docID); + String docName = pc.getName(); + ExecutionCode execCode = pc.getExecutionCode(); + String regID = pc.getUser(pm).getId(); + Date startDate = pc.getStartDate() == null ? new Date() : pc.getStartDate(); + String stDate = new SimpleDateFormat("yyyy-MM-dd").format(startDate); + String stTime = new SimpleDateFormat("HH").format(startDate); + Date endDate = pc.getEndDate(); + AccessAuth accAuth = pc.getAccessAuth(); + AcceptanceLimitStrategy strategy = pc.getAcceptanceLimitStrategy(); + TotDocProcess prss = pc.getProcess(pm); + int docGroupID = pc.getType().ordinal(); + Long repID = pc.getMasterTotDoc() == null ? null : pc.getMasterTotDoc().getId(); + MDept mDept = pm.getObjectById(MDept.class, pc.getDept()); + + TotDocAppendType appendType = pc.getAppendType(); + +// TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); +// String docName = totDoc.getName(); +// ExecutionCode execCode = totDoc.getExecutionCode(); +// String regID = totDoc.getUser(pm).getId(); +// Date startDate = totDoc.getStartDate() == null ? new Date() : totDoc.getStartDate(); +// String stDate = new SimpleDateFormat("yyyy-MM-dd").format(startDate); +// String stTime = new SimpleDateFormat("HH").format(startDate); +// Date endDate = totDoc.getEndDate(); +// AccessAuth accAuth = totDoc.getAccessAuth(); +// AcceptanceLimitStrategy strategy = totDoc.getAcceptanceLimitStrategy(); +// TotDocProcess prss = totDoc.getProcess(pm); +// int docGroupID = totDoc.getType().ordinal(); +// Long repID = totDoc.getMasterTotDoc() == null ? null : totDoc.getMasterTotDoc().getId(); + + tx.rollback(); + + /** + * ******** , , , ********* + */ + Date currentDate = new Date(); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat hourFormat = new SimpleDateFormat("HH"); + String edDate = dateFormat.format(endDate); + String edTime = hourFormat.format(endDate); + String curDate = dateFormat.format(currentDate); + String curTime = hourFormat.format(currentDate); + + String setTheTime = totDoc.getProcess(pm) == TotDocProcess.REG ? "" : totDoc.getProcess(pm) == TotDocProcess.END ? "" : ""; + Report report = new Report(); + int allReportCount = report.getAllCount(docID); + + + //2014.10.14 Delete by KWON,HAN : Ʒ Ͽ Ƿ ּ +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// PrssReportsService prssService = new PrssReportsService(pm); +// +// String deptIDs = ""; +// String deptNames = ""; +// +// List list = null; +// list = prssService.getReportDeptListByDocId(docID); +// int listCount = list.size(); +// +// if( list != null && list.size() > 0 ) { +// for (int i = 0; i < listCount; i++) { +// CodeVO codeVO = (CodeVO)list.get(i); +// if (i != 0) { +// deptIDs += "," + codeVO.getCode(); +// deptNames += "," + codeVO.getValue(); +// } else { +// deptIDs = codeVO.getCode(); +// deptNames = codeVO.getValue(); +// } +// } +// } +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + + + String boardTitle = ""; + String boardContents = ""; + String usrFilenames = ""; + String svrFilenames = ""; + int fileCount = 0; + String[] usrFilenameList = null; + String[] svrFilenameList = null; + +// mode = MString.checkNull(request.getParameter("mode")); + + Board board = pc.getBoard(); + + if (board != null) { +// tx.begin(); + boardTitle = board.getTitle(); + boardContents = TagFilter.convertSpace(MString.checkNull(board.getContents())); + //÷ κп ӵ : Ͽ뷮 ޴´ + for (Entry> entry : board.getAttachments().entrySet()) { + usrFilenames += entry.getKey() + ";"; + svrFilenames += entry.getKey() + ";"; + } + //fileCount = board.getAttachments().size(); + + usrFilenameList = usrFilenames.split(";"); + svrFilenameList = svrFilenames.split(";"); + if(!"".equals(svrFilenames)) { + fileCount = usrFilenameList.length; + } +// visit = board.getVisit(); +// board.setVisit(visit + 1); +// pm.makePersistent(board); +// tx.commit(); + } + + /** + * ****÷κ ߰ ***** + */ +// Ƿ ּó, +// String boardGroupID = Category.ID_TOT_DOC_COMMENT; +// String url = clearXSS(request.getParameter("url"), ""); +//-------------------------- + +// String[] usrFilenameList = usrFilenames.split(";"); +// String[] svrFilenameList = svrFilenames.split(";"); + + /** + * ****߰***** + */ + //System.out.println("execCode.getDeptName()=" + execCode.getDeptName()); +%> + + + + + + + + + + + + + + + + + + + + + +
    + + + + <% if (url_sysadm.equals("mmprss")) {%> + + <%}%> +
    + +
    + + + + +
    +
    + + + +
    + +
    + + + +
    + +
    + + + + +<% if("".equals(setTheTime)) { %> + + + + +<% } else { %> + + +<% } %> + + + + + + + + + + + + + + + + <% + if (!deptListView.equals("false")) { + %> + + <% + } + %> + + + + ۸Ӹ<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.information")%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.doc")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.name")%> + + + + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.executionCode")%> + <%= (execCode != null && execCode.getDeptName() != null) ? execCode.getDeptName() : mDept.getName()%> + +
    + <%= TotDocType.FORM_DOC%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.form")%> + + + + + + + + <%=MoumiConfig.getMessageBundle().getString("moumi.message.doc")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.type.share")%> + + + + + +
    + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.dataInputDevision")%> + + + + + +
    + + + <%=MoumiConfig.getMessageBundle().getString(" valign="absmiddle" /> + + + +
    +
    + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.input")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.trick")%> + + + + <%=MoumiConfig.getMessageBundle().getString(" /> + + + + <%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.add")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.file")%> + + <%int i; + for (i = 0; i < (svrFilenameList.length); i++) { + if (svrFilenameList[i] != null && !svrFilenameList[i].equals("")) {%> + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.file")%><%= (i + 1)%> : + + &fileName=<%=URLEncoder.encode(svrFilenameList[i], "UTF-8")%>&docID=<%=docID%>" target="hiddenIframe"><%= usrFilenameList[i]%>
    + <%} else {%> +   + <%}%> + <%}%> + +
    + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.endMethod")%> + + +<% if("".equals(setTheTime)) { %> + + + + onclick="showSetWin('dform.stDate');" <%}%> + style="cursor: hand;" class="inputtxt"><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.day")%>  + <% if (strategy instanceof LimitByDeadlineStrategy) {%> + + <%}%> + + <% if (strategy instanceof LimitByDeadlineStrategy) {%> + + <%}%> +   + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.time")%> + ~ + + onclick="showSetWin('dform.edDate');" <%}%> + style="cursor: hand;" class="inputtxt"><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.day")%>  + <% if (strategy instanceof LimitByDeadlineStrategy) {%> + + <%}%> + + <% if (strategy instanceof LimitByDeadlineStrategy) {%> + + <%}%> +   + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.time")%> + + <% } else if("".equals(setTheTime)){ %> + + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.startDate")%> : <%= stDate%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.day")%> <%= stTime%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.time")%> + + + + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.day")%>  + + + +   + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.time")%> + + <% } else { %> + + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.startDate")%> : <%= stDate%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.day")%> <%= stTime%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.time")%> + + + + onclick="showSetWin('dform.edDate');" <%}%> + style="cursor: hand;" class="inputtxt"><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.day")%>  + <% if (strategy instanceof LimitByDeadlineStrategy) {%> + + <%}%> + + <% if (strategy instanceof LimitByDeadlineStrategy) {%> + + <%}%> +   + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.time")%> + +<% } %> + + + ;"> + + <%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.coporation")%> + + +
    + + + + +   + + + + + <% if (totDoc.getProcess(pm).equals(TotDocProcess.PRSS) || totDoc.getProcess(pm).equals(TotDocProcess.REG)) {%> + + + +
    + + + <%= MoumiConfig.getMessageBundle().getString(" /> + + <%}%> + <% if (totDoc.getProcess(pm) != TotDocProcess.PRSS) { + %> + + + <%= MoumiConfig.getMessageBundle().getString(" /> + + <% }%> + + + <%= MoumiConfig.getMessageBundle().getString(" /> + +
    + + +   + + <%if(appendType!=TotDocAppendType.FILE){ %> + + + + + + + + + +
    ۸Ӹ + <%=TotDocProcess.FORM%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.info")%> +   
    + + + + + + + + + + + + + + + <%} %> + + + + + + + + + + + + <% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } + %> diff --git a/webapps/totsys/common/inc/documents/tot_doc/form_config.jsp b/webapps/totsys/common/inc/documents/tot_doc/form_config.jsp new file mode 100644 index 0000000..eaa3e63 --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_doc/form_config.jsp @@ -0,0 +1,1106 @@ +<%@ page contentType="text/html; charset=UTF-8" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="java.text.SimpleDateFormat" + import="java.util.*" + import="java.util.regex.*" + import="java.io.StringReader" + import="javax.swing.text.html.parser.ParserDelegator" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.text.html.HtmlUtil" + import="kr.co.kihyun.text.excel.CalculationForm" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.text.html.CallbackHandler" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.doc.table.MTable" + import="kr.co.kihyun.moumi.doc.table.MTableType" + import="kr.co.kihyun.moumi.doc.table.TableDefine" + import="kr.co.kihyun.moumi.doc.table.TableCreation" + import="kr.co.kihyun.moumi.doc.table.item.MItem" + import="kr.co.kihyun.moumi.doc.table.item.MItemInfo" + import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.moumi.report.MReport" + import="java.util.ResourceBundle" + import="kr.co.kihyun.moumi.MoumiConfig"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<%@ include file="/totsys/common/inc/documents/tot_doc/reload_expr.jsp"%> +<% + try { + /********** parameter **********/ + request.setCharacterEncoding("UTF-8"); + String docName = URLDecoder.decode(MString.checkNull(request.getParameter("docName")), "UTF-8"); + String execNum = MString.checkNull(request.getParameter("execNum")); + String execDate = MString.checkNull(request.getParameter("execDate")); + String appendType = MString.checkNull(request.getParameter("appendType")); + + String deptNames = URLDecoder.decode(MString.checkNull(request.getParameter("deptNames")), "UTF-8"); + String usrFilenames = URLDecoder.decode(MString.checkNull(request.getParameter("usrFilenames")), "UTF-8"); + String svrFilenames = URLDecoder.decode(MString.checkNull(request.getParameter("svrFilenames")), "UTF-8"); + String tableTypes = clearXSS(request.getParameter("tableTypes"), ""); + String itemExprs = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemExprs")), "UTF-8"), ""); + String itemTypes = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemTypes")), "UTF-8"), ""); + String backDash = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("backDash")), "UTF-8"), ""); + String docForm = HtmlUtil.toLowerCase((String) session.getAttribute("docForm")); + System.out.println("docForm 222222 \n" + docForm); + String tableForm = MReport.getRemoveErrTable(docForm); + System.out.println("tableForm 222222 \n" + tableForm); + + boolean quotationCheck = true; + quotationCheck = TagFilter.quotationCheckForm(tableForm); + if (quotationCheck == false) { + out.println(ServletUtil.alert(MoumiConfig.getMessageBundle().getString("moumi.message.popup.tableSymboleCheck"))); + out.println(ServletUtil.getJavaScript("windwos.history.go(-1);")); + + } + /********** Ľ **********/ + //ø String Reader ̿ؼ д´. + CallbackHandler cbHandler = new CallbackHandler(); + int inx1=docForm.indexOf("-1) + { + int inx2=docForm.indexOf("/>",inx1); + inx2=inx2+2; + String t1=docForm.substring(0,inx1); + String t2=docForm.substring(inx2); + docForm=t1+t2; + } + new ParserDelegator().parse(new StringReader(MTable.getTables(docForm)), cbHandler, true); + + List> tdList = cbHandler.getTDs(); + int tdCount = tdList.size(); + + //ǥ .. + if (tdCount < 1) { + out.println(""); + return; + } + + // 迭 + int allRowCount = 0; + int allColCount = 0; + int rowCount = 0; + int colCount = 0; + for (int i = 0; i < tdCount; i++) { + rowCount = Integer.parseInt(tdList.get(i).get("row")); + colCount = Integer.parseInt(tdList.get(i).get("col")); + if (allRowCount < rowCount) + allRowCount = rowCount; + if (allColCount < colCount) + allColCount = colCount; + } + + ++allRowCount; //迭̶ 0 Ѵ. + ++allColCount; //迭̶ 0 Ѵ. + + // ִ Text tdTextList 迭 Ѵ. + boolean isDynaTable = true; + + String tdName = ""; + String tableNumList = ""; + String tdText = ""; + String tdTextList[][] = new String[allRowCount][allColCount]; + StringBuffer itemValueListBuff = new StringBuffer(); + MTableType tableType = new MTableType(allRowCount); //table type value + + Long reuseDocID = MLong.parseLong(request.getParameter("reuseDocID"), null); + //System.out.println("============================================================================= "+reuseDocID); + //reuseDocID = ""; + String[] itemNameList = null; + String[] itemExprList = null; + int[] itemTypeList = null; + + if (!MString.isNull(itemTypes)) { + + isDynaTable = !clearXSS(request.getParameter("isDynaTable"), "").equals("false"); + + MItemInfo itemInfo = new MItemInfo(); + + itemInfo.itemInfo( + clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemNames")), "UTF-8"), + ""), + clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemSizes")), "UTF-8"), + ""), + itemExprs, + clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemDescs")), "UTF-8"), + ""), + itemTypes, + clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("tableNums")), "UTF-8"), + ""), + clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("colNums")), "UTF-8"), ""), + clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("rowNums")), "UTF-8"), ""), + 10); + itemNameList = itemInfo.getItemNameList(); + itemExprList = itemInfo.getItemExprList(); + itemTypeList = itemInfo.getItemTypeList(); + + int[] itemNumList = itemInfo.getItemNumList(); + int[] itemSizeList = itemInfo.getItemSizeList(); + String[] itemDescList = itemInfo.getItemDescList(); + + int[] intTableNumList = itemInfo.getTableNumList(); + int[] rowNumList = itemInfo.getRowNumList(); + int[] colNumList = itemInfo.getColNumList(); + + if (backDash.equals("back")) //ܰ ̵ İ ȯ + itemExprs = reloadExpr(itemExprs, itemExprList, itemNameList); + + for (int i = 0; i < itemNameList.length; i++) { + itemValueListBuff.append("totForm.itemList[" + i + "].itemName = '" + itemNameList[i] + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].size = '';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].tableNum = '" + + Integer.toString(intTableNumList[i]) + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].rowNum = '" + rowNumList[i] + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].colNum = '" + colNumList[i] + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].desc = '" + itemDescList[i] + "';\n"); + itemValueListBuff + .append("totForm.itemList[" + + i + + "].type = '" + + getTypeName(TotDocAppendType.valueOf(appendType) == TotDocAppendType.FILE ? MItem.TITLE + : itemTypeList[i]) + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].expr = '" + itemExprList[i] + "';\n"); + } + } else { + // ====================================================================== ź...ѱ... + + if (reuseDocID != null) + { + ItemList itemList = new ItemList(); + //v2. 13.SQL : itemList.executeQuery() prepare SQL Ǿ ִ. + itemList.executeQuery(reuseDocID); + //================ + itemTypeList = itemList.getTypeList(); + itemExprList = itemList.getExprList(); + } else { itemExprList = CalculationForm.getExprList(tableForm).toArray(new String[tdCount]); } + + if (backDash.equals("back")) + itemExprs = reloadExpr(itemExprs, itemExprList, itemNameList); + + for (int i = 0; i < tdCount; i++) + { + tdName = tdList.get(i).get("name"); + tableNumList = tdList.get(i).get("table"); + tdText = tdList.get(i).get("text"); + // ϶.. + //  , ù° "emptyempty" Ѿ ... + int colNum = Integer.parseInt(tdList.get(i).get("col")); + int rowNum = Integer.parseInt(tdList.get(i).get("row")); + tdTextList[rowNum][colNum] = tdText; + //Item Ҷ Excel 1 ϱ 1 ߰ + ++colNum; ++rowNum; + itemValueListBuff.append("totForm.itemList[" + i + "].itemName = '" + tdName + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].size = '';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].tableNum = '" + tableNumList + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].rowNum = '" + rowNum + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].colNum = '" + colNum + "';\n"); + //out.println(itemValueListBuff.append("totForm.itemList[" + i + "].size = '';\n")); + //// ΰ empty ڷ ٲ۴. Է¼ νѴ. + + if (tdText != null && tdText.trim().equals("")) { + + itemValueListBuff.append("totForm.itemList[" + i + "].desc = 'empty';\n"); + tableType.setStartTRNum(rowNum); + } else if (tdText != null && !MString.isNull(itemExprList[i])) { + + itemValueListBuff.append("totForm.itemList[" + i + "].desc = 'empty';\n"); + tableType.setStartTRNum(rowNum); + tableForm = TagFilter.deleteTdText(tableForm, i); + + } else { + tdText = tdText.replaceAll("\'", "\""); + if (tdText.indexOf("<") > 0 && tdText.indexOf("/>") > 0) + { + itemValueListBuff.append("totForm.itemList[" + i + "].desc = 'empty';\n"); + } + else + { + itemValueListBuff.append("totForm.itemList[" + i + "].desc = '" + tdText + "';\n"); + } + } + + itemValueListBuff + .append("totForm.itemList[" + + i + + "].type = '" + + (reuseDocID == null ? MItem + .getTypeName(TotDocAppendType.valueOf(appendType) == TotDocAppendType.FILE ? MItem.TITLE + : MItem.INT) + : MItem.getTypeName(TotDocAppendType.valueOf(appendType) == TotDocAppendType.FILE ? MItem.TITLE + : itemTypeList[i])) + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].expr = '" + + MString.checkNull(itemExprList[i]).replaceAll("'", "\\'") + "';\n"); + } + + // ǥ ǥ ľ boolean + isDynaTable = tableType.isDynaTable(); + } + + /********** form ͸ **********/ + int sumSusig = TagFilter.getSumSusig(tableForm); + int comboBox = TagFilter.getComboBox(tableForm); + + if (!backDash.equals("back")) {//ܰ ƿ° ƴҶ . + if (sumSusig != -1) + itemValueListBuff.append(CalculationForm.getCalculationForms("totForm.itemList", "expr", + tableForm)); + } + if (comboBox != -1) + itemValueListBuff.append(TagFilter.excelComboBoxImport(tableForm)); + int tableCount = HtmlUtil.getTableCount(tableForm); + + tableForm = TagFilter.tdTextToSpace(tableForm); + byte[] formBytes = docForm.getBytes(); + + session.setAttribute("docForm", tableForm); + TableDefine tableDefine = new TableDefine(); + + String strTableInfo = tableDefine.insertDiv(tableForm, tdList, cbHandler.getTRCount()); + +%> + + + + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + + + + + + + + + + + + + + +');configStart(); scrollObjectContent('formDiv');"> + +
    + + + + + + + + + +
    + + + + +
    +
    ; overflow-x: auto;"> + + <%if(!appendType.equals("FILE")) { %> + <%= TableCreation.insertTypeButtons("totForm",strTableInfo, tableTypes) %> + <% } %> + +
    + + +
    +
    + + + <%= MoumiConfig.getMessageBundle().getString(" /> + + + + +   ׽Ʈմϴ. + + + + + ڷᰡ ӽǸ ڷ Ͽ ϴ. + + + + +      踦 մϴ. + + +
    +
    + + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil + .getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + } +%> diff --git a/webapps/totsys/common/inc/documents/tot_doc/form_config_form.jsp b/webapps/totsys/common/inc/documents/tot_doc/form_config_form.jsp new file mode 100644 index 0000000..77ab6e1 --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_doc/form_config_form.jsp @@ -0,0 +1,464 @@ +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="java.util.*" + import="java.net.URLDecoder" + import="java.io.StringReader" + import="javax.swing.text.html.parser.ParserDelegator" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.util.Stopwatch" + import="kr.co.kihyun.text.html.HtmlUtil" + import="kr.co.kihyun.text.excel.Excel" + import="kr.co.kihyun.text.excel.CalculationForm" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.text.html.CallbackHandler" + import="kr.co.kihyun.moumi.MoumiConfig" + autoFlush="" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.doc.table.MTable" + import="kr.co.kihyun.moumi.doc.table.MTableType" + import="kr.co.kihyun.moumi.doc.table.TableDefine" + import="kr.co.kihyun.moumi.doc.table.TableCreation" + import="kr.co.kihyun.moumi.doc.table.item.MItem" + import="kr.co.kihyun.moumi.doc.table.item.MItemInfo" + import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<%@ include file="/totsys/common/inc/documents/tot_doc/reload_expr.jsp"%> +<% + try { + /********** parameter **********/ + request.setCharacterEncoding("euc-kr"); + String docName = URLDecoder.decode(MString.checkNull(request.getParameter("docName")), "UTF-8"); + String tableTypes = clearXSS(request.getParameter("tableTypes"), ""); + String itemExprs = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemExprs")), "UTF-8"), ""); + String itemTypes = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemTypes")), "UTF-8"), ""); + String backDash = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("backDash")), "UTF-8"), ""); + String docForm = HtmlUtil.toLowerCase((String) session.getAttribute("docForm")); + String tableForm = docForm; + + tableForm = tableForm.replaceAll("

     ", ""); + + /********** Ľ **********/ + //ø String Reader ̿ؼ д´. + CallbackHandler cbHandler = new CallbackHandler(); + + new ParserDelegator().parse(new StringReader(MTable.getTables(docForm)), cbHandler, true); + List> tdList = cbHandler.getTDs(); + int tdCount = tdList.size(); + + //ǥ .. + if (tdCount < 1) { + out.println(""); + return; + } + + // 迭 + int allRowCount = 0; + int allColCount = 0; + int rowCount = 0; + int colCount = 0; + for (int i = 0; i < tdCount; i++) { + rowCount = Integer.parseInt(tdList.get(i).get("row")); + colCount = Integer.parseInt(tdList.get(i).get("col")); + if (allRowCount < rowCount) + allRowCount = rowCount; + if (allColCount < colCount) + allColCount = colCount; + } + + ++allRowCount; //迭̶ 0 Ѵ. + ++allColCount; //迭̶ 0 Ѵ. + + // ִ Text tdTextList 迭 Ѵ. + boolean isDynaTable = true; + + String tdName = ""; + String tableNumList = ""; + String tdText = ""; + String tdTextList[][] = new String[allRowCount][allColCount]; + StringBuffer itemValueListBuff = new StringBuffer(); + MTableType tableType = new MTableType(allRowCount); //table type value + + Long reuseDocID = ((Long) session.getAttribute("reuseDocID")); + + String[] itemNameList = null; + String[] itemExprList = null; + int[] itemTypeList = null; + + if (!MString.isNull(itemTypes) && !itemTypes.equals("")) { + isDynaTable = !clearXSS(request.getParameter("isDynaTable"), "").equals("false"); + + MItemInfo itemInfo = new MItemInfo(); + + itemInfo.itemInfo( + clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemNames")), "UTF-8"), ""), + clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemSizes")), "UTF-8"), ""), + itemExprs, clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("itemDescs")), "UTF-8"), ""), + itemTypes, clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("tableNums")), "UTF-8"), ""), + clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("colNums")), "UTF-8"), ""), + clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("rowNums")), "UTF-8"), ""), + 10 + ); + itemNameList = itemInfo.getItemNameList(); + itemExprList = itemInfo.getItemExprList(); + itemTypeList = itemInfo.getItemTypeList(); + + int[] itemNumList = itemInfo.getItemNumList(); + int[] itemSizeList = itemInfo.getItemSizeList(); + String[] itemDescList = itemInfo.getItemDescList(); + int[] intTableNumList = itemInfo.getTableNumList(); + int[] rowNumList = itemInfo.getRowNumList(); + int[] colNumList = itemInfo.getColNumList(); + + if (backDash.equals("back")) //make by #ܰ ̵ İ ȯ + itemExprs = reloadExpr(itemExprs, itemExprList, + itemNameList); + + for (int i = 0; i < itemNameList.length; i++) { + itemValueListBuff.append("totForm.itemList[" + i + "].itemName = '" + itemNameList[i] + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].size = '';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].tableNum = '" + Integer.toString(intTableNumList[i]) + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].rowNum = '" + rowNumList[i] + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].colNum = '" + colNumList[i] + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].desc = '" + itemDescList[i] + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].type = '" + getTypeName(itemTypeList[i]) + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].expr = '" + itemExprList[i] + "';\n"); + } + } else { + if (reuseDocID != null) { + ItemList itemList = new ItemList(); + itemList.executeQuery(reuseDocID); + itemTypeList = itemList.getTypeList(); + itemExprList = itemList.getExprList(); + } else { + itemExprList = CalculationForm.getExprList(tableForm).toArray(new String[tdCount]); + } + + for (int i = 0; i < tdCount; i++) { + tdName = tdList.get(i).get("name"); + tableNumList = tdList.get(i).get("table"); + tdText = tdList.get(i).get("text"); + + // ϶.. + //  , ù° "emptyempty" Ѿ ... + int colNum = Integer.parseInt(tdList.get(i).get("col")); + int rowNum = Integer.parseInt(tdList.get(i).get("row")); + + tdTextList[rowNum][colNum] = tdText; + + //Item Ҷ Excel 1 ϱ 1 ߰ + ++colNum; + ++rowNum; + itemValueListBuff.append("totForm.itemList[" + i + "].itemName = '" + tdName + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].size = '';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].tableNum = '" + tableNumList + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].rowNum = '" + rowNum + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].colNum = '" + colNum + "';\n"); + + //// ΰ empty ڷ ٲ۴. + if (tdText != null && tdText.trim().equals("")) { + itemValueListBuff.append("totForm.itemList[" + i + "].desc = 'empty';\n"); + tableType.setStartTRNum(rowNum); + } else if (tdText != null && !MString.isNull(itemExprList[i])) { + itemValueListBuff.append("totForm.itemList[" + i + "].desc = 'empty';\n"); + tableType.setStartTRNum(rowNum); + tableForm = TagFilter.deleteTdText(tableForm, i); + } else { + tdText = tdText.replaceAll("\'", "\""); + if (tdText.indexOf("<") > 0 + || tdText.indexOf("/>") > 0) + itemValueListBuff.append("totForm.itemList[" + i + "].desc = 'empty';\n"); + else + itemValueListBuff.append("totForm.itemList[" + i + "].desc = '" + tdText + "';\n"); + } + + itemValueListBuff + .append("totForm.itemList[" + i + "].type = '" + + (reuseDocID == null ? MItem.getTypeName(MItem.INT) : MItem.getTypeName(itemTypeList[i])) + + "';\n"); + itemValueListBuff.append("totForm.itemList[" + i + "].expr = '" + + MString.checkNull(itemExprList[i]).replaceAll("'", "\\'") + "';\n"); + } + + // ǥ ǥ ľ + isDynaTable = tableType.isDynaTable(); + } + /********** form ͸ **********/ + int sumSusig = TagFilter.getSumSusig(tableForm); + int comboBox = TagFilter.getComboBox(tableForm); + + if (!backDash.equals("back")) {//ܰ ƿ° ƴҶ . + if (sumSusig != -1) + itemValueListBuff.append(CalculationForm.getCalculationForms("totForm.itemList", "expr", tableForm)); + } + if (comboBox != -1) + itemValueListBuff.append(TagFilter.excelComboBoxImport(tableForm)); + int tableCount = HtmlUtil.getTableCount(tableForm); + + tableForm = TagFilter.tdTextToSpace(tableForm); + byte[] formBytes = docForm.getBytes(); + session.setAttribute("docForm", tableForm); + TableDefine tableDefine = new TableDefine(); + String strTableInfo = tableDefine.insertDiv(tableForm, tdList, cbHandler.getTRCount()); +%> + + + + + + + +');configStart();scrollObjectContent('formDiv');"> + + + + + + + + + + + + + + +
    + + + + +
    +
    ; overflow-x: auto;"> + + <%=TableCreation.insertTypeButtons("totForm", + strTableInfo, tableTypes)%> +
    +
    +
    + + + + + + + + + + + + +
     
    + + +

    "> "> "> "> + +"> +"> "> "> +"> + +
    +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + } +%> diff --git a/webapps/totsys/common/inc/documents/tot_doc/form_view.jsp b/webapps/totsys/common/inc/documents/tot_doc/form_view.jsp new file mode 100644 index 0000000..4cbe69b --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_doc/form_view.jsp @@ -0,0 +1,69 @@ +<%@page import="javax.jdo.PersistenceManager"%> +<% +/************************************************************@@ + * Program Name : doc_list.jsp + * Description : //// + * Author : ũ + * Create Date : 2004.10.11 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.beans.user.UserView" + + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +try{ + /******* Parameter *********/ + Long docID = MLong.parseLong(request.getParameter("docID"),null); + String type = MString.checkNull(request.getParameter("type")); + /*********** Doc View vlaues ***********/ + String docName = ""; + String docForm = ""; + boolean isDynaTable = false; + + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + docForm = TagFilter.convertSpace(totDoc.getForm()); + %> + + + + + + + +
    + + + + + + +
    +
    ; height: <%if(type.equals("totper")){%><%=session.getAttribute("totperDocViewHeight") %><%}else if(type.equals("repoper")){%><%=session.getAttribute("repoperViewHeight")%><%}else{%><%=session.getAttribute("totperFormDocViewHeight") %><%}%>; overflow-x: auto; overflow-y: auto;"> + + <%= docForm %> +
    +
    +
    + + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ + pm.close(); +} +%> \ No newline at end of file diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/bt_cancel3.gif b/webapps/totsys/common/inc/documents/tot_doc/images/bt_cancel3.gif new file mode 100644 index 0000000..37a7cd7 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/bt_cancel3.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/bt_enter.gif b/webapps/totsys/common/inc/documents/tot_doc/images/bt_enter.gif new file mode 100644 index 0000000..2ad918b Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/bt_enter.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/bt_gop.gif b/webapps/totsys/common/inc/documents/tot_doc/images/bt_gop.gif new file mode 100644 index 0000000..70d2b5e Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/bt_gop.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/bt_minus.gif b/webapps/totsys/common/inc/documents/tot_doc/images/bt_minus.gif new file mode 100644 index 0000000..1bc1afc Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/bt_minus.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/bt_nanugi.gif b/webapps/totsys/common/inc/documents/tot_doc/images/bt_nanugi.gif new file mode 100644 index 0000000..a6ba70f Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/bt_nanugi.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/bt_plus.gif b/webapps/totsys/common/inc/documents/tot_doc/images/bt_plus.gif new file mode 100644 index 0000000..7b42ab4 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/bt_plus.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/bt_pre.gif b/webapps/totsys/common/inc/documents/tot_doc/images/bt_pre.gif new file mode 100644 index 0000000..e9afe2d Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/bt_pre.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/bt_prev.gif b/webapps/totsys/common/inc/documents/tot_doc/images/bt_prev.gif new file mode 100644 index 0000000..631d3d6 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/bt_prev.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/bt_preview.gif b/webapps/totsys/common/inc/documents/tot_doc/images/bt_preview.gif new file mode 100644 index 0000000..5590b4d Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/bt_preview.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/bt_showFirst.gif b/webapps/totsys/common/inc/documents/tot_doc/images/bt_showFirst.gif new file mode 100644 index 0000000..96de90c Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/bt_showFirst.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/bt_sum.jpg b/webapps/totsys/common/inc/documents/tot_doc/images/bt_sum.jpg new file mode 100644 index 0000000..0c99476 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/bt_sum.jpg differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/btn_completed.gif b/webapps/totsys/common/inc/documents/tot_doc/images/btn_completed.gif new file mode 100644 index 0000000..ab83c53 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/btn_completed.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/btn_modify_completed.gif b/webapps/totsys/common/inc/documents/tot_doc/images/btn_modify_completed.gif new file mode 100644 index 0000000..f8628be Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/btn_modify_completed.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/close.gif b/webapps/totsys/common/inc/documents/tot_doc/images/close.gif new file mode 100644 index 0000000..caa1388 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/close.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/close1.gif b/webapps/totsys/common/inc/documents/tot_doc/images/close1.gif new file mode 100644 index 0000000..f60f6c1 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/close1.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/date.gif b/webapps/totsys/common/inc/documents/tot_doc/images/date.gif new file mode 100644 index 0000000..d0dc349 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/date.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/doct_bcenter.jpg b/webapps/totsys/common/inc/documents/tot_doc/images/doct_bcenter.jpg new file mode 100644 index 0000000..d76ef0e Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/doct_bcenter.jpg differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/doct_bleft.jpg b/webapps/totsys/common/inc/documents/tot_doc/images/doct_bleft.jpg new file mode 100644 index 0000000..dfdabcf Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/doct_bleft.jpg differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/doct_bright.jpg b/webapps/totsys/common/inc/documents/tot_doc/images/doct_bright.jpg new file mode 100644 index 0000000..b3bbf95 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/doct_bright.jpg differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/doct_cleft.jpg b/webapps/totsys/common/inc/documents/tot_doc/images/doct_cleft.jpg new file mode 100644 index 0000000..383ce68 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/doct_cleft.jpg differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/doct_cright.jpg b/webapps/totsys/common/inc/documents/tot_doc/images/doct_cright.jpg new file mode 100644 index 0000000..9799eb0 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/doct_cright.jpg differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/doct_tcenter.jpg b/webapps/totsys/common/inc/documents/tot_doc/images/doct_tcenter.jpg new file mode 100644 index 0000000..a7a8488 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/doct_tcenter.jpg differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/doct_tleft.jpg b/webapps/totsys/common/inc/documents/tot_doc/images/doct_tleft.jpg new file mode 100644 index 0000000..1b2ca70 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/doct_tleft.jpg differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/doct_tright.jpg b/webapps/totsys/common/inc/documents/tot_doc/images/doct_tright.jpg new file mode 100644 index 0000000..1e526bd Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/doct_tright.jpg differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/p_1.gif b/webapps/totsys/common/inc/documents/tot_doc/images/p_1.gif new file mode 100644 index 0000000..02c0f52 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/p_1.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/p_2.gif b/webapps/totsys/common/inc/documents/tot_doc/images/p_2.gif new file mode 100644 index 0000000..11be8e5 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/p_2.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/reg_icon.gif b/webapps/totsys/common/inc/documents/tot_doc/images/reg_icon.gif new file mode 100644 index 0000000..2663e20 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/reg_icon.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/s_form_cellconfig.gif b/webapps/totsys/common/inc/documents/tot_doc/images/s_form_cellconfig.gif new file mode 100644 index 0000000..8d68318 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/s_form_cellconfig.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/s_form_config.gif b/webapps/totsys/common/inc/documents/tot_doc/images/s_form_config.gif new file mode 100644 index 0000000..65e7be5 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/s_form_config.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/set1.gif b/webapps/totsys/common/inc/documents/tot_doc/images/set1.gif new file mode 100644 index 0000000..75bd46c Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/set1.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/set2.gif b/webapps/totsys/common/inc/documents/tot_doc/images/set2.gif new file mode 100644 index 0000000..514a19d Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/set2.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/set3.gif b/webapps/totsys/common/inc/documents/tot_doc/images/set3.gif new file mode 100644 index 0000000..24d622e Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/set3.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/set4.gif b/webapps/totsys/common/inc/documents/tot_doc/images/set4.gif new file mode 100644 index 0000000..45fccae Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/set4.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/set_on1.gif b/webapps/totsys/common/inc/documents/tot_doc/images/set_on1.gif new file mode 100644 index 0000000..3a3fd01 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/set_on1.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/set_on2.gif b/webapps/totsys/common/inc/documents/tot_doc/images/set_on2.gif new file mode 100644 index 0000000..631759b Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/set_on2.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/set_on3.gif b/webapps/totsys/common/inc/documents/tot_doc/images/set_on3.gif new file mode 100644 index 0000000..45f4912 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/set_on3.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/set_on4.gif b/webapps/totsys/common/inc/documents/tot_doc/images/set_on4.gif new file mode 100644 index 0000000..ea3d805 Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/set_on4.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/set_on5.gif b/webapps/totsys/common/inc/documents/tot_doc/images/set_on5.gif new file mode 100644 index 0000000..3f69f4e Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/set_on5.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/images/tot_info_bg.gif b/webapps/totsys/common/inc/documents/tot_doc/images/tot_info_bg.gif new file mode 100644 index 0000000..cd1c11a Binary files /dev/null and b/webapps/totsys/common/inc/documents/tot_doc/images/tot_info_bg.gif differ diff --git a/webapps/totsys/common/inc/documents/tot_doc/modify_form_config.jsp b/webapps/totsys/common/inc/documents/tot_doc/modify_form_config.jsp new file mode 100644 index 0000000..790e7e8 --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_doc/modify_form_config.jsp @@ -0,0 +1,285 @@ +<%@ page contentType="text/html; charset=euc-kr" + import="java.io.StringReader" import="java.util.*" + import="java.util.regex.*" + import="javax.swing.text.html.parser.ParserDelegator" + import="java.net.URLEncoder" import="java.net.URLDecoder" + import="kr.co.kihyun.lang.MLong" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.text.html.CallbackHandler" + import="kr.co.kihyun.text.html.HtmlUtil" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.doc.table.MTable" + import="kr.co.kihyun.moumi.doc.table.MTableAnalysis" + import="kr.co.kihyun.moumi.doc.table.TableCreation" + import="kr.co.kihyun.moumi.doc.table.TableDefine" + import="kr.co.kihyun.moumi.doc.table.item.MItem" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.lang.MInteger" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.beans.entity.TotTable"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<%@ include file="/totsys/common/inc/documents/tot_doc/reload_expr.jsp"%> +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +try{ + /********** parameter **********/ + Long docID = MLong.parseLong(request.getParameter("docID"),null); + + /****** Ǵ ******/ + Doc doc = new Doc(); + String repDocID = doc.getRepID(docID); + + if(!MString.isNull(repDocID) && !repDocID.equals(docID)){ + String connURL="./doc_view.jsp?docID="+docID+"&strPage="+clearXSS(request.getParameter("strPage"),"")+"&findOption="+clearXSS(request.getParameter("findOption"),"")+"&findWord="+clearXSS(request.getParameter("findWord"),""); + out.println(ServletUtil.alert(Moumi.getMessageBundle().getString("moumi.message.popup.subDocNotAuth"))); + out.println(ServletUtil.redirect(connURL)); + return; + } + + /********** doc values **********/ + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String docForm = TagFilter.convertPAll(totDoc.getForm()); + TotTable totTable = totDoc.getTotTables().iterator().next(); + String tableTypes = totDoc.getTotTables().iterator().next().getTypes(); + int tableCount = HtmlUtil.getTableCount(docForm); + + session.setAttribute("docForm", docForm); + + ItemList itemList = new ItemList(); + itemList.executeQuery(docID); + int itemCount = itemList.getCount(); + String[] itemNameList = itemList.getNameList(); + String[] itemDescList = itemList.getDescList(); + int[] itemNumList = itemList.getNumList(); + int[] itemSizeList = itemList.getSizeList(); + int[] tableNumList = itemList.getTableNumList(); + int[] colNumList = itemList.getFieldNumList(); + int[] rowNumList = itemList.getRecordNumList(); + int[] itemBNWList = itemList.getBNWList(); + String[] itemTypeNameList = itemList.getTypeNameList(); + String[] itemExprList = itemList.getExprList(); + int[] itemTypeList = itemList.getTypeList(); + + int tmp = MInteger.parseInt(request.getParameter("tmp")); + String backDash = clearXSS(request.getParameter("backDash"),""); + + if(backDash.equals("back")){ //make by #ܰ ̵ İ ȯ + String itemExprs = clearXSS(URLDecoder.decode(request.getParameter("itemExprs"), "UTF-8"),""); + String itemTypes = clearXSS(URLDecoder.decode(request.getParameter("itemTypes"), "UTF-8"),""); + tableTypes = clearXSS(URLDecoder.decode(request.getParameter("tableTypes"), "UTF-8"),""); + + //step 1. ձ 0: ش. + itemExprs = itemExprs.substring(2,itemExprs.length()); + itemTypes = itemTypes.substring(2,itemTypes.length()); + + //step 2. ȣ: ش. (step 1,2 ϴ 0: 100: 0: ¹ ֱ⶧.) + for(int i=0; i + + + + + + +
    + + + +
    + + + + + + + + + + + + + + + + + +
    + + + + +
    +
    ; overflow-x: auto;"> + + <%= TableCreation.insertTypeButtons("totForm", docForm, tableTypes) %> + +
    +
    +
    + + +<%if(HttpSSOLogin.getSysAuth(request) == Moumi.SYSADM || MString.checkNull(request.getParameter("type")).equals("formbox")){%> + +<%if(tmp == 1){%> +<%}else{%> + + + + + + + +
    + + +<%}%> +<%}%> + +<% +}catch(Exception ex){ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ + pm.close(); +} +%> \ No newline at end of file diff --git a/webapps/totsys/common/inc/documents/tot_doc/reload_expr.jsp b/webapps/totsys/common/inc/documents/tot_doc/reload_expr.jsp new file mode 100644 index 0000000..25bae2e --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_doc/reload_expr.jsp @@ -0,0 +1,26 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page import="kr.co.kihyun.moumi.doc.table.item.MItem" %> +<%! +String getTypeName(int typeNum) { + String[] typeNameList = {"", "", "", "¥", "ŸƲ"}; + return typeNameList[typeNum > 0 && typeNum < typeNameList.length ? typeNum : 0]; +} +String reloadExpr(String itemExprs, String[] itemExprList, String[] itemNameList) { + //step 1. ձ 0: ش. + itemExprs = itemExprs.substring(2,itemExprs.length()); + + //step 2. ȣ: ش. (step 1,2 ϴ 0: 100: 0: ¹ ֱ⶧.) + for(int i=0; i< itemNameList.length; i++) + itemExprs = itemExprs.replaceAll(MItem.LIST_DELIM+i+":",MItem.LIST_DELIM); + + //step 3. Ư MItem.LIST_DELIM 迭 ִ´. ̶, itemTypeNameList 迭 Ѵٴ°Ϳ . + itemExprList = itemExprs.split(MItem.LIST_DELIM); + + //step 4. ~迭 ̰ null϶ 迭 ߰ + String[] itemExprList_temp = itemExprList; + itemExprList = new String[itemNameList.length]; + for(int i=0; i< itemNameList.length; i++) + itemExprList[i] = i diff --git a/webapps/totsys/common/inc/documents/tot_doc/sysadm_modify_form_config.jsp b/webapps/totsys/common/inc/documents/tot_doc/sysadm_modify_form_config.jsp new file mode 100644 index 0000000..6a7a72f --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_doc/sysadm_modify_form_config.jsp @@ -0,0 +1,217 @@ +<%@ page contentType="text/html; charset=euc-kr" + import="java.io.StringReader" import="java.util.*" + import="java.util.regex.*" + import="javax.swing.text.html.parser.ParserDelegator" + import="java.net.URLEncoder" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.text.html.CallbackHandler" + import="kr.co.kihyun.text.html.HtmlUtil" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.doc.table.MTable" + import="kr.co.kihyun.moumi.doc.table.MTableAnalysis" + import="kr.co.kihyun.moumi.doc.table.TableCreation" + import="kr.co.kihyun.moumi.doc.table.TableDefine" + import="kr.co.kihyun.moumi.doc.table.item.MItem" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +try{ + /********** parameter **********/ + Long docID = MLong.parseLong(request.getParameter("docID"),null); + String strPage = clearXSS(request.getParameter("strPage"),""); + String findOption = clearXSS(request.getParameter("findOption"),""); + String findWord = clearXSS(request.getParameter("findWord"),""); + String tableTypes = clearXSS(request.getParameter("tableTypes"),""); + + /********** doc values **********/ + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + + /****** Ǵ ******/ + if(totDoc.getMasterTotDoc() != null && !docID.equals(totDoc.getMasterTotDoc())){ + String connURL="./doc_view.jsp?docID="+docID+"&strPage="+strPage+"&findOption="+findOption+"&findWord="+findWord; + out.println(ServletUtil.alert(" 蹮 Դϴ.\\nԷ¾ ϴ.")); + out.println(ServletUtil.redirect(connURL)); + return; + } + + String docName = totDoc.getName(); + String docForm = TagFilter.convertPAll(totDoc.getForm()); + int tableCount = HtmlUtil.getTableCount(docForm); + + session.setAttribute("docForm", docForm); + + ItemList itemList = new ItemList(); + itemList.executeQuery(docID); + int itemCount = itemList.getCount(); + String[] itemNameList = itemList.getNameList(); + String[] itemDescList = itemList.getDescList(); + String[] itemExprList = itemList.getExprList(); + int[] itemTypeList = itemList.getTypeList(); + int[] itemNumList = itemList.getNumList(); + int[] itemSizeList = itemList.getSizeList(); + int[] tableNumList = itemList.getTableNumList(); + int[] colNumList = itemList.getFieldNumList(); + int[] rowNumList = itemList.getRecordNumList(); + int[] itemBNWList = itemList.getBNWList(); + String[] itemTypeNameList = itemList.getTypeNameList(); + + StringBuffer dataBuf = new StringBuffer(); + for(int i=0; i < itemCount; i++){ + dataBuf.append("\n\t\t\t"); + dataBuf.append("totForm.itemList["+i+"].itemName='"+itemNameList[i]+"';\n\t\t\t"); + dataBuf.append("totForm.itemList["+i+"].size='"+itemSizeList[i]+"';\n\t\t\t"); + dataBuf.append("totForm.itemList["+i+"].tableNum='"+tableNumList[i]+"';\n\t\t\t"); + dataBuf.append("totForm.itemList["+i+"].colNum='"+colNumList[i]+"';\n\t\t\t"); + dataBuf.append("totForm.itemList["+i+"].rowNum='"+rowNumList[i]+"';\n\t\t\t"); + dataBuf.append("totForm.itemList["+i+"].desc='"+itemDescList[i].replaceAll("'","\\'")+"';\n\t\t\t"); + dataBuf.append("totForm.itemList["+i+"].expr='"+itemExprList[i].replaceAll("'","\\'")+"';\n\t\t\t"); + dataBuf.append("totForm.itemList["+i+"].type= '"+itemTypeNameList[i]+"';\n\t\t\t"); + dataBuf.append("\n"); + } + TableDefine tableDefine = new TableDefine(); + docForm = tableDefine.insertDiv(docForm, itemNumList); + String tableForm = MReport.getRemoveErrTable(docForm); + tableForm = TagFilter.tdTextToSpace(tableForm); + %> + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + <%= TableCreation.insertTypeButtons("totForm", docForm, tableTypes) %> +
    +
    + + + + + + + + + + + +
    + + +
    + + + +
    + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ + pm.close(); +} +%> \ No newline at end of file diff --git a/webapps/totsys/common/inc/documents/tot_doc/tot_doc_excel.jsp b/webapps/totsys/common/inc/documents/tot_doc/tot_doc_excel.jsp new file mode 100644 index 0000000..f65a086 --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_doc/tot_doc_excel.jsp @@ -0,0 +1,78 @@ + +<% +/************************************************************@@ + * Program Name : tot_reports_excel.jsp + * Description : //// + * Author : + * Create Date : 2004.10.11 + * History : +@@************************************************************/ +%> +<%@ page language="java" contentType="text/html; charset=euc-kr" + pageEncoding="euc-kr"%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" import="java.net.URLDecoder" + import="java.util.*" import="java.io.StringReader" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="javax.swing.text.html.parser.ParserDelegator" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.beans.totsys.doc.Doc"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + + /********** parameter **********/ + Long docID = MLong.parseLong(MString.checkNull(request.getParameter("docID")),null); + String mode = clearXSS(MString.checkNull(request.getParameter("mode")),""); + String docForm = null; + String docName = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("docName")), "UTF-8"),""); + TotDoc totDoc = docID == null ? null : pm.getObjectById(TotDoc.class, docID); + + if(mode != null && mode.equals("regist")){ + docForm = (String)session.getAttribute("docForm"); + }else if(mode != null && mode.equals("modify")){ + docForm = totDoc.getForm(); + docName = totDoc.getName(); + }else if(mode != null && mode.equals("preview")){ + docForm = totDoc.getForm(); + docName = totDoc.getName(); + } + + response.setHeader("Accept-Ranges", "bytes"); + if((mode != null && mode.equals("preview")) || (mode != null && mode.equals("modify"))){ + response.setHeader("Content-Disposition","attachment; filename="+(URLEncoder.encode(docName, "UTF-8")).replaceAll(":","_").replace("+","%20" ) +".xls;"); + }else{ + response.setHeader("Content-Disposition","attachment; filename="+(URLEncoder.encode(docName, "UTF-8")).replaceAll(":","_").replace("+","%20" ) +".xls;"); + } + + %> + + + + + + + +<%=docForm %> + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ + pm.close(); +} +%> diff --git a/webapps/totsys/common/inc/documents/tot_doc/totper_base_info.jsp b/webapps/totsys/common/inc/documents/tot_doc/totper_base_info.jsp new file mode 100644 index 0000000..11002b3 --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_doc/totper_base_info.jsp @@ -0,0 +1,150 @@ + +<% +/************************************************************@@ + * Program Name : doc_list.jsp + * Description : //// + * Author : + * Create Date : 2004.10.11 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" import="java.util.Date" + import="java.text.SimpleDateFormat" import="java.net.URLEncoder" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.moumi.doc.table.MTable" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.util.MDate" import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + + /******* Parameter *********/ + Long docID = MLong.parseLong(request.getParameter("docID"),null); + Long deptID = MLong.parseLong(request.getParameter("deptID"),null); + String deptListView = clearXSS(request.getParameter("deptListView"),""); + + /****** Doc values ******/ + String selectType = ""; + + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String docName = totDoc.getName(); + Date stDate = totDoc.getStartDate(); + Date edDate = totDoc.getEndDate(); + AccessAuth accAuth = totDoc.getAccessAuth(); + String handyName = totDoc.getHandyName(); + + /******** Ȳ ********/ + int allReportCount = 0; + int sendReportCount = 0; + + Report report = new Report(); + allReportCount = report.getAllCount(docID); + sendReportCount = report.getSendCount(docID); + %> + + + + + + + + + + + + + +
      
    + + + + + + + + + + + + + + + + + + + + + + + + + <%if(!deptListView.equals("false")){%> + + + + + <%}%> +
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.doc") %><%= docName %> <%= stDate == null ? " " : new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(stDate) %> 
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.doc") %> + + <%if(accAuth==AccessAuth.PER){ %><%}else{%><%}%> + <%= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(edDate) %> 
    μ + + + + + +
    +
    +
    + + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ + pm.close(); +} +%> diff --git a/webapps/totsys/common/inc/documents/tot_doc/totper_selected_info.jsp b/webapps/totsys/common/inc/documents/tot_doc/totper_selected_info.jsp new file mode 100644 index 0000000..ebc248d --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_doc/totper_selected_info.jsp @@ -0,0 +1,68 @@ + +<% +/************************************************************@@ + * Program Name : doc_list.jsp + * Description : //// + * Author : + * Create Date : 2004.10.11 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.moumi.doc.MDoc"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +String docID = clearXSS(request.getParameter("docID"),""); + +//28.ũνƮ ũƮ(Reflected)_CWE-80 : Add by KWON,HAN +if (docID !=null) { + docID = docID.replaceAll("<","<"); + docID = docID.replaceAll(">",">"); +} +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +%> + + + + + + + + + + + + + +
    û μ/  
    + + + + + + + + + + +
    + + + + + + + +
    +
    + + diff --git a/webapps/totsys/common/inc/documents/tot_reports/sub_total_reports_excel.jsp b/webapps/totsys/common/inc/documents/tot_reports/sub_total_reports_excel.jsp new file mode 100644 index 0000000..3268fb5 --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_reports/sub_total_reports_excel.jsp @@ -0,0 +1,403 @@ + +<%/************************************************************@@ + * Program Name : doc_view.jsp + * Description : ///Ȳ + * Author : + * Create Date : 2004.10.11 + * History : + @@************************************************************/%> + + +<%@ page contentType="application/x-msexcel;charset=euc-kr" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="javax.jdo.*" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.text.excel.Excel" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.Part" + import="kr.co.kihyun.beans.user.PartList" + import="kr.co.kihyun.beans.totsys.doc.table.Table" + import="kr.co.kihyun.beans.totsys.doc.table.item.Item" + import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList" + import="kr.co.kihyun.beans.totsys.report.tots.ReportsViewer" + import="kr.co.kihyun.beans.totsys.report.tot.TotReportViewer" + import="kr.co.kihyun.beans.totsys.report.ReportViewManager" + import="kr.co.kihyun.beans.totsys.report.ReportFormElement" + import="kr.co.kihyun.beans.totsys.report.ReportsView" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.totsys.doc.Doc"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% PersistenceManager pm = PMF.get().getPersistenceManager(); + try { + /****** Parameter ******/ + Long docID = MLong.parseLong(request.getParameter("docID"), null); + String partID = request.getParameter("partID"); + String docName = clearXSS(URLDecoder.decode(request.getParameter("docName"), "UTF-8"), ""); + int rowDelType = MInteger.parseInt(request.getParameter("rowDelType"), 0); + String saveExprType = clearXSS(MString.checkNull(request.getParameter("saveExprType")), ""); + String saveType = clearXSS(request.getParameter("saveType"), ""); + + response.setHeader("Accept-Ranges", "bytes"); + response.setHeader("Content-Disposition", "attachment; filename=" + (URLEncoder.encode(docName, "UTF-8")).replaceAll(":", "_").replace("+", "%20") + ".xls;"); + + + + /*********** ***********/ + String deptID = null; + String userID = null; + + Doc doc = new Doc(); + + deptID = doc.getRegisterDept(docID); + userID = doc.getRegisterID(docID); + + + /*********** Part View vlaues ***********/ + int partCount = 0; + String[] partIDList = null; + String[] partNameList = null; + Long[] downDocIDList = null; + PartList partList = new PartList(); + //v2. 13.SQL : partList.executeQuery() prepare SQL Ǿ ִ. + partList.executeQuery(docID, "sendedReport"); + //================= + partCount = partList.getCount(); + partIDList = partList.getIDList(); + partNameList = partList.getNameList(); + + if (!MString.isNull(saveType) && saveType.equals("all")) { + partID = null; + } + + /********** doc_id part Ʈ ********/ + PartList repoPartList = new PartList(); + //v2. 13.SQL : partList.executeQuery() prepare SQL Ǿ ִ. + partList.executeQuery(docID, "sendedRepoReport"); + //================= + partCount = partList.getCount(); + partIDList = partList.getIDList(); + partNameList = partList.getNameList(); + + /********** down_doc_id Ʈ **********/ + ReportsView reportsView = new ReportsView(); + //v2. 13.SQL : reportsView.executeQuery() prepare SQL Ǿ ִ. + reportsView.executeQuery(docID, partID); + //================= + downDocIDList = reportsView.getDownDocIDList(); + + /********** down_doc_id Ʈ鿡 part Ʈ ***********/ + int last = 0; + int repoPartCount = 0; + String[] repoPartIDList = null; + //String[] repoPartNameList = null; + + + /********** ڷẸ ***********/ + TotReportViewer totViewManager = null; + int partReportCount = 0; + int partAllReportCount = 0; + String totReport = ""; + + + /*********** HTML Form values ***********/ + int tableCount = (new Table()).getCount(docID); + int[] lineNum = new int[tableCount]; + String[] delSelect = new String[tableCount]; + StringBuffer queryBuff = new StringBuffer(); + int firstTableNum = -1; + int firstTableTitleCount = -1; + if (rowDelType == 1) { + for (int i = 0; i < tableCount; i++) { + lineNum[i] = MInteger.parseInt(request.getParameter("table" + i + ""), 0); + queryBuff.append("&table" + i + "=" + lineNum[i]); + if (firstTableNum == -1) { + if (lineNum[i] > -1) { + firstTableNum = i; + } + } + } + } else { + firstTableNum = 0; + } + + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + + // ⹮ ü ǥ ü + ReportViewManager reportViewManager = new ReportViewManager(totDoc); + ReportFormElement reportFormElement = new ReportFormElement(totDoc); + String Form = reportFormElement.getForm(); + ItemList itemTypes = reportFormElement.getItemList(); + int[] tmpItemTypeList = itemTypes.getTypeList(); + + /*********** Doc & Report Values ***********/ + int reportCount = 0; + String[] repoPartNameList = null; + String[] repoDeptNameList = null; + String[] reportList = null; + ReportsViewer viewManager = new ReportsViewer(totDoc, MReport.EXCEL); + + /********** doc title count **********/ + Item item = new Item(); + int[] titleCount = item.getTitleRowCountList(docID); + for (int i = 0; i < titleCount.length; i++) { + if (i == firstTableNum) { + firstTableTitleCount = titleCount[i]; + } + } + //docName = viewManager.getDocName(); +%> + + + + + + + + + + + + + + + + + +
       <%=docName%>
    + + + + + + + + + + + + +   + + + + + + + + + + +
    μ
    + + + + + + + + <% + boolean isAllDelete = true; //ǥ + + if (partID != null) { + partCount = 1; //ϳ ڷ + partIDList = new String[1]; + partIDList[0] = partID; + partNameList = new String[1]; + partNameList[0] = (new Part()).getName(partID); + } + + for (int i = 0; i < downDocIDList.length; i++) { + //repoPartList.executeQuery(downDocIDList[i], "sendedRepoReport"); + repoPartList.executeQuery(downDocIDList[i], "sendedReport"); + repoPartIDList = repoPartList.getIDList(); + TotDoc downDoc = pm.getObjectById(TotDoc.class, downDocIDList[i]); + viewManager = new ReportsViewer(downDoc); + totViewManager = new TotReportViewer(downDoc, MReport.EXCEL); + + totViewManager.setReportData(partID); + partReportCount = totViewManager.getReportCount(); + partAllReportCount = totViewManager.getAllReportCount(); + totReport = totViewManager.getReport("save", "onlyData"); + + for (int p = 0; p < repoPartIDList.length; p++) { + /********* report *********/ + viewManager.setReportData(repoPartIDList[p]); + reportCount = viewManager.getReportsView().getCount(); + repoPartNameList = viewManager.getReportsView().getPartNameList(); + repoDeptNameList = viewManager.getReportsView().getDeptNameList(); + reportList = viewManager.getReportNBSPList(); + for (int d = 0; d < reportCount; d++) { + reportList[d] = reportList[d].replaceAll("
    ", ""); + //title + if (rowDelType == 1) { + int delLine = 0; + for (int t = 1; t <= tableCount; t++) { + if (lineNum[t - 1] == -1) { //ǥ + if (t == tableCount) { + reportList[d] = MReport.getDeleteTableEnd(reportList[d], (t - delLine)); + reportList[d] = MReport.getDeleteTableEndBr(reportList[d]); + } else { + reportList[d] = MReport.getDeleteTable(reportList[d], (t - delLine)); + } + delLine = delLine + 1; + } else if (lineNum[t - 1] > 0) { // + if (d > 0 || p > 0) { + for (int k = 0; k < lineNum[t - 1]; k++) { + if (saveExprType.equals("no")) { + reportList[d] = MReport.getDeleteTitleAll(reportList[d], t - delLine); // + } else { + reportList[d] = MReport.getDeleteTitle2All(reportList[d], t - delLine, k); //̹ + } + } + } + isAllDelete = false; + } else { + isAllDelete = false; + } + } + } else { + isAllDelete = false; + } + + if (saveExprType.equals("no")) { + reportList[d] = Excel.removeFmla(reportList[d]); + } + %> + + + + + + <% + } + %> + <% + } + %> + <% + } + %> + <% + for (int i = 0; i < downDocIDList.length; i++) { + repoPartList.executeQuery(downDocIDList[i], "sendedReport"); + repoPartIDList = repoPartList.getIDList(); + TotDoc downDoc = pm.getObjectById(TotDoc.class, downDocIDList[i]); + viewManager = new ReportsViewer(downDoc); + totViewManager = new TotReportViewer(downDoc, MReport.EXCEL); + + totViewManager.setReportData(partID); + partReportCount = totViewManager.getReportCount(); + partAllReportCount = totViewManager.getAllReportCount(); + totReport = totViewManager.getReport("save", "onlyData").replaceAll("
    ", ""); + %> + + + <% + //title + /* + if(rowDelType == 1){ + int delLine = 0; + for(int t=1; t<=tableCount; t++){ + if(lineNum[t-1] == -1){ //ǥ + if(t == tableCount){ + totReport = MReport.getDeleteTableEnd(totReport, (t-delLine)); + totReport = MReport.getDeleteTableEndBr(totReport); + }else{ + totReport = MReport.getDeleteTable(totReport, (t-delLine)); + } + delLine = delLine + 1; + }else if(lineNum[t-1] > 0){ // + //if(p > 0){ + for(int k=0; k + <% + // totReport +%> + + + <% + } + %> + + + + + + + <% + if (partCount > 0) { + totViewManager = new TotReportViewer(totDoc, MReport.EXCEL); + totViewManager.setReportData(null); + reportCount = totViewManager.getReportCount(); + int allReportCount = totViewManager.getAllReportCount(); + totReport = totViewManager.getReport("save", "onlyData").replaceAll("
    ", ""); + + if (saveExprType.equals("no")) { + totReport = Excel.removeFmla(totReport); + } + %> +
    + + + + + <% }%> +
    <%=repoPartNameList[d]%><%=repoDeptNameList[d]%><%=Excel.setCellTypes(reportList[d], tmpItemTypeList)%>
     ü
    +   :<%= reportCount%>
    +   ü:<%= allReportCount%>
    +
    <%= Excel.removeFmla(Excel.setCellTypes(totReport, tmpItemTypeList))%> +
    + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/documents/tot_reports/total_reports.jsp b/webapps/totsys/common/inc/documents/tot_reports/total_reports.jsp new file mode 100644 index 0000000..cd4fca0 --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_reports/total_reports.jsp @@ -0,0 +1,979 @@ +<% /** + * ********************************************************** + * @@ Program Name : total_reports.jsp + * @@ Description : ////Ȳ + * @@ Author : + * @@ Create Date : 2004.10.11 + * @@ History : 2014.10.07 Update by KWON,HAN : + * @@*********************************************************** + */ +%> +<%@ page contentType="text/html; charset=utf-8" + import="java.util.List" + import="java.util.ArrayList" + import="java.util.Map" + import="java.util.HashMap" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.MoumiConfig" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.totsys.doc.table.Table" + import="kr.co.kihyun.beans.totsys.doc.table.item.Item" + import="kr.co.kihyun.beans.entity.TotDoc2" + import="kr.co.kihyun.beans.entity.MDept" + import="kr.co.kihyun.service.PrssReportsService" + import="kr.co.kihyun.service.vo.PrssReportsVO" + import="kr.co.kihyun.service.vo.ReportTotalVO" + import="javax.jdo.Query"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + + try { + + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + String dpID = HttpSSOLogin.getDeptID(request); + + /** + * **** Parameter ***** + */ + Long docID = MLong.parseLong(request.getParameter("docID"), null); + int tableNum = MInteger.parseInt(request.getParameter("tableNum"), 1);//create by + String docType = clearXSS(request.getParameter("docType"), null); + Long reportID = MLong.parseLong(request.getParameter("reportID")); + + int searchType = MInteger.parseInt(request.getParameter("searchType"), -1); + String[] displaySummaryValues = request.getParameterValues("displaySummary"); + boolean displaySummary = displaySummaryValues != null; + int gradeCode = MInteger.parseInt(request.getParameter("gradeCode"), -1); + String type = clearXSS(request.getParameter("type"), ""); + int rowDelType = MInteger.parseInt(request.getParameter("rowDelType"), 0); + String tableval = clearXSS(request.getParameter("tableval"), "0"); + + + + String strPage = clearXSS(request.getParameter("strPage"),""); + String findOption = clearXSS(request.getParameter("findOption"), ""); + String findWord = URLDecoder.decode(MString.checkNull(request.getParameter("findWord")), "UTF-8"); + String stDate = clearXSS(request.getParameter("stDate"),""); + String edDate = clearXSS(request.getParameter("edDate"),""); + + String searchDepth = clearXSS(request.getParameter("searchDepth"), ""); + String innerStrPage = ""; + String innerFindOption = ""; + String innerFindWord = ""; + + if("inner".equals(searchDepth)) { + innerStrPage = clearXSS(request.getParameter("innerStrPage"),""); + innerFindOption = clearXSS(request.getParameter("innerFindOption"), ""); + innerFindWord = URLDecoder.decode(MString.checkNull(request.getParameter("innerFindWord")), "UTF-8"); + } else { + innerStrPage = clearXSS(request.getParameter("innerStrPage"),""); + innerFindOption = clearXSS(request.getParameter("innerFindOption"), ""); + //˻ ذ + //innerFindWord = clearXSS(Encoder.toJava(request.getParameter("innerFindWord")), ""); + innerFindWord = URLDecoder.decode(MString.checkNull(request.getParameter("innerFindWord")), "UTF-8"); + } + + String sort = clearXSS(request.getParameter("sort"), ""); + int listType = searchType; + String howSort = clearXSS(request.getParameter("howSort"), ""); + + tx.begin(); + + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String userId = totDoc.getUser(); + AccessAuth docAccAuth = totDoc.getAccessAuth(); + String docName = totDoc.getName(); + String regID = totDoc.getUser(pm).getId(); + String deptID = totDoc.getDept(pm).getId(); + + int count = 0; + + PrssReportsService prssService = new PrssReportsService(pm); + //˻Ķ + Map params = new HashMap(); + params.put("docId", docID); + params.put("listType", listType); + params.put("findOption", innerFindOption); + params.put("filterValue", innerFindWord); + params.put("howSort", howSort); + params.put("sort", sort); + + //˻ ڵ尹ȸ + prssService.createPrssTotalReportsSearchQuery(params); + + List list = null; + + //ϴ ڵ尡 ϸ ȸ + list = prssService.executeQuery(PrssReportsVO.class); + + count = list.size(); + //====================================================================== + + List compReportList = null; //ü + + int allReportCount = 0; //ü-ü + int totReportCount = 0; //ü-Ϸ + + if(displaySummary) { + List totalList = null; + totalList = prssService.getReportTotalByDocId(docID); + + if( totalList != null && totalList.size() > 0 ) { + for(Object obj : totalList) { + ReportTotalVO totalVO = (ReportTotalVO)obj; + + allReportCount = MInteger.parseInt(totalVO.getAllCnt().toString(), 0); + + totReportCount = MInteger.parseInt(totalVO.getTotReportCnt().toString(), 0); + } + } + + if(totReportCount > 0) { + compReportList = prssService.getRecursiveAllReports(docID, TotReportProcess.COMP, ""); //ü-Ϸ + } + + } + + tx.rollback(); + + /** + * ********* HTML Form values ********** + */ + int tableCount = new Table().getCount(docID); + int[] lineNum = new int[tableCount]; + String[] delSelect = new String[tableCount]; + StringBuffer queryBuff = new StringBuffer(); + if (rowDelType == 1) { + for (int i = 0; i < tableCount; i++) { + if (type.equals("first")) { + if (i == 0) { + lineNum[i] = 1; + } else { + lineNum[i] = MInteger.parseInt(request.getParameter("table" + i + ""), -1); + } + } else { + lineNum[i] = MInteger.parseInt(request.getParameter("table" + i + ""), 0); + } + + queryBuff.append("&table" + i + "=" + lineNum[i]); + } + } +%> + + + + + + + + + + + + + + + +
    + + + + + + +
    + +
    + + + + + +
    + + + + + + + + + + + + + + + + +
    +
    + > + > + > + + + + + + + + + + + <% if (displaySummary) {%> + + <% }%> + <% + for (int i = 0; i < tableCount; i++) { + %> + <% + }%> + + +
    +
    +
    + > + > + > + + + + + + + + + + + + + <% if (displaySummary) {%> + <% }%> + + <%for (int i = 0; i < tableCount; i++) {%> + + <%}%> + + + + +
    +
    +
    + > + > + > + + + + + + + + + + + + + + <%for (int i = 0; i < tableCount; i++) {%> + + <%}%> + + +
    +
    + + + + + + + + +
    + <%= Moumi.getMessageBundle().getString(" /> + <%= Moumi.getMessageBundle().getString(" /> + <% + if (!docType.equals("END")) { + if (!(sysAuth == 2 && !usID.equals(userId) && docAccAuth == AccessAuth.ALL)) { + %> + <%= Moumi.getMessageBundle().getString(" /> + <%= Moumi.getMessageBundle().getString(" /> + <% + } + } + %> + + + <%= Moumi.getMessageBundle().getString(" /> + +
    + +
    +
    + > + > + > + + + + + + + + + <% if (displaySummary) {%> + + <% }%> + + <%for (int i = 0; i < tableCount; i++) {%> + + <%}%> + + + + + + + + + +
    +
    + + + + + +
    ; height: <%=session.getAttribute("totperViewHeight")%>; overflow-x: auto; overflow-y: auto;"> + + <% if (tableNum != 0 && (searchType == TotReportProcess.COMP.ordinal() || searchType == -1)) {%> + + + + <%} else {%> + + <%}%> + <% if (displaySummary && totReportCount > 0) {%> + + + + + + + + + + + + + + + + + + + <%} else if (displaySummary && totReportCount <= 0) {%> + + + + + + + + + <%}%> + + + <% + int index = -1; + int slavePaddingLeft = 0; + //tx.begin(); + + if( count > 0 ) { + int listCount = list.size(); + + for (int i = 0; i < listCount; i++) { + index = i; + + PrssReportsVO prssVO = (PrssReportsVO)list.get(i); + TotReportProcess process = (TotReportProcess) prssVO.getProcess(); + + if("2".equals(prssVO.getDeptNo())) { + slavePaddingLeft = 30; + } else { + slavePaddingLeft = 0; + } + + int kkkk = prssVO.getProcess().ordinal(); + String html = null; + if( (process == TotReportProcess.COMP && prssVO.getDownDocId() == null) || (process == TotReportProcess.TEMP && "Y".equals(totDoc.getRegularDocYn()))) { + //html = prssVO.getToHTML(pm, tableNum, tableNum > 0, true); //ǥ ִ κ + TotReport report = pm.getObjectById(TotReport.class, prssVO.getId()); + html = TotReportUtil.toHTML(report, tableNum, tableNum > 0, true); //ǥ ִ κ + } + String note = prssVO.getNoteString(pm); + //String note = prssVO.getNote(); + + //Map> attachmentsMap = null; + //if (process == TotReportProcess.COMP || process == TotReportProcess.NOTE) { + // attachmentsMap = prssVO.getAttachmentsMap(pm); + //} + + //for (TotReport report : reportList) { + // index++; + // if (index % 100 == 0) { + // tx.rollback(); + // tx.begin(); + // } + // Long id = reportList.get(index).getId(); + // MDept organCode = report.getDept(pm).getOrgan(pm); + // String organName = report.getDept(pm).getOrgan(pm).getName(); + // String deptName = report.getDept(pm).getName(); + // String ownerName = report.getOwnerName(pm); + // TotReportProcess process = report.getProcess(); + // int kkkk = report.getProcess().ordinal(); + // String html = TotReportUtil.toHTML(report, tableNum, tableNum > 0, true); //ǥ ִ κ + // String note = report.getNote(); + + %> + + + + + + + + + + + + <% + } //end of for list + } //end of if( count > 0) + + //} + //tx.rollback(); + %> + + + <%if (count <= 0) { //if (reportList.size() <= 0) {%> + + + + <%}%> + + +
    <%=TagFilter.removeTableHeight(MDoc.getTitleForm(totDoc, tableNum))%>
    + + + + + + + +
    <%=TotReportProcess.ALL%><%=TotDocType.TOT_DOC%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.table")%>   + <%=TotReportProcess.COMP%>:<%= totReportCount%>   + <%=TotReportProcess.ALL%>:<%= allReportCount%>
    +
    + + + + +
    + <%if (totReportCount != 0) { //if (compReportList.size() != 0) {%> + <%= TotReportUtil.toHTML(totDoc, compReportList, tableNum, tableNum > 0)%> + <%} else {%> + <%=Moumi.getMessageBundle().getString("moumi.message.tot_report.notSubmitDoc")%> + <%}%> + +
    +
    --------------------------------------------------------------------------------
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.notTotdocTable")%>
    --------------------------------------------------------------------------------
    + + + + + + + + + +
    + <%= prssVO.getUpperDeptName() == null ? "" : prssVO.getUpperDeptName() + " - "%> + <%= prssVO.getDeptName()%>   + <%= MString.checkNull(prssVO.getOwnerName())%> + <% if( prssVO.getDownDocId() != null ) { + out.write(" [" + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.subdoc") + "]"); + }%> +
    +
    + <%= ( (process == TotReportProcess.COMP && prssVO.getDownDocId() == null) || (process == TotReportProcess.TEMP && "Y".equals(totDoc.getRegularDocYn()))) ? (html == null ? process : html) : process%> + +
    + + <% if (!MString.isNull(note)) {%> + + + + + + + <% }%> + + <% if("Y".equals(prssVO.getIsAttachments())) { /*if (attachmentsMap != null && !attachmentsMap.isEmpty()) { */ %> + + <%if (process == TotReportProcess.COMP || process == TotReportProcess.NOTE || (process == TotReportProcess.TEMP && "Y".equals(totDoc.getRegularDocYn()))){%> + + + + + + + + + + + <%} else {%>   <%}%> + <%}%> +
    <%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.noteRecall")%><%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.reason")%>
    <%= note%>
    + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.add")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.file")%> + +
    + +
    +
    <%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.reportDocNot")%>
    +
    + + + + + + + + +
    + + + + + + +<% for (int i = 0; lineNum != null && i < lineNum.length; i++) { %> + +<% } %> +
    + +
    + + + + + +
    + + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/documents/tot_reports/total_reports.jsp_org b/webapps/totsys/common/inc/documents/tot_reports/total_reports.jsp_org new file mode 100644 index 0000000..2c00cb8 --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_reports/total_reports.jsp_org @@ -0,0 +1,979 @@ +<% /** + * ********************************************************** + * @@ Program Name : total_reports.jsp + * @@ Description : ////Ȳ + * @@ Author : + * @@ Create Date : 2004.10.11 + * @@ History : 2014.10.07 Update by KWON,HAN : + * @@*********************************************************** + */ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.util.List" + import="java.util.ArrayList" + import="java.util.Map" + import="java.util.HashMap" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.MoumiConfig" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.totsys.doc.table.Table" + import="kr.co.kihyun.beans.totsys.doc.table.item.Item" + import="kr.co.kihyun.beans.entity.TotDoc2" + import="kr.co.kihyun.beans.entity.MDept" + import="kr.co.kihyun.service.PrssReportsService" + import="kr.co.kihyun.service.vo.PrssReportsVO" + import="kr.co.kihyun.service.vo.ReportTotalVO" + import="javax.jdo.Query"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + + try { + + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + String dpID = HttpSSOLogin.getDeptID(request); + + /** + * **** Parameter ***** + */ + Long docID = MLong.parseLong(request.getParameter("docID"), null); + int tableNum = MInteger.parseInt(request.getParameter("tableNum"), 0);//create by + String docType = clearXSS(request.getParameter("docType"), null); + Long reportID = MLong.parseLong(request.getParameter("reportID")); + + int searchType = MInteger.parseInt(request.getParameter("searchType"), -1); + String[] displaySummaryValues = request.getParameterValues("displaySummary"); + boolean displaySummary = displaySummaryValues != null; + int gradeCode = MInteger.parseInt(request.getParameter("gradeCode"), -1); + String type = clearXSS(request.getParameter("type"), ""); + int rowDelType = MInteger.parseInt(request.getParameter("rowDelType"), 0); + String tableval = clearXSS(request.getParameter("tableval"), "0"); + + + + String strPage = clearXSS(request.getParameter("strPage"),""); + String findOption = clearXSS(request.getParameter("findOption"), ""); + String findWord = URLDecoder.decode(MString.checkNull(request.getParameter("findWord")), "UTF-8"); + String stDate = clearXSS(request.getParameter("stDate"),""); + String edDate = clearXSS(request.getParameter("edDate"),""); + + String searchDepth = clearXSS(request.getParameter("searchDepth"), ""); + String innerStrPage = ""; + String innerFindOption = ""; + String innerFindWord = ""; + + if("inner".equals(searchDepth)) { + innerStrPage = clearXSS(request.getParameter("innerStrPage"),""); + innerFindOption = clearXSS(request.getParameter("innerFindOption"), ""); + innerFindWord = URLDecoder.decode(MString.checkNull(request.getParameter("innerFindWord")), "UTF-8"); + } else { + innerStrPage = clearXSS(request.getParameter("innerStrPage"),""); + innerFindOption = clearXSS(request.getParameter("innerFindOption"), ""); + //˻ ذ + //innerFindWord = clearXSS(Encoder.toJava(request.getParameter("innerFindWord")), ""); + innerFindWord = URLDecoder.decode(MString.checkNull(request.getParameter("innerFindWord")), "UTF-8"); + } + + String sort = clearXSS(request.getParameter("sort"), ""); + int listType = searchType; + String howSort = clearXSS(request.getParameter("howSort"), ""); + + tx.begin(); + + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String userId = totDoc.getUser(); + AccessAuth docAccAuth = totDoc.getAccessAuth(); + String docName = totDoc.getName(); + String regID = totDoc.getUser(pm).getId(); + String deptID = totDoc.getDept(pm).getId(); + + int count = 0; + + PrssReportsService prssService = new PrssReportsService(pm); + //˻Ķ + Map params = new HashMap(); + params.put("docId", docID); + params.put("listType", listType); + params.put("findOption", innerFindOption); + params.put("filterValue", innerFindWord); + params.put("howSort", howSort); + params.put("sort", sort); + + //˻ ڵ尹ȸ + prssService.createPrssTotalReportsSearchQuery(params); + + List list = null; + + //ϴ ڵ尡 ϸ ȸ + list = prssService.executeQuery(PrssReportsVO.class); + + count = list.size(); + //====================================================================== + + List compReportList = null; //ü + + int allReportCount = 0; //ü-ü + int totReportCount = 0; //ü-Ϸ + + if(displaySummary) { + List totalList = null; + totalList = prssService.getReportTotalByDocId(docID); + + if( totalList != null && totalList.size() > 0 ) { + for(Object obj : totalList) { + ReportTotalVO totalVO = (ReportTotalVO)obj; + + allReportCount = MInteger.parseInt(totalVO.getAllCnt().toString(), 0); + + totReportCount = MInteger.parseInt(totalVO.getTotReportCnt().toString(), 0); + } + } + + if(totReportCount > 0) { + compReportList = prssService.getRecursiveAllReports(docID, TotReportProcess.COMP, ""); //ü-Ϸ + } + + } + + tx.rollback(); + + /** + * ********* HTML Form values ********** + */ + int tableCount = new Table().getCount(docID); + int[] lineNum = new int[tableCount]; + String[] delSelect = new String[tableCount]; + StringBuffer queryBuff = new StringBuffer(); + if (rowDelType == 1) { + for (int i = 0; i < tableCount; i++) { + if (type.equals("first")) { + if (i == 0) { + lineNum[i] = 1; + } else { + lineNum[i] = MInteger.parseInt(request.getParameter("table" + i + ""), -1); + } + } else { + lineNum[i] = MInteger.parseInt(request.getParameter("table" + i + ""), 0); + } + + queryBuff.append("&table" + i + "=" + lineNum[i]); + } + } +%> + + + + + + + + + + + + + + + +
    + + + + + + +
    + +
    + + + + + +
    + + + + + + + + + + + + + + + + +
    +
    + > + > + > + + + + + + + + + + + <% if (displaySummary) {%> + + <% }%> + <% + for (int i = 0; i < tableCount; i++) { + %> + <% + }%> + + +
    +
    +
    + > + > + > + + + + + + + + + + + + + <% if (displaySummary) {%> + <% }%> + + <%for (int i = 0; i < tableCount; i++) {%> + + <%}%> + + + + +
    +
    +
    + > + > + > + + + + + + + + + + + + + + <%for (int i = 0; i < tableCount; i++) {%> + + <%}%> + + +
    +
    + + + + + + + + +
    + <%= Moumi.getMessageBundle().getString(" /> + <%= Moumi.getMessageBundle().getString(" /> + <% + if (!docType.equals("END")) { + if (!(sysAuth == 2 && !usID.equals(userId) && docAccAuth == AccessAuth.ALL)) { + %> + <%= Moumi.getMessageBundle().getString(" /> + <%= Moumi.getMessageBundle().getString(" /> + <% + } + } + %> + + + <%= Moumi.getMessageBundle().getString(" /> + +
    + +
    +
    + > + > + > + + + + + + + + + <% if (displaySummary) {%> + + <% }%> + + <%for (int i = 0; i < tableCount; i++) {%> + + <%}%> + + + + + + + + + +
    +
    + + + + + +
    ; height: <%=session.getAttribute("totperViewHeight")%>; overflow-x: auto; overflow-y: auto;"> + + <% if (tableNum != 0 && (searchType == TotReportProcess.COMP.ordinal() || searchType == -1)) {%> + + + + <%} else {%> + + <%}%> + <% if (displaySummary && totReportCount > 0) {%> + + + + + + + + + + + + + + + + + + + <%} else if (displaySummary && totReportCount <= 0) {%> + + + + + + + + + <%}%> + + + <% + int index = -1; + int slavePaddingLeft = 0; + //tx.begin(); + + if( count > 0 ) { + int listCount = list.size(); + + for (int i = 0; i < listCount; i++) { + index = i; + + PrssReportsVO prssVO = (PrssReportsVO)list.get(i); + TotReportProcess process = (TotReportProcess) prssVO.getProcess(); + + if("2".equals(prssVO.getDeptNo())) { + slavePaddingLeft = 30; + } else { + slavePaddingLeft = 0; + } + + int kkkk = prssVO.getProcess().ordinal(); + String html = null; + if( (process == TotReportProcess.COMP && prssVO.getDownDocId() == null) || (process == TotReportProcess.TEMP && "Y".equals(totDoc.getRegularDocYn()))) { + //html = prssVO.getToHTML(pm, tableNum, tableNum > 0, true); //ǥ ִ κ + TotReport report = pm.getObjectById(TotReport.class, prssVO.getId()); + html = TotReportUtil.toHTML(report, tableNum, tableNum > 0, true); //ǥ ִ κ + } + String note = prssVO.getNoteString(pm); + //String note = prssVO.getNote(); + + //Map> attachmentsMap = null; + //if (process == TotReportProcess.COMP || process == TotReportProcess.NOTE) { + // attachmentsMap = prssVO.getAttachmentsMap(pm); + //} + + //for (TotReport report : reportList) { + // index++; + // if (index % 100 == 0) { + // tx.rollback(); + // tx.begin(); + // } + // Long id = reportList.get(index).getId(); + // MDept organCode = report.getDept(pm).getOrgan(pm); + // String organName = report.getDept(pm).getOrgan(pm).getName(); + // String deptName = report.getDept(pm).getName(); + // String ownerName = report.getOwnerName(pm); + // TotReportProcess process = report.getProcess(); + // int kkkk = report.getProcess().ordinal(); + // String html = TotReportUtil.toHTML(report, tableNum, tableNum > 0, true); //ǥ ִ κ + // String note = report.getNote(); + + %> + + + + + + + + + + + + <% + } //end of for list + } //end of if( count > 0) + + //} + //tx.rollback(); + %> + + + <%if (count <= 0) { //if (reportList.size() <= 0) {%> + + + + <%}%> + + +
    <%=TagFilter.removeTableHeight(MDoc.getTitleForm(totDoc, tableNum))%>
    + + + + + + + +
    <%=TotReportProcess.ALL%><%=TotDocType.TOT_DOC%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.table")%>   + <%=TotReportProcess.COMP%>:<%= totReportCount%>   + <%=TotReportProcess.ALL%>:<%= allReportCount%>
    +
    + + + + +
    + <%if (totReportCount != 0) { //if (compReportList.size() != 0) {%> + <%= TotReportUtil.toHTML(totDoc, compReportList, tableNum, tableNum > 0)%> + <%} else {%> + <%=Moumi.getMessageBundle().getString("moumi.message.tot_report.notSubmitDoc")%> + <%}%> + +
    +
    --------------------------------------------------------------------------------
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.notTotdocTable")%>
    --------------------------------------------------------------------------------
    + + + + + + + + + +
    + <%= prssVO.getUpperDeptName() == null ? "" : prssVO.getUpperDeptName() + " - "%> + <%= prssVO.getDeptName()%>   + <%= MString.checkNull(prssVO.getOwnerName())%> + <% if( prssVO.getDownDocId() != null ) { + out.write(" [" + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.subdoc") + "]"); + }%> +
    +
    + <%= ( (process == TotReportProcess.COMP && prssVO.getDownDocId() == null) || (process == TotReportProcess.TEMP && "Y".equals(totDoc.getRegularDocYn()))) ? (html == null ? process : html) : process%> + +
    + + <% if (!MString.isNull(note)) {%> + + + + + + + <% }%> + + <% if("Y".equals(prssVO.getIsAttachments())) { /*if (attachmentsMap != null && !attachmentsMap.isEmpty()) { */ %> + + <%if (process == TotReportProcess.COMP || process == TotReportProcess.NOTE || (process == TotReportProcess.TEMP && "Y".equals(totDoc.getRegularDocYn()))){%> + + + + + + + + + + + <%} else {%>   <%}%> + <%}%> +
    <%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.noteRecall")%><%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.reason")%>
    <%= note%>
    + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.add")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.file")%> + +
    + +
    +
    <%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.reportDocNot")%>
    +
    + + + + + + + + +
    + + + + + + +<% for (int i = 0; lineNum != null && i < lineNum.length; i++) { %> + +<% } %> +
    + +
    + + + + + +
    + + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/documents/tot_reports/total_reports_excel.jsp b/webapps/totsys/common/inc/documents/tot_reports/total_reports_excel.jsp new file mode 100644 index 0000000..62a17d1 --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_reports/total_reports_excel.jsp @@ -0,0 +1,126 @@ + +<% +/************************************************************@@ + * Program Name : tot_reports_excel.jsp + * Description : //// + * Author : ũ + * Create Date : 2010.11.24 + * History : +@@************************************************************/ +%> +<%@ page language="java" contentType="text/html; charset=utf-8"%> +<%@ page contentType="text/html; charset=utf-8" + import="java.net.URLEncoder" import="java.net.URLDecoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="java.util.*" + import="java.io.StringReader" + import="javax.swing.text.html.parser.ParserDelegator" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.util.Stopwatch" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.text.html.CallbackHandler" + import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.doc.table.MTable" + import="kr.co.kihyun.moumi.doc.table.TableDefine" + import="kr.co.kihyun.moumi.doc.table.TableCreation" + import="kr.co.kihyun.moumi.doc.table.item.MItem" + import="kr.co.kihyun.beans.entity.*" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="java.util.Date" + import="java.util.List" + import="java.util.Map" + import="java.util.HashMap" + import="java.text.SimpleDateFormat" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.util.MDate" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*" + import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" + import="kr.co.kihyun.service.PrssReportsService" + import="kr.co.kihyun.service.vo.PrssReportsVO" + import="javax.jdo.Query"%> + import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.lang.MString"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% request.setCharacterEncoding("utf-8"); %> +<% + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try{ + tx.begin(); + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + + /********** parameter **********/ + Long docID = MLong.parseLong(request.getParameter("docID"), null); + String partID = clearXSS(request.getParameter("partID"),""); + int gradeCode = MInteger.parseInt(request.getParameter("gradeCode"), -1); + int tableNum = MInteger.parseInt(request.getParameter("tableNum"), 0); + int searchType = MInteger.parseInt(request.getParameter("searchType"), -1); + String displaySummary = MString.checkNull(request.getParameter("displaySummary")); + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + String docName = totDoc.getName(); + + //String docName1=URLDecoder.decode(request.getParameter("docName"),"UTF-8"); + //String docName2=request.getParameter("docName"); + //String docName=URLEncoder.encode(request.getParameter("docName"),"UTF-8"); + + String sort = clearXSS(request.getParameter("sort"),""); + + System.out.println("docName ::::"+docName); + + + //response.setHeader("Accept-Ranges", "bytes"); + //response.setHeader("Content-Disposition","attachment; filename="+request.getParameter("docName").replaceAll(":","_").replace("+", "%20") +".xls;"); + //LJH + //response.setHeader("Content-Disposition","attachment; filename="+request.getParameter("docName").replaceAll(":","_").replace("+", " ") +".xls;"); + response.setHeader("Content-Disposition","attachment; filename="+docName.replaceAll(":","_").replace("+", " ") +".xls;"); + tx.rollback(); +%> + + + + + + + + + + + + + + + + + + + + +<% +}catch(Exception ex){ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> \ No newline at end of file diff --git a/webapps/totsys/common/inc/documents/tot_reports/total_reports_hwp.jsp b/webapps/totsys/common/inc/documents/tot_reports/total_reports_hwp.jsp new file mode 100644 index 0000000..edff53f --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_reports/total_reports_hwp.jsp @@ -0,0 +1,84 @@ + +<% +/************************************************************@@ + * Program Name : tot_reports_excel.jsp + * Description : //// + * Author : ũ + * Create Date : 2010.11.24 + * History : +@@************************************************************/ +%> +<%@ page language="java" contentType="text/html; charset=euc-kr" + pageEncoding="euc-kr"%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" import="java.net.URLDecoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" import="java.util.*" + import="java.io.StringReader" + import="javax.swing.text.html.parser.ParserDelegator" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.util.Stopwatch" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.text.html.CallbackHandler" + import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.doc.table.MTable" + import="kr.co.kihyun.moumi.doc.table.TableDefine" + import="kr.co.kihyun.moumi.doc.table.TableCreation" + import="kr.co.kihyun.moumi.doc.table.item.MItem" + import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.lang.MString"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + + /********** parameter **********/ + String docID = clearXSS(MString.checkNull(request.getParameter("docID")),""); + String partID = clearXSS(request.getParameter("partID"),""); + int gradeCode = MInteger.parseInt(request.getParameter("gradeCode"), -1); + int tableNum = MInteger.parseInt(request.getParameter("tableNum"), 0); + int searchType = MInteger.parseInt(request.getParameter("searchType"), -1); + String displaySummary = MString.checkNull(request.getParameter("displaySummary")); + + //String docName=URLDecoder.decode(request.getParameter("docName"),"UTF-8"); + //String docName=request.getParameter("docName"); + //String docName=URLEncoder.encode(request.getParameter("docName"),"UTF-8"); + String docName=URLDecoder.decode(request.getParameter("docName")); + + //response.setHeader("Accept-Ranges", "bytes"); + //response.setHeader("Content-Disposition","attachment; filename="+request.getParameter("docName").replaceAll(":","_").replace("+", "%20") +".xls;"); + //LJH + //response.setHeader("Content-Disposition","attachment; filename="+request.getParameter("docName").replaceAll(":","_").replace("+", " ") +".xls;"); + + //response.setHeader("Content-Disposition","attachment; filename="+docName.replaceAll(":","_").replace("+", " ") +".xls;"); + response.setHeader("Content-Disposition","attachment; filename="+docName.replaceAll(":","_").replace("+", " ") +".hwp;"); + + %> + + + + + + + + + + + + + + + + + + +<% +}catch(Exception ex){ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> \ No newline at end of file diff --git a/webapps/totsys/common/inc/documents/tot_reports/total_reports_hwp_save.jsp b/webapps/totsys/common/inc/documents/tot_reports/total_reports_hwp_save.jsp new file mode 100644 index 0000000..9dcf2c7 --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_reports/total_reports_hwp_save.jsp @@ -0,0 +1,153 @@ + +<%/************************************************************@@ + * Program Name : doc_view.jsp + * Description : ///Ȳ + * Author : ũ + * Create Date : 2010.11.24 + * History : +@@************************************************************/%> + +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" import="java.net.URLDecoder" + import="java.util.StringTokenizer" import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.text.excel.Excel" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.util.Stopwatch" import="kr.co.kihyun.text.hml.Hwp" + import="kr.co.kihyun.text.html.HtmlUtil" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.doc.table.MTableAnalysis" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.Part" + import="kr.co.kihyun.beans.user.PartList" + import="kr.co.kihyun.beans.totsys.doc.table.Table" + import="kr.co.kihyun.beans.totsys.doc.table.item.Item" + import="kr.co.kihyun.beans.totsys.report.tots.ReportsViewer" + import="kr.co.kihyun.beans.totsys.report.tot.TotReportViewer" + import="kr.co.kihyun.beans.totsys.report.ReportViewManager" + import="kr.co.kihyun.beans.totsys.report.ReportFormElement" + import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="kr.co.kihyun.beans.entity.TotReport" + import="kr.co.kihyun.beans.entity.TotReportProcess" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.beans.entity.MDept" import="java.util.List" + import="javax.jdo.Query" + import="kr.co.kihyun.beans.entity.util.TotReportUtil" + import="kr.co.kihyun.beans.entity.TotDocType"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try{ + + /********** session userId **********/ + Long docID = MLong.parseLong(request.getParameter("docID"), null); + int gradeCode = MInteger.parseInt(request.getParameter("gradeCode"), -1); + int tableNum = MInteger.parseInt(request.getParameter("tableNum"), 0); + int searchType = MInteger.parseInt(request.getParameter("searchType"), -1); + String displaySummary = MString.checkNull(request.getParameter("displaySummary")); + + tx.begin(); + + TotDoc totDoc = (TotDoc)pm.getObjectById(TotDoc.class, docID); + List reportList = totDoc.getAllReports(pm); + List compReportList=null; + //LJH + /* + Query q = pm.newNamedQuery(TotReport.class, "CompReports"); + q = pm.newQuery(TotReport.class, (List) q.execute()); + q.setFilter("totDoc == tot_doc"); + q.declareParameters("kr.co.kihyun.beans.entity.TotDoc tot_doc"); + q.setOrdering("mDept"); + compReportList = (List) q.execute(totDoc); + */ + Query q = pm.newQuery(TotReport.class, compReportList); + q.setFilter("totDoc == tot_doc && process == kr.co.kihyun.beans.entity.TotReportProcess.COMP"); + q.declareParameters("kr.co.kihyun.beans.entity.TotDoc tot_doc"); + q.setOrdering("mDept"); + //v2. 13.SQL : JDO̹Ƿ ذå prepare SQL + compReportList = (List) q.execute(totDoc); + //================= + compReportList=totDoc.getRecursiveAllReports(pm, compReportList, null); + + + +for(int ii=0;ii= 0) { + if(searchType == TotReportProcess.COMP.ordinal()) { + reportList = compReportList; + } else if(searchType == TotReportProcess.ACCEPT.ordinal()) { + q = pm.newQuery(TotReport.class, reportList); + q.setFilter("process == kr.co.kihyun.beans.entity.TotReportProcess.ACCEPT"); + q = pm.newQuery(TotReport.class, (List) q.execute()); + q.setFilter("totDoc == tot_doc"); + q.declareParameters("kr.co.kihyun.beans.entity.TotDoc tot_doc"); + q.setOrdering("mDept"); + reportList = (List) q.execute(totDoc); + } else { + q = pm.newQuery(TotReport.class, reportList); + q = pm.newQuery(TotReport.class, (List) q.execute()); + q.setFilter("totDoc == tot_doc"); + q.declareParameters("kr.co.kihyun.beans.entity.TotDoc tot_doc"); + q.setOrdering("mDept"); + reportList = (List) q.execute(totDoc); + } + } + + tx.rollback(); + + int allReportCount = reportList.size(); + int totReportCount = compReportList.size(); + %> + <% + int index=-1; + tx.begin(); + for(TotReport report : reportList) + { + index++; + if(index%100==0) { tx.rollback();tx.begin(); } + MDept organCode=report.getDept(pm).getOrgan(pm); + String organName=report.getDept(pm).getOrgan(pm).getName(); + String deptName=report.getDept(pm).getName(); + String ownerName=report.getOwnerName(pm); + TotReportProcess process=report.getProcess(); + String html=TotReportUtil.toHTML(report, tableNum, tableNum > 0, true); + %> + + + + + + + +
    <%=deptName%>-<%=ownerName%>
    <%= process == TotReportProcess.COMP ? Excel.removeFmla(html) : process%>
    + <%} + tx.rollback(); + %> + <% + } catch (Exception ex) { + ex.printStackTrace(); + } finally { + if(tx.isActive()) + tx.rollback(); + pm.close(); + } + %> diff --git a/webapps/totsys/common/inc/documents/tot_reports/total_reports_print.jsp b/webapps/totsys/common/inc/documents/tot_reports/total_reports_print.jsp new file mode 100644 index 0000000..d895d61 --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_reports/total_reports_print.jsp @@ -0,0 +1,149 @@ + +<% +/************************************************************@@ + * Program Name : tot_reports_print.jsp + * Description : //// + * Author : ũ + * Create Date : 2010.11.25 + * History : +@@************************************************************/ +%> +<%@ page language="java" contentType="text/html; charset=euc-kr" + pageEncoding="euc-kr"%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" import="java.net.URLDecoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" import="java.util.*" + import="java.io.StringReader" + import="javax.swing.text.html.parser.ParserDelegator" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.util.Stopwatch" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.text.html.CallbackHandler" + import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.doc.table.MTable" + import="kr.co.kihyun.moumi.doc.table.TableDefine" + import="kr.co.kihyun.moumi.doc.table.TableCreation" + import="kr.co.kihyun.moumi.doc.table.item.MItem" + import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.beans.totsys.doc.Doc"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); +System.out.println("-----------------a--------------a--------------"); + /********** parameter **********/ + Long docID = MLong.parseLong(MString.checkNull(request.getParameter("docID")),null); + String partID = request.getParameter("partID"); + int gradeCode = MInteger.parseInt(request.getParameter("gradeCode"), -1); + int tableNum = MInteger.parseInt(request.getParameter("tableNum"), 0); + int searchType = MInteger.parseInt(request.getParameter("searchType"), -1); + String displaySummary = MString.checkNull(request.getParameter("displaySummary")); + + String deptID = null; + String userID = ""; + + Doc doc = new Doc(); + + deptID = doc.getRegisterDept(docID); + userID = doc.getRegisterID(docID); + String docName = URLDecoder.decode(MString.checkNull(request.getParameter("docName")), "UTF-8"); + System.out.println("-----------------b--------------b--------------"); + %> + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    <%=docName%>
    +
    + + + + + + + + +
    +
    + + + + + + + + +
    +
    +
    + + + +<% +}catch(Exception ex){ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> diff --git a/webapps/totsys/common/inc/documents/tot_reports/total_reports_save.jsp b/webapps/totsys/common/inc/documents/tot_reports/total_reports_save.jsp new file mode 100644 index 0000000..f965f52 --- /dev/null +++ b/webapps/totsys/common/inc/documents/tot_reports/total_reports_save.jsp @@ -0,0 +1,242 @@ + +<%/** + * ********************************************************** + * @@ Program Name : doc_view.jsp + * @@ Description : ///Ȳ + * @@ Author : ũ + * @@ Create Date : 2010.11.24 + * @@ History : + * @@*********************************************************** + */%> + +<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="java.util.List" + import="java.util.Map" + import="java.util.HashMap" + import="java.util.StringTokenizer" + import="kr.co.kihyun.text.excel.Excel" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.text.hml.Hwp" + import="kr.co.kihyun.text.html.HtmlUtil" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.util.Stopwatch" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.doc.table.MTableAnalysis" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.Part" + import="kr.co.kihyun.beans.user.PartList" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.beans.totsys.doc.table.Table" + import="kr.co.kihyun.beans.totsys.doc.table.item.Item" + import="kr.co.kihyun.beans.totsys.report.tots.ReportsViewer" + import="kr.co.kihyun.beans.totsys.report.tot.TotReportViewer" + import="kr.co.kihyun.beans.totsys.report.ReportViewManager" + import="kr.co.kihyun.beans.totsys.report.ReportFormElement" + import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="kr.co.kihyun.beans.entity.TotReport" + import="kr.co.kihyun.beans.entity.TotReportProcess" + import="kr.co.kihyun.beans.entity.util.TotReportUtil" + import="kr.co.kihyun.beans.entity.TotDocType" + import="kr.co.kihyun.beans.entity.Grade" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.beans.entity.MDept" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.service.PrssReportsService" + import="kr.co.kihyun.service.vo.PrssReportsVO" + import="kr.co.kihyun.service.vo.ReportTotalVO" + import="javax.jdo.Query"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% request.setCharacterEncoding("utf-8"); %> +<% + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + + /** + * ******** session userId ********* + */ + Long docID = MLong.parseLong(request.getParameter("docID"), null); + int gradeCode = MInteger.parseInt(request.getParameter("gradeCode"), -1); + int tableNum = MInteger.parseInt(request.getParameter("tableNum"), 0); + int searchType = MInteger.parseInt(request.getParameter("searchType"), -1); + String findOption = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("findOption")), "UTF-8"), ""); + String findWord = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("findWord")), "UTF-8"), ""); + int listType = searchType; + String howSort = clearXSS(request.getParameter("howSort"), ""); + + String displaySummary = MString.checkNull(request.getParameter("displaySummary")); + System.out.println("displaySummary ="+displaySummary); + + String sort = clearXSS(request.getParameter("sort"), ""); +// System.out.println("sort2 ::::"+sort); + + tx.begin(); + + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + + //====================================================================== + int count = 0; + + PrssReportsService prssService = new PrssReportsService(pm); + //˻Ķ + Map params = new HashMap(); + params.put("docId", docID); + params.put("listType", listType); + params.put("findOption", findOption); + params.put("filterValue", findWord); + params.put("howSort", howSort); + params.put("sort", sort); + + //˻ ڵ尹ȸ + prssService.createPrssTotalReportsSearchQuery(params); + + List list = null; + + //ϴ ڵ尡 ϸ ȸ + list = prssService.executeQuery(PrssReportsVO.class); + + count = list.size(); + //====================================================================== + + List compReportList = null; //ü + + + int allReportCount = 0; //ü-ü + int totReportCount = 0; //ü-Ϸ + if("true".equals(displaySummary)) { + List totalList = null; + totalList = prssService.getReportTotalByDocId(docID); + + if( totalList != null && totalList.size() > 0 ) { + for(Object obj : totalList) { + ReportTotalVO totalVO = (ReportTotalVO)obj; + + allReportCount = MInteger.parseInt(totalVO.getAllCnt().toString(), 0); + + totReportCount = MInteger.parseInt(totalVO.getTotReportCnt().toString(), 0); + } + } + + if(totReportCount > 0) { + compReportList = prssService.getRecursiveAllReports(docID, TotReportProcess.COMP, ""); //ü-Ϸ + } + + } + tx.rollback(); + +%> + + + + + + <% if (tableNum != 0 && (searchType == TotReportProcess.COMP.ordinal() || searchType == -1)) {%> + + <%} else {%> + + <%}%> + + <% if ("true".equals(displaySummary) && totReportCount > 0) {%> + + + + + + <%}%> + <% + int index = -1; + //tx.begin(); + int slavePaddingLeft = 0; + + if( count > 0 ) { + int listCount = list.size(); + + for (int i = 0; i < listCount; i++) { + index = i; + + PrssReportsVO prssVO = (PrssReportsVO)list.get(i); + TotReportProcess process = (TotReportProcess) prssVO.getProcess(); + + if("2".equals(prssVO.getDeptNo())) { + slavePaddingLeft = 20; + } else { + slavePaddingLeft = 5; + } + + String html = null; + //if(process == TotReportProcess.COMP && prssVO.getDownDocId() == null) { + if( (process == TotReportProcess.COMP && prssVO.getDownDocId() == null) || (process == TotReportProcess.TEMP && "Y".equals(totDoc.getRegularDocYn()))) { + //html = prssVO.getToHTML(pm, tableNum, tableNum > 0, true); //ǥ ִ κ + TotReport report = pm.getObjectById(TotReport.class, prssVO.getId()); + html = TotReportUtil.toHTML(report, tableNum, tableNum > 0, true); //ǥ ִ κ + } + +// for (TotReport report : reportList) { +// index++; +// if (index % 100 == 0) { +// tx.rollback(); +// tx.begin(); +// } +// MDept organCode = report.getDept(pm).getOrgan(pm); +// String organName = report.getDept(pm).getOrgan(pm).getName(); +// String deptName = report.getDept(pm).getName(); +// String ownerName = report.getOwnerName(pm); +// TotReportProcess process = report.getProcess(); +// String upperName = report.getDept(pm).getUpperDept(pm).getName(); +// String html = TotReportUtil.toHTML(report, tableNum, tableNum > 0, true); + %> + + + + + + + <% + } //end of for list + } //end of if( count > 0) + +// } + //tx.rollback(); + %> + <% + if(count <= 0) { //if (reportList.size() <= 0) { + %> + + + + <% } %> +
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.devision")%>μڵ<%=TagFilter.removeTableHeight(MDoc.getTitleForm(totDoc, tableNum))%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.content")%>
    <%=TotReportProcess.ALL%> <%=TotDocType.TOT_DOC%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.table")%>   + <%=TotReportProcess.COMP%>:<%= totReportCount%>   + <%=TotReportProcess.ALL%>:<%= allReportCount%> + + <%if (totReportCount != 0) { //if (compReportList.size() != 0) {%> + <%= Excel.removeFmla(TotReportUtil.toHTML(totDoc, compReportList, tableNum, tableNum > 0))%> + <%} else {%> + <%=Moumi.getMessageBundle().getString("moumi.message.tot_report.notSubmitDoc")%> + <%}%> +
    <%= prssVO.getUpperDept() == null ? "" : prssVO.getUpperDeptName()%><%= MString.checkNull(prssVO.getDeptName())%><%= MString.checkNull(prssVO.getDeptId())%> + <% if( prssVO.getDownDocId() != null ) { + out.write(" [" + Moumi.getMessageBundle().getString("moumi.message.tot_doc.subdoc") + "]"); + }%> + <%= ((process == TotReportProcess.COMP && prssVO.getDownDocId() == null) || (process == TotReportProcess.TEMP && "Y".equals(totDoc.getRegularDocYn()))) ? Excel.removeFmla(html) : process%>
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.notReportData")%>
    + +<% + } catch (Exception ex) { + ex.printStackTrace(); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/memo/errReport_Contents.jsp b/webapps/totsys/common/inc/memo/errReport_Contents.jsp new file mode 100644 index 0000000..e69de29 diff --git a/webapps/totsys/common/inc/memo/reReport_Contents.jsp b/webapps/totsys/common/inc/memo/reReport_Contents.jsp new file mode 100644 index 0000000..73f11de --- /dev/null +++ b/webapps/totsys/common/inc/memo/reReport_Contents.jsp @@ -0,0 +1,73 @@ + +<% +/************************************************************@@ + * Program Name : reMemoContents.jsp + * Description : 纸 / + * Author : ũ + * Create Date : 2010.11.26 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.beans.entity.Memo" + import="javax.jdo.PersistenceManager" import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotReport" import="java.util.List" + import="kr.co.kihyun.beans.entity.TotReportProcess"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +try{ + + /****** Parameter ******/ + Long reportID = null; + String groupID = ""; + reportID = MLong.parseLong(request.getParameter("reportID")); + groupID = clearXSS(request.getParameter("groupID"),""); + + TotReport totReport = pm.getObjectById(TotReport.class, reportID); + List memos = totReport.getMemos(); + + if(memos.size() > 0 && totReport.getProcess() == TotReportProcess.RETURN){%> + + + + + + + + + + +
    + + + + + + + + + +
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_report.reinput")%> + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.request")%>
    + <% for(int i=0; i <%=i+1%><%=Moumi.getMessageBundle().getString("moumi.message.tot_report.reinputReson")%> + : <%= memos.get(i).getContents() %>
    + <%}%> +
    +
    + + +<%}%> +<%}catch(Exception ex){ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ + pm.close(); +} +%> \ No newline at end of file diff --git a/webapps/totsys/common/inc/memo/recog_return_message.jsp b/webapps/totsys/common/inc/memo/recog_return_message.jsp new file mode 100644 index 0000000..e005695 --- /dev/null +++ b/webapps/totsys/common/inc/memo/recog_return_message.jsp @@ -0,0 +1,59 @@ + +<% +/************************************************************@@ + * Program Name : reMemoContents.jsp + * Description : 纸 / + * Author : + * Create Date : + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.lang.MLong" import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.Repoadm"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +try{ + + /****** Parameter ******/ + Long repoadminID = MLong.parseLong(request.getParameter("repoadminID")); + Repoadm repoadm = pm.getObjectById(Repoadm.class, repoadminID); +%> + +<%@page import="kr.co.kihyun.lang.MString"%> + + + + + + + + +
    + + + + + + + + + +
    ݷ
    <%= MString.checkNull(repoadm.getHistory()) %> +
    +
    + + +<%}catch(Exception ex){ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ + pm.close(); +} +%> \ No newline at end of file diff --git a/webapps/totsys/common/inc/repoadm/repoadm_info.jsp b/webapps/totsys/common/inc/repoadm/repoadm_info.jsp new file mode 100644 index 0000000..a2be539 --- /dev/null +++ b/webapps/totsys/common/inc/repoadm/repoadm_info.jsp @@ -0,0 +1,86 @@ + +<% +/************************************************************@@ + * Program Name : reMemoContents.jsp + * Description : 纸 / + * Author : + * Create Date : + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.lang.MLong" import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.Repoadm" + import="kr.co.kihyun.beans.entity.TotReport" + import="kr.co.kihyun.lang.MString"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + + /****** Parameter ******/ + Long reportID = MLong.parseLong(request.getParameter("reportID")); + TotReport totReport = pm.getObjectById(TotReport.class, reportID); +%> + + +<%@page import="kr.co.kihyun.beans.entity.Recog"%> +<%@page import="java.text.SimpleDateFormat"%> +<%@page import="kr.co.kihyun.moumi.Moumi"%> + + + + + + + +
    + + + + + + + + + + + + <% + tx.begin(); + for(int i=0; i + + + + + + + <%} + tx.rollback(); + %> +
    <%= Moumi.getMessageBundle().getString("moumi.message.repoperdoc.recog")%><%= Moumi.getMessageBundle().getString("moumi.message.repoperdoc.recog")%>û + <%= Moumi.getMessageBundle().getString("moumi.message.repoperdoc.recog")%>
    <%= totReport.getRepoadms().get(i).getRecogNum() %> <%= totReport.getRepoadms().get(i).getRecogUser(pm).getUpperDept(pm).getName() %><%= totReport.getRepoadms().get(i).getRecogUser(pm).getName() %><%= new SimpleDateFormat("yyyy-MM-dd").format(totReport.getRepoadms().get(i).getDecDate()) %>
    <%= new SimpleDateFormat("HH:mm:ss").format(totReport.getRepoadms().get(i).getDecDate()) %> +
    <%= Recog.asRecogType(totReport.getRepoadms().get(i).getRecog().ordinal())%>
    +
    + + +<%}catch(Exception ex){ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> \ No newline at end of file diff --git a/webapps/totsys/common/inc/repoadm/top/images/hart.jpg b/webapps/totsys/common/inc/repoadm/top/images/hart.jpg new file mode 100644 index 0000000..d7a3c9a Binary files /dev/null and b/webapps/totsys/common/inc/repoadm/top/images/hart.jpg differ diff --git a/webapps/totsys/common/inc/repoadm/top/images/location.jpg b/webapps/totsys/common/inc/repoadm/top/images/location.jpg new file mode 100644 index 0000000..995105a Binary files /dev/null and b/webapps/totsys/common/inc/repoadm/top/images/location.jpg differ diff --git a/webapps/totsys/common/inc/repoadm/top/images/location_bg.gif b/webapps/totsys/common/inc/repoadm/top/images/location_bg.gif new file mode 100644 index 0000000..b63132d Binary files /dev/null and b/webapps/totsys/common/inc/repoadm/top/images/location_bg.gif differ diff --git a/webapps/totsys/common/inc/repoadm/top/images/top_acceptbox.jpg b/webapps/totsys/common/inc/repoadm/top/images/top_acceptbox.jpg new file mode 100644 index 0000000..143b094 Binary files /dev/null and b/webapps/totsys/common/inc/repoadm/top/images/top_acceptbox.jpg differ diff --git a/webapps/totsys/common/inc/repoadm/top/images/top_assignbox.jpg b/webapps/totsys/common/inc/repoadm/top/images/top_assignbox.jpg new file mode 100644 index 0000000..bd6e449 Binary files /dev/null and b/webapps/totsys/common/inc/repoadm/top/images/top_assignbox.jpg differ diff --git a/webapps/totsys/common/inc/repoadm/top/images/top_bg.jpg b/webapps/totsys/common/inc/repoadm/top/images/top_bg.jpg new file mode 100644 index 0000000..7a84007 Binary files /dev/null and b/webapps/totsys/common/inc/repoadm/top/images/top_bg.jpg differ diff --git a/webapps/totsys/common/inc/repoadm/top/images/top_cancelbox.jpg b/webapps/totsys/common/inc/repoadm/top/images/top_cancelbox.jpg new file mode 100644 index 0000000..bf8742e Binary files /dev/null and b/webapps/totsys/common/inc/repoadm/top/images/top_cancelbox.jpg differ diff --git a/webapps/totsys/common/inc/repoadm/top/images/top_compbox.jpg b/webapps/totsys/common/inc/repoadm/top/images/top_compbox.jpg new file mode 100644 index 0000000..0c7be67 Binary files /dev/null and b/webapps/totsys/common/inc/repoadm/top/images/top_compbox.jpg differ diff --git a/webapps/totsys/common/inc/repoadm/top/images/top_endbox.jpg b/webapps/totsys/common/inc/repoadm/top/images/top_endbox.jpg new file mode 100644 index 0000000..30e414f Binary files /dev/null and b/webapps/totsys/common/inc/repoadm/top/images/top_endbox.jpg differ diff --git a/webapps/totsys/common/inc/repoadm/top/images/top_logout.gif b/webapps/totsys/common/inc/repoadm/top/images/top_logout.gif new file mode 100644 index 0000000..fdcbe65 Binary files /dev/null and b/webapps/totsys/common/inc/repoadm/top/images/top_logout.gif differ diff --git a/webapps/totsys/common/inc/repoadm/top/images/top_recogbox.jpg b/webapps/totsys/common/inc/repoadm/top/images/top_recogbox.jpg new file mode 100644 index 0000000..38ca765 Binary files /dev/null and b/webapps/totsys/common/inc/repoadm/top/images/top_recogbox.jpg differ diff --git a/webapps/totsys/common/inc/repoadm/top/images/top_returnbox.jpg b/webapps/totsys/common/inc/repoadm/top/images/top_returnbox.jpg new file mode 100644 index 0000000..df8fb25 Binary files /dev/null and b/webapps/totsys/common/inc/repoadm/top/images/top_returnbox.jpg differ diff --git a/webapps/totsys/common/inc/repoadm/top/images/top_seebox.jpg b/webapps/totsys/common/inc/repoadm/top/images/top_seebox.jpg new file mode 100644 index 0000000..b8821e0 Binary files /dev/null and b/webapps/totsys/common/inc/repoadm/top/images/top_seebox.jpg differ diff --git a/webapps/totsys/common/inc/repoadm/top/images/top_setup.jpg b/webapps/totsys/common/inc/repoadm/top/images/top_setup.jpg new file mode 100644 index 0000000..f47db5e Binary files /dev/null and b/webapps/totsys/common/inc/repoadm/top/images/top_setup.jpg differ diff --git a/webapps/totsys/common/inc/repoadm/top/images/top_tempbox.jpg b/webapps/totsys/common/inc/repoadm/top/images/top_tempbox.jpg new file mode 100644 index 0000000..047f100 Binary files /dev/null and b/webapps/totsys/common/inc/repoadm/top/images/top_tempbox.jpg differ diff --git a/webapps/totsys/common/inc/repoadm/top/top.jsp b/webapps/totsys/common/inc/repoadm/top/top.jsp new file mode 100644 index 0000000..ce0b216 --- /dev/null +++ b/webapps/totsys/common/inc/repoadm/top/top.jsp @@ -0,0 +1,179 @@ + +<% +/************************************************************@@ + * Program Name : top.jsp + * Description : //// + * Author : + * Create Date : 2004.10.11 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.moumi.Moumi" import="java.net.URLDecoder" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.beans.user.User"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +try{ + /*********** User HttpSSOLogin check ***********/ + String connURL="location='/totsys/login/login.jsp';"; + if(!HttpSSOLogin.isLogin(request)){ + out.println(ServletUtil.alert("۾ð Ǿϴ.\\n ٽ÷α Ͻñ ٶϴ.")); + out.println(ServletUtil.getJavaScript(connURL)); + return; + } + + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + String usName = HttpSSOLogin.getUserName(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + + if(usID == null){ + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } + + if(sysAuth != Moumi.REPOADM){ + connURL="history.go(-1);"; + out.println(ServletUtil.alert(" ϴ.\\nȮϽð ٽ õּ.")); + out.println(ServletUtil.getJavaScript(connURL)); + return; + } + ////////////////////////////////////////////// login session value end ////////////////////////////////////////////// + + /****** Parameter ******/ + String dirPath = ""; + dirPath = URLDecoder.decode(clearXSS(request.getParameter("dirPath"),""), "UTF-8"); + %> + + + +   + + + + + + + + <%if(Moumi.getUseAssign()){%> + + <%}%> + + <%if(Moumi.getUseRecog()){%> + + <%}else{%> + + <%}%> + + + + + + + + + +
      
    + +   + + +   + + + + + + + + + + + + + + + +
     <%= dirPath %><%= usName + "("+usID+")"%> α + ϼ̽ϴ. 
    + +   + + +<% +}catch(Exception ex){ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> \ No newline at end of file diff --git a/webapps/totsys/common/inc/repoper/accept_page_list.jsp b/webapps/totsys/common/inc/repoper/accept_page_list.jsp new file mode 100644 index 0000000..c28eefd --- /dev/null +++ b/webapps/totsys/common/inc/repoper/accept_page_list.jsp @@ -0,0 +1,319 @@ + +<% +/************************************************************@@ + * Program Name : accept_page_list.jsp + * Description : / + * Author : + * Create Date : 2004.11.09 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="java.util.Arrays" import="java.util.Date" + import="java.util.List" import="java.util.Set" + import="java.util.ResourceBundle" import="java.text.SimpleDateFormat" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="javax.jdo.Query" import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.moumi.MoumiConfig"%> +<% + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + String deptID = HttpSSOLogin.getDeptID(request); + + int wordLengthLimit = 19; + + tx.begin(); + + MUser mUser = pm.getObjectById(MUser.class, usID); + List reports = mUser.getUnwrittenReports(pm, null, null); +%> + + + + + +
      <%= TotReportProcess.ACCEPT%><%=MoumiConfig.getMessageBundle().getString("moumi.message.doc") %> + go + onclick="openTop(2);" <%}%>>
    + + + + + + + + + + + + + + + + +
      + + + + +
    + + + + + + + + + + + + + + + + + +
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.doc") %>
    + + <% +if(reports.size() >= 3){ + int blank=0; + for(int i=0; i<3; i++, blank++){ + if(i==0){ + %> + + + + + + + + + <% + }else if((blank%2)==0){ + %> + + + + + + + + + <% + }else{ + %> + + + + + + + + + <% + } + } +}else{ + int blank=0; + for(int i=0; i + + + + + + + + + + <% + }else if((blank%2)==0){ + %> + + + + + + + + + <% + }else{ + %> + + + + + + + + + <% + } + } + for(int i=0; i < (3-reports.size()); i++, blank++){ + if((blank%2)==0){ + %> + + + + + + + + + <% + }else{ + %> + + + + + + + + + <% + } + } +} +%> + + + + +
    + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getTotDoc().getName(), wordLengthLimit)%> + <%= reports.get(i).getTotDoc().getOwnerName(pm) %><%= reports.get(i).getTotDoc().getDept(pm).getName() %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getTotDoc().getStartDate()) %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getTotDoc().getEndDate()) %> + <% + if(reports.get(i).getProcess() == TotReportProcess.RETURN){ + %> <%= TotReportProcess.RETURN%> <% + } + %> +
    + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getTotDoc().getName(), wordLengthLimit)%> + <%= reports.get(i).getTotDoc().getOwnerName(pm) %><%= reports.get(i).getTotDoc().getDept(pm).getName() %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getTotDoc().getStartDate()) %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getTotDoc().getEndDate()) %> + <% + if(reports.get(i).getProcess() == TotReportProcess.RETURN){ + %> <%= TotReportProcess.RETURN%> <% + } + %> +
    + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getTotDoc().getName(), wordLengthLimit)%> + <%= reports.get(i).getTotDoc().getOwnerName(pm) %><%= reports.get(i).getTotDoc().getDept(pm).getName() %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getTotDoc().getStartDate()) %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getTotDoc().getEndDate()) %> + <% + if(reports.get(i).getProcess() == TotReportProcess.RETURN){ + %> <%= TotReportProcess.RETURN%> <% + } + %> +
    <%if(reports.get(i).getProcess() == TotReportProcess.RETURN){%> + + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getTotDoc().getName(), wordLengthLimit)%> + <%}else if(reports.get(i).getProcess() == TotReportProcess.ACCEPT){%> + + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getTotDoc().getName(), wordLengthLimit)%> + <%}%> <%= reports.get(i).getTotDoc().getOwnerName(pm) %><%= reports.get(i).getTotDoc().getDept(pm).getName() %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getTotDoc().getStartDate()) %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getTotDoc().getEndDate()) %> + <% + if(reports.get(i).getProcess() == TotReportProcess.RETURN){ + %> <%= TotReportProcess.RETURN%> <% + } + %> +
    <%if(reports.get(i).getProcess() == TotReportProcess.RETURN){%> + + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getTotDoc().getName(), wordLengthLimit)%> + <%}else if(reports.get(i).getProcess() == TotReportProcess.ACCEPT){%> + + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getTotDoc().getName(), wordLengthLimit)%> + <%}%> + <%= reports.get(i).getTotDoc().getOwnerName(pm) %><%= reports.get(i).getTotDoc().getDept(pm).getName() %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getTotDoc().getStartDate()) %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getTotDoc().getEndDate()) %> + <% + if(reports.get(i).getProcess() == TotReportProcess.RETURN){ + %> <%= TotReportProcess.RETURN%> <% + } + %> +
    <%if(reports.get(i).getProcess() == TotReportProcess.RETURN){%> + + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getTotDoc().getName(), wordLengthLimit)%> + <%}else if(reports.get(i).getProcess() == TotReportProcess.ACCEPT){%> + + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getTotDoc().getName(), wordLengthLimit)%> + <%}%> + <%= reports.get(i).getTotDoc().getOwnerName(pm) %><%= reports.get(i).getTotDoc().getDept(pm).getName() %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getTotDoc().getStartDate()) %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getTotDoc().getEndDate()) %> + <% + if(reports.get(i).getProcess() == TotReportProcess.RETURN){ + %> <%= TotReportProcess.RETURN%> <% + } + %> +
          
          
    +
    +
     
    +<% + tx.rollback(); + }catch(Exception e){ + e.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + }finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/repoper/left/left.jsp b/webapps/totsys/common/inc/repoper/left/left.jsp new file mode 100644 index 0000000..bbb0ce6 --- /dev/null +++ b/webapps/totsys/common/inc/repoper/left/left.jsp @@ -0,0 +1,318 @@ + +<% +/************************************************************@@ + * Program Name : top.jsp + * Description : ڸ ž + * Author : + * Create Date : 2004.10.11 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.text.html.ServletUtil" + import="java.net.URLDecoder" import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.beans.totsys.menu.MenuBean"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +try{ + /*********** User HttpSSOLogin check ***********/ + String connURL="location='/totsys/login/login.jsp';"; + if(!HttpSSOLogin.isLogin(request)){ + out.println(ServletUtil.alert("۾ð Ǿϴ.\\nٽ÷α Ͻñ ٶϴ.")); + out.println(ServletUtil.getJavaScript(connURL)); + return; + } + + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + String usName = HttpSSOLogin.getUserName(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + + if(sysAuth != Moumi.REPOPER && sysAuth != Moumi.SUB_TOTPER && sysAuth != Moumi.TOTPER){ + connURL="history.go(-1);"; + out.println(ServletUtil.alert(" ϴ.\\nȮϽð ٽ õּ.")); + out.println(ServletUtil.getJavaScript(connURL)); + return; + } + + /****** Parameter ******/ + String dirPath = ""; + dirPath = URLDecoder.decode(clearXSS(request.getParameter("dirPath"),""), "UTF-8"); + + MenuBean tempboxMenu = new MenuBean(request, "/totsys/repoper/mydocbox/tempbox/report_list.jsp"); +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    +
    <%= tempboxMenu %>
    + + + + +
    +
    Ϸ
    + + + + +
    +
    +
    + + + + + + + + + +<% +}catch(Exception ex){ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> diff --git a/webapps/totsys/common/inc/repoper/mydocbox/submenu.jsp b/webapps/totsys/common/inc/repoper/mydocbox/submenu.jsp new file mode 100644 index 0000000..31b18be --- /dev/null +++ b/webapps/totsys/common/inc/repoper/mydocbox/submenu.jsp @@ -0,0 +1,110 @@ + +<% +/************************************************************@@ + * Program Name : doc_list.jsp + * Description : //// + * Author : + * Create Date : 2004.10.11 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.moumi.report.MReport"%> + +<% +try{ + /******* Parameter *********/ + int prss = MInteger.parseInt(request.getParameter("prss"));%> + + + + + + <%//() + if(MReport.ASSIGN == prss){%> + + <%}else{%> + + <%}%> + + + + <%//纸 + if(MReport.RETURN == prss){%> + + <%}else{%> + + <%}%> + + + + <%//ӽú + if(MReport.TEMP == prss){%> + + <%}else{%> + + <%}%> + + + + <%//Ϸ + if(MReport.COMP == prss){%> + + <%}else{%> + + <%}%> + + + + <%// + if(MReport.END == prss){%> + + <%}else{%> + + <%}%> + +
    ||ӽúӽú|ϷϷ|
    + + +<% +}catch(Exception ex){ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> \ No newline at end of file diff --git a/webapps/totsys/common/inc/repoper/repoper.jsp b/webapps/totsys/common/inc/repoper/repoper.jsp new file mode 100644 index 0000000..604eabf --- /dev/null +++ b/webapps/totsys/common/inc/repoper/repoper.jsp @@ -0,0 +1,126 @@ + +<% /** + * **********************************************************@@ Program Name + * : doc_list.jsp Description : //// Author : ũ Create + * Date : 2010.11.27 History : + * @@*********************************************************** + */ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.moumi.Moumi" + import="java.net.URLDecoder" + import="kr.co.kihyun.beans.entity.*" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.beans.user.DeptAdd" + import="kr.co.kihyun.beans.entity.util.*"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + String usID = HttpSSOLogin.getLoginID(request); + String dtID = HttpSSOLogin.getDeptID(request); + DeptAdd dept = new DeptAdd(); + int grade = dept.getGrade(usID, dtID); + int foundation = dept.getFoundation(usID, dtID); + /** + * ***** Parameter ******** + */ + Long reportID = MLong.parseLong(request.getParameter("reportID")); + int tmp1 = MInteger.parseInt(request.getParameter("tmp1"), 0); //⺻ ǥ + + tx.begin(); + + TotReport totReport = pm.getObjectById(TotReport.class, reportID); +%> + + + + + + + + + + + + + + + + +
    + <%=Moumi.getMessageBundle().getString("moumi.message.tot_report.submit")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.info")%>  
    + + + + + + + + <%if (tmp1 != 0) {%> + + + + + <%} else {%> + + + <%}%> + + + + + + + +
    + <%=Moumi.getMessageBundle().getString("moumi.message.tot_report.submit")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.person")%>  + + <%= totReport.getOwnerName()%>  + + <%=TotDocType.SUB_DOC%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.modify")%>  + + + <%=Moumi.getMessageBundle().getString("moumi.message.tot_report.career")%>  + + + <%=Moumi.getMessageBundle().getString("moumi.message.tot_report.submit")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.person")%>  + + <%= totReport.getOwnerName()%>  +
    E-MAIL + <%= MString.checkNull(totReport.getOwnerEmail())%>  + + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.telNumber")%>  + + <%= MString.checkNull(totReport.getOwnerPhone())%>  +
    + + +<% + tx.rollback(); + } catch (Exception ex) { + ex.printStackTrace(); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/repoper/top/top.jsp b/webapps/totsys/common/inc/repoper/top/top.jsp new file mode 100644 index 0000000..a12d85a --- /dev/null +++ b/webapps/totsys/common/inc/repoper/top/top.jsp @@ -0,0 +1,31 @@ + +<% +/************************************************************@@ + * Program Name : doc_list.jsp + * Description : //// + * Author : + * Create Date : 2004.10.14 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.moumi.Moumi"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + + + + +<% + if(!HttpSSOLogin.isLogin(request)){ + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } + +%> + + + diff --git a/webapps/totsys/common/inc/repoper/total_account_list.jsp b/webapps/totsys/common/inc/repoper/total_account_list.jsp new file mode 100644 index 0000000..fdd6f20 --- /dev/null +++ b/webapps/totsys/common/inc/repoper/total_account_list.jsp @@ -0,0 +1,319 @@ + +<% +/************************************************************@@ + * Program Name : total_account_list.jsp + * Description : / + * Author : ȣ + * Create Date : 2012.11.22 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="java.util.Arrays" import="java.util.Date" + import="java.util.List" import="java.util.Set" + import="java.util.ResourceBundle" import="java.text.SimpleDateFormat" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="javax.jdo.Query" import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.moumi.MoumiConfig"%> +<% + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + String deptID = HttpSSOLogin.getDeptID(request); + + int wordLengthLimit = 19; + + tx.begin(); + + MUser mUser = (MUser)pm.getObjectById(MUser.class, usID); + //List reports = mUser.getUnwrittenReports(pm, null, null); + List reports = mUser.getOnGoingDocs(pm,null,null); +%> + + + + + +
      <%= "ڷ" %> + go + onclick="openTop(2);" <%}%>>
    + + + + + + + + + + + + + + + + +
      + + + + +
    + + + + + + + + + + + + + + + + + +
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.doc") %>
    + + <% + if(reports.size() >= 3){ + int blank=0; + for(int i=0; i<3; i++, blank++){ + if(i==0){ + %> + + + + + + + + + <% + }else if((blank%2)==0){ + %> + + + + + + + + + <% + }else{ + %> + + + + + + + + + <% + } + } + }else{ + int blank=0; + for(int i=0; i + + + + + + + + + <% + }else if((blank%2)==0){ + %> + + + + + + + + + <% + }else{ + %> + + + + + + + + + <% + } + } + for(int i=0; i < (3-reports.size()); i++, blank++){ + if((blank%2)==0){ + %> + + + + + + + + + <% + }else{ + %> + + + + + + + + + <% + } + } + } + %> + + + + +
    + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getName(), wordLengthLimit)%> + <%= reports.get(i).getOwnerName(pm) %><%= reports.get(i).getDept(pm).getName() %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getStartDate()) %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getEndDate()) %> + <% + if(reports.get(i).PROCESS_PRSS == 3){ + %> <%= TotReportProcess.RETURN%> <% + } + %> +
    + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getName(), wordLengthLimit)%> + <%= reports.get(i).getOwnerName(pm) %><%= reports.get(i).getDept(pm).getName() %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getStartDate()) %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getEndDate()) %> + <% + if(reports.get(i).PROCESS_PRSS == 3){ + %> <%= TotReportProcess.RETURN%> <% + } + %> +
    + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getName(), wordLengthLimit)%> + <%= reports.get(i).getOwnerName(pm) %><%= reports.get(i).getDept(pm).getName() %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getStartDate()) %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getEndDate()) %> + <% + if(reports.get(i).PROCESS_PRSS == 3){ + %> <%= TotReportProcess.RETURN%> <% + } + %> +
    <%if(reports.get(i).PROCESS_PRSS == 3){%> + + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getName(), wordLengthLimit)%> + <%}else if(reports.get(i).PROCESS_PRSS == 3){%> + + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getName(), wordLengthLimit)%> + <%}%> <%= reports.get(i).getOwnerName(pm) %><%= reports.get(i).getDept(pm).getName() %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getStartDate()) %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getEndDate()) %> + <% + if(reports.get(i).PROCESS_PRSS == 3){ + %> <%= TotReportProcess.RETURN%> <% + } + %> +
    <%if(reports.get(i).PROCESS_PRSS == 3){%> + + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getName(), wordLengthLimit)%> + <%}else if(reports.get(i).PROCESS_PRSS == 3){%> + + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getName(), wordLengthLimit)%> + <%}%> + <%= reports.get(i).getOwnerName(pm) %><%= reports.get(i).getDept(pm).getName() %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getStartDate()) %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getEndDate()) %> + <% + if(reports.get(i).PROCESS_PRSS == 3){ + %> <%= TotReportProcess.RETURN%> <% + } + %> +
    <%if(reports.get(i).PROCESS_PRSS == 3){%> + + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getName(), wordLengthLimit)%> + <%}else if(reports.get(i).PROCESS_PRSS == 3){%> + + onclick="openTop(2);" <%}%>><%=MString.getEllipsis(reports.get(i).getName(), wordLengthLimit)%> + <%}%> + <%= reports.get(i).getOwnerName(pm) %><%= reports.get(i).getDept(pm).getName() %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getStartDate()) %><%= new SimpleDateFormat("yyyy-MM-dd").format(reports.get(i).getEndDate()) %> + <% + if(reports.get(i).PROCESS_PRSS == 3){ + %> <%= TotReportProcess.RETURN%> <% + } + %> +
          
          
    +
    +
     
    +<% + tx.rollback(); + }catch(Exception e){ + e.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + }finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/sec/secure.inc.jsp b/webapps/totsys/common/inc/sec/secure.inc.jsp new file mode 100644 index 0000000..de7d439 --- /dev/null +++ b/webapps/totsys/common/inc/sec/secure.inc.jsp @@ -0,0 +1,131 @@ + +<% +String test="<><>"; +%> + +<%! + //Ȯ ˻ + //$filename: ϸ + //$avaext: Ȯ )$avaext="jpg,gif,pdf" + //ϰ: true-"ok", false-"error" + + String checkext(String fileName, String avaExt){ + String chkExt = "false"; + + if(fileName.indexOf("\0")>-1) { + chkExt= "false"; + return chkExt; + } + + //ε ȭ üũ + String file_ext = fileName.substring(fileName.lastIndexOf('.')+1); + if(( file_ext.equalsIgnoreCase("jsp") || file_ext.equalsIgnoreCase("htm") || file_ext.equalsIgnoreCase("html") )){ + //out.println("ε Ȯ"); + chkExt="false"; + return chkExt; + } + + // Ȯڰ + if(!avaExt.equals("")){ + // + avaExt.replaceAll(" ",""); + String compStr[] = avaExt.split(","); + + for(int i=0; i < compStr.length; i++){ + if(file_ext.equalsIgnoreCase(compStr[i])){ + chkExt = "true"; + } + } + } + else{ + chkExt = "true"; + } + + return chkExt; + } + + + //ٿε üũ Լ + //$dn_dir-ٿε 丮 + //$fname-ٿε ϸ + // - true:ٿε , false:"error" + + String checkpath(String dn_path, String fname){ + //ԷµǴ 丮 Ư ˻ + if((dn_path.indexOf("..\\")!=-1) || (dn_path.indexOf("../")!=-1)){ + return "error"; + } + + if((fname.indexOf("../") != -1) || (fname.indexOf("..%2F") != -1) || (fname.indexOf("./") != -1)) { + return "error"; + } + + // Է° ٿε + if(dn_path.equals("")){ + } + else{ + dn_path=dn_path+"/"; + } + String origfile = dn_path+fname; + + //fname ϸ и-ϸ 輺 ͸ + //fname.replaceAll("\\","/"); + //String filename3 = fname.substring(fname.lastIndexOf('/')+1); + //fname.replaceAll("\\","/"); Ʒ + String filename4=fname.substring(fname.lastIndexOf('\\')+1); + + //и ϸ θ 籸 + String FilePath = dn_path + filename4; + + // Է° 籸 Է° Ͽ 輺 ϴ Ȯ + if(origfile.equals(FilePath)){ + return (FilePath); + } + else{ + return "error"; + } + } + + //XSS Լ + //$str-͸ ° + //$avatag- ±׸Ʈ ) $avatag="p,br" + String clearXSS(String str, String avatag){ + + if(str==null || str.trim().equals("")){ + return avatag; + } + //XSS + str=str.replaceAll("\0"," "); + str=str.replaceAll("%00",""); + + //SQL Injection + str=str.replaceAll("'","''"); + str=str.replaceAll("\"","\"\""); + //str=str.replaceAll("\\","\\\\"); + //str=str.replaceAll(";",""); + str=str.replaceAll("#",""); + str=str.replaceAll("--",""); + //str=str.replaceAll(" ",""); + //str=str.replaceAll("or",""); + str=str.replaceAll("%27",""); + + //XSS + str=str.replaceAll("<","<"); + str=str.replaceAll(">",">"); + + /* ±׸ (̿ϼ) + if(!avatag.equals("")){ + avatag.replaceAll(" ",""); + String[] st= avatag.split(","); + + // ±׸ θ ˻Ͽ · ȯ + for(int x=0; x","<"+str+">"); + str=str.replaceAll("</"+str+" "," diff --git a/webapps/totsys/common/inc/statistics/statistics.jsp b/webapps/totsys/common/inc/statistics/statistics.jsp new file mode 100644 index 0000000..c25f8e4 --- /dev/null +++ b/webapps/totsys/common/inc/statistics/statistics.jsp @@ -0,0 +1,627 @@ +<%@page import="java.net.URLDecoder"%> +<%@ page contentType="text/html; charset=UTF-8" + import="java.net.URLEncoder" import="java.util.Date" + import="java.text.*" import="kr.co.kihyun.util.MDate" + import="kr.co.kihyun.lang.MLong" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.moumi.MoumiUtil" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.beans.user.UserGroup" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.beans.user.UserGroupList" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.beans.entity.MUser" import="java.util.*" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.UserPart" + import="kr.co.kihyun.service.*" import="kr.co.kihyun.service.vo.*" + import="java.util.HashMap" + import="java.util.Map" import="javax.jdo.Query" import="kr.co.kihyun.moumi.MoumiConfig" + import="org.slf4j.Logger" import="org.slf4j.LoggerFactory" +%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +//final Logger LOG = LoggerFactory.getLogger(this.getClass()); +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + String deptID = HttpSSOLogin.getDeptID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + + /****** Parameter *******/ + //String strPage = clearXSS(request.getParameter("strPage"),""); + String searchType = clearXSS(request.getParameter("searchType"),""); + String dateType = clearXSS(request.getParameter("dateType"),""); + String stDate = clearXSS(request.getParameter("stDate"),""); + String edDate = clearXSS(request.getParameter("edDate"),""); + String searchOrgan = clearXSS(request.getParameter("search_organ"),""); + String searchDept = clearXSS(request.getParameter("search_dept"),""); + String chkboxDept = clearXSS(request.getParameter("chkbox_dept"),""); + String chkboxSchool = clearXSS(request.getParameter("chkbox_school"),""); + String searchOrganName = ""; + + tx.begin(); + + List list = null; + DecimalFormat numberFormat = new DecimalFormat("#,###,###"); + Long now_today = new Date().getTime(); + SimpleDateFormat dForomat = new SimpleDateFormat("yyyy-MM-dd"); + + MDept mDept = pm.getObjectById(MDept.class, deptID); + + +// if( LOG.isDebugEnabled() ) { +// LOG.debug("sysAuth={}", sysAuth); +// } + + boolean disableOrgan = false; + boolean disableDept = false; + + DeptService deptService = new DeptService(pm); + String sOrgan = "ALL"; + String sDept = "ALL"; + List organDeptList = null; + List deptList = null; + String rootDept = ""; + //=========================================================== + // û, μ, б ޺ڽ ȸ + //=========================================================== + if( sysAuth == SysAuth.SYSADM.ordinal() ) { + //9.ý۰ + rootDept = mDept.getRootDept(pm).getId(); + organDeptList = deptService.getLOVFromDept(DeptService.TYPE.SAME_ROOT_DEPT, rootDept); + }else if( sysAuth == SysAuth.SUB_SYSADM.ordinal() ) { + //7.ý۰ + sOrgan = mDept.getOrgan(); + if( deptID.equals(sOrgan) ) { + // + disableOrgan = true; + organDeptList = new ArrayList(); + CodeVO codeVO = new CodeVO(); + codeVO.setCode(mDept.getName()); + codeVO.setValue(mDept.getId()); + organDeptList.add(codeVO); + }else{ + //μ, б + sDept = deptID; + disableOrgan = true; + disableDept = true; + organDeptList = new ArrayList(); + CodeVO organCode = new CodeVO(); + MDept mOrgan = pm.getObjectById(MDept.class, sOrgan); + organCode.setCode(mOrgan.getName()); + organCode.setValue(mOrgan.getId()); + organDeptList.add(organCode); + deptList = new ArrayList(); + CodeVO codeVO = new CodeVO(); + codeVO.setCode(mDept.getName()); + codeVO.setValue(mDept.getId()); + deptList.add(codeVO); + + Grade grade = mDept.getGrade(); + if( grade == Grade.NULL ) { + //μ + chkboxDept = "D"; + }else{ + //б + chkboxSchool = "S"; + } + } + } + //=========================================================== + if( !searchType.equals("") ) { + sOrgan = searchOrgan; + sDept = searchDept; + String sDeptSchoolType = MString.checkNull(chkboxDept, chkboxSchool); + + StatisticsService service = new StatisticsService(pm); + + Map params = new HashMap(); + params.put("organId", sOrgan); + params.put("deptId", sDept); + params.put("deptSchoolType", sDeptSchoolType); + if( searchType.equals("all") ) { + params.put("startDate", stDate); + params.put("endDate", edDate); + + list = service.getStatisticsForAll(params); + }else if( searchType.equals("period") ) { + params.put("dateType", dateType); + params.put("stDate", stDate); + params.put("edDate", edDate); + list = service.getStatisticsByDate(params); + } + } +%> + + + +<%=Moumi.getTitle()%> + + + + + + + + + + + + + + + <%----%> + + + + + +
    + + + + + + + <% if( !searchType.equals("") ) { %> + + + + <% } %> + + <%@ include file="/totsys/common/inc/buttom/buttom.jsp"%> + +
    + +
    + + + + + + + + + +
    + + + +   + + " readonly onclick="showSetWin('searchForm.stDate');" style="cursor: pointer; vertical-align: middle;" class="inputtxt"> + + + + ~ + + " readonly onclick="showSetWin('searchForm.edDate');" style="cursor: pointer; vertical-align: middle;" class="inputtxt"> + + + + +   + + + + + + + + + + + + +   + + +
    + + + +   + + + +   + + + +   + + +     + + + + + +
    +
    + +
    + + <% if( searchType.equals("") || searchType.equals("period") ) { %> + + + + + +
    + + + + + + + + + + <% + int prssTot = 0; //հ + int endTot = 0; //Ϸհ + int acceptTot = 0; //հ + int tempTot = 0; //հ + int compTot = 0; //Ϸհ + for(int i = 0; i < list.size(); i++ ) { + Object[] row = (Object[])list.get(i); + prssTot += Integer.parseInt(row[1].toString()); + endTot += Integer.parseInt(row[2].toString()); + acceptTot += Integer.parseInt(row[3].toString()); + tempTot += Integer.parseInt(row[4].toString()); + compTot += Integer.parseInt(row[5].toString()); + %> + + + + + + + + + <% + } + %> + + + + + + + + +
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.day")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_doc")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.temp")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_doc")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.complete")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.accept")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_report")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.temp")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_report")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.complete")%>
    <%= row[0] %><%= numberFormat.format(row[1]).trim() %><%= numberFormat.format(row[2]).trim() %><%= numberFormat.format(row[3]).trim() %><%= numberFormat.format(row[4]).trim() %><%= numberFormat.format(row[5]).trim() %>
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.total")%><%= numberFormat.format(prssTot).trim() %><%= numberFormat.format(endTot).trim() %><%= numberFormat.format(acceptTot).trim() %><%= numberFormat.format(tempTot).trim() %><%= numberFormat.format(compTot).trim() %>
    +
    + + <% + }else if( searchType.equals("all") ) { + Object[] row = (Object[])list.get(0); + %> + + + +
    +  <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_doc")%> + + + + + + + + + + +
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_doc")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.temp")%><%= numberFormat.format(row[0]).trim() %> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.job")%>
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_doc")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.complete")%><%= numberFormat.format(row[1]).trim() %> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.job")%>
    + + +
    +  <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_report")%> + + + + + + + + + + + + + + +
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.accept")%> <%= numberFormat.format(row[2]).trim() %> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.job")%>
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_report")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.temp")%><%= numberFormat.format(row[3]).trim() %> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.job")%>
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_report")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.complete")%><%= numberFormat.format(row[4]).trim() %> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.job")%>
    + + + + + <% } %> + +
    + +
    + + + +<% + tx.commit(); +}catch(Exception ex){ + //ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/totsys/common/inc/statistics/statistics_excel.jsp b/webapps/totsys/common/inc/statistics/statistics_excel.jsp new file mode 100644 index 0000000..f39414d --- /dev/null +++ b/webapps/totsys/common/inc/statistics/statistics_excel.jsp @@ -0,0 +1,307 @@ +<% /** + * ********************************************************** + * @@ Program Name : statistics_excel.jsp + * @@ Description : // + * @@ Author : ũ + * @@ Create Date : 2010.11.21 + * @@ History : 2014.10.14 Update by jskim + * @@*********************************************************** + */ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.util.Date" + import="java.util.List" + import="java.text.SimpleDateFormat" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.util.MDate" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*" + import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" + import="kr.co.kihyun.service.*" import="kr.co.kihyun.service.vo.*" + import="java.util.*" import="java.text.*" + import="javax.jdo.Query"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + Logger LOG = LoggerFactory.getLogger(this.getClass()); + /** + * ******** session userId ********* + */ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + String dpID = HttpSSOLogin.getDeptID(request); + + /** + * **** Parameter ***** + */ + String searchType = clearXSS(request.getParameter("searchType"), ""); + String dateType = clearXSS(request.getParameter("dateType"), ""); + String stDate = clearXSS(request.getParameter("stDate"), ""); + String edDate = clearXSS(request.getParameter("edDate"), ""); + String searchOrgan = clearXSS(request.getParameter("search_organ"), ""); + String searchDept = clearXSS(request.getParameter("search_dept"), ""); + String chkboxDept = clearXSS(request.getParameter("chkbox_dept"), ""); + String chkboxSchool = clearXSS(request.getParameter("chkbox_school"), ""); + + tx.begin(); + + String deptName = ""; + if (searchOrgan.equals("ALL")) { + MDept mDept = pm.getObjectById(MDept.class, dpID); + deptName = mDept.getRootDept(pm).getName(); + } else { + if (searchDept.equals("ALL")) { + MDept mDept = pm.getObjectById(MDept.class, searchOrgan); + deptName = mDept.getName(); + } else { + if (chkboxDept.equals("D")) { + MDept mDept = pm.getObjectById(MDept.class, searchOrgan); + deptName = mDept.getName() + " - "; + } + MDept mDept = pm.getObjectById(MDept.class, searchDept); + deptName += mDept.getName(); + } + } + //=========================================================== + String txtStartDate = stDate; + String txtEndDate = edDate; + + String sDeptSchoolType = MString.checkNull(chkboxDept, chkboxSchool); + + StatisticsService service = new StatisticsService(pm); + List list = null; + Map params = new HashMap(); + params.put("organId", searchOrgan); + params.put("deptId", searchDept); + params.put("deptSchoolType", sDeptSchoolType); + if (searchType.equals("all")) { + params.put("startDate", stDate); + params.put("endDate", edDate); + + list = service.getStatisticsForAll(params); + } else if (searchType.equals("period")) { + params.put("dateType", dateType); + params.put("stDate", stDate); + params.put("edDate", edDate); + list = service.getStatisticsByDate(params); + if (dateType.equals("month")) { + txtStartDate = stDate.substring(0, stDate.lastIndexOf("-")); + txtEndDate = edDate.substring(0, stDate.lastIndexOf("-")); + } else if (dateType.equals("year")) { + txtStartDate = stDate.substring(0, stDate.indexOf("-")); + txtEndDate = edDate.substring(0, stDate.indexOf("-")); + } + } + + tx.rollback(); + + DecimalFormat numberFormat = new DecimalFormat("#,###,###"); + + response.setHeader("Accept-Ranges", "bytes"); + //response.setHeader("Content-Disposition","attachment; filename="+(URLEncoder.encode(docName, "UTF-8")).replaceAll(":","_").replace("+","%20" )+".xls;"); + //LJH + + //v2. 11.HTTP : Update by KWON,HAN + //response.setHeader("Content-Disposition", "attachment; filename=statistics_"+searchType+".xls;"); + // : ܺ Է° ͸ + String filtered_searchType = searchType.replaceAll("\r", "").replaceAll("\n", ""); + response.setHeader("Content-Disposition", "attachment; filename=statistics_" + filtered_searchType + ".xls;"); + //================================================================================================= +%> + + + + + + + + + + <% if (searchType.equals("") || searchType.equals("period")) {%> + + + + + + + + +
    + + + + + + + +
    + <%= deptName%> +
    + <%= txtStartDate%> ~ <%= txtEndDate%> +
    +
    + + + + + + + + + + + <% + int prssTot = 0; //հ + int endTot = 0; //Ϸհ + int acceptTot = 0; //հ + int tempTot = 0; //հ + int compTot = 0; //Ϸհ + for (int i = 0; i < list.size(); i++) { + Object[] row = (Object[]) list.get(i); + prssTot += Integer.parseInt(row[1].toString()); + endTot += Integer.parseInt(row[2].toString()); + acceptTot += Integer.parseInt(row[3].toString()); + tempTot += Integer.parseInt(row[4].toString()); + compTot += Integer.parseInt(row[5].toString()); + %> + + + + + + + + + <% + } + %> + + + + + + + + +
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.day")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_doc")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.temp")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_doc")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.complete")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.accept")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_report")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.temp")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_report")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.complete")%>
    <%= row[0]%><%= numberFormat.format(row[1])%><%= numberFormat.format(row[2])%><%= numberFormat.format(row[3])%><%= numberFormat.format(row[4])%><%= numberFormat.format(row[5])%>
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.total")%><%= numberFormat.format(prssTot)%><%= numberFormat.format(endTot)%><%= numberFormat.format(acceptTot)%><%= numberFormat.format(tempTot)%><%= numberFormat.format(compTot)%>
    +
    + + <% + } else if (searchType.equals("all")) { + Object[] row = (Object[]) list.get(0); + %> + + + + + + + + +
    + + + + + + + +
    + <%= deptName%> +
    + <%= txtStartDate%> ~ <%= txtEndDate%> +
    +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_doc")%> +
    + <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_doc")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.temp")%> + + <%= numberFormat.format(row[0]).trim()%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.job")%> +
    + <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_doc")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.complete")%> + + <%= numberFormat.format(row[1]).trim()%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.job")%> +
    + <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_report")%> +
    + <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.accept")%> + + <%= numberFormat.format(row[2]).trim()%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.job")%> +
    + <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_report")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.temp")%> + + <%= numberFormat.format(row[3]).trim()%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.job")%> +
    + <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.tot_report")%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.complete")%> + + <%= numberFormat.format(row[4]).trim()%> <%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.job")%> +
    +
    +
    + + <% } %> + + + <% + } catch (Exception ex) { + //ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } + %> diff --git a/webapps/totsys/common/inc/sysadm/left/images/left_doc_check.gif b/webapps/totsys/common/inc/sysadm/left/images/left_doc_check.gif new file mode 100644 index 0000000..ac0a036 Binary files /dev/null and b/webapps/totsys/common/inc/sysadm/left/images/left_doc_check.gif differ diff --git a/webapps/totsys/common/inc/sysadm/left/images/left_document.gif b/webapps/totsys/common/inc/sysadm/left/images/left_document.gif new file mode 100644 index 0000000..b6d0939 Binary files /dev/null and b/webapps/totsys/common/inc/sysadm/left/images/left_document.gif differ diff --git a/webapps/totsys/common/inc/sysadm/left/images/left_group.gif b/webapps/totsys/common/inc/sysadm/left/images/left_group.gif new file mode 100644 index 0000000..0176b8c Binary files /dev/null and b/webapps/totsys/common/inc/sysadm/left/images/left_group.gif differ diff --git a/webapps/totsys/common/inc/sysadm/left/images/left_user.gif b/webapps/totsys/common/inc/sysadm/left/images/left_user.gif new file mode 100644 index 0000000..6ebc492 Binary files /dev/null and b/webapps/totsys/common/inc/sysadm/left/images/left_user.gif differ diff --git a/webapps/totsys/common/inc/sysadm/left/images/main_img_03.gif b/webapps/totsys/common/inc/sysadm/left/images/main_img_03.gif new file mode 100644 index 0000000..c54d911 Binary files /dev/null and b/webapps/totsys/common/inc/sysadm/left/images/main_img_03.gif differ diff --git a/webapps/totsys/common/inc/sysadm/left/left.jsp b/webapps/totsys/common/inc/sysadm/left/left.jsp new file mode 100644 index 0000000..73db7fa --- /dev/null +++ b/webapps/totsys/common/inc/sysadm/left/left.jsp @@ -0,0 +1,293 @@ + +<% +/************************************************************@@ + * Program Name : top.jsp + * Description : ý ž + * Author : + * Create Date : + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" import="java.util.List" + import="javax.jdo.Extent" import="javax.jdo.PersistenceManager" + import="javax.jdo.Query" import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.totsys.menu.MenuBean" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.text.html.ServletUtil"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +try{ + /*********** User HttpSSOLogin check ***********/ + String connURL="location='/totsys/login/login.jsp';"; + if(!HttpSSOLogin.isLogin(request)){ + out.println(ServletUtil.alert("۾ð Ǿϴ.\\n ٽ÷α Ͻñ ٶϴ.")); + out.println(ServletUtil.getJavaScript(connURL)); + return; + } + + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + String usName = HttpSSOLogin.getUserName(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + + if(sysAuth != MoumiConfig.SUB_SYSADM && sysAuth != MoumiConfig.SYSADM){ + out.println(ServletUtil.alert("ý۱ ʽϴ.\\n ٽ÷α Ͻñ ٶϴ.")); + out.println(ServletUtil.getJavaScript(connURL)); + return; + } + + MenuBean orgMenu = new MenuBean(request, "/totsys/sysadm/org/org_view.jsp"); + + List categoryList = pm.getObjectById(Category.class, Category.ID_BOARD).getChildCategories(); +%> + + + + + + + + + + +
    + + + + + + + <% for(Category boardCategory : categoryList) { %> + + + + + + + <% } %> + +
    +
    <%= boardCategory.getName() %>
    +
    + + + + + + + + + + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ + pm.close(); +} +%> diff --git a/webapps/totsys/common/inc/sysadm/mydocbox/submenu.jsp b/webapps/totsys/common/inc/sysadm/mydocbox/submenu.jsp new file mode 100644 index 0000000..a967cb9 --- /dev/null +++ b/webapps/totsys/common/inc/sysadm/mydocbox/submenu.jsp @@ -0,0 +1,128 @@ + +<% +/************************************************************@@ + * Program Name : doc_list.jsp + * Description : //// + * Author : + * Create Date : 2004.10.11 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.moumi.doc.MDoc"%> + +<% +try{ + /******* Parameter *********/ + int prss = MInteger.parseInt(request.getParameter("prss")); + %> + + + + + <%// + if(MDoc.FORM == prss){%> + + <%}else{%> + + <% + }%> + + + + <%// + if(MDoc.REG == prss){%> + + <%}else{%> + + <% + }%> + + + + <%// + if(MDoc.PRSS== prss){%> + + <%}else{%> + + <% + }%> + + + + <%// + if(MDoc.END == prss){%> + + <%}else{%> + + <% + }%> + + + + <%// + if(MDoc.CANCLE == prss){%> + + <%}else{%> + + <% + }%> + + + + <%// + if(MDoc.READ == prss){%> + + <%}else{%> + + <% + }%> + +
    |||||
    + + +<% +}catch(Exception ex){ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> diff --git a/webapps/totsys/common/inc/sysadm/top/top.jsp b/webapps/totsys/common/inc/sysadm/top/top.jsp new file mode 100644 index 0000000..edff2e0 --- /dev/null +++ b/webapps/totsys/common/inc/sysadm/top/top.jsp @@ -0,0 +1,26 @@ + +<% +/************************************************************@@ + * Program Name : doc_list.jsp + * Description : //// + * Author : + * Create Date : 2004.10.14 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.moumi.Moumi"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% + + if(!HttpSSOLogin.isLogin(request)){ + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } + +%> diff --git a/webapps/totsys/common/inc/title/title.jsp b/webapps/totsys/common/inc/title/title.jsp new file mode 100644 index 0000000..fcb8ce9 --- /dev/null +++ b/webapps/totsys/common/inc/title/title.jsp @@ -0,0 +1,97 @@ +<%@page import="kr.co.kihyun.beans.totsys.menu.DefaultMenu"%> +<% +/************************************************************@@ + * Program Name : title.jsp + * Description : ̼ + * Author : ũ + * Create Date : 2010-11-21 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" import="kr.co.kihyun.lang.MString"%> +<%// trail޴ ִ . + // titleŰ ̿ trail޴ ٸ , + // descŰ ߰ ޽ ִ.%> +<%//@ taglib prefix="trail" uri="http://www.kihyun.co.kr/taglibs/trail" %> +<%@ taglib prefix="trail" uri="/WEB-INF/tlds/TrailTagLib.tld"%> +<% + String title = URLDecoder.decode(MString.checkNull(request.getParameter("title")), "UTF-8"); + String desc = URLDecoder.decode(MString.checkNull(request.getParameter("desc")), "UTF-8"); + String flag = request.getParameter("flag"); + if(flag==null) { + flag="00"; + } + DefaultMenu menu = new DefaultMenu(request); + String docName=menu.getDocName(); + if(docName==null) { + docName=""; + } + menu=null; + + try { +%> + + + + + <% if(flag.equals("99")) { %> + + + + + <% + } else { + %> + + + + + <% } %> +
    +   + + <%=title%> +
    + + + + + <% if(MString.isNull(title)|| !MString.isNull(title)) { %> + + <% } %> + <% if(!MString.isNull(desc)) { + if(!desc.equals(docName)) { + out.println(" / "+desc); + } + } + %> + + +
    + + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> diff --git a/webapps/totsys/common/inc/title/title2.jsp b/webapps/totsys/common/inc/title/title2.jsp new file mode 100644 index 0000000..197b63e --- /dev/null +++ b/webapps/totsys/common/inc/title/title2.jsp @@ -0,0 +1,111 @@ + +<%@page import="kr.co.kihyun.beans.totsys.menu.DefaultMenu"%> +<% +/************************************************************@@ + * Program Name : title.jsp + * Description : ̼ + * Author : ũ + * Create Date : 2010-11-21 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MString"%> +<%// trail޴ ִ . + // titleŰ ̿ trail޴ ٸ , + // descŰ ߰ ޽ ִ.%> + +<%//@ taglib prefix="trail" uri="http://www.kihyun.co.kr/taglibs/trail" %> +<%@ taglib prefix="trail" uri="/WEB-INF/tlds/TrailTagLib.tld"%> + +<% +//String title = Encoder.toJava(MString.checkNull(request.getParameter("title"))); +String title=URLDecoder.decode(MString.checkNull(request.getParameter("title"))); +//String desc = URLDecoder.decode(MString.checkNull(request.getParameter("desc")),"UTF-8"); +String desc=URLDecoder.decode(MString.checkNull(request.getParameter("desc"))); + +String flag = request.getParameter("flag"); +if(flag==null) flag="00"; +DefaultMenu menu = new DefaultMenu(request); +try { +%> + + + + + + + <% if(flag.equals("99")) { %> + + + + + <% } + else + { %> + + + + + <% } %> + + + +
      <%=title%>
      <% if(MString.isNull(title)|| !MString.isNull(title)) { %> + <% } %> <% if(!MString.isNull(desc)) { if(!desc.equals(menu.getDocName())){%> + <%= " / "+desc %> <% }} %>
    + + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> diff --git a/webapps/totsys/common/inc/title/title3.jsp b/webapps/totsys/common/inc/title/title3.jsp new file mode 100644 index 0000000..1948a36 --- /dev/null +++ b/webapps/totsys/common/inc/title/title3.jsp @@ -0,0 +1,103 @@ + +<%@page import="kr.co.kihyun.beans.totsys.menu.DefaultMenu"%> +<% +/************************************************************@@ + * Program Name : title.jsp + * Description : ̼ + * Author : ũ + * Create Date : 2010-11-21 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MString"%> +<%@ taglib prefix="trail" uri="/WEB-INF/tlds/TrailTagLib.tld"%> + +<% +String title = Encoder.toJava(MString.checkNull(request.getParameter("title"))); +String desc = URLDecoder.decode(MString.checkNull(request.getParameter("desc")),"UTF-8"); +String flag = request.getParameter("flag"); +if(flag==null) flag="00"; +DefaultMenu menu = new DefaultMenu(request); +try { +%> + + + + + + + <% if(flag.equals("99")) { %> + + + + + <% } + else + { %> + + + + + <% } %> + + + +
      <%=title%>
      <% if(MString.isNull(title)|| !MString.isNull(title)) { %> + <% } %> +
    + + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> diff --git a/webapps/totsys/common/inc/title/title4.jsp b/webapps/totsys/common/inc/title/title4.jsp new file mode 100644 index 0000000..a74fa59 --- /dev/null +++ b/webapps/totsys/common/inc/title/title4.jsp @@ -0,0 +1,93 @@ +<%@page pageEncoding="euc-kr"%> +<%@page import="kr.co.kihyun.beans.totsys.menu.DefaultMenu"%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MString"%> +<%@ taglib prefix="trail" uri="/WEB-INF/tlds/TrailTagLib.tld"%> + +<% +String title=URLDecoder.decode(MString.checkNull(request.getParameter("title"))); +String desc=URLDecoder.decode(MString.checkNull(request.getParameter("desc"))); +String flag = request.getParameter("flag"); +if(flag==null) flag="00"; +DefaultMenu menu = new DefaultMenu(request); +try { +%> + + + + + + + <% if(flag.equals("99")) { %> + + + + + <% } + else + { %> + + + + + <% } %> + + + +
      <%=title%>
      <% if(MString.isNull(title)|| !MString.isNull(title)) { %> + <% } %> +
    + + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> diff --git a/webapps/totsys/common/inc/title/title5.jsp b/webapps/totsys/common/inc/title/title5.jsp new file mode 100644 index 0000000..605301f --- /dev/null +++ b/webapps/totsys/common/inc/title/title5.jsp @@ -0,0 +1,92 @@ +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MString"%> +<%@page import="kr.co.kihyun.beans.totsys.menu.DefaultMenu"%> +<%@ taglib prefix="trail" uri="/WEB-INF/tlds/TrailTagLib.tld"%> +<% +String title=URLDecoder.decode(MString.checkNull(request.getParameter("title"))); +String desc=URLDecoder.decode(MString.checkNull(request.getParameter("desc"))); +String flag = request.getParameter("flag"); +if(flag==null) flag="00"; +DefaultMenu menu = new DefaultMenu(request); + +try { +%> + + + + + + + <% if(flag.equals("99")) { %> + + + + + <% } + else + { %> + + + + + <% } %> + + + +
      <%=title%>
      <% if(MString.isNull(title)|| !MString.isNull(title)) { %> + ڷ<% } %> <% if(!MString.isNull(desc)) { if(!desc.equals(menu.getDocName())){%> + <%= " / "+desc %> <% }} %>
    + + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> diff --git a/webapps/totsys/common/inc/title/title_approve.jsp b/webapps/totsys/common/inc/title/title_approve.jsp new file mode 100644 index 0000000..165a815 --- /dev/null +++ b/webapps/totsys/common/inc/title/title_approve.jsp @@ -0,0 +1,115 @@ +<%@page import="kr.co.kihyun.moumi.MoumiConfig"%> +<%@page import="kr.co.kihyun.beans.totsys.menu.DefaultMenu"%> +<% +/************************************************************@@ + * Program Name : title.jsp + * Description : ̼ + * Author : ũ + * Create Date : 2010-11-21 + * History : +@@************************************************************/ +%> +<%@page pageEncoding="euc-kr"%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MString"%> +<%// trail޴ ִ . + // titleŰ ̿ trail޴ ٸ , + // descŰ ߰ ޽ ִ.%> +<%//@ taglib prefix="trail" uri="http://www.kihyun.co.kr/taglibs/trail" %> +<%@ taglib prefix="trail" uri="/WEB-INF/tlds/TrailTagLib.tld"%> +<% +/*String title = Encoder.toJava(MString.checkNull(request.getParameter("title"))); +String desc = Encoder.toJava(MString.checkNull(request.getParameter("desc")));*/ +String reportType = Encoder.toJava(MString.checkNull(request.getParameter("reportType"))); +String title=URLDecoder.decode(MString.checkNull(request.getParameter("title"))); +//System.out.println("title::::::"+title); +String desc=URLDecoder.decode(MString.checkNull(request.getParameter("desc"))); + +String flag = request.getParameter("flag"); +if(flag==null) flag="00"; +DefaultMenu menu = new DefaultMenu(request); +try { +%> + + + + + +<% if(flag.equals("99")) { %> + + + + + <% } + else + { %> + + + + + <% } %> +
      <%=title%>
      <% if(MString.isNull(title) || !MString.isNull(title)) { %> + + <%if("READY".equals(reportType)){%> + ΰ + <%}else if("COMPLETE".equals(reportType)){%> + ΰϷ + <%}%> + <% } %><% if(!MString.isNull(desc)) { if(!desc.equals(menu.getDocName())){%> + <%= " / "+desc %> <% }} %> +
    + + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> diff --git a/webapps/totsys/common/inc/totper/left/11.gif b/webapps/totsys/common/inc/totper/left/11.gif new file mode 100644 index 0000000..d1d4dd8 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/11.gif differ diff --git a/webapps/totsys/common/inc/totper/left/22.gif b/webapps/totsys/common/inc/totper/left/22.gif new file mode 100644 index 0000000..69342ba Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/22.gif differ diff --git a/webapps/totsys/common/inc/totper/left/PIC77.gif b/webapps/totsys/common/inc/totper/left/PIC77.gif new file mode 100644 index 0000000..a8599ca Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PIC77.gif differ diff --git a/webapps/totsys/common/inc/totper/left/PIC78.gif b/webapps/totsys/common/inc/totper/left/PIC78.gif new file mode 100644 index 0000000..a33facf Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PIC78.gif differ diff --git a/webapps/totsys/common/inc/totper/left/PIC79.jpg b/webapps/totsys/common/inc/totper/left/PIC79.jpg new file mode 100644 index 0000000..3874b02 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PIC79.jpg differ diff --git a/webapps/totsys/common/inc/totper/left/PIC7A.gif b/webapps/totsys/common/inc/totper/left/PIC7A.gif new file mode 100644 index 0000000..8bc1b9c Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PIC7A.gif differ diff --git a/webapps/totsys/common/inc/totper/left/PIC8C.gif b/webapps/totsys/common/inc/totper/left/PIC8C.gif new file mode 100644 index 0000000..e2db837 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PIC8C.gif differ diff --git a/webapps/totsys/common/inc/totper/left/PIC8E.gif b/webapps/totsys/common/inc/totper/left/PIC8E.gif new file mode 100644 index 0000000..a8599ca Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PIC8E.gif differ diff --git a/webapps/totsys/common/inc/totper/left/PIC8F.gif b/webapps/totsys/common/inc/totper/left/PIC8F.gif new file mode 100644 index 0000000..a33facf Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PIC8F.gif differ diff --git a/webapps/totsys/common/inc/totper/left/PIC90.jpg b/webapps/totsys/common/inc/totper/left/PIC90.jpg new file mode 100644 index 0000000..3874b02 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PIC90.jpg differ diff --git a/webapps/totsys/common/inc/totper/left/PIC91.gif b/webapps/totsys/common/inc/totper/left/PIC91.gif new file mode 100644 index 0000000..8bc1b9c Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PIC91.gif differ diff --git a/webapps/totsys/common/inc/totper/left/PIC99.gif b/webapps/totsys/common/inc/totper/left/PIC99.gif new file mode 100644 index 0000000..91605dd Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PIC99.gif differ diff --git a/webapps/totsys/common/inc/totper/left/PIC9A.gif b/webapps/totsys/common/inc/totper/left/PIC9A.gif new file mode 100644 index 0000000..cbad118 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PIC9A.gif differ diff --git a/webapps/totsys/common/inc/totper/left/PIC9B.jpg b/webapps/totsys/common/inc/totper/left/PIC9B.jpg new file mode 100644 index 0000000..3874b02 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PIC9B.jpg differ diff --git a/webapps/totsys/common/inc/totper/left/PIC9C.gif b/webapps/totsys/common/inc/totper/left/PIC9C.gif new file mode 100644 index 0000000..e0160c5 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PIC9C.gif differ diff --git a/webapps/totsys/common/inc/totper/left/PIC9E.gif b/webapps/totsys/common/inc/totper/left/PIC9E.gif new file mode 100644 index 0000000..91605dd Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PIC9E.gif differ diff --git a/webapps/totsys/common/inc/totper/left/PIC9F.gif b/webapps/totsys/common/inc/totper/left/PIC9F.gif new file mode 100644 index 0000000..cbad118 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PIC9F.gif differ diff --git a/webapps/totsys/common/inc/totper/left/PICA0.jpg b/webapps/totsys/common/inc/totper/left/PICA0.jpg new file mode 100644 index 0000000..3874b02 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PICA0.jpg differ diff --git a/webapps/totsys/common/inc/totper/left/PICA1.gif b/webapps/totsys/common/inc/totper/left/PICA1.gif new file mode 100644 index 0000000..e0160c5 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/PICA1.gif differ diff --git a/webapps/totsys/common/inc/totper/left/TTTT.GIF b/webapps/totsys/common/inc/totper/left/TTTT.GIF new file mode 100644 index 0000000..28dff82 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/TTTT.GIF differ diff --git a/webapps/totsys/common/inc/totper/left/Thumbs.db b/webapps/totsys/common/inc/totper/left/Thumbs.db new file mode 100644 index 0000000..a4d5d5b Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/Thumbs.db differ diff --git a/webapps/totsys/common/inc/totper/left/images/Thumbs.db b/webapps/totsys/common/inc/totper/left/images/Thumbs.db new file mode 100644 index 0000000..dfd8990 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/images/Thumbs.db differ diff --git a/webapps/totsys/common/inc/totper/left/images/under_line.gif b/webapps/totsys/common/inc/totper/left/images/under_line.gif new file mode 100644 index 0000000..2b7b35d Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/images/under_line.gif differ diff --git a/webapps/totsys/common/inc/totper/left/left.htm b/webapps/totsys/common/inc/totper/left/left.htm new file mode 100644 index 0000000..c561c21 --- /dev/null +++ b/webapps/totsys/common/inc/totper/left/left.htm @@ -0,0 +1 @@ + Untitled Document
    ڷ
    ޴1
    ޴2
    ޴3
    ޴4
    \ No newline at end of file diff --git a/webapps/totsys/common/inc/totper/left/left.jsp b/webapps/totsys/common/inc/totper/left/left.jsp new file mode 100644 index 0000000..464eaeb --- /dev/null +++ b/webapps/totsys/common/inc/totper/left/left.jsp @@ -0,0 +1,483 @@ +<%@page import="kr.co.kihyun.beans.tosys.etc1.TotsysEtc"%> +<%@page import="javax.jdo.Transaction"%> +<%@page import="javax.jdo.Query"%> +<% +/************************************************************@@ + * Program Name : left.jsp + * Description : 핸디소프트 연동용 totper_left Menu + * Author : 기현테크 + * Create Date : 2010.11.18 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=utf-8" + import="java.net.URLDecoder" import="java.net.URLEncoder" + import="java.util.Iterator" import="java.util.List" + import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.beans.totsys.menu.MenuBean" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.beans.entity.TotDoc"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + /*********** User HttpSSOLogin check ***********/ + String connURL="location='/totsys/login/login.jsp';"; + if(!HttpSSOLogin.isLogin(request)){ + out.println(ServletUtil.alert(MoumiConfig.getMessageBundle().getString("moumi.message.popup.left_jsp_WorkTimeOut"))); + out.println(ServletUtil.getJavaScript(connURL)); + return; + } + /********** session내의 userId **********/ + String dtName = HttpSSOLogin.getDeptName(request); + String usID = HttpSSOLogin.getLoginID(request); + String dpID = HttpSSOLogin.getDeptID(request); + String usName = HttpSSOLogin.getUserName(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + + /****** Parameter ******/ + int menuType = MInteger.parseInt(request.getParameter("menuType"), -1); + String param = MString.checkNull(request.getParameter("On")); + String locationType = MString.checkNull(request.getParameter("locationType")); + Long docID = MLong.parseLong(request.getParameter("docID"), null); + String deptID = request.getParameter("deptID"); +// System.out.println("메뉴_left.jsp_deptID="+deptID); + String repUserID = MString.checkNull(request.getParameter("repUserID")); + String recog = MString.checkNull(request.getParameter("recog")); + String recogNum = MString.checkNull(request.getParameter("recogNum")); + String prss = MString.checkNull(request.getParameter("prss")); + + /************* home taget url *****************/ + session.setAttribute("homeTagetURL", "/totsys/totper/main.jsp"); + session.setAttribute("envTagetURL", "/totsys/common/inc/totper/top/top.jsp"); + + //List categoryList = (List)pm.getObjectById(Category.class, Category.ID_BOARD).getChildCategories(); +// List categoryList = ((Category)pm.getObjectById(Category.class, Category.ID_BOARD)).getChildCategories(); +// +// for(int ii=0;ii catIter = categoryList.iterator(); + //int icnt = boardMenus.length; + //icnt = 1; + /*for(int i = 0; i < icnt; i++) + { + if(i == 0) + { + // if(HttpSSOLogin.getSysAuth(request) == Moumi.TOTPER) + boardMenus[i] = new MenuBean(request, "/totsys/totper/main.jsp?mata=1", "공지사항"); + // else if(HttpSSOLogin.getSysAuth(request) == Moumi.SYSADM) + // boardMenus[i] = new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", "게시판"); + } + else + { + Category cat = catIter.next(); + //boardMenus[i] = new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID="+cat.getId(), cat.getName()); + boardMenus[i] = new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE"); + } + }*/ + +// MenuBean[][] totperMenuss = null; + /*SysAuth == 2, 5, 7*/ + //사용자메뉴 + + MenuBean[][] totperMenuss = { + //boardMenus, + { + //top/left메뉴 : 집계하기 -> 문서배포 + //집계=TotDocType.java=TotDocType.TOT_DOC=moumi.message.tot_doc.tot_doc 하기=moumi.message.menu.do 문서배포 + //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", TotDocType.TOT_DOC+MoumiConfig.getMessageBundle().getString("moumi.message.menu.do")), + + //문서=TotDocType.TOT_DOC2=moumi.message.tot_doc.tot_doc2 배포=moumi.message.menu.do2 + new MenuBean(request, "/totsys/totper/main.jsp?mata=1", "문서배포"), + //문서작성 + new MenuBean(request, "/totsys/totper/mydocbox/regbox/doc_regist.jsp?step=1"), + //832 : moumi.message.totsys.totper.mydocbox.prssbox.doc_list_jsp = 집계진행자료 :: 취합현황 + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=PRSS"), + //임시저장moumi.message.tot_doc.reg + 자료 moumi.message.doc :: 임시저장함 moumi.message.tot_doc.reg + moumi.message.box + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=REG"), + //moumi.message.menu.end 종료, moumi.message.menu.box 함 + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=END"), + //825 :: moumi.message.totsys.totper.mydocbox.formbox.doc_list_jsp = 서식 :: 서식관리함 + new MenuBean(request, "/totsys/totper/mydocbox/formbox/doc_list.jsp") + + //new MenuBean(request, "/totsys/login/envsetting/group/group_setup.jsp") // 사용자그룹설정 추가 + + }, + + { + //제출=moumi.message.menu.submit, 하기=moumi.message.menu.do + //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.menu.submit")+MoumiConfig.getMessageBundle().getString("moumi.message.menu.do")+""), + //문서=moumi.message.menu.submit2, 수신=moumi.message.menu.do3 + new MenuBean(request, "/totsys/totper/main.jsp?mata=1", "문서수신"), + // 접수 자료 :: 730 :: moumi.message.totsys.repoper.mydocbox.returnbox.report_list_jsp :: 수신함 + new MenuBean(request, "/totsys/repoper/mydocbox/returnbox/report_list.jsp"), + //제출진행자료 :: 736:: totsys.repoper.mydocbox.tempbox.report_list_jsp :: 제출현황 + new MenuBean(request, "/totsys/repoper/mydocbox/tempbox/report_list.jsp?reportType=TEMP"), + //승인제출결재대기 :: 405 :: moumi.message.repoperdoc.recog :: 승인 + 결재대기(제출진행) + new MenuBean(request, "/totsys/repoper/mydocbox/approve/report_list.jsp?reportType=READY"), + //승인결재완료 :: 405 :: moumi.message.repoperdoc.recog :: 승인 + 결재완료(제출완료) + new MenuBean(request, "/totsys/repoper/mydocbox/approve/report_list.jsp?reportType=COMPLETE"), + //자료 + //new MenuBean(request, "/totsys/repoper/mydocbox/compbox/report_list.jsp?reportType=COMP", MoumiConfig.getMessageBundle().getString("moumi.message.menu.mySubmit") +MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc")), + //부서제출자료 :: 부서제출자료 moumi.message.menu.allSubmit + 함 moumi.message.menu.doc // moumi.message.menu.allSubmit2 제출완료 + 함 moumi.message.menu.box + new MenuBean(request, "/totsys/repoper/mydocbox/endbox/report_list.jsp?reportType=END" ) + }, + + { //사용자그룹 관련 + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.userGroup")), + new MenuBean(request, "/totsys/login/envsetting/group/group_setup.jsp") + }/*,{ //자주묻는질문 + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.faq")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_FAQ") + }*/,{ //자료실 + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.pds")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_PDS") + }/*,{ //공지사항 + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.notice")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE") + }*/ + + }; + + + MenuBean[][] sub_sysMenus = { + //boardMenus, + { + //top/left메뉴 : 집계하기 -> 문서배포 + //집계=TotDocType.java=TotDocType.TOT_DOC=moumi.message.tot_doc.tot_doc 하기=moumi.message.menu.do 문서배포 + //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", TotDocType.TOT_DOC+MoumiConfig.getMessageBundle().getString("moumi.message.menu.do")), + + //문서=TotDocType.TOT_DOC2=moumi.message.tot_doc.tot_doc2 배포=moumi.message.menu.do2 + new MenuBean(request, "/totsys/totper/main.jsp?mata=1", "문서배포"), + //문서작성 + new MenuBean(request, "/totsys/totper/mydocbox/regbox/doc_regist.jsp?step=1"), + //832 : moumi.message.totsys.totper.mydocbox.prssbox.doc_list_jsp = 집계진행자료 :: 취합현황 + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=PRSS"), + //임시저장moumi.message.tot_doc.reg + 자료 moumi.message.doc :: 임시저장함 moumi.message.tot_doc.reg + moumi.message.box + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=REG"), + //moumi.message.menu.end 종료, moumi.message.menu.box 함 + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=END"), + //825 :: moumi.message.totsys.totper.mydocbox.formbox.doc_list_jsp = 서식 :: 서식관리함 + new MenuBean(request, "/totsys/totper/mydocbox/formbox/doc_list.jsp") + + //new MenuBean(request, "/totsys/login/envsetting/group/group_setup.jsp") // 사용자그룹설정 추가 + + }, + + { + //제출=moumi.message.menu.submit, 하기=moumi.message.menu.do + //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.menu.submit")+MoumiConfig.getMessageBundle().getString("moumi.message.menu.do")+""), + //문서=moumi.message.menu.submit2, 수신=moumi.message.menu.do3 + new MenuBean(request, "/totsys/totper/main.jsp?mata=1", "문서수신"), + // 접수 자료 :: 730 :: moumi.message.totsys.repoper.mydocbox.returnbox.report_list_jsp :: 수신함 + new MenuBean(request, "/totsys/repoper/mydocbox/returnbox/report_list.jsp"), + //제출진행자료 :: 736:: totsys.repoper.mydocbox.tempbox.report_list_jsp :: 제출현황 + new MenuBean(request, "/totsys/repoper/mydocbox/tempbox/report_list.jsp?reportType=TEMP"), + //지사 제출진행자료 :: 736:: totsys.repoper.mydocbox.tempbox.report_list_jsp :: 지사 제출 현황 + new MenuBean(request, "/totsys/repoper/mydocbox/subtempbox/report_list.jsp"), + //승인제출결재대기 :: 405 :: moumi.message.repoperdoc.recog :: 승인 + 결재대기(제출진행) + new MenuBean(request, "/totsys/repoper/mydocbox/approve/report_list.jsp?reportType=READY"), + //승인결재완료 :: 405 :: moumi.message.repoperdoc.recog :: 승인 + 결재완료(제출완료) + new MenuBean(request, "/totsys/repoper/mydocbox/approve/report_list.jsp?reportType=COMPLETE"), + //자료 + //new MenuBean(request, "/totsys/repoper/mydocbox/compbox/report_list.jsp?reportType=COMP", MoumiConfig.getMessageBundle().getString("moumi.message.menu.mySubmit") +MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc")), + //부서제출자료 :: 부서제출자료 moumi.message.menu.allSubmit + 함 moumi.message.menu.doc // moumi.message.menu.allSubmit2 제출완료 + 함 moumi.message.menu.box + new MenuBean(request, "/totsys/repoper/mydocbox/endbox/report_list.jsp?reportType=END" ) + }, + + { //사용자그룹 관련 + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.userGroup")), + new MenuBean(request, "/totsys/login/envsetting/group/group_setup.jsp") + }/*,{ //자주묻는질문 + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.faq")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_FAQ") + }*/,{ //자료실 + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.pds")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_PDS") + }/*,{ //공지사항 + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.notice")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE") + }*/ + + }; + + //SysAuth == 9 + //관리자 + MenuBean[][] sysadmMenus = { + //boardMenus, + { + // new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc")+MoumiConfig.getMessageBundle().getString("moumi.message.menu.box")), + //moumi.message.tot_doc 집계자료 + //new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc")), + new MenuBean(request, "/totsys/totper/main.jsp?mata=1", "문서배포"), + //문서작성 + new MenuBean(request, "/totsys/totper/mydocbox/regbox/doc_regist.jsp?step=1"), + //832 : moumi.message.totsys.totper.mydocbox.prssbox.doc_list_jsp = 집계진행자료 :: 취합현황 + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=PRSS"), + //임시저장moumi.message.tot_doc.reg + 자료 moumi.message.doc :: 임시저장함 moumi.message.tot_doc.reg + moumi.message.box + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=REG"), + //moumi.message.menu.end 종료, moumi.message.menu.box 함 + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=END"), + //825 :: moumi.message.totsys.totper.mydocbox.formbox.doc_list_jsp = 서식 :: 서식관리함 + new MenuBean(request, "/totsys/totper/mydocbox/formbox/doc_list.jsp"), + new MenuBean(request, "/totsys/common/inc/statistics/statistics.jsp","통계(집계.제출)") //통계 + }, + /*{ + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", Moumi.getMessageBundle().getString("moumi.message.menu.doc")+Moumi.getMessageBundle().getString("moumi.message.menu.statistics")), + new MenuBean(request, "/totsys/sysadm/stat/doc_check.jsp") + },*/ + { + // new MenuBean(request, "/totsys/totper/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.menu.submit")+MoumiConfig.getMessageBundle().getString("moumi.message.menu.do")+""), + //moumi.message.tot_report.submitted = 제출자료 + //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.submitted")), + new MenuBean(request, "/totsys/totper/main.jsp?mata=1", "문서수신"), + // 접수 자료 :: 730 :: moumi.message.totsys.repoper.mydocbox.returnbox.report_list_jsp :: 수신함 + new MenuBean(request, "/totsys/repoper/mydocbox/returnbox/report_list.jsp"), + //제출진행자료 :: 736:: totsys.repoper.mydocbox.tempbox.report_list_jsp :: 제출현황 + new MenuBean(request, "/totsys/repoper/mydocbox/tempbox/report_list.jsp?reportType=TEMP"), + //승인제출결재대기 :: 405 :: moumi.message.repoperdoc.recog :: 승인 + 결재대기(제출진행) + new MenuBean(request, "/totsys/repoper/mydocbox/approve/report_list.jsp?reportType=READY"), + //승인결재완료 :: 405 :: moumi.message.repoperdoc.recog :: 승인 + 결재완료(제출완료) + new MenuBean(request, "/totsys/repoper/mydocbox/approve/report_list.jsp?reportType=COMPLETE"), + //new MenuBean(request, "/totsys/repoper/mydocbox/compbox/report_list.jsp?reportType=COMP", MoumiConfig.getMessageBundle().getString("moumi.message.menu.mySubmit") +MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc")), + //부서제출자료 :: 부서제출자료 moumi.message.menu.allSubmit + 함 moumi.message.menu.doc // moumi.message.menu.allSubmit2 제출완료 + 함 moumi.message.menu.box + new MenuBean(request, "/totsys/repoper/mydocbox/endbox/report_list.jsp?reportType=END") + + }, + { //조직도 관련 + //moumi.message.menu.oraganization = 조직도 + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.userGroup")), + //사용자그룹 + new MenuBean(request, "/totsys/login/envsetting/group/group_setup.jsp"), + //new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.menu.oraganization")), + // new MenuBean(request, "/totsys/login/envsetting/group/group_setup.jsp"), + //조직도 + new MenuBean(request, "/totsys/sysadm/org/org_view.jsp") + }/*,{ //자주묻는질문 + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.faq")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_FAQ") + }*/, + { //자료실 + //moumi.message.board.pds = 자료실 + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.pds")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_PDS") + }/*,{ //공지사항 + //moumi.message.board.notice = 공지사항 + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.notice")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE") + }*/ + }; + + //SysAuth == 7인 부분 추가 함 + + + /******************************************************************************** + tx.begin(); + Category category = pm.getObjectById(Category.class, "ID_SYSTEM_NOTICE"); + List boardList; + Query q = pm.newQuery(Board.class); + boardList = (List) q.execute(); + q = pm.newQuery(Board.class, boardList); + StringBuilder filter = new StringBuilder(150) + .append("upperBoard == null && category == board_category && popup_yn==true"); + q.setFilter(filter.toString()); + q.declareParameters("kr.co.kihyun.beans.entity.Category board_category"); + q.setOrdering("writeDate DESC"); + boardList = (List) q.execute(category); + tx.commit(); + *********************************************************************************/ + + TotsysEtc te=new TotsysEtc(); + te.getPopupNotice(); + int count=te.count; + String[] idList=te.popupId; + + +%> + + + + + + + + + + + + + + + + +<% +MenuBean[][] menus = null; +if(HttpSSOLogin.getSysAuth(request) == MoumiConfig.TOTPER || HttpSSOLogin.getSysAuth(request) == MoumiConfig.REPOPER ) + menus = totperMenuss; +else if(HttpSSOLogin.getSysAuth(request) == MoumiConfig.SYSADM ) + menus = sysadmMenus; + +else if(HttpSSOLogin.getSysAuth(request) == MoumiConfig.SUB_SYSADM) + menus = sub_sysMenus; +//else if(HttpSSOLogin.getSysAuth(request) == MoumiConfig.REPOADM) +// menus = repoadmMenus; +if(MoumiConfig.isOnLeftMenu()){ + for(int i = 0; i < menus.length; i++) { +%> + + + <% + } + } else { + %> + + <% + } + %> + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> \ No newline at end of file diff --git a/webapps/totsys/common/inc/totper/left/left.jsp.bak b/webapps/totsys/common/inc/totper/left/left.jsp.bak new file mode 100644 index 0000000..23360ae --- /dev/null +++ b/webapps/totsys/common/inc/totper/left/left.jsp.bak @@ -0,0 +1,483 @@ +<%@page import="kr.co.kihyun.beans.tosys.etc1.TotsysEtc"%> +<%@page import="javax.jdo.Transaction"%> +<%@page import="javax.jdo.Query"%> +<% +/************************************************************@@ + * Program Name : left.jsp + * Description : ڵƮ totper_left Menu + * Author : ũ + * Create Date : 2010.11.18 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=utf-8" + import="java.net.URLDecoder" import="java.net.URLEncoder" + import="java.util.Iterator" import="java.util.List" + import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.beans.totsys.menu.MenuBean" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.beans.entity.TotDoc"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + /*********** User HttpSSOLogin check ***********/ + String connURL="location='/totsys/login/login.jsp';"; + if(!HttpSSOLogin.isLogin(request)){ + out.println(ServletUtil.alert(MoumiConfig.getMessageBundle().getString("moumi.message.popup.left_jsp_WorkTimeOut"))); + out.println(ServletUtil.getJavaScript(connURL)); + return; + } + /********** session userId **********/ + String dtName = HttpSSOLogin.getDeptName(request); + String usID = HttpSSOLogin.getLoginID(request); + String dpID = HttpSSOLogin.getDeptID(request); + String usName = HttpSSOLogin.getUserName(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + + /****** Parameter ******/ + int menuType = MInteger.parseInt(request.getParameter("menuType"), -1); + String param = MString.checkNull(request.getParameter("On")); + String locationType = MString.checkNull(request.getParameter("locationType")); + Long docID = MLong.parseLong(request.getParameter("docID"), null); + String deptID = request.getParameter("deptID"); +// System.out.println("޴_left.jsp_deptID="+deptID); + String repUserID = MString.checkNull(request.getParameter("repUserID")); + String recog = MString.checkNull(request.getParameter("recog")); + String recogNum = MString.checkNull(request.getParameter("recogNum")); + String prss = MString.checkNull(request.getParameter("prss")); + + /************* home taget url *****************/ + session.setAttribute("homeTagetURL", "/totsys/totper/main.jsp"); + session.setAttribute("envTagetURL", "/totsys/common/inc/totper/top/top.jsp"); + + //List categoryList = (List)pm.getObjectById(Category.class, Category.ID_BOARD).getChildCategories(); +// List categoryList = ((Category)pm.getObjectById(Category.class, Category.ID_BOARD)).getChildCategories(); +// +// for(int ii=0;ii catIter = categoryList.iterator(); + //int icnt = boardMenus.length; + //icnt = 1; + /*for(int i = 0; i < icnt; i++) + { + if(i == 0) + { + // if(HttpSSOLogin.getSysAuth(request) == Moumi.TOTPER) + boardMenus[i] = new MenuBean(request, "/totsys/totper/main.jsp?mata=1", ""); + // else if(HttpSSOLogin.getSysAuth(request) == Moumi.SYSADM) + // boardMenus[i] = new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", "Խ"); + } + else + { + Category cat = catIter.next(); + //boardMenus[i] = new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID="+cat.getId(), cat.getName()); + boardMenus[i] = new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE"); + } + }*/ + +// MenuBean[][] totperMenuss = null; + /*SysAuth == 2, 5, 7*/ + //ڸ޴ + + MenuBean[][] totperMenuss = { + //boardMenus, + { + //top/left޴ : ϱ -> + //=TotDocType.java=TotDocType.TOT_DOC=moumi.message.tot_doc.tot_doc ϱ=moumi.message.menu.do + //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", TotDocType.TOT_DOC+MoumiConfig.getMessageBundle().getString("moumi.message.menu.do")), + + //=TotDocType.TOT_DOC2=moumi.message.tot_doc.tot_doc2 =moumi.message.menu.do2 + new MenuBean(request, "/totsys/totper/main.jsp?mata=1", ""), + //ۼ + new MenuBean(request, "/totsys/totper/mydocbox/regbox/doc_regist.jsp?step=1"), + //832 : moumi.message.totsys.totper.mydocbox.prssbox.doc_list_jsp = ڷ :: Ȳ + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=PRSS"), + //ӽmoumi.message.tot_doc.reg + ڷ moumi.message.doc :: ӽ moumi.message.tot_doc.reg + moumi.message.box + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=REG"), + //moumi.message.menu.end , moumi.message.menu.box + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=END"), + //825 :: moumi.message.totsys.totper.mydocbox.formbox.doc_list_jsp = :: İ + new MenuBean(request, "/totsys/totper/mydocbox/formbox/doc_list.jsp") + + //new MenuBean(request, "/totsys/login/envsetting/group/group_setup.jsp") // ڱ׷켳 ߰ + + }, + + { + //=moumi.message.menu.submit, ϱ=moumi.message.menu.do + //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.menu.submit")+MoumiConfig.getMessageBundle().getString("moumi.message.menu.do")+""), + //=moumi.message.menu.submit2, =moumi.message.menu.do3 + new MenuBean(request, "/totsys/totper/main.jsp?mata=1", ""), + // ڷ :: 730 :: moumi.message.totsys.repoper.mydocbox.returnbox.report_list_jsp :: + new MenuBean(request, "/totsys/repoper/mydocbox/returnbox/report_list.jsp"), + //ڷ :: 736:: totsys.repoper.mydocbox.tempbox.report_list_jsp :: Ȳ + new MenuBean(request, "/totsys/repoper/mydocbox/tempbox/report_list.jsp?reportType=TEMP"), + // :: 405 :: moumi.message.repoperdoc.recog :: + () + new MenuBean(request, "/totsys/repoper/mydocbox/approve/report_list.jsp?reportType=READY"), + //ΰϷ :: 405 :: moumi.message.repoperdoc.recog :: + Ϸ(Ϸ) + new MenuBean(request, "/totsys/repoper/mydocbox/approve/report_list.jsp?reportType=COMPLETE"), + //ڷ + //new MenuBean(request, "/totsys/repoper/mydocbox/compbox/report_list.jsp?reportType=COMP", MoumiConfig.getMessageBundle().getString("moumi.message.menu.mySubmit") +MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc")), + //μڷ :: μڷ moumi.message.menu.allSubmit + moumi.message.menu.doc // moumi.message.menu.allSubmit2 Ϸ + moumi.message.menu.box + new MenuBean(request, "/totsys/repoper/mydocbox/endbox/report_list.jsp?reportType=END" ) + }, + + { //ڱ׷ + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.userGroup")), + new MenuBean(request, "/totsys/login/envsetting/group/group_setup.jsp") + }/*,{ //ֹ + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.faq")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_FAQ") + }*/,{ //ڷ + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.pds")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_PDS") + }/*,{ // + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.notice")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE") + }*/ + + }; + + + MenuBean[][] sub_sysMenus = { + //boardMenus, + { + //top/left޴ : ϱ -> + //=TotDocType.java=TotDocType.TOT_DOC=moumi.message.tot_doc.tot_doc ϱ=moumi.message.menu.do + //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", TotDocType.TOT_DOC+MoumiConfig.getMessageBundle().getString("moumi.message.menu.do")), + + //=TotDocType.TOT_DOC2=moumi.message.tot_doc.tot_doc2 =moumi.message.menu.do2 + new MenuBean(request, "/totsys/totper/main.jsp?mata=1", ""), + //ۼ + new MenuBean(request, "/totsys/totper/mydocbox/regbox/doc_regist.jsp?step=1"), + //832 : moumi.message.totsys.totper.mydocbox.prssbox.doc_list_jsp = ڷ :: Ȳ + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=PRSS"), + //ӽmoumi.message.tot_doc.reg + ڷ moumi.message.doc :: ӽ moumi.message.tot_doc.reg + moumi.message.box + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=REG"), + //moumi.message.menu.end , moumi.message.menu.box + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=END"), + //825 :: moumi.message.totsys.totper.mydocbox.formbox.doc_list_jsp = :: İ + new MenuBean(request, "/totsys/totper/mydocbox/formbox/doc_list.jsp") + + //new MenuBean(request, "/totsys/login/envsetting/group/group_setup.jsp") // ڱ׷켳 ߰ + + }, + + { + //=moumi.message.menu.submit, ϱ=moumi.message.menu.do + //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.menu.submit")+MoumiConfig.getMessageBundle().getString("moumi.message.menu.do")+""), + //=moumi.message.menu.submit2, =moumi.message.menu.do3 + new MenuBean(request, "/totsys/totper/main.jsp?mata=1", ""), + // ڷ :: 730 :: moumi.message.totsys.repoper.mydocbox.returnbox.report_list_jsp :: + new MenuBean(request, "/totsys/repoper/mydocbox/returnbox/report_list.jsp"), + //ڷ :: 736:: totsys.repoper.mydocbox.tempbox.report_list_jsp :: Ȳ + new MenuBean(request, "/totsys/repoper/mydocbox/tempbox/report_list.jsp?reportType=TEMP"), + // ڷ :: 736:: totsys.repoper.mydocbox.tempbox.report_list_jsp :: Ȳ + new MenuBean(request, "/totsys/repoper/mydocbox/subtempbox/report_list.jsp"), + // :: 405 :: moumi.message.repoperdoc.recog :: + () + new MenuBean(request, "/totsys/repoper/mydocbox/approve/report_list.jsp?reportType=READY"), + //ΰϷ :: 405 :: moumi.message.repoperdoc.recog :: + Ϸ(Ϸ) + new MenuBean(request, "/totsys/repoper/mydocbox/approve/report_list.jsp?reportType=COMPLETE"), + //ڷ + //new MenuBean(request, "/totsys/repoper/mydocbox/compbox/report_list.jsp?reportType=COMP", MoumiConfig.getMessageBundle().getString("moumi.message.menu.mySubmit") +MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc")), + //μڷ :: μڷ moumi.message.menu.allSubmit + moumi.message.menu.doc // moumi.message.menu.allSubmit2 Ϸ + moumi.message.menu.box + new MenuBean(request, "/totsys/repoper/mydocbox/endbox/report_list.jsp?reportType=END" ) + }, + + { //ڱ׷ + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.userGroup")), + new MenuBean(request, "/totsys/login/envsetting/group/group_setup.jsp") + }/*,{ //ֹ + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.faq")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_FAQ") + }*/,{ //ڷ + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.pds")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_PDS") + }/*,{ // + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.notice")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE") + }*/ + + }; + + //SysAuth == 9 + // + MenuBean[][] sysadmMenus = { + //boardMenus, + { + // new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc")+MoumiConfig.getMessageBundle().getString("moumi.message.menu.box")), + //moumi.message.tot_doc ڷ + //new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc")), + new MenuBean(request, "/totsys/totper/main.jsp?mata=1", ""), + //ۼ + new MenuBean(request, "/totsys/totper/mydocbox/regbox/doc_regist.jsp?step=1"), + //832 : moumi.message.totsys.totper.mydocbox.prssbox.doc_list_jsp = ڷ :: Ȳ + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=PRSS"), + //ӽmoumi.message.tot_doc.reg + ڷ moumi.message.doc :: ӽ moumi.message.tot_doc.reg + moumi.message.box + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=REG"), + //moumi.message.menu.end , moumi.message.menu.box + new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=END"), + //825 :: moumi.message.totsys.totper.mydocbox.formbox.doc_list_jsp = :: İ + new MenuBean(request, "/totsys/totper/mydocbox/formbox/doc_list.jsp"), + new MenuBean(request, "/totsys/common/inc/statistics/statistics.jsp","(.)") // + }, + /*{ + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", Moumi.getMessageBundle().getString("moumi.message.menu.doc")+Moumi.getMessageBundle().getString("moumi.message.menu.statistics")), + new MenuBean(request, "/totsys/sysadm/stat/doc_check.jsp") + },*/ + { + // new MenuBean(request, "/totsys/totper/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.menu.submit")+MoumiConfig.getMessageBundle().getString("moumi.message.menu.do")+""), + //moumi.message.tot_report.submitted = ڷ + //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.submitted")), + new MenuBean(request, "/totsys/totper/main.jsp?mata=1", ""), + // ڷ :: 730 :: moumi.message.totsys.repoper.mydocbox.returnbox.report_list_jsp :: + new MenuBean(request, "/totsys/repoper/mydocbox/returnbox/report_list.jsp"), + //ڷ :: 736:: totsys.repoper.mydocbox.tempbox.report_list_jsp :: Ȳ + new MenuBean(request, "/totsys/repoper/mydocbox/tempbox/report_list.jsp?reportType=TEMP"), + // :: 405 :: moumi.message.repoperdoc.recog :: + () + new MenuBean(request, "/totsys/repoper/mydocbox/approve/report_list.jsp?reportType=READY"), + //ΰϷ :: 405 :: moumi.message.repoperdoc.recog :: + Ϸ(Ϸ) + new MenuBean(request, "/totsys/repoper/mydocbox/approve/report_list.jsp?reportType=COMPLETE"), + //new MenuBean(request, "/totsys/repoper/mydocbox/compbox/report_list.jsp?reportType=COMP", MoumiConfig.getMessageBundle().getString("moumi.message.menu.mySubmit") +MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc")), + //μڷ :: μڷ moumi.message.menu.allSubmit + moumi.message.menu.doc // moumi.message.menu.allSubmit2 Ϸ + moumi.message.menu.box + new MenuBean(request, "/totsys/repoper/mydocbox/endbox/report_list.jsp?reportType=END") + + }, + { // + //moumi.message.menu.oraganization = + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.userGroup")), + //ڱ׷ + new MenuBean(request, "/totsys/login/envsetting/group/group_setup.jsp"), + //new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.menu.oraganization")), + // new MenuBean(request, "/totsys/login/envsetting/group/group_setup.jsp"), + // + new MenuBean(request, "/totsys/sysadm/org/org_view.jsp") + }/*,{ //ֹ + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.faq")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_FAQ") + }*/, + { //ڷ + //moumi.message.board.pds = ڷ + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.pds")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_PDS") + }/*,{ // + //moumi.message.board.notice = + new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board.notice")), + new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE") + }*/ + }; + + //SysAuth == 7 κ ߰ + + + /******************************************************************************** + tx.begin(); + Category category = pm.getObjectById(Category.class, "ID_SYSTEM_NOTICE"); + List boardList; + Query q = pm.newQuery(Board.class); + boardList = (List) q.execute(); + q = pm.newQuery(Board.class, boardList); + StringBuilder filter = new StringBuilder(150) + .append("upperBoard == null && category == board_category && popup_yn==true"); + q.setFilter(filter.toString()); + q.declareParameters("kr.co.kihyun.beans.entity.Category board_category"); + q.setOrdering("writeDate DESC"); + boardList = (List) q.execute(category); + tx.commit(); + *********************************************************************************/ + + TotsysEtc te=new TotsysEtc(); + te.getPopupNotice(); + int count=te.count; + String[] idList=te.popupId; + + +%> + + + + + + + + + + + + + + + + +<% +MenuBean[][] menus = null; +if(HttpSSOLogin.getSysAuth(request) == MoumiConfig.TOTPER || HttpSSOLogin.getSysAuth(request) == MoumiConfig.REPOPER ) + menus = totperMenuss; +else if(HttpSSOLogin.getSysAuth(request) == MoumiConfig.SYSADM ) + menus = sysadmMenus; + +else if(HttpSSOLogin.getSysAuth(request) == MoumiConfig.SUB_SYSADM) + menus = sub_sysMenus; +//else if(HttpSSOLogin.getSysAuth(request) == MoumiConfig.REPOADM) +// menus = repoadmMenus; +if(MoumiConfig.isOnLeftMenu()){ + for(int i = 0; i < menus.length; i++) { +%> + + + <% + } + } else { + %> + + <% + } + %> + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> \ No newline at end of file diff --git a/webapps/totsys/common/inc/totper/left/main.css b/webapps/totsys/common/inc/totper/left/main.css new file mode 100644 index 0000000..075e10b --- /dev/null +++ b/webapps/totsys/common/inc/totper/left/main.css @@ -0,0 +1,160 @@ +@charset "utf-8"; + +/******************************************* + * 파일명 : main.css + * 설명 : 차세대나이스 메인 + * 작성자 : 유기옥 + * 작성일 : 2010.07.08 +********************************************/ + +#skipnavigation {left: 110px;position:absolute;top: 3px;width: 200px;z-index: 100;} +#skipnavigation li {position:absolute; float:left;} +#skipnavigation li a {width:110px;position:absolute;top:-150px;height:1px;width:1px;margin-bottom:-1px;overflow:hidden;text-align:center;} +#skipnavigation a:hover, #skipnavigation a:focus, #skipnavigation a:active {position:absolute;top:0;height:auto;width:130px;padding:5px;font-weight:bold;border:solid 1px #01614c;color:#fff;z-index:2;background:#000;} + +#wrap {width:100%; height:100%;} +#mainWrap {width:981px; margin:0 auto;} +#header {float:left; position:relative; width:944px; height:49px; padding:10px 0 6px 0;} +#header h1 {float:left; width:194px; height:49px; margin:0 0 0 10px; } +#header h2 {position:absolute;top:30px;left:66px;} +#utilityArea {float:right; padding-right:0; margin-top:15px;} +#utilityArea ul li{float:left;} +#utility {float:left;} +#ctrlText {float:left;} +#ctrlText ul{float:left;} +#ctrlText ul li{padding:0 0 0 3px;} +.hide {overflow:hidden;visibility:hidden;position:absolute;width:0;height:0;font-size:0;line-height:0;} + +/* middle */ +#middle {clear:both;width:981px; overflow:hidden; position:relative; /*height:486px;*/ padding:0 0 12px 0;} +#flashArea {float:left;position:relative;} +#viewAllbtn {position:absolute; top:12px; left:944px; width:36px; height:84px; cursor:pointer; z-index:99;} +#serviceMenu {position:relative;float:left;width:945px;height:482px; z-index:90;} +#serviceMenu img {display:block;} +#serviceMenu ul {float:left; display:inline;} +#serviceMenu ul li {float:left;} + +/* View all menu */ +#viewAllLayer {z-index:99; position:absolute; top:0; left:0; width:945px; height:290px; background:url('../images/main/bg_allmenu.gif') no-repeat top left;} +#innerWrap {width:945px; margin:25px 0 0 0;} +.menulistWrap {float:left; width:135px; height:240px; padding:0 0 0 14px; border-right:1px solid #d2d2d2;} +.menulistWrap h3 {margin:0} +.menulistWrap ul {margin:12px 0 0 0;} +.menulistWrap ul li {margin:0 0 6px 0; background:url("../images/main/blt_square1.gif") no-repeat 0 5px; padding:0 0 0 7px; line-height:160%;} +.menulistWrap a:link, .menulistWrap a:visited {color:#666666;text-decoration:none; font-family:'돋움', Dotum; font-size:11px;} +.menulistWrap a:active, .menulistWrap a:hover{color:#666666;text-decoration:underline; font-family:'돋움', Dotum; font-size:11px;} +.menulistWrap2 {float:left; width:150px; padding:0 0 0 14px;} +.menulistWrap2 h3 {margin:0} +.menulistWrap2 ul {margin:12px 0 0 0;} +.menulistWrap2 ul li {margin:0 0 6px 0; background:url("../images/main/blt_square1.gif") no-repeat 0 5px; padding:0 0 0 7px; line-height:160%;} +.menulistWrap2 a:link, .menulistWrap2 a:visited {color:#666666;text-decoration:none; font-family:'돋움', Dotum; font-size:11px;} +.menulistWrap2 a:active, .menulistWrap2 a:hover{color:#666666;text-decoration:underline; font-family:'돋움', Dotum; font-size:11px;} +#btnArea {clear:left; position:absolute;left:452px; top:294px;} +#btnArea a.close {display:block; overflow:hidden; width:50px; height:0; padding-top:14px; background:transparent; text-indent:-3000em; cursor:pointer;} + +/* related */ +#related {clear:both;overflow:hidden;width:944px;height:50px;background:url('../images/main/related_bg.gif') no-repeat top left;} +#related h2 {float:left; width:116px; height:16px; padding:18px 0 0 20px;} +#related ul {float:left; margin:14px 0 0 0;padding-left:8px;} +#related ul li {float:left; padding:0 0 0 35px;} + +/* footer */ +#pasFooter {clear:both;float:left;width:945px;height:87px;line-height:100%;font-family:dotum;background:url('/images/main/main_footer_bg.gif') no-repeat top left;} +#pasFooterLogo {float:left;width:160px;padding:15px 0 0 25px;} +#pasCopyright {position:relative;float:left;width:749px;padding-top:10px;font-size:11px;} +#pasFooter img {vertical-align:middle;} +.textEffect1 {font-weight:bold;color:#ff6600;vertical-align:top;} +.textEffect1 a:hover, .textEffect1 a:active, .textEffect1 a:visited, .textEffect1 a:link {font-weight:bold;color:#ff6600;vertical-align:top;} +.textEffect2 {font-weight:bold;color:#ff6600;font-size:6px;vertical-align:top;} +.textEffect3 {color:#ff6600;vertical-align:top;} +.textEffect4 {color:#4c4c4c;vertical-align:top;} +.textlh {line-height:150%;} +.mar_t5 {margin-top:5px;} + +/* mainmenu +#mainmenu {position:absolute; width:940px; left:0; background:#000;} +ul.accNavi li.Menu, ul.accNavi li.subMenu {height:0; line-height:0; position:absolute; top:-100px;} +ul.accNavi li.Menu a {display:block; position:absolute; margin-left:-450px; top:-3000px; text-align:center;} +ul.accNavi li.Menu a:hover, ul.accNavi li.Menu a:focus, ul.accNavi li.Menu a:active {position:absolute; z-index:5; color:#ff0; background:#000; width:940px;height:480px;top:100px; border:2px solid #ff0;margin-left:0; padding:200px 0 20px 0;font-weight:bold; font-size:1.6em;line-height:160%;} +ul.accNavi li.subMenu a {display:block; position:absolute; margin-left:-450px; top:-3000px; text-align:center;} +ul.accNavi li.subMenu a:hover, ul.accNavi li.subMenu a:focus, ul.accNavi li.subMenu a:active {position:absolute; z-index:5; color:#fff; background:#000; width:940px;height:480px; top:200px; border:2px solid #ff0; margin-left:0;padding:200px 0 20px 0; font-weight:bold;font-size:1.4em;} +p.skip_menuflash1 {height:0;line-height:0;position:absolute;top:-100px;} +p.skip_menuflash2 {height:0;left:0;line-height:0;position:absolute;top:-100px;} +*/ + +/* navigation */ +#navigation{ + z-index:1; + clear:both; +} +/* //navigation */ + +#navigation ul.flash_alt { + position:absolute; + left:-9800px; + top:10px; + + } + #navigation ul.flash_alt li.flash_alt_li { + position:absolute; + width:660px; + height:50px; + padding:10px; + text-align:center; + } + #navigation ul.flash_alt li.flash_alt_li a { + position:absolute; + left:-9969px; + background:#898989; + font-size:1.5em; + font-weight:bold; + color:#fff; + padding:10px; + text-decoration:underline; + } + #navigation ul.flash_alt li.flash_alt_li a:hover, + #navigation ul.flash_alt li.flash_alt_li a:focus, + #navigation ul.flash_alt li.flash_alt_li a:active { + position:absolute; + left:9999px; + top:2px; + width:600px; + } + + + /* flash alt link edited */ + #navigation ul.flash_in { + height:200px; + background:#e9e9e9; + float:left; + margin:0px 0 0 0; + } + #navigation ul.flash_in li.flash_in_li_tit { + padding:5px 0 0 10px ; + background:#e9e9e9; + } + + #navigation ul.flash_in li.flash_in_li_tit a { + color:#898989; + font-size:1.0em; + text-decoration:none; + font-weight:bold; + } + + #navigation ul.flash_in li.flash_in_li { + padding:5px 0 0 10px ; + background:#e9e9e9; + font-family:"Dotum"; + } + + #navigation ul.flash_in li.flash_in_li a { + color:#898989; + font-size:0.9em; + text-decoration:none; + } + #navigation ul.flash_in li.flash_in_li a:hover, + #navigation ul.flash_in li.flash_in_li a:focus, + #navigation ul.flash_in li.flash_in_li a:active { + text-decoration:underline; + } +/* // flash alt navigation */ diff --git a/webapps/totsys/common/inc/totper/left/main_popup.jsp b/webapps/totsys/common/inc/totper/left/main_popup.jsp new file mode 100644 index 0000000..45bd7f8 --- /dev/null +++ b/webapps/totsys/common/inc/totper/left/main_popup.jsp @@ -0,0 +1,53 @@ +<%-- + Document : main_popup + Created on : 2011. 6. 30, 1:36:45 + Author : Kts +--%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" import="java.net.URLEncoder" + import="java.util.Iterator" import="java.util.List" + import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.moumi.MoumiConfig" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.beans.totsys.menu.MenuBean" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.beans.entity.TotDoc"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + + + + ڷ ǻ + + + + +
    + + + + +
    + Ϸ     ϰ
    + + diff --git a/webapps/totsys/common/inc/totper/left/main_popup2.jsp b/webapps/totsys/common/inc/totper/left/main_popup2.jsp new file mode 100644 index 0000000..a9d079b --- /dev/null +++ b/webapps/totsys/common/inc/totper/left/main_popup2.jsp @@ -0,0 +1,55 @@ +<%-- + Document : main_popup + Created on : 2011. 6. 30, 1:36:45 + Author : Kts +--%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" import="java.net.URLEncoder" + import="java.util.Iterator" import="java.util.List" + import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.moumi.MoumiConfig" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.beans.totsys.menu.MenuBean" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.beans.entity.TotDoc"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + + + + + ڷ ǻ + + + + + + +
    + + + + +
    Ϸ      ϰ
    + + diff --git a/webapps/totsys/common/inc/totper/left/main_popup3.jsp b/webapps/totsys/common/inc/totper/left/main_popup3.jsp new file mode 100644 index 0000000..2c517c8 --- /dev/null +++ b/webapps/totsys/common/inc/totper/left/main_popup3.jsp @@ -0,0 +1,79 @@ +<%-- + Document : main_popup + Created on : 2011. 6. 30, 1:36:45 + Author : Kts +--%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLDecoder" import="java.net.URLEncoder" + import="java.util.Iterator" import="java.util.List" + import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.moumi.MoumiConfig" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.beans.totsys.menu.MenuBean" + import="kr.co.kihyun.moumi.doc.MDoc" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.beans.entity.TotDoc"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% + String gName = request.getParameter("gName"); + String id=gName.substring(5); + + //28.ũνƮ ũƮ(Reflected)_CWE-80 : Add by KWON,HAN + if (id !=null) { + id = id.replaceAll("<","<"); + id = id.replaceAll(">",">"); + } + //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +%> + + +- ڷ - + + + + + + + + diff --git a/webapps/totsys/common/inc/totper/left/path b/webapps/totsys/common/inc/totper/left/path new file mode 100644 index 0000000..3599cda --- /dev/null +++ b/webapps/totsys/common/inc/totper/left/path @@ -0,0 +1 @@ +\totsys\common\inc\totper\left\ \ No newline at end of file diff --git a/webapps/totsys/common/inc/totper/left/popup.gif b/webapps/totsys/common/inc/totper/left/popup.gif new file mode 100644 index 0000000..82b1f5a Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/popup.gif differ diff --git a/webapps/totsys/common/inc/totper/left/popup.htm b/webapps/totsys/common/inc/totper/left/popup.htm new file mode 100644 index 0000000..dc1328a --- /dev/null +++ b/webapps/totsys/common/inc/totper/left/popup.htm @@ -0,0 +1,91 @@ + + + + + + +차세대 나이스 자료집계 사용시 유의사항 + + + + + + + +

    차세대 나이스 자료집계 사용시 유의사항

    + +


    + +

    1. 학교에서 자료 제출하기

    + +

    상단메뉴의 제출하기 메뉴를 클릭하면 접수자료에 제출할 목록이 나타나며 학교 전체사용자에게 문서가 보여집니다.(업무관리를 통해 지정된 담당자가 접수자료를 클릭하고 자료를 입력하신후 저장 -> 제출진행자료에서 승인상신을 통해 결재를 요청하시면 됩니다.)

    + +

     집계하기 메뉴(문서생성)는 학교에서는 사용하지 않습니다.

    + +

        

    + +


    + +

    2. 승인 요령

    + +

    승인자는 차세대 나이스 (미결/협조함)에서 자료를 승인/반려 처리하시면 됩니다.

    + +

       

    + +


    + + + + diff --git a/webapps/totsys/common/inc/totper/left/popup1-1.gif b/webapps/totsys/common/inc/totper/left/popup1-1.gif new file mode 100644 index 0000000..e20b868 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/popup1-1.gif differ diff --git a/webapps/totsys/common/inc/totper/left/popup1-2.gif b/webapps/totsys/common/inc/totper/left/popup1-2.gif new file mode 100644 index 0000000..edef4aa Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/popup1-2.gif differ diff --git a/webapps/totsys/common/inc/totper/left/popup2-2.gif b/webapps/totsys/common/inc/totper/left/popup2-2.gif new file mode 100644 index 0000000..5a59535 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/popup2-2.gif differ diff --git a/webapps/totsys/common/inc/totper/left/popup2.back120314 b/webapps/totsys/common/inc/totper/left/popup2.back120314 new file mode 100644 index 0000000..3a87eb7 --- /dev/null +++ b/webapps/totsys/common/inc/totper/left/popup2.back120314 @@ -0,0 +1,72 @@ + + + + + + +차세대 나이스 자료집계 사용시 유의사항 + + + + + + +

    차세대 나이스 자료집계 기능 개선

    + +


    + +

    1. 집계진행중인 문서의 부서변경 기능 개선

    + +

    집계진행자료의 기본정보에서 제출기관지정을 클릭하여 수신처를 추가하거나 삭제할 수 있다

    + +

        

    + +


    + +

    2. 집계진행중인 문서의 서식 정보 수정 기능 개선

    + +

    집계진행자료의 기본정보의 서식정보에서 서식의 셀 속성을 수정할 수 있다.

    + +

    문구 및 내용을 수정한 후 다음단계를 클릭하여 셀의 속성(숫자/문자/날짜/서식)을 수정하면 된다

    + +

       

    + +

    ※ 주의! 서식을 수정하면 진행중인 문서의 제출된 데이터가 모두 삭제되며 복구가 불가능합니다.

    + +



    + + + diff --git a/webapps/totsys/common/inc/totper/left/popup2.htm b/webapps/totsys/common/inc/totper/left/popup2.htm new file mode 100644 index 0000000..cdcc7d0 --- /dev/null +++ b/webapps/totsys/common/inc/totper/left/popup2.htm @@ -0,0 +1,72 @@ + + + + + + +차세대 나이스 자료집계 사용시 유의사항 + + + + + + +

    차세대 나이스 자료집계 기능 개선

    + +


    + +

    1. 집계진행중인 문서의 부서변경 기능 개선

    + +

    집계진행자료의 기본정보에서 제출기관지정을 클릭하여 수신처를 추가하거나 삭제할 수 있다

    + +

    + +


    + +

    2. 집계진행중인 문서의 서식 정보 수정 기능 개선

    + +

    집계진행자료의 기본정보의 서식정보에서 서식의 셀 속성을 수정할 수 있다.

    + +

    문구 및 내용을 수정한 후 다음단계를 클릭하여 셀의 속성(숫자/문자/날짜/서식)을 수정하면 된다

    + +

    + +

    ※ 주의! 서식을 수정하면 진행중인 문서의 제출된 데이터가 모두 삭제되며 복구가 불가능합니다.

    + +



    + + + diff --git a/webapps/totsys/common/inc/totper/left/popup2.html b/webapps/totsys/common/inc/totper/left/popup2.html new file mode 100644 index 0000000..9d13e70 --- /dev/null +++ b/webapps/totsys/common/inc/totper/left/popup2.html @@ -0,0 +1,72 @@ + + + + + + +차세대 나이스 자료집계 사용시 유의사항 + + + + + + +

    차세대 나이스 자료집계 기능 개선

    + +


    + +

    1. 집계진행중인 문서의 부서변경 기능 개선

    + +

    집계진행자료의 기본정보에서 제출기관지정을 클릭하여 수신처를 추가하거나 삭제할 수 있다

    + +

    + +


    + +

    2. 집계진행중인 문서의 서식 정보 수정 기능 개선

    + +

    집계진행자료의 기본정보의 서식정보에서 서식의 셀 속성을 수정할 수 있다.

    + +

    문구 및 내용을 수정한 후 다음단계를 클릭하여 셀의 속성(숫자/문자/날짜/서식)을 수정하면 된다

    + +

    + +

    ※ 주의! 서식을 수정하면 진행중인 문서의 제출된 데이터가 모두 삭제되며 복구가 불가능합니다.

    + +



    + + + diff --git a/webapps/totsys/common/inc/totper/left/popup21.gif b/webapps/totsys/common/inc/totper/left/popup21.gif new file mode 100644 index 0000000..b4ca955 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/popup21.gif differ diff --git a/webapps/totsys/common/inc/totper/left/t_popup.gif b/webapps/totsys/common/inc/totper/left/t_popup.gif new file mode 100644 index 0000000..63ab7b1 Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/t_popup.gif differ diff --git a/webapps/totsys/common/inc/totper/left/test.JPG b/webapps/totsys/common/inc/totper/left/test.JPG new file mode 100644 index 0000000..e40461a Binary files /dev/null and b/webapps/totsys/common/inc/totper/left/test.JPG differ diff --git a/webapps/totsys/common/inc/totper/popup_repoper.jsp b/webapps/totsys/common/inc/totper/popup_repoper.jsp new file mode 100644 index 0000000..e811a9e --- /dev/null +++ b/webapps/totsys/common/inc/totper/popup_repoper.jsp @@ -0,0 +1,147 @@ + +<% +/************************************************************@@ + * Program Name : doc_list.jsp + * Description : //// + * Author : + * Create Date : 2004.10.11 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.beans.user.UserView" + import="kr.co.kihyun.beans.user.DeptView" import="java.net.URLDecoder" + import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="kr.co.kihyun.lang.MString"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +try{ + /******* Parameter *********/ + String userID = ""; + String deptID = ""; + Long docID = null; + int formName = 0; + + userID = clearXSS(URLDecoder.decode(request.getParameter("userID"), "UTF-8"),""); + deptID = request.getParameter("deptID"); + docID = MLong.parseLong(request.getParameter("docID"),null); + formName = MInteger.parseInt(request.getParameter("formName")); + + /***** doc getUserID *********/ + Doc doc = new Doc(); + if(docID != null){ + deptID = doc.getRegisterDept(docID); + } + + /******* *********/ + //String deptID = ""; + String deptName = ""; + String userName = ""; + String phone = ""; + String email = ""; + + UserView userView = new UserView(); + if(deptID != null){ + //v2. 13.SQL : userView.executeQuery() prepare SQL Ǿ ִ. + userView.executeQuery(userID,deptID); + //================= + }else{ + //v2. 13.SQL : userView.executeQuery() prepare SQL Ǿ ִ. + userView.executeQuery(userID); + //================= + } + DeptView deptView = new DeptView(); + //v2. 13.SQL : deptView.executeQuery() prepare SQL Ǿ ִ. + deptView.executeQuery(deptID); + //================= + //deptID = userView.getDeptID(); + deptName = deptView.getName(); + userName = userView.getName(); + phone = userView.getPhone(); + email = userView.getEmail(); + + if(phone==null) phone=""; + if(email==null) email=""; + + %> + + + + + + + + + + + + + + + + + + + + +
      
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    <%if(formName == 1){%>ڸ<%}else{%><%}%> + <%= userName %> 
    <%= deptName %> ȭȣ<%= phone %> 
    E-MAIL<%= email %> Ÿ 
    + + + +<% +}catch(Exception ex){ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> diff --git a/webapps/totsys/common/inc/totper/top/top.jsp b/webapps/totsys/common/inc/totper/top/top.jsp new file mode 100644 index 0000000..245953d --- /dev/null +++ b/webapps/totsys/common/inc/totper/top/top.jsp @@ -0,0 +1,26 @@ + +<% +/************************************************************@@ + * Program Name : doc_list.jsp + * Description : //// + * Author : ũ + * Create Date : 2010.11.23 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html;" + import="java.net.URLDecoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.moumi.Moumi"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% + if(!HttpSSOLogin.isLogin(request)){ + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } + +%> diff --git a/webapps/totsys/common/inc/totper/tot_repoper.jsp b/webapps/totsys/common/inc/totper/tot_repoper.jsp new file mode 100644 index 0000000..d536eab --- /dev/null +++ b/webapps/totsys/common/inc/totper/tot_repoper.jsp @@ -0,0 +1,89 @@ + +<% /** + * **********************************************************@@ Program Name + * : doc_list.jsp Description : / Author : ũ Create Date + * : 2010.11.27 History : + * @@*********************************************************** + */ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="java.text.SimpleDateFormat" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*" import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.lang.MLong" import="kr.co.kihyun.lang.MString"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + tx.begin(); + + /** + * **** Parameter ***** + */ + Long reportID = MLong.parseLong(request.getParameter("reportID"), null); + TotReport totReport = pm.getObjectById(TotReport.class, reportID); +%> + + + + <%=Moumi.getMessageBundle().getString("moumi.message.tot_report.submit")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.info")%> + +   +   + + + + + + + + + + + + + + + + + + + + + + + +
    + <%=Moumi.getMessageBundle().getString("moumi.message.tot_report.submit")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.name")%> + <%= MString.checkNull(totReport.getOwnerName(pm))%>  +
    + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation")%>/<%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.devision")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.name")%>  + + <%= totReport.getUser(pm).getUpperDept(pm).getName()%>  + + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.telNumber")%>  + + <%= MString.checkNull(totReport.getOwnerPhone())%>  +
    E-MAIL + <%= MString.checkNull(totReport.getOwnerEmail())%>  + + <%=Moumi.getMessageBundle().getString("moumi.message.tot_report.submit")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.dateTime")%>  + + <%=totReport.getSubmitDate() == null ? "" : new SimpleDateFormat("yy/MM/dd HH:mm:ss").format(totReport.getSubmitDate())%>  +
    + + +<% + tx.rollback(); + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/totper/totper.jsp b/webapps/totsys/common/inc/totper/totper.jsp new file mode 100644 index 0000000..8d7238a --- /dev/null +++ b/webapps/totsys/common/inc/totper/totper.jsp @@ -0,0 +1,99 @@ + +<% + /** + * **********************************************************@@ Program Name + * : doc_list.jsp Description : //// Author : ũ Create + * Date : 2010.11.26 History : + * @@*********************************************************** + */ +%> + +<%@ page contentType="text/html; charset=UTF-8" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" + import="java.text.SimpleDateFormat" + %> +<% + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + tx.begin(); + TotDoc totDoc = pm.getObjectById(TotDoc.class, MLong.parseLong(request.getParameter("docID"))); + AcceptanceLimitStrategy acceptanceLimitStrategy = totDoc.getAcceptanceLimitStrategy(); + String tmp = null; + if(acceptanceLimitStrategy.getLimitCount() == 0){ + tmp = new SimpleDateFormat("yyyy-MM-dd HH").format(totDoc.getEndDate()) + " "; + }else{ + tmp = MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.endBySubmitTotal") + " "; + } + if(tmp.contains("9999-12-30")) tmp=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.endManually"); + + String recTmpMagam = MString.checkNull(tmp); +%> + + + + + + + + + +
    Ӹ<%=TotDocType.TOT_DOC%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.request")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.person")%> + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.info")%>
    + + + + + + + + + + + + + + + + + + + + + +
    + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.registrition")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.name")%> + + <%= MString.checkNull(totDoc.getOwnerName())%>  +
    + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.request")%> + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.coporation")%>/<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.devision")%> + + <%= totDoc.getDept(pm).getName()%>  + + <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.telNumber")%> + + <%= MString.checkNull(totDoc.getOwnerPhone())%>  +
    E-MAIL<%= MString.checkNull(totDoc.getOwnerEmail())%> <%=""%><%=recTmpMagam%>
    + + +<% + tx.commit(); + } catch (Exception ex) { + ex.printStackTrace(); + pm.close(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> diff --git a/webapps/totsys/common/inc/totper/totper_excel.jsp b/webapps/totsys/common/inc/totper/totper_excel.jsp new file mode 100644 index 0000000..973b865 --- /dev/null +++ b/webapps/totsys/common/inc/totper/totper_excel.jsp @@ -0,0 +1,111 @@ + +<% +/************************************************************@@ + * Program Name : doc_list.jsp + * Description : //// + * Author : + * Create Date : 2004.10.11 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.beans.user.UserView" + import="kr.co.kihyun.beans.user.DeptView" import="java.net.URLDecoder" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MLong"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +try{ + /******* Parameter *********/ + String userID = clearXSS(Encoder.toJava(request.getParameter("userID")),""); + String deptID = request.getParameter("deptID"); + Long docID = MLong.parseLong(MString.checkNull(request.getParameter("docID")),null); + int formName = MInteger.parseInt(request.getParameter("formName")); + + /***** doc getUserID *********/ + Doc doc = new Doc(); + if(docID != null){ + userID = doc.getRegisterID(docID); + deptID = doc.getRegisterDept(docID); + } + + + /******* *********/ + //String deptID = ""; + String deptName = ""; + String userName = ""; + String phone = ""; + String email = ""; + + UserView userView = new UserView(); + if(deptID != null){ + //v2. 13.SQL : userView.executeQuery() prepare SQL Ǿ ִ. + userView.executeQuery(userID,deptID); + //================= + }else{ + //v2. 13.SQL : userView.executeQuery() prepare SQL Ǿ ִ. + userView.executeQuery(userID); + //================= + } + DeptView deptView = new DeptView(); + //v2. 13.SQL : deptView.executeQuery() prepare SQL Ǿ ִ. + deptView.executeQuery(deptID); + //================= + //deptID = userView.getDeptID(); + deptName = deptView.getName(); + userName = userView.getName(); + phone = userView.getPhone(); + email = userView.getEmail(); + + if(phone==null) phone=""; + if(email==null) email=""; + + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     <%if(formName == 1){%>ڸ<%}else{%>û<%}%> + <%= userName %>  <%if(formName == 1){%> + ID<%}else{%> ID<%}%> +  
     û /μ<%= deptName %>  ȭȣ<%= phone %> 
     E-MAIL<%= email %>  Ÿ 
    + + + +<% +}catch(Exception ex){ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> diff --git a/webapps/totsys/common/inc/totper/totper_print.jsp b/webapps/totsys/common/inc/totper/totper_print.jsp new file mode 100644 index 0000000..3de17d7 --- /dev/null +++ b/webapps/totsys/common/inc/totper/totper_print.jsp @@ -0,0 +1,111 @@ +<% +/************************************************************@@ + * Program Name : doc_list.jsp + * Description : //// + * Author : ũ + * Create Date : 2010.11.25 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.beans.user.UserView" + import="kr.co.kihyun.beans.user.DeptView" import="java.net.URLDecoder" + import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +try{ + /******* Parameter *********/ + String userID = clearXSS(Encoder.toJava(request.getParameter("userID")),""); + String deptID = request.getParameter("deptID"); + Long docID = MLong.parseLong(request.getParameter("docID"),null); + int formName = MInteger.parseInt(request.getParameter("formName")); + + /***** doc getUserID *********/ + Doc doc = new Doc(); + if(docID != null){ + userID = doc.getRegisterID(docID); + deptID = doc.getRegisterDept(docID); + } + + /******* *********/ + //String deptID = ""; + String deptName = ""; + String userName = ""; + String phone = ""; + String email = ""; + + UserView userView = new UserView(); + if(deptID != null){ + //v2. 13.SQL : userView.executeQuery() prepare SQL Ǿ ִ. + userView.executeQuery(userID,deptID); + //================= + }else{ + //v2. 13.SQL : userView.executeQuery() prepare SQL Ǿ ִ. + userView.executeQuery(userID); + //================= + } + DeptView deptView = new DeptView(); + //v2. 13.SQL : deptView.executeQuery() prepare SQL Ǿ ִ. + deptView.executeQuery(deptID); + //================= + //deptID = userView.getDeptID(); + deptName = deptView.getName(); + userName = userView.getName(); + phone = userView.getPhone(); + email = userView.getEmail(); + + if(phone==null) phone=""; + if(email==null) email=""; + %> + + + + + + + + + + + + + + + + + + + + +
     <%if(formName == 1){%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.registrition")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.name")%> + <%}else{%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.tot_doc")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.request")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.person")%> + <%}%> + <%= userName %> 
     <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.request")%> + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation")%>/<%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.devision")%><%= deptName %>  +   + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.telNumber")%> + <%= phone %>  +
     E-MAIL<%= email %>  <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.others")%> 
    + + + +<% +}catch(Exception ex){ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> diff --git a/webapps/totsys/common/js/Copyjquery-1.12.4.js b/webapps/totsys/common/js/Copyjquery-1.12.4.js new file mode 100644 index 0000000..7fc60fc --- /dev/null +++ b/webapps/totsys/common/js/Copyjquery-1.12.4.js @@ -0,0 +1,11008 @@ +/*! + * jQuery JavaScript Library v1.12.4 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2016-05-20T17:17Z + */ + +(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 have a `window` with a `document` + // (such as Node.js), expose a 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 ) { + +// Support: Firefox 18+ +// Can't be in strict mode, several libs including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +//"use strict"; +var deletedIds = []; + +var document = window.document; + +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.12.4", + + // 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. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + 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(); + }, + + // 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) + var realStringObj = obj && obj.toString(); + return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 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.ownFirst ) { + 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; + }, + + // 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 ); // jscs:ignore requireDotNotation + } )( 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(); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === 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 length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + 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 +} ); + +// JSHint would error on this code due to the Symbol not being defined in ES5. +// Defining this global in .jshintrc would create a danger of using the global +// unguarded in another place, it seems safer to just disable JSHint for these +// three lines. +/* jshint ignore: start */ +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = deletedIds[ Symbol.iterator ]; +} +/* jshint ignore: end */ + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".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 = !!obj && "length" in obj && obj.length, + type = jQuery.type( obj ); + + if ( type === "function" || jQuery.isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.2.1 + * http://sizzlejs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2015-10-17 + */ +(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 + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + // 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( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "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 m, i, elem, nid, nidselect, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { + + // ID selector + if ( (m = match[1]) ) { + + // Document context + if ( nodeType === 9 ) { + if ( (elem = context.getElementById( m )) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && (elem = newContext.getElementById( m )) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( (m = match[3]) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !compilerCache[ selector + " " ] && + (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + + if ( nodeType !== 1 ) { + newContext = context; + newSelector = selector; + + // qSA looks outside Element context, which is not what we want + // Thanks to Andrew Dupont for this workaround technique + // Support: IE <=8 + // Exclude object elements + } else if ( context.nodeName.toLowerCase() !== "object" ) { + + // Capture the context ID, setting it first if necessary + if ( (nid = context.getAttribute( "id" )) ) { + nid = nid.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", (nid = expando) ); + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']"; + while ( i-- ) { + groups[i] = nidselect + " " + toSelector( groups[i] ); + } + newSelector = groups.join( "," ); + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + } finally { + if ( nid === expando ) { + 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 = arr.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; + + // Return early if doc is invalid or already selected + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + + // Support: IE 9-11, Edge + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + if ( (parent = document.defaultView) && parent.top !== parent ) { + // Support: IE 11 + if ( parent.addEventListener ) { + parent.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( parent.attachEvent ) { + parent.attachEvent( "onunload", unloadHandler ); + } + } + + /* 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( document.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( document.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 !document.getElementsByName || !document.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 ); + return m ? [ 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 ( typeof context.getElementsByClassName !== "undefined" && 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( document.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.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + 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 = document.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 self-exclusive + // 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 === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + return -1; + } + if ( b === document || 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 === document ? -1 : + b === document ? 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 document; +}; + +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 && + !compilerCache[ expr + " " ] && + ( !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, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + 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 + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && 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 ) { + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + // Use previously-cached element index if available + if ( useCache ) { + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + // 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 ) { + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + uniqueCache[ 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, uniqueCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator 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 ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); + + if ( (oldCache = uniqueCache[ 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 + uniqueCache[ 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 || outermost; + } + + // Add elements passing elementMatchers directly to results + // 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; + if ( !context && elem.ownerDocument !== document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context || document, 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 ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + 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 only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound 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, + !context || 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.uniqueSort = jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +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 ) > -1 ) !== 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, + + // 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, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // init accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // 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 || root ).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 root.ready !== "undefined" ? + root.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.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.uniqueSort( 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.uniqueSort( + 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 dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( 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.uniqueSort( ret ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + } + + return this.pushStack( ret ); + }; +} ); +var rnotwhite = ( /\S+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + 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" ? + 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, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( jQuery.isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + 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.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = true; + if ( !memory ) { + self.disable(); + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + 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() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } 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() + .progress( updateFunc( i, progressContexts, progressValues ) ) + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ); + } 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; + } + + // 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 ); + window.removeEventListener( "load", completed ); + + } 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 || + window.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. + // Support: IE6-10 + // Older IE sometimes signals "interactive" too soon + if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); + + // 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 window.setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + } )(); + } + } + } + return readyList.promise( obj ); +}; + +// Kick off the DOM ready check even if the user does not +jQuery.ready.promise(); + + + + +// Support: IE<9 +// Iteration over object's inherited properties before its own +var i; +for ( i in jQuery( support ) ) { + break; +} +support.ownFirst = 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 !== "undefined" ) { + + // 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" ); + + // Support: IE<9 + support.deleteExpando = true; + try { + delete div.test; + } catch ( e ) { + support.deleteExpando = false; + } + + // Null elements to avoid leaks in IE. + div = null; +} )(); +var 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 ( !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 ( !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, undefined + } else { + cache[ id ] = undefined; + } +} + +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 ); + } +} ); + + +( function() { + var shrinkWrapBlocksVal; + + support.shrinkWrapBlocks = function() { + if ( shrinkWrapBlocksVal != null ) { + return shrinkWrapBlocksVal; + } + + // Will be changed later if needed. + shrinkWrapBlocksVal = false; + + // Minified: var b,c,d + var div, body, container; + + body = document.getElementsByTagName( "body" )[ 0 ]; + if ( !body || !body.style ) { + + // Test fired too early or in an unsupported environment, exit. + 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 ); + + // Support: IE6 + // Check if elements with layout shrink-wrap their children + if ( typeof div.style.zoom !== "undefined" ) { + + // Reset CSS: box-sizing; display; margin; border + div.style.cssText = + + // Support: Firefox<29, Android 2.3 + // Vendor-prefix box-sizing + "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + + "box-sizing:content-box;display:block;margin:0;border:0;" + + "padding:1px;width:1px;zoom:1"; + div.appendChild( document.createElement( "div" ) ).style.width = "5px"; + shrinkWrapBlocksVal = div.offsetWidth !== 3; + } + + body.removeChild( container ); + + return shrinkWrapBlocksVal; + }; + +} )(); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +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 ); + }; + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, + scale = 1, + maxIterations = 20, + currentValue = tween ? + function() { return tween.cur(); } : + function() { return jQuery.css( elem, prop, "" ); }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + do { + + // If previous iteration zeroed out, double until we get *something*. + // Use string for doubling so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + initialInUnit = initialInUnit / scale; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // Break the loop if scale is unchanged or perfect, or if we've just had enough. + } while ( + scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations + ); + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var 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 ) { + 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 ); + +var rtagName = ( /<([\w:-]+)/ ); + +var rscriptType = ( /^$|\/(?:java|ecma)script/i ); + +var rleadingWhitespace = ( /^\s+/ ); + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|" + + "details|dialog|figcaption|figure|footer|header|hgroup|main|" + + "mark|meter|nav|output|picture|progress|section|summary|template|time|video"; + + + +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + + +( function() { + var div = document.createElement( "div" ), + fragment = document.createDocumentFragment(), + input = document.createElement( "input" ); + + // 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 ); + + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input = document.createElement( "input" ); + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // 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 + // Cloned elements keep attachEvent handlers, we use addEventListener on IE9+ + support.noCloneEvent = !!div.addEventListener; + + // Support: IE<9 + // Since attributes and properties are the same in IE, + // cleanData must set properties to undefined rather than use removeAttribute + div[ jQuery.expando ] = 1; + support.attributes = !div.getAttribute( jQuery.expando ); +} )(); + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
    ", "
    " ], + area: [ 1, "", "" ], + + // Support: IE8 + 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
    ", "
    " ] +}; + +// Support: IE8-IE9 +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 !== "undefined" ? + context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== "undefined" ? + 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; +} + + +// 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" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/, + rtbody = / 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++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + + 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; +} + + +( function() { + var i, eventName, + div = document.createElement( "div" ); + + // Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events) + for ( i in { submit: true, change: true, focusin: true } ) { + eventName = "on" + i; + + if ( !( support[ i ] = eventName in window ) ) { + + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + div.setAttribute( eventName, "t" ); + support[ i ] = 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|drag|drop)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE9 +// See #13393 for more info +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // 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 ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + 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 elem; + } + + 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 elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * 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 !== "undefined" && + ( !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( "." ) > -1 ) { + + // 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.rnamespace = 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 && 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 + ) && 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, j, ret, matched, handleObj, + 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.rnamespace || event.rnamespace.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 i, matches, sel, handleObj, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Support (at least): Chrome, IE9 + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // + // Support: Firefox<=42+ + // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) + if ( delegateCount && cur.nodeType && + ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) { + + /* 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 ) > -1 : + 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: Safari 6-8+ + // 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 detail 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; + } + } + } + }, + + // Piggyback on a donor event to simulate a different one + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + + // Previously, `originalEvent: {}` was set here, so stopPropagation call + // would not be triggered on donor event, since in our own + // jQuery.event.stopPropagation function we had a check for existence of + // originalEvent.stopPropagation method, so, consequently it would be a noop. + // + // Guard for simulated events was moved to jQuery.event.stopPropagation function + // since `originalEvent` should point to the original event for the + // constancy with other events and for more focused logic + } + ); + + jQuery.event.trigger( e, null, elem ); + + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } + } : + 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 ] === "undefined" ) { + 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 = { + constructor: jQuery.Event, + 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 || this.isSimulated ) { + 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 +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://code.google.com/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +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 mouseenter/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.submit ) { + + 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" ) ? + + // Support: IE <=8 + // We use jQuery.prop instead of elem.form + // to allow fixing the IE8 delegated submit issue (gh-2332) + // by 3rd party polyfills/workarounds. + jQuery.prop( elem, "form" ) : + undefined; + + if ( form && !jQuery._data( form, "submit" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submitBubble = true; + } ); + jQuery._data( form, "submit", 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._submitBubble ) { + delete event._submitBubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event ); + } + } + }, + + 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.change ) { + + 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._justChanged = true; + } + } ); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._justChanged && !event.isTrigger ) { + this._justChanged = false; + } + + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event ); + } ); + } + 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, "change" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event ); + } + } ); + jQuery._data( elem, "change", 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 ); + } + }; +} + +// Support: Firefox +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome, Safari +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + 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 ) ); + }; + + 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 ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, 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 rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp( "<(?:" + nodeNames + ")[\\s/>]", "i" ), + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, + + // Support: IE 10-11, Edge 10240+ + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement( "div" ) ); + +// 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; +} + +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; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = collection.length, + 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 collection.each( function( index ) { + var self = collection.eq( index ); + if ( isFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + 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 ) { + + // Support: Android<4.1, PhantomJS<2 + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ 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 collection; +} + +function remove( elem, selector, keepData ) { + var node, + elems = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = elems[ i ] ) != null; i++ ) { + + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html.replace( rxhtmlTag, "<$1>" ); + }, + + 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; + }, + + cleanData: function( elems, /* internal */ forceAcceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + attributes = support.attributes, + special = jQuery.event.special; + + for ( ; ( elem = elems[ i ] ) != null; i++ ) { + if ( forceAcceptData || 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 ]; + + // Support: IE<9 + // IE does not allow us to delete expando properties from nodes + // IE creates expando attributes along with the property + // IE does not have a removeAttribute function on Document nodes + if ( !attributes && typeof elem.removeAttribute !== "undefined" ) { + elem.removeAttribute( internalKey ); + + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://code.google.com/p/chromium/issues/detail?id=378607 + } else { + elem[ internalKey ] = undefined; + } + + deletedIds.push( id ); + } + } + } + } + } +} ); + +jQuery.fn.extend( { + + // Keep domManip exposed until 3.0 (gh-2225) + domManip: domManip, + + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + 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 domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, 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 domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + 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 = jQuery.htmlPrefilter( value ); + + 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 ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +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 = { + + // Support: Firefox + // We have to pre-define these values for FF (#10227) + HTML: "block", + BODY: "block" + }; + +/** + * 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 elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + + 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( "'; + $mainbody.find('.popframeblock'+winname+',iframe[name="'+winname+'"]').remove(); + $mainbody.append(html); + return $mainbody.find('iframe[name="'+winname+'"]')[0].contentWindow; + }catch(e){ + alert('브라우저 오류입니다. 페이지를 새로 고칩니다.'); + location.href=location.href; + } + + }; + } + + function bindload(mainifr){ + //팝업 레이어 사용안함 + if(true)return; + try{ + try{ + if(getPopCookie() == 'no' || document.documentMode < 10) + return; + }catch(e){return;} + overrideOpen(mainifr.contentWindow); + mainifr.contentWindow.poploadbind=function(popifr){ + if(popifr.contentWindow.location.href.indexOf('reuse_copy_form.jsp') > -1){ + closepop(); + } + overrideOpen(popifr.contentWindow); + popifr.contentWindow.close=function(){ + popifr.contentWindow.parent.$('.popframeblock,.popifr').remove(); + }; + popifr.contentWindow.focus=null; + try{ + Object.keys(popifr.contentWindow).filter(function(m){ + for(var m in popifr.contentWindow){ + try{ + var con = popifr.contentWindow[m].toString(); + if(con.substr(0,9) == 'function ' && con.indexOf('[native code]')==-1){ + if(con.indexOf('window.close()') > -1||con.indexOf('self.close()') > -1){ + con=con.replace('window.close()','parent.parent.closepop(window.name)'); + con=con.replace('self.close()','parent.parent.closepop(window.name)'); + popifr.contentWindow.eval(m+'='+con); + hasCloseBtn=true; + } + } + }catch(e){ + console.log(e); + } + } + }); + }catch(e){} + $(popifr.contentWindow.document.body).find('*').each(function(){ + try{ + var oncl = $(this).attr('onclick').toString(); + if(oncl){ + if(oncl.indexOf('window.close()')>-1||oncl.indexOf('self.close()')>-1){ + oncl = oncl.replace('window.close()','parent.parent.closepop(window.name)'); + oncl = oncl.replace('self.close()','parent.parent.closepop(window.name)'); + $(this).attr('onclick',oncl); + hasCloseBtn=true; + } + } + }catch(e){} + try{ + var href = $(this).attr('href'); + if(href){ + if(href.indexOf('window.close()')>-1||href.indexOf('self.close()')>-1){ + href = href.replace('window.close()','parent.parent.closepop(window.name)'); + href = href.replace('self.close()','parent.parent.closepop(window.name)'); + $(this).attr('href',href); + hasCloseBtn=true; + } + } + }catch(e){} + }); + if(!hasCloseBtn){ + if(popifr.contentWindow.document.body.innerHTML == ''){ + closepop(window.name); + }else{ + $(popifr.contentWindow.document.body).append('
    닫기
    '); + } + } + hasCloseBtn=false; + $(popifr.contentWindow.document.body).css({'background-color':'#fff','overflow':'hidden'}); + var ch = popifr.contentWindow.document.body.clientHeight; + var sh = popifr.contentWindow.document.body.scrollHeight; + var oh = $(popifr).height(); + var arr = [ch,sh,oh].sort(function(a,b){return b-a;}); + $(popifr).height(arr[0]); + var cw = popifr.contentWindow.document.body.clientWidth; + var sw = popifr.contentWindow.document.body.scrollWidth; + var ow = $(popifr).width(); + arr = [cw,sw,ow].sort(function(a,b){return b-a;}); + $(popifr).width(arr[0]); + var $mainbody = $(document.frames.main.document.body); + var x = $mainbody.width()/2-sw/2; + x = parseInt(x); + var y = $mainbody.height()/2-sh/2; + y = parseInt(y); + if(x<0)x=0; + if(y<0)y=0; + $(popifr).css({top:y+'px',left:x+'px'}); + }; + var html='
    ' + +'' + +'' + +'' + +'' + +'
    '; + $(mainifr.contentWindow.document.body).append(html); + $(mainifr.contentWindow.document.body).find('#formDiv').prepend('
    ') + $(mainifr.contentWindow.document.head).append(''); + }catch(e){} + } + + function closepop(name){ + if(!name){ + $(document.frames.main.document.body).find('.popframeblock,.popifr').remove(); + }else{ + $(document.frames.main.document.body).find('.popframeblock'+name+',.popifr'+name).remove(); + } + } + + function setCookie( name, value, expiredays ) + { + var todayDate = new Date(); + todayDate.setDate( todayDate.getDate() + expiredays ); + document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" + } + + function setpop(idx){ + if(idx == 0){ + setCookie('usepop','yes',999); + }else{ + setCookie('usepop','no',999); + } + if(confirm('다음페이지부터 적용됩니다\n\n지금 새로고침하고 적용하시겠습니까?\n\n새로고침시 현재 페이지의 입력내용이 사라집니다.')){ + document.frames.main.location.reload(); + } + } + function getPopCookie(){ + var coo=document.cookie; + var popcoo; + try{ + popcoo = coo.split('usepop=')[1].split(';')[0]; + }catch(e){} + if(!popcoo)popcoo='no'; + return popcoo; + } + + function bindtopload(topwin){ + //팝업 레이어 사용안함 + if(true)return; + try{ + if(document.documentMode<10) + return; + }catch(e){ + return; + } + var dv=$(topwin.document.getElementById('top_other_menu')); + dv.append(''); + var popcoo = getPopCookie(); + idx = popcoo == 'yes' ? 0 : 1; + dv.find('select')[0].selectedIndex=idx; + + } + + var tf=false; + function toggleForm(obj){ + tf = !tf; + if(tf){ + obj.value = '원래대로'; + $(document.frames.main.document.body).find('#formDiv').css({ + 'position':'absolute', + 'top':'0', + 'left':'0', + 'width':'100%', + 'height':$(document.frames.main.document.body).height()+'px', + 'background-color':'#fff', + 'z-index':'2000', + 'overflow':'scroll' + }); + }else{ + obj.value = '전체화면보기'; + $(document.frames.main.document.body).find('#formDiv').css({ + 'position':'', + 'width':'', + 'height':'', + 'overflow':'' + }); + } + } + + var togglemax=false; + function toggleMaximum(obj){ + togglemax = !togglemax; + if(obj)obj.value = togglemax?'원래대로':'최대화'; + alert("frame.jsp 297 프레임 호출"); + var row = parseInt(document.getElementsByTagName('frameset')[0].rows.split(',')[0]); + var col = parseInt(document.getElementsByTagName('frameset')[1].cols.split(',')[0]); + toggleMaxAct(row,col); + } + function toggleMaxAct(row,col){ + var orow = parseInt(frameset1rows.split(',')[0]); + var ocol = parseInt(frameset2cols.split(',')[0]); + if(togglemax){ + row-=3; + col-=5; + }else{ + row+=3; + col+=5; + } + + if(row<0)row = 0; + if(row>orow)row = orow; + if(col<0)col = 0; + if(col>ocol)col = ocol; + document.getElementsByTagName('frameset')[0].rows=row+',*'; + document.getElementsByTagName('frameset')[1].cols=col+',*'; + if((togglemax&&row0&&col>0)){ + setTimeout(function(){toggleMaxAct(row,col);},0); + } + } + setTimeout(checkloading,100); \ No newline at end of file diff --git a/webapps/totsys/common/js/mktree.js b/webapps/totsys/common/js/mktree.js new file mode 100644 index 0000000..41812d2 --- /dev/null +++ b/webapps/totsys/common/js/mktree.js @@ -0,0 +1,177 @@ +// =================================================================== +// Author: Matt Kruse +// WWW: http://www.mattkruse.com/ +// +// NOTICE: You may use this code for any purpose, commercial or +// private, without any further permission from the author. You may +// remove this notice from your final code if you wish, however it is +// appreciated by the author if at least my web site address is kept. +// +// You may *NOT* re-distribute this code in any way except through its +// use. That means, you can include it in your product, or your web +// site, or any other form where the code is actually being used. You +// may not put the plain javascript up on your site for download or +// include it in your javascript libraries for download. +// If you wish to share this code with others, please just point them +// to the URL instead. +// Please DO NOT link directly to my .js files from your site. Copy +// the files to your server and use them there. Thank you. +// =================================================================== + +// HISTORY +// ------------------------------------------------------------------ +// December 9, 2003: Added script to the Javascript Toolbox +// December 10, 2003: Added the preProcessTrees variable to allow user +// to turn off automatic conversion of UL's onLoad +// March 1, 2004: Changed it so if a
  • has a class already attached +// to it, that class won't be erased when initialized. This allows +// you to set the state of the tree when painting the page simply +// by setting some
  • 's class name as being "liOpen" (see example) +/* +This code is inspired by and extended from Stuart Langridge's aqlist code: + http://www.kryogenix.org/code/browser/aqlists/ + Stuart Langridge, November 2002 + sil@kryogenix.org + Inspired by Aaron's labels.js (http://youngpup.net/demos/labels/) + and Dave Lindquist's menuDropDown.js (http://www.gazingus.org/dhtml/?id=109) +*/ + +// Automatically attach a listener to the window onload, to convert the trees +addEvent(window,"load",convertTrees); + +// Utility function to add an event listener +function addEvent(o,e,f){ + if (o.addEventListener){ o.addEventListener(e,f,true); return true; } + else if (o.attachEvent){ return o.attachEvent("on"+e,f); } + else { return false; } +} + +// utility function to set a global variable if it is not already set +function setDefault(name,val) { + if (typeof(window[name])=="undefined" || window[name]==null) { + window[name]=val; + } +} + +// Full expands a tree with a given ID +function expandTree(treeId) { + var ul = document.getElementById(treeId); + if (ul == null) { return false; } + expandCollapseList(ul,nodeOpenClass); +} + +// Fully collapses a tree with a given ID +function collapseTree(treeId) { + var ul = document.getElementById(treeId); + if (ul == null) { return false; } + expandCollapseList(ul,nodeClosedClass); +} + +// Expands enough nodes to expose an LI with a given ID +function expandToItem(treeId,itemId) { + var ul = document.getElementById(treeId); + if (ul == null) { return false; } + var ret = expandCollapseList(ul,nodeOpenClass,itemId); + if (ret) { + var o = document.getElementById(itemId); + if (o.scrollIntoView) { + o.scrollIntoView(false); + } + } +} + +// Performs 3 functions: +// a) Expand all nodes +// b) Collapse all nodes +// c) Expand all nodes to reach a certain ID +function expandCollapseList(ul,cName,itemId) { + if (!ul.childNodes || ul.childNodes.length==0) { return false; } + // Iterate LIs + for (var itemi=0;itemi"; + balloonHtml = balloonHtml + "
    "; + balloonHtml = balloonHtml + " "; + balloonHtml = balloonHtml + " " + str + ""; + balloonHtml = balloonHtml + " "; + balloonHtml = balloonHtml + " "; + balloonHtml = balloonHtml + "
    "; + return balloonHtml; +} + +// 링크ALT (풍선 도움말) +function balloon_on(str,obj,mv_right,mv_up) { + var alt_balloon = document.getElementById('TnT_TempLayer2'); + //alt_balloon.innerHTML="
    " + str + "
    "; + //alt_balloon.innerHTML="
    " + str + "
    "; + //alt_balloon.innerHTML="
    " + str + "
    "; + //alt_balloon.innerHTML = html; + + alt_balloon.innerHTML = balloon_html(str); + + //alt_balloon.style.left=TnT_get_objLeft(obj)+mv_right; + //alt_balloon.style.top=TnT_get_objTop(obj)-20-mv_up; + alt_balloon.style.left = TnT_get_objLeft(obj) + mv_right + "px"; + //alt_balloon.style.top=TnT_get_objTop(obj)-20-mv_up+"px"; + alt_balloon.style.top = TnT_get_objTop(obj) - 23 - mv_up + "px"; + alt_balloon.style.visibility = 'visible'; +} + +function balloon_off() { + document.getElementById('TnT_TempLayer2').style.visibility = 'hidden'; +} + +// onload 기본모드 +nsEvent='rest'; // Netscape event + +if(navigator.userAgent.indexOf('MSIE') === -1) { + this_browser = 'n'; + document.onmousedown = function(n_evt) { + nsEvent = n_evt; + }; + it_img_tag = 'input type=image '; // iwindow title +} else { + this_browser = 'e'; + it_img_tag = 'img '; +} + +document.write(""); +document.write(""); + diff --git a/webapps/totsys/common/js/org_search.js b/webapps/totsys/common/js/org_search.js new file mode 100644 index 0000000..9fbfeed --- /dev/null +++ b/webapps/totsys/common/js/org_search.js @@ -0,0 +1,69 @@ +function getXMLHttpRequest() { + if (window.ActiveXObject) { + try { + return new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e1) { + try { + return new ActiveXObject("Microsoft.XMLHTTP"); + } catch (e2) { + return null; + } + } + } else if (window.XMLHttpRequest) { + return new XMLHttpRequest(); + } else { + return null; + } +} + +OrgSearch = function(onNodeCallback) { + var currentNodeNum = -1; + var keyword; + var resultNodes; + var current; + + var doSearch = function (k) { + if(typeof(k) == "undefined" || k.length < 2) { + throw "검색어는 2자이상 입력하세요."; + } + if(keyword != k) { + keyword = k; + var xmlHttpRequest = getXMLHttpRequest(); + xmlHttpRequest.open("GET", "/servlet/kr.co.kihyun.beans.user.HttpOrgSearch?keyword="+encodeURI(keyword), false); + xmlHttpRequest.send(null); + resultNodes = xmlHttpRequest.responseXML.getElementsByTagName('node'); + } + }; + + var getNode = function(nodeNum) { + var node = new Object(); + node.id = resultNodes[nodeNum].getElementsByTagName("id")[0].childNodes[0].nodeValue; + node.name = resultNodes[nodeNum].getElementsByTagName("name")[0].childNodes[0].nodeValue; + node.type = resultNodes[nodeNum].getElementsByTagName("type")[0].childNodes[0].nodeValue; + node.pathList = new Array(); + for(var i = 0; i < resultNodes[nodeNum].getElementsByTagName("path").length; i++) + node.pathList[i] = resultNodes[nodeNum].getElementsByTagName("path")[i].childNodes[0].nodeValue; + return node; + } + + this.previous = function(k) { + doSearch(k); + if(currentNodeNum <= 0) { + onNodeCallback(getNode(currentNodeNum = 0)); + throw "맨 앞까지 찾았습니다."; + } else { + onNodeCallback(getNode(--currentNodeNum)); + } + }; + + this.next = function(k) { + doSearch(k); + if(currentNodeNum >= resultNodes.length-1) { + onNodeCallback(getNode(resultNodes.length-1)); + throw "맨 뒤까지 찾았습니다."; + } else { + onNodeCallback(getNode(++currentNodeNum)); + } + }; +}; + diff --git a/webapps/totsys/common/js/popup.js b/webapps/totsys/common/js/popup.js new file mode 100644 index 0000000..442d502 --- /dev/null +++ b/webapps/totsys/common/js/popup.js @@ -0,0 +1,134 @@ +function opener(url, target, width, height, align, valign, scroll, resize){ + + /////////////// window a ? /////////////////////// + var scWidth = screen.width; + var scHeight = screen.height; + + var toppos = 0; //? top + var leftpos = 0; //? left + + if(align == "center"){ + leftpos = (scWidth- width) / 2 ; + }else if(align == "right"){ + leftpos = (scWidth- width); + }else if(align == ''){ + leftpos = (scWidth- width) / 2 ; + } + + if(valign == "middle"){ + toppos = (scHeight- height) / 2 ; + }else if(valign == "buttom"){ + toppos = (scHeight- height); + }else if(valign == ''){ + toppos = (scHeight- height) / 2 ; + } + + target = window.open(url, target, "width="+width+", height="+height+", toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars="+scroll+", resizable="+resize+", left="+leftpos+", top="+ toppos); +// target = window.open(url, target, "width="+width+", height="+height+", toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=auto, resizable="+resize+", left="+leftpos+", top="+ toppos); + target.focus(); +} + +function totperInfo(docID, boardGroupID){ + var width = 600; + var height = 410; + var leftpos = (screen.width - width) / 2; + var toppos = (screen.height - height) / 2; + window.open("/totsys/common/web/note/popup_totper_info.jsp?docID="+docID+"&boardGroupID="+boardGroupID,"","width="+width+", height="+height+", toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left= "+ leftpos +" ,top= "+ toppos); +} + +function getOpener(url, target, width, height, align, valign, scroll, resize){ + + /////////////// window a ? /////////////////////// + var scWidth = screen.width; + var scHeight = screen.height; + + var toppos = 0; //? top + var leftpos = 0; //? left + + if(align == "center"){ + leftpos = (scWidth- width) / 2 ; + }else if(align == "right"){ + leftpos = (scWidth- width); + }else if(align == ''){ + leftpos = (scWidth- width) / 2 ; + } + + if(valign == "middle"){ + toppos = (scHeight- height) / 2 ; + }else if(valign == "buttom"){ + toppos = (scHeight- height); + }else if(valign == ''){ + toppos = (scHeight- height) / 2 ; + } + + target = window.open(url, target, "width="+width+", height="+height+", toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars="+scroll+", resizable="+resize+", left="+leftpos+", top="+ toppos); + return target; +} + +function popupView(obj_id){ + cpt_layer = document.getElementById(obj_id); + if(cpt_layer.style.display=='none'){ + //cpt_layer.style.top = window.event.y - 10; + //cpt_layer.style.left = window.event.x - 130; + + // 2014.09.29 by youngjun cho (첨부파일 리스트 조회 레이어 팝업 출력 위치 조절) + cpt_layer.style.top = window.event.clientY + 10; + cpt_layer.style.left = window.event.clientX - 170; + cpt_layer.style.display=''; + cpt_layer.style.width = 200; + } +} + +function popupMove(obj_id){ + cpt_layer = document.getElementById(obj_id); + popupClose(obj_id); +} + +function popupClose(obj_id){ + cpt_layer = document.getElementById(obj_id); + cpt_layer.style.display='none'; +} + +function listView(obj_id, show_button, none_button){ + cpt_layer = document.getElementById(obj_id); + show_layer = document.getElementById(show_button); + none_layer = document.getElementById(none_button); + + if(cpt_layer.style.display=='none'){ + cpt_layer.style.display=''; + show_layer.style.display='none'; + none_layer.style.display=''; + }else{ + cpt_layer.style.display='none'; + show_layer.style.display=''; + none_layer.style.display='none'; + } + + +} +/* +function getOpener(url, target, width, height, align, valign, scroll, resize){ + + /////////////// window a ? /////////////////////// + var scWidth = screen.width; + var scHeight = screen.height; + + var toppos = 0; //? top + var leftpos = 0; //? left + + if(align == "center"){ + leftpos = (scWidth- width) / 2 ; + }else if(align == "right"){ + leftpos = (scWidth- width); + } + + if(valign == "middle"){ + toppos = (scHeight- height) / 2 ; + }else if(valign == "buttom"){ + toppos = (scHeight- height); + } + + target = window.open(url, target, "width="+width+", height="+height+", toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars="+scroll+", resizable="+resize+", left="+leftpos+", top="+ toppos); + + return target; +}*/ diff --git a/webapps/totsys/common/js/rollover.js b/webapps/totsys/common/js/rollover.js new file mode 100644 index 0000000..05f36ff --- /dev/null +++ b/webapps/totsys/common/js/rollover.js @@ -0,0 +1,43 @@ +function MM_swapImgRestore() { //v3.0 + var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { + d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} + if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i + +function MM_showHideLayers() { //v3.0 + var i,p,v,obj,args=MM_showHideLayers.arguments; + for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2]; + if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; } + obj.visibility=v; } +} + +function scrollObjectContent(form) { + var obj = document.getElementById(form); + if(obj!=null) obj.style.height=obj.offsetHeight+40; +} diff --git a/webapps/totsys/common/js/signup.js b/webapps/totsys/common/js/signup.js new file mode 100644 index 0000000..fd31da0 --- /dev/null +++ b/webapps/totsys/common/js/signup.js @@ -0,0 +1,857 @@ +/************** 숫자 체크 **************/ +function Check_Num(tocheck){ + var isnum = true; + + if (tocheck == null || tocheck == ""){ + isnum = false; + return isnum; + } + + for (var j = 0 ; j < tocheck.length; j++){ + if ( tocheck.substring(j, j + 1) != "0" + && tocheck.substring(j, j + 1) != "1" + && tocheck.substring(j, j + 1) != "2" + && tocheck.substring(j, j + 1) != "3" + && tocheck.substring(j, j + 1) != "4" + && tocheck.substring(j, j + 1) != "5" + && tocheck.substring(j, j + 1) != "6" + && tocheck.substring(j, j + 1) != "7" + && tocheck.substring(j, j + 1) != "8" + && tocheck.substring(j, j + 1) != "9" + && tocheck.substring(j, j + 1) != "-"){ + isnum = false; + } + } + return isnum; +} + + +/************** 주민 등록 번호 체크 **************/ +function check_ResidentNO(){ + + var str_f_num = document.registForm.resi1.value; + var str_l_num = document.registForm.resi2.value; + + var i3=0 + for (var i=0;i'9') { i3=i3+1 } + } + + if ((str_f_num == "") || ( i3 != 0 )){return (false);} + + var i4=0 + for (var i=0;i'9') { i4=i4+1 } + } + + if ((str_l_num == "") || ( i4 != 0 )){return (false);} + + if(str_f_num.substring(0,1) < 0){return (false);} + + if(str_l_num.substring(0,1) > 2){return (false);} + + if((str_f_num.length > 7) || (str_l_num.length > 8)){return (false);} + + if ((str_f_num == '72') || ( str_l_num == '18')){return (false);} + + var f1=str_f_num.substring(0,1) + var f2=str_f_num.substring(1,2) + var f3=str_f_num.substring(2,3) + var f4=str_f_num.substring(3,4) + var f5=str_f_num.substring(4,5) + var f6=str_f_num.substring(5,6) + var hap=f1*2+f2*3+f3*4+f4*5+f5*6+f6*7 + var l1=str_l_num.substring(0,1) + var l2=str_l_num.substring(1,2) + var l3=str_l_num.substring(2,3) + var l4=str_l_num.substring(3,4) + var l5=str_l_num.substring(4,5) + var l6=str_l_num.substring(5,6) + var l7=str_l_num.substring(6,7) + hap=hap+l1*8+l2*9+l3*2+l4*3+l5*4+l6*5 + hap=hap%11 + hap=11-hap + hap=hap%10 + + if (hap != l7) { + return (false); + } + + return true; +} + +/************** ID count **************/ +/* +function int getByteCount(id_text){ + return id_text.getBytes().length; +}*/ + + + +/************** 영숫자 체크 **************/ +function Check_Char(id_text){ + var alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + var numeric = '1234567890'; + var nonkorean = alpha+numeric; + + var i ; + for ( i=0; i < id_text.length; i++ ) { + if( nonkorean.indexOf(id_text.substring(i,i+1)) < 0) { + break ; + } + } + + if ( i != id_text.length ) { + return false ; + }else{ + return true ; + } + + return true; +} + +/************** 특수문자 체크 **************/ +function CheckNonChar(id_text){ + var nonchar = '~`!@#$%^&*()-_=+\|<>?,./;:"'; + var nonkorean = nonchar; + + var i ; + for ( i=0; i < id_text.length; i++ ) { + if( nonkorean.indexOf(id_text.substring(i,i+1)) < 0) { + break ; + } + } + + if ( i != id_text.length ) { + return false ; + }else{ + return true ; + } + + return true; +} + + +/************** 특수문자 체크 **************/ +function Check_nonChar(id_text){ + var nonchar = '~`!@#$%^&*()-_=+\|<>?,./;:"'; + var numeric = '1234567890'; + var nonkorean = nonchar+numeric; + + var i ; + for ( i=0; i < id_text.length; i++ ) { + if( nonkorean.indexOf(id_text.substring(i,i+1)) > 0) { + break ; + } + } + + if ( i != id_text.length ) { + return false ; + }else{ + return true ; + } + return false; +} + + +function Check_name(id_text){ + var nonchar = '~`!@#$%^&*()-_=+\|<>?,./;:"'; + var nonkorean = nonchar; + + var i ; + for ( i=0; i < id_text.length; i++ ) { + if( nonkorean.indexOf(id_text.substring(i,i+1)) > 0) { + break ; + } + } + + if ( i != id_text.length ) { + return false ; + }else{ + return true ; + } + return false; +} + + +/************** 이메일 체크 **************/ +// 이메일 체크 +function check_Email(){ + + var email = document.registForm.email.value; + var check_point = 0; + + if(email.indexOf("@") > 0){ + hanmail_Check = email.substring(parseInt(email.indexOf("@")),parseInt(email.indexOf("."))); + if(hanmail_Check == "@hanmail"){ + alert("Daum의 온라인 우표제로 인하여 hanmail은 사용할 수 없습니다."); + registForm.email.focus(); + return; + } + } + + + /* + if (email.indexOf("@") < 0 ) { + alert("e-mail에 @ 가 빠져있습니다."); + registForm.email.focus(); + return false; + } + */ + if (email.indexOf(".") < 0 ) { + alert("e-mail에 . 가 빠져있습니다."); + registForm.email.focus(); + return false; + } + + if (email.indexOf("'") >= 0 ) { + alert("e-mail에 ' 는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + if (email.indexOf("|") >= 0 ) { + alert("e-mail에 | 는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + if (email.indexOf(">") >= 0 ) { + alert("e-mail에 > 는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + if (email.indexOf("<") >= 0 ) { + alert("e-mail에 < 는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + if (email.indexOf(" ") >= 0 ) { + alert("e-mail에 스페이스는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + + + if (check_point > 1 ) { + alert("e-mail에 @ 는 1번이상 들어갈수 없습니다."); + registForm.email.focus(); + return false; + } + + if (email.indexOf("(") >= 0 ) { + alert("e-mail에 ( 는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + if (email.indexOf("(") >= 0 ) { + alert("e-mail에 ( 는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + if (email.indexOf(")") >= 0 ) { + alert("e-mail에 ) 는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + if (email.indexOf(",") >= 0 ) { + alert("e-mail에 , 는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + if (email.indexOf(";") >= 0 ) { + alert("e-mail에 ; 는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + if (email.indexOf(":") >= 0 ) { + alert("e-mail에 : 는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + if (email.indexOf("/") >= 0 ) { + alert("e-mail에 / 는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + if (email.indexOf("[") >= 0 ) { + alert("e-mail에 [ 는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + if (email.indexOf("]") >= 0 ) { + alert("e-mail에 ] 는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + if (email.indexOf("{") >= 0 ) { + alert("e-mail에 { 는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + if (email.indexOf("}") >= 0 ) { + alert("e-mail에 } 는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + if (email.indexOf(" ") >= 0 ) { + alert("e-mail에 스페이스는 포함할수 없습니다.."); + registForm.email.focus(); + return false; + } + return true; +} + + +/************** Trim 하는 함수 **************/ +function TrimString(SrcString){ + + /* 왼쪽 트림 */ + len = SrcString.length; + for(i=0;i0;i--){ + if(SrcString.substring(i-1) == " "){ + SrcString = SrcString.substring(0,i-1); + }else{ + break; + } + } + return SrcString; +} + + +// 중복 ID 검색 +function idcheck() { + + var height = screen.height; + var width = screen.width; + var leftpos = width / 2 - 150; + var toppos = height / 2 - 200; + + var userID = document.registForm.userID.value; + var urlname = "/registForm/check_id.jsp?userID="+ userID; + + if (userID.length < 6 || userID.length > 12 ) { + alert("ID는 6 ~ 12자리만 가능합니다."); + document.registForm.userID.focus(); + return; + }else if(!Check_Char(userID)){ + alert("숫자와 영문자만 입력해주세요."); + document.registForm.userID.focus(); + return false; + } + + check_id= window.open(urlname, "check_id","height=290,width=505, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=" + leftpos + ",top=" + toppos); + check_id.focus(); +} + +// 우편번호 검색 +function openzip() { + var height = screen.height; + var width = screen.width; + var leftpos = width / 2 - 150; + var toppos = height / 2 - 200; + + var urlname = "/registForm/post_search.jsp"; + + post= window.open(urlname, "post","height=300, width=530, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=" + leftpos + ",top=" + toppos); + post.focus(); +} + +// 성명 체크 +function checkName(){ + var form = document.registForm; + var userName = form.userName.value; + + if (userName != ""){ + if (!Check_name(userName) ) { + alert("고객명에 특수문자나 숫자는 입력할 수 없습니다."); + form.userName.focus(); + form.userName.select(); + return; + } + } +} + +// 주민등록번호로 생년월일 Setting +function setbirthdate(){ + var form = document.registForm; + var resd = form.resi1.value; + + form.birthday1.value = "19" + resd.substring(0, 2); + form.birthday2.value = resd.substring(2, 4); + form.birthday3.value = resd.substring(4, 6); +} + +// 주민등록번호1 자리수 체크 +function Check_focus1(){ + var form = document.registForm; + var str = form.resi1.value.length; + if(str == 6){ + form.resi2.focus(); + } +} + +// 주민등록번호2 자리수 체크 +function Check_focus2(){ + var form = document.registForm; + var str = form.resi2.value.length; + if(str == 7){ + form.home_tel1.focus(); + } +} + + +function checkRegForm(){ + var form = document.registForm; + + //필수기입 항목 + var cust_id = form.cust_id.value; //회원ID +} + +function checkForm(){ + var form = document.registForm; + var deptName = form.deptName.value; + var passcode = form.passcode.value; + var userID = form.userID.value; + var passwd = form.passwd.value; + var passwd2 = form.passwd2.value; + var userName = form.userName.value; + var phone = form.phone.value; + var email = form.email.value; + + if(form.deptName.value == ""){ + alert("소속 기관 또는 부서를 선택하여 주세요"); + form.deptName.focus(); + return; + }else if(form.passcode.value == ""){ + alert("기관/부서코드를 입력하여 주세요"); + form.passcode.focus(); + return; + }else if(form.userID.value == ""){ + alert("아이디를 입력하여 주세요"); + form.userID.focus(); + return; + }else if(userID.length < 4 || userID.length > 14){ + alert("ID는 4~14자리입니다."); + form.userID.focus(); + return false; + }else if(CheckNonChar(userID)){ + alert("아이디에 툭수문자가 입력되었는지 확인해주세요."); + form.userID.focus(); + return false; + }else if(form.passwd.value == ""){ + alert("비밀번호를 입력하여 주세요"); + form.passwd.focus(); + return; + }else if(form.passwd2.value == ""){ + alert("확인 비밀번호를 입력하여 주세요"); + form.passwd2.focus(); + return; + }else if(form.passwd.value != form.passwd2.value){ + alert("비밀번호와 비밀번호 확인이 일치 하지 않습니다. 다시 입력하여 주세요"); + form.passwd.value = ""; + form.passwd2.value = ""; + form.passwd.focus(); + return; + }else if(form.userName.value == ""){ + alert("이름을 입력하여 주세요"); + form.userName.focus(); + return; + }else if(!Check_name(userName)){ + alert("이름에 특수문자는 입력할 수 없습니다."); + form.userName.focus(); + form.userName.select(); + return false; + //}else if(form.phone.value == ""){ + // alert("전화번호를 입력하여주세요"); + // form.phone.focus(); + // return; + /* + }else if(form.homephone1.length > 3){ + alert("전화번호 앞자리는 3자리 이하입니다."); + form.homephone1.focus(); + return; + }else if(form.homephone1.value == ""){ + alert("전화번호를 입력하여주세요"); + form.homephone1.focus(); + return; + }else if(form.homephone2.value == ""){ + alert("전화번호를 입력하여주세요"); + form.homephone2.focus(); + return; + }else if(form.homephone3.value == ""){ + alert("전화번호를 입력하여주세요"); + form.homephone3.focus(); + return; + //}else if(!Check_Num(phone)){ + // alert("집전화번호를 숫자로 입력해주세요."); + // form.phone.focus(); + // form.phone.select(); + // return false; + }else if(!Check_Num(form.homephone1.value)){ + alert("집전화번호를 숫자로 입력해주세요."); + form.homephone1.focus(); + form.homephone1.select(); + return false; + }else if(!Check_Num(form.homephone2.value)){ + alert("집전화번호를 숫자로 입력해주세요."); + form.homephone2.focus(); + form.homephone2.select(); + return false; + }else if(!Check_Num(form.homephone3.value)){ + alert("집전화번호를 숫자로 입력해주세요."); + form.homephone3.focus(); + form.homephone3.select(); + return false; + }else if(form.email.value == ""){ + alert("E-Mail을 입력하여 주세요"); + form.email.focus(); + return; + }else if(!check_Email()) { + form.email.focus(); + return false; + } + */} + + form.submit(); +} + +function modifyCheckForm(){ + var form = document.registForm; + var deptName = form.deptName.value; + var passcode = form.passcode.value; + var userID = form.userID.value; + var passwd = form.passwd.value; + var passwd2 = form.passwd2.value; + var userName = form.userName.value; + var phone = form.phone.value; + var email = form.email.value; + + + + if(form.deptName.value == ""){ + alert("소속 기관 또는 부서를 선택하여 주세요"); + form.deptName.focus(); + return; + }else if(form.passcode.value == ""){ + alert("기관/부서코드를 입력하여 주세요"); + form.passcode.focus(); + return; + //}else if(form.userID.value == ""){ + // alert("아이디를 입력하여 주세요"); + // form.userID.focus(); + // return; + //}else if(userID.length < 4 || userID.length > 14){ + // alert("ID는 4~14자리입니다."); + // form.userID.focus(); + // return false; + //}else if(CheckNonChar(userID)){ + // alert("아이디에 툭수문자가 입력되었는지 확인해주세요."); + // form.userID.focus(); + // return false; + }else if(form.passwd.value == ""){ + alert("비밀번호를 입력하여 주세요"); + form.passwd.focus(); + return; + }else if(form.passwd2.value == ""){ + alert("확인 비밀번호를 입력하여 주세요"); + form.passwd2.focus(); + return; + }else if(form.passwd.value != form.passwd2.value){ + alert("비밀번호와 비밀번호 확인이 일치 하지 않습니다. 다시 입력하여 주세요"); + form.passwd.value = ""; + form.passwd2.value = ""; + form.passwd.focus(); + return; + }else if(form.userName.value == ""){ + alert("이름을 입력하여 주세요"); + form.userName.focus(); + return; + }else if(!Check_nonChar(userName)){ + alert("이름에 특수문자는 입력할 수 없습니다."); + form.userName.focus(); + form.userName.select(); + return false; + }else if(form.phone.value == ""){ + alert("전화번호를 입력하여주세요"); + form.phone.focus(); + return; + }/*else if(!Check_Num(phone)){ + alert("집전화번호를 숫자로 입력해주세요."); + form.phone.focus(); + form.phone.select(); + return false; + }*/else if(form.email.value == ""){ + alert("E-Mail을 입력하여 주세요"); + form.email.focus(); + return; + }else if(!check_Email()) { + form.email.focus(); + return false; + } + + form.submit(); +} + +function submitForm(){ + var form = document.registForm; + + var userID = form.userID.value; + var passwd = form.passwd.value; + var passwd2 = form.passwd2.value; + var userName = form.userName.value; + var resi1 = form.resi1.value; + var resi2 = form.resi2.value; + var post1 = form.post1.value; + var post2 = form.post2.value; + var addr1 = form.addr1.value; + var addr2 = form.addr2.value; + var hop1 = form.hop1.value; + var hop2 = form.hop2.value; + var hop3 = form.hop3.value; + var hap1 = form.hap1.value; + var hap2 = form.hap2.value; + var hap3 = form.hap3.value; + var email1 = form.email1.value; + var email = form.email.value; + var isEmail = form.isEmail.value; + var bankName = form.bankName.value; + var bankNumber = form.bankNumber.value; + var bankDepositor = form.bankDepositor.value; + + var thisfilednum = true; + + /***************** userID 체크 *****************/ + if(userID == ""){ + alert("회원ID를 입력하십시오."); + form.userID.focus(); + return false; + }else if(userID.length < 6 || userID.length > 12){ + alert("ID는 6~12자리입니다."); + form.userID.focus(); + return false; + }else if(!Check_Char(userID)){ + alert("숫자와 영문자만 입력해주세요."); + form.userID.focus(); + return false; + } + + + /***************** passwd 체크 *****************/ + if(passwd == ""){ + alert("패스워드를 입력하십시오."); + form.passwd.focus(); + return false; + }else if(passwd.length < 5 || passwd.length > 12){ + alert("회원 비밀번호는 5~12자리입니다."); + form.passwd.focus(); + return false; + }else if(!Check_Char(passwd)){ + alert("회원 비밀번호에 특수문자는 입력할 수 없습니다."); + form.passwd.focus(); + return false; + }else if(passwd2 == ""){ + alert("확인 Password를 입력하십시오."); + form.passwd2.focus(); + return false; + }else if(passwd != passwd2){ + alert("Password확인에 다시 입력하십시요."); + form.passwd2.focus(); + return false; + } + + /***************** 이름 체크 *****************/ + if(userName == ""){ + alert("회원ID를 입력하십시오."); + form.userName.focus(); + return false; + }else if(!Check_nonChar(userName)){ + alert("고객명에 특수문자는 입력할 수 없습니다."); + form.userName.focus(); + form.userName.select(); + return false; + } + + /************* 주민등록 번호 체크 *************/ + if(resi1 == ""){//주민등록 첫번째 번호 체크 + alert("주민등록번호를 입력하십시오."); + form.resi1.focus(); + return false; + }else if(!Check_Num(resi1)){ + alert("주민등록번호는 숫자만 가능합니다."); + form.resi1.focus(); + form.resi1.select(); + return false; + }else if(resi1.length != 6 ){ + alert("주민등록 앞자리는 6자리입니다."); + form.resi1.focus(); + return false; + }else if(resi2 == ""){//주민등록 첫번째 번호 체크 + alert("주민등록번호를 입력하십시오."); + form.resi2.focus(); + return false; + }else if (!Check_Num(resi2)){ + alert("주민등록번호는 숫자만 가능합니다."); + form.resi2.focus(); + form.resi2.select(); + return false; + }else if(resi2.length != 7){ + alert("주민등록 뒷자리는 7자리입니다."); + form.resi2.focus(); + return false; + }else if( resi1 != "999999" && resi2 != "9999999" && resi1 != "888888" + && resi2 != "8888888" && resi1 != "777777" && resi2 != "7777777" ){ + if(!check_ResidentNO()){ + alert("올바른 주민등록번호가 아닙니다. 다시 한번 확인해 주시기 바랍니다."); + form.resi1.focus(); + return false; + } + } + + /************* 우편번호 체크 *************/ + if(post1 == ""){ + alert("우편번호를 입력하세요."); + form.post1.focus(); + return false; + }else if(!Check_Num(post1)){ + alert("숫자를 입력하십시요."); + form.post1.focus(); + form.post1.select(); + return false; + }else if(post2 == ""){ + alert("우편번호를 입력하세요."); + form.post2.focus(); + return false; + }else if(!Check_Num(post2)){ + alert("숫자를 입력하십시요."); + form.post2.focus(); + form.post2.select(); + return false; + } + + /************* 주소 체크 *************/ + if(addr1 == ""){ + alert("집주소를 입력하십시오."); + form.addr1.focus(); + return false; + }else if(addr2 == ""){ + alert("집주소를 입력하십시오."); + form.addr2.focus(); + return false; + } + + /************* 집 전화번호 체크 *************/ + if(hop1 == ""){//첫번째 + alert("집전화번호를 입력해주세요."); + form.hop1.focus(); + return false; + }else if(!Check_Num(hop1)){ + alert("집전화번호를 숫자로 입력해주세요."); + form.hop1.focus(); + form.hop1.select(); + return false; + }else if(hop2 == ""){//두번째 + alert("집전화번호를 입력해주세요."); + form.hop2.focus(); + return false; + }else if(!Check_Num(hop2)){ + alert("집전화번호를 숫자로 입력해주세요."); + form.hop2.focus(); + form.hop2.select(); + return false; + }else if(hop3 == ""){//세번째 + alert("집전화번호를 입력해주세요."); + form.hop3.focus(); + return false; + }else if(!Check_Num(hop3)){ + alert("집전화번호를 숫자로 입력해주세요."); + form.hop3.focus(); + form.hop3.select(); + return false; + } + + /************* 휴대전화 번호 체크 *************/ + if(hap1 == ""){//첫번째 + alert("휴대전화번호를 입력해주세요."); + form.hap1.focus(); + return false; + }else if(!Check_Num(hap1)){ + alert("휴대전화번호를 숫자로 입력해주세요."); + form.hap1.focus(); + return false; + }else if(hap1 != "011" && hap1 != "016" && hap1 != "017" && hap1 != "018" && hap1 != "019"){ + alert("휴대전화번호를 정확히 입력해주세요."); + form.hap1.focus(); + return false; + }else if(hap2 == ""){//두번째 + alert("휴대전화번호를 숫자로 입력해주세요."); + form.hap2.focus(); + return false; + }else if(!Check_Num(hap2)){ + alert("휴대전화를 숫자로 입력해주세요."); + form.hap2.focus(); + return false; + }else if(hap3 == ""){//세번째 + alert("휴대전화번호를 숫자로 입력해주세요."); + form.hap3.focus(); + return false; + }else if(!Check_Num(hap3)){ + alert("휴대전화번호를 숫자로 입력해주세요."); + form.hap3.focus(); + return false; + } + + + + /************* email 체크 *************/ + if(email1 == ""){ + alert("E-mail을 입력하십시오."); + form.email1.focus(); + return false; + }else if(email == ""){ + alert("E-mail을 입력하십시오."); + form.email.focus(); + return false; + }else if(!check_Email()) { + form.email.focus(); + return false; + } + + /************* 은행 체크 *************/ + if(bankName == ""){ + alert("은행 이름을 입력하세요."); + form.bankName.focus(); + return false; + } + + if(bankDepositor == ""){ + alert("예금주 명을입력하세요."); + form.bankDepositor.focus(); + return false; + }else if(bankDepositor != userName){ + alert("예금주는 본인 이여야 합니다."); + form.bankDepositor.focus(); + return false; + } + + if(bankNumber == ""){ + alert("계좌번호를 입력하세요"); + form.bankNumber.focus(); + return false; + }else if(!Check_Num(bankNumber)){ + alert("계좌번호를 숫자로 입력해주세요."); + form.bankNumber.focus(); + form.bankNumber.select(); + return false; + } +} diff --git a/webapps/totsys/common/js/themes/apple/bg.jpg b/webapps/totsys/common/js/themes/apple/bg.jpg new file mode 100644 index 0000000..3aad05d Binary files /dev/null and b/webapps/totsys/common/js/themes/apple/bg.jpg differ diff --git a/webapps/totsys/common/js/themes/apple/d.png b/webapps/totsys/common/js/themes/apple/d.png new file mode 100644 index 0000000..2463ba6 Binary files /dev/null and b/webapps/totsys/common/js/themes/apple/d.png differ diff --git a/webapps/totsys/common/js/themes/apple/dot_for_ie.gif b/webapps/totsys/common/js/themes/apple/dot_for_ie.gif new file mode 100644 index 0000000..c0cc5fd Binary files /dev/null and b/webapps/totsys/common/js/themes/apple/dot_for_ie.gif differ diff --git a/webapps/totsys/common/js/themes/apple/style.css b/webapps/totsys/common/js/themes/apple/style.css new file mode 100644 index 0000000..aa05bba --- /dev/null +++ b/webapps/totsys/common/js/themes/apple/style.css @@ -0,0 +1,61 @@ +/* + * jsTree apple theme 1.0 + * Supported features: dots/no-dots, icons/no-icons, focused, loading + * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search + */ + +.jstree-apple > ul { background:url("bg.jpg") left top repeat; } +.jstree-apple li, +.jstree-apple ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; } +.jstree-apple li { background-position:-90px 0; background-repeat:repeat-y; } +.jstree-apple li.jstree-last { background:transparent; } +.jstree-apple .jstree-open > ins { background-position:-72px 0; } +.jstree-apple .jstree-closed > ins { background-position:-54px 0; } +.jstree-apple .jstree-leaf > ins { background-position:-36px 0; } + +.jstree-apple a { border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px; text-shadow:1px 1px 1px white; } +.jstree-apple .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 3px 0 1px; text-shadow:1px 1px 1px silver; } +.jstree-apple .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 3px 0 1px; } +.jstree-apple a .jstree-icon { background-position:-56px -20px; } +.jstree-apple a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; } + +.jstree-apple.jstree-focused { background:white; } + +.jstree-apple .jstree-no-dots li, +.jstree-apple .jstree-no-dots .jstree-leaf > ins { background:transparent; } +.jstree-apple .jstree-no-dots .jstree-open > ins { background-position:-18px 0; } +.jstree-apple .jstree-no-dots .jstree-closed > ins { background-position:0 0; } + +.jstree-apple .jstree-no-icons a .jstree-icon { display:none; } + +.jstree-apple .jstree-search { font-style:italic; } + +.jstree-apple .jstree-no-icons .jstree-checkbox { display:inline-block; } +.jstree-apple .jstree-no-checkboxes .jstree-checkbox { display:none !important; } +.jstree-apple .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; } +.jstree-apple .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; } +.jstree-apple .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; } +.jstree-apple .jstree-checked > a > .checkbox:hover { background-position:-38px -37px; } +.jstree-apple .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; } +.jstree-apple .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; } + +#vakata-dragged.jstree-apple ins { background:transparent !important; } +#vakata-dragged.jstree-apple .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; } +#vakata-dragged.jstree-apple .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; } +#jstree-marker.jstree-apple { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; } + +.jstree-apple a.jstree-search { color:aqua; } +.jstree-apple .jstree-locked a { color:silver; cursor:default; } + +#vakata-contextmenu.jstree-apple-context, +#vakata-contextmenu.jstree-apple-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; } +#vakata-contextmenu.jstree-apple-context li { } +#vakata-contextmenu.jstree-apple-context a { color:black; } +#vakata-contextmenu.jstree-apple-context a:hover, +#vakata-contextmenu.jstree-apple-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; } +#vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a, +#vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; } +#vakata-contextmenu.jstree-apple-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; } +#vakata-contextmenu.jstree-apple-context li ul { margin-left:-4px; } + +/* TODO: IE6 support - the `>` selectors */ diff --git a/webapps/totsys/common/js/themes/apple/throbber.gif b/webapps/totsys/common/js/themes/apple/throbber.gif new file mode 100644 index 0000000..5b33f7e Binary files /dev/null and b/webapps/totsys/common/js/themes/apple/throbber.gif differ diff --git a/webapps/totsys/common/js/themes/classic/d.gif b/webapps/totsys/common/js/themes/classic/d.gif new file mode 100644 index 0000000..6eb0004 Binary files /dev/null and b/webapps/totsys/common/js/themes/classic/d.gif differ diff --git a/webapps/totsys/common/js/themes/classic/d.png b/webapps/totsys/common/js/themes/classic/d.png new file mode 100644 index 0000000..275daec Binary files /dev/null and b/webapps/totsys/common/js/themes/classic/d.png differ diff --git a/webapps/totsys/common/js/themes/classic/dot_for_ie.gif b/webapps/totsys/common/js/themes/classic/dot_for_ie.gif new file mode 100644 index 0000000..c0cc5fd Binary files /dev/null and b/webapps/totsys/common/js/themes/classic/dot_for_ie.gif differ diff --git a/webapps/totsys/common/js/themes/classic/style.css b/webapps/totsys/common/js/themes/classic/style.css new file mode 100644 index 0000000..58dc585 --- /dev/null +++ b/webapps/totsys/common/js/themes/classic/style.css @@ -0,0 +1,77 @@ +/* + * jsTree classic theme 1.0 + * Supported features: dots/no-dots, icons/no-icons, focused, loading + * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search + */ + +.jstree-classic li, +.jstree-classic ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; } +.jstree-classic li { background-position:-90px 0; background-repeat:repeat-y; } +.jstree-classic li.jstree-last { background:transparent; } +.jstree-classic .jstree-open > ins { background-position:-72px 0; } +.jstree-classic .jstree-closed > ins { background-position:-54px 0; } +.jstree-classic .jstree-leaf > ins { background-position:-36px 0; } + +.jstree-classic .jstree-hovered { background:#e7f4f9; border:1px solid #e7f4f9; padding:0 2px 0 1px; } +.jstree-classic .jstree-clicked { background:navy; border:1px solid navy; padding:0 2px 0 1px; color:white; } +.jstree-classic a .jstree-icon { background-position:-56px -19px; } +.jstree-classic .jstree-open > a .jstree-icon { background-position:-56px -36px; } +.jstree-classic a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; } + +.jstree-classic.jstree-focused { background:white; } + +.jstree-classic .jstree-no-dots li, +.jstree-classic .jstree-no-dots .jstree-leaf > ins { background:transparent; } +.jstree-classic .jstree-no-dots .jstree-open > ins { background-position:-18px 0; } +.jstree-classic .jstree-no-dots .jstree-closed > ins { background-position:0 0; } + +.jstree-classic .jstree-no-icons a .jstree-icon { display:none; } + +.jstree-classic .jstree-search { font-style:italic; } + +.jstree-classic .jstree-no-icons .jstree-checkbox { display:inline-block; } +.jstree-classic .jstree-no-checkboxes .jstree-checkbox { display:none !important; } +.jstree-classic .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; } +.jstree-classic .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; } +.jstree-classic .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; } +.jstree-classic .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; } +.jstree-classic .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; } +.jstree-classic .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; } + +#vakata-dragged.jstree-classic ins { background:transparent !important; } +#vakata-dragged.jstree-classic .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; } +#vakata-dragged.jstree-classic .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; } +#jstree-marker.jstree-classic { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; } + +.jstree-classic a.jstree-search { color:aqua; } +.jstree-classic .jstree-locked a { color:silver; cursor:default; } + +#vakata-contextmenu.jstree-classic-context, +#vakata-contextmenu.jstree-classic-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; } +#vakata-contextmenu.jstree-classic-context li { } +#vakata-contextmenu.jstree-classic-context a { color:black; } +#vakata-contextmenu.jstree-classic-context a:hover, +#vakata-contextmenu.jstree-classic-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; } +#vakata-contextmenu.jstree-classic-context li.jstree-contextmenu-disabled a, +#vakata-contextmenu.jstree-classic-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; } +#vakata-contextmenu.jstree-classic-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; } +#vakata-contextmenu.jstree-classic-context li ul { margin-left:-4px; } + +/* IE6 BEGIN */ +.jstree-classic li, +.jstree-classic ins, +#vakata-dragged.jstree-classic .jstree-invalid, +#vakata-dragged.jstree-classic .jstree-ok, +#jstree-marker.jstree-classic { _background-image:url("d.gif"); } +.jstree-classic .jstree-open ins { _background-position:-72px 0; } +.jstree-classic .jstree-closed ins { _background-position:-54px 0; } +.jstree-classic .jstree-leaf ins { _background-position:-36px 0; } +.jstree-classic .jstree-open a ins.jstree-icon { _background-position:-56px -36px; } +.jstree-classic .jstree-closed a ins.jstree-icon { _background-position:-56px -19px; } +.jstree-classic .jstree-leaf a ins.jstree-icon { _background-position:-56px -19px; } +#vakata-contextmenu.jstree-classic-context ins { _display:none; } +#vakata-contextmenu.jstree-classic-context li { _zoom:1; } +.jstree-classic .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; } +.jstree-classic .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; } +.jstree-classic .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; } +/* IE6 END */ diff --git a/webapps/totsys/common/js/themes/classic/throbber.gif b/webapps/totsys/common/js/themes/classic/throbber.gif new file mode 100644 index 0000000..5b33f7e Binary files /dev/null and b/webapps/totsys/common/js/themes/classic/throbber.gif differ diff --git a/webapps/totsys/common/js/themes/classic/throbber2.gif b/webapps/totsys/common/js/themes/classic/throbber2.gif new file mode 100644 index 0000000..5b33f7e Binary files /dev/null and b/webapps/totsys/common/js/themes/classic/throbber2.gif differ diff --git a/webapps/totsys/common/js/themes/default-rtl/d.gif b/webapps/totsys/common/js/themes/default-rtl/d.gif new file mode 100644 index 0000000..d85aba0 Binary files /dev/null and b/webapps/totsys/common/js/themes/default-rtl/d.gif differ diff --git a/webapps/totsys/common/js/themes/default-rtl/d.png b/webapps/totsys/common/js/themes/default-rtl/d.png new file mode 100644 index 0000000..5179cf6 Binary files /dev/null and b/webapps/totsys/common/js/themes/default-rtl/d.png differ diff --git a/webapps/totsys/common/js/themes/default-rtl/dots.gif b/webapps/totsys/common/js/themes/default-rtl/dots.gif new file mode 100644 index 0000000..0043364 Binary files /dev/null and b/webapps/totsys/common/js/themes/default-rtl/dots.gif differ diff --git a/webapps/totsys/common/js/themes/default-rtl/style.css b/webapps/totsys/common/js/themes/default-rtl/style.css new file mode 100644 index 0000000..1ee2253 --- /dev/null +++ b/webapps/totsys/common/js/themes/default-rtl/style.css @@ -0,0 +1,84 @@ +/* + * jsTree default-rtl theme 1.0 + * Supported features: dots/no-dots, icons/no-icons, focused, loading + * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search + */ + +.jstree-default-rtl li, +.jstree-default-rtl ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; } +.jstree-default-rtl li { background-position:-90px 0; background-repeat:repeat-y; } +.jstree-default-rtl li.jstree-last { background:transparent; } +.jstree-default-rtl .jstree-open > ins { background-position:-72px 0; } +.jstree-default-rtl .jstree-closed > ins { background-position:-54px 0; } +.jstree-default-rtl .jstree-leaf > ins { background-position:-36px 0; } + +.jstree-default-rtl .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; } +.jstree-default-rtl .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; } +.jstree-default-rtl a .jstree-icon { background-position:-56px -19px; } +.jstree-default-rtl a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; } + +.jstree-default-rtl.jstree-focused { background:#ffffee; } + +.jstree-default-rtl .jstree-no-dots li, +.jstree-default-rtl .jstree-no-dots .jstree-leaf > ins { background:transparent; } +.jstree-default-rtl .jstree-no-dots .jstree-open > ins { background-position:-18px 0; } +.jstree-default-rtl .jstree-no-dots .jstree-closed > ins { background-position:0 0; } + +.jstree-default-rtl .jstree-no-icons a .jstree-icon { display:none; } + +.jstree-default-rtl .jstree-search { font-style:italic; } + +.jstree-default-rtl .jstree-no-icons .jstree-checkbox { display:inline-block; } +.jstree-default-rtl .jstree-no-checkboxes .jstree-checkbox { display:none !important; } +.jstree-default-rtl .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; } +.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; } +.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; } +.jstree-default-rtl .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; } +.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; } +.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; } + +#vakata-dragged.jstree-default-rtl ins { background:transparent !important; } +#vakata-dragged.jstree-default-rtl .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; } +#vakata-dragged.jstree-default-rtl .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; } +#jstree-marker.jstree-default-rtl { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; } + +.jstree-default-rtl a.jstree-search { color:aqua; } +.jstree-default-rtl .jstree-locked a { color:silver; cursor:default; } + +#vakata-contextmenu.jstree-default-rtl-context, +#vakata-contextmenu.jstree-default-rtl-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; } +#vakata-contextmenu.jstree-default-rtl-context li { } +#vakata-contextmenu.jstree-default-rtl-context a { color:black; } +#vakata-contextmenu.jstree-default-rtl-context a:hover, +#vakata-contextmenu.jstree-default-rtl-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; } +#vakata-contextmenu.jstree-default-rtl-context li.jstree-contextmenu-disabled a, +#vakata-contextmenu.jstree-default-rtl-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; } +#vakata-contextmenu.jstree-default-rtl-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; } +#vakata-contextmenu.jstree-default-rtl-context li ul { margin-left:-4px; } + +/* IE6 BEGIN */ +.jstree-default-rtl li, +.jstree-default-rtl ins, +#vakata-dragged.jstree-default-rtl .jstree-invalid, +#vakata-dragged.jstree-default-rtl .jstree-ok, +#jstree-marker.jstree-default-rtl { _background-image:url("d.gif"); } +.jstree-default-rtl .jstree-open ins { _background-position:-72px 0; } +.jstree-default-rtl .jstree-closed ins { _background-position:-54px 0; } +.jstree-default-rtl .jstree-leaf ins { _background-position:-36px 0; } +.jstree-default-rtl a ins.jstree-icon { _background-position:-56px -19px; } +#vakata-contextmenu.jstree-default-rtl-context ins { _display:none; } +#vakata-contextmenu.jstree-default-rtl-context li { _zoom:1; } +.jstree-default-rtl .jstree-undetermined a .jstree-checkbox { _background-position:-18px -19px; } +.jstree-default-rtl .jstree-checked a .jstree-checkbox { _background-position:-36px -19px; } +.jstree-default-rtl .jstree-unchecked a .jstree-checkbox { _background-position:0px -19px; } +/* IE6 END */ + +/* RTL part */ +.jstree-default-rtl .jstree-hovered, .jstree-default-rtl .jstree-clicked { padding:0 1px 0 2px; } +.jstree-default-rtl li { background-image:url("dots.gif"); background-position: 100% 0px; } +.jstree-default-rtl .jstree-checked > a > .jstree-checkbox { background-position:-36px -19px; margin-left:2px; } +.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox { background-position:0px -19px; margin-left:2px; } +.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox { background-position:-18px -19px; margin-left:2px; } +.jstree-default-rtl .jstree-checked > a > .jstree-checkbox:hover { background-position:-36px -37px; } +.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox:hover { background-position:0px -37px; } +.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-18px -37px; } diff --git a/webapps/totsys/common/js/themes/default-rtl/throbber.gif b/webapps/totsys/common/js/themes/default-rtl/throbber.gif new file mode 100644 index 0000000..5b33f7e Binary files /dev/null and b/webapps/totsys/common/js/themes/default-rtl/throbber.gif differ diff --git a/webapps/totsys/common/js/themes/default/d.gif b/webapps/totsys/common/js/themes/default/d.gif new file mode 100644 index 0000000..0e958d3 Binary files /dev/null and b/webapps/totsys/common/js/themes/default/d.gif differ diff --git a/webapps/totsys/common/js/themes/default/d.png b/webapps/totsys/common/js/themes/default/d.png new file mode 100644 index 0000000..8540175 Binary files /dev/null and b/webapps/totsys/common/js/themes/default/d.png differ diff --git a/webapps/totsys/common/js/themes/default/style.css b/webapps/totsys/common/js/themes/default/style.css new file mode 100644 index 0000000..5831eae --- /dev/null +++ b/webapps/totsys/common/js/themes/default/style.css @@ -0,0 +1,74 @@ +/* + * jsTree default theme 1.0 + * Supported features: dots/no-dots, icons/no-icons, focused, loading + * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search + */ + +.jstree-default li, +.jstree-default ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; } +.jstree-default li { background-position:-90px 0; background-repeat:repeat-y; } +.jstree-default li.jstree-last { background:transparent; } +.jstree-default .jstree-open > ins { background-position:-72px 0; } +.jstree-default .jstree-closed > ins { background-position:-54px 0; } +.jstree-default .jstree-leaf > ins { background-position:-36px 0; } + +.jstree-default .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; } +.jstree-default .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; } +.jstree-default a .jstree-icon { background-position:-56px -19px; } +.jstree-default a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; } + +.jstree-default.jstree-focused { background:#ffffee; } + +.jstree-default .jstree-no-dots li, +.jstree-default .jstree-no-dots .jstree-leaf > ins { background:transparent; } +.jstree-default .jstree-no-dots .jstree-open > ins { background-position:-18px 0; } +.jstree-default .jstree-no-dots .jstree-closed > ins { background-position:0 0; } + +.jstree-default .jstree-no-icons a .jstree-icon { display:none; } + +.jstree-default .jstree-search { font-style:italic; } + +.jstree-default .jstree-no-icons .jstree-checkbox { display:inline-block; } +.jstree-default .jstree-no-checkboxes .jstree-checkbox { display:none !important; } +.jstree-default .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; } +.jstree-default .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; } +.jstree-default .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; } +.jstree-default .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; } +.jstree-default .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; } +.jstree-default .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; } + +#vakata-dragged.jstree-default ins { background:transparent !important; } +#vakata-dragged.jstree-default .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; } +#vakata-dragged.jstree-default .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; } +#jstree-marker.jstree-default { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; } + +.jstree-default a.jstree-search { color:aqua; } +.jstree-default .jstree-locked a { color:silver; cursor:default; } + +#vakata-contextmenu.jstree-default-context, +#vakata-contextmenu.jstree-default-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; } +#vakata-contextmenu.jstree-default-context li { } +#vakata-contextmenu.jstree-default-context a { color:black; } +#vakata-contextmenu.jstree-default-context a:hover, +#vakata-contextmenu.jstree-default-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; } +#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a, +#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; } +#vakata-contextmenu.jstree-default-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; } +#vakata-contextmenu.jstree-default-context li ul { margin-left:-4px; } + +/* IE6 BEGIN */ +.jstree-default li, +.jstree-default ins, +#vakata-dragged.jstree-default .jstree-invalid, +#vakata-dragged.jstree-default .jstree-ok, +#jstree-marker.jstree-default { _background-image:url("d.gif"); } +.jstree-default .jstree-open ins { _background-position:-72px 0; } +.jstree-default .jstree-closed ins { _background-position:-54px 0; } +.jstree-default .jstree-leaf ins { _background-position:-36px 0; } +.jstree-default a ins.jstree-icon { _background-position:-56px -19px; } +#vakata-contextmenu.jstree-default-context ins { _display:none; } +#vakata-contextmenu.jstree-default-context li { _zoom:1; } +.jstree-default .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; } +.jstree-default .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; } +.jstree-default .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; } +/* IE6 END */ diff --git a/webapps/totsys/common/js/themes/default/throbber.gif b/webapps/totsys/common/js/themes/default/throbber.gif new file mode 100644 index 0000000..5b33f7e Binary files /dev/null and b/webapps/totsys/common/js/themes/default/throbber.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/langs/en.js b/webapps/totsys/common/js/tiny_mce/langs/en.js new file mode 100644 index 0000000..223ada7 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/langs/en.js @@ -0,0 +1,170 @@ +tinyMCE.addI18n({en:{ +common:{ +edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?", +apply:"Apply", +insert:"Insert", +update:"Update", +cancel:"Cancel", +close:"Close", +browse:"Browse", +class_name:"Class", +not_set:"-- Not set --", +clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?", +clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.", +popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.", +invalid_data:"Error: Invalid values entered, these are marked in red.", +more_colors:"More colors" +}, +contextmenu:{ +align:"Alignment", +left:"Left", +center:"Center", +right:"Right", +full:"Full" +}, +insertdatetime:{ +date_fmt:"%Y-%m-%d", +time_fmt:"%H:%M:%S", +insertdate_desc:"Insert date", +inserttime_desc:"Insert time", +months_long:"January,February,March,April,May,June,July,August,September,October,November,December", +months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec", +day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday", +day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun" +}, +print:{ +print_desc:"Print" +}, +preview:{ +preview_desc:"Preview" +}, +directionality:{ +ltr_desc:"Direction left to right", +rtl_desc:"Direction right to left" +}, +layer:{ +insertlayer_desc:"Insert new layer", +forward_desc:"Move forward", +backward_desc:"Move backward", +absolute_desc:"Toggle absolute positioning", +content:"New layer..." +}, +save:{ +save_desc:"Save", +cancel_desc:"Cancel all changes" +}, +nonbreaking:{ +nonbreaking_desc:"Insert non-breaking space character" +}, +iespell:{ +iespell_desc:"Run spell checking", +download:"ieSpell not detected. Do you want to install it now?" +}, +advhr:{ +advhr_desc:"Horizontal rule" +}, +emotions:{ +emotions_desc:"Emotions" +}, +searchreplace:{ +search_desc:"Find", +replace_desc:"Find/Replace" +}, +advimage:{ +image_desc:"Insert/edit image" +}, +advlink:{ +link_desc:"Insert/edit link" +}, +xhtmlxtras:{ +cite_desc:"Citation", +abbr_desc:"Abbreviation", +acronym_desc:"Acronym", +del_desc:"Deletion", +ins_desc:"Insertion", +attribs_desc:"Insert/Edit Attributes" +}, +style:{ +desc:"Edit CSS Style" +}, +paste:{ +paste_text_desc:"Paste as Plain Text", +paste_word_desc:"Paste from Word", +selectall_desc:"Select All", +plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.", +plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode." +}, +paste_dlg:{ +text_title:"Use CTRL+V on your keyboard to paste the text into the window.", +text_linebreaks:"Keep linebreaks", +word_title:"Use CTRL+V on your keyboard to paste the text into the window." +}, +table:{ +desc:"Inserts a new table", +row_before_desc:"Insert row before", +row_after_desc:"Insert row after", +delete_row_desc:"Delete row", +col_before_desc:"Insert column before", +col_after_desc:"Insert column after", +delete_col_desc:"Remove column", +split_cells_desc:"Split merged table cells", +merge_cells_desc:"Merge table cells", +row_desc:"Table row properties", +cell_desc:"Table cell properties", +props_desc:"Table properties", +paste_row_before_desc:"Paste table row before", +paste_row_after_desc:"Paste table row after", +cut_row_desc:"Cut table row", +copy_row_desc:"Copy table row", +del:"Delete table", +row:"Row", +col:"Column", +cell:"Cell" +}, +autosave:{ +unload_msg:"The changes you made will be lost if you navigate away from this page.", +restore_content:"Restore auto-saved content.", +warning_message:"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?." +}, +fullscreen:{ +desc:"Toggle fullscreen mode" +}, +media:{ +desc:"Insert / edit embedded media", +edit:"Edit embedded media" +}, +fullpage:{ +desc:"Document properties" +}, +template:{ +desc:"Insert predefined template content" +}, +visualchars:{ +desc:"Visual control characters on/off." +}, +spellchecker:{ +desc:"Toggle spellchecker", +menu:"Spellchecker settings", +ignore_word:"Ignore word", +ignore_words:"Ignore all", +langs:"Languages", +wait:"Please wait...", +sug:"Suggestions", +no_sug:"No suggestions", +no_mpell:"No misspellings found." +}, +pagebreak:{ +desc:"Insert page break." +}, +advlist:{ +types:"Types", +def:"Default", +lower_alpha:"Lower alpha", +lower_greek:"Lower greek", +lower_roman:"Lower roman", +upper_alpha:"Upper alpha", +upper_roman:"Upper roman", +circle:"Circle", +disc:"Disc", +square:"Square" +}}}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/langs/ko.js b/webapps/totsys/common/js/tiny_mce/langs/ko.js new file mode 100644 index 0000000..f1ce840 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/langs/ko.js @@ -0,0 +1,170 @@ +tinyMCE.addI18n({ko:{ +common:{ +edit_confirm:"WYSIWYG\uBAA8\uB4DC\uB85C \uC804\uD658\uD569\uB2C8\uAE4C?", +apply:"\uC801\uC6A9", +insert:"\uC0BD\uC785", +update:"\uAC31\uC2E0", +cancel:"\uCDE8\uC18C", +close:"\uB2EB\uAE30", +browse:"\uBE0C\uB77C\uC6B0\uC988", +class_name:"\uD074\uB798\uC2A4", +not_set:"-- \uC5C6\uC74C --", +clipboard_msg:"\uBCF5\uC0AC/\uC798\uB77C\uB0B4\uAE30/\uBD99\uC774\uAE30\uB294 Mozilla \uBC0FFirefox \uC5D0\uC11C \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n\uC0C1\uC138\uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uAE4C?", +clipboard_no_support:"\uC774 \uAE30\uB2A5\uC740 \uBE0C\uB77C\uC6B0\uC800\uC5D0 \uC758\uD574 \uC81C\uD55C\uB418\uACE0 \uC788\uC2B5\uB2C8\uB2E4. \uB2E8\uCD95\uD0A4\uC744 \uC774\uC6A9\uD558\uC2ED\uC2DC\uC624.", +popup_blocked:"\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBAA8\uB4E0 \uAE30\uB2A5\uC744 \uC774\uC6A9\uD558\uC2DC\uAE30 \uC704\uD574\uC11C\uB294 \uD31D\uC5C5\uCC28\uB2E8\uC744 \uD574\uC81C\uD574 \uC8FC\uC138\uC694.", +invalid_data:"\uC5D0\uB7EC: \uC720\uD6A8\uD558\uC9C0 \uC54A\uB294 \uAE00\uC790\uAC00 \uC788\uC2B5\uB2C8\uB2E4. \uBE68\uAC04\uC0C9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.", +more_colors:"\uADF8 \uC678\uC758 \uC0C9" +}, +contextmenu:{ +align:"\uC815\uB82C", +left:"\uC67C\uCABD \uC815\uB82C", +center:"\uAC00\uC6B4\uB370 \uC815\uB82C", +right:"\uC624\uB978\uCABD \uC815\uB82C", +full:"\uBC30\uBD84 \uC815\uB82C" +}, +insertdatetime:{ +date_fmt:"%Y-%m-%d", +time_fmt:"%H:%M:%S", +insertdate_desc:"\uB0A0\uC9DC \uC0BD\uC785", +inserttime_desc:"\uC2DC\uAC04 \uC0BD\uC785", +months_long:"1\uC6D4,2\uC6D4,3\uC6D4,4\uC6D4,5\uC6D4,6\uC6D4,7\uC6D4,8\uC6D4,9\uC6D4,10\uC6D4,11\uC6D4,12\uC6D4", +months_short:"1,2,3,4,5,6,7,8,9,10,11,12", +day_long:"\uC77C\uC694\uC77C,\uC6D4\uC694\uC77C,\uD654\uC694\uC77C,\uC218\uC694\uC77C,\uBAA9\uC694\uC77C,\uAE08\uC694\uC77C,\uD1A0\uC694\uC77C,\uC77C\uC694\uC77C", +day_short:"\uC77C,\uC6D4,\uD654,\uC218,\uBAA9,\uAE08,\uD1A0,\uC77C" +}, +print:{ +print_desc:"\uC778\uC1C4" +}, +preview:{ +preview_desc:"\uBBF8\uB9AC\uBCF4\uAE30" +}, +directionality:{ +ltr_desc:"\uBB38\uC790\uBC29\uD5A5\uC744 \uC67C\uCABD\uC5D0\uC11C \uC624\uB978\uCABD\uC73C\uB85C", +rtl_desc:"\uBB38\uC790\uBC29\uD5A5\uC744 \uC624\uB978\uCABD\uC5D0\uC11C \uC67C\uCABD\uC73C\uB85C" +}, +layer:{ +insertlayer_desc:"\uC0C8 \uB808\uC774\uC5B4", +forward_desc:"\uC55E\uC73C\uB85C \uC774\uB3D9", +backward_desc:"\uB4A4\uB85C \uC774\uB3D9", +absolute_desc:"\uC808\uB300\uC704\uCE58\uB85C \uC804\uD658", +content:"\uC0C8 \uB808\uC774\uC5B4..." +}, +save:{ +save_desc:"\uC800\uC7A5", +cancel_desc:"\uBAA8\uB450 \uCDE8\uC18C" +}, +nonbreaking:{ +nonbreaking_desc:"\uBE48\uCE78 \uC0BD\uC785" +}, +iespell:{ +iespell_desc:"\uCCA0\uC790 \uAC80\uC0AC", +download:"ieSpell\uC774 \uBC1C\uACAC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.\n\uC778\uC2A4\uD1A8 \uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?" +}, +advhr:{ +advhr_desc:"\uAD6C\uBD84\uC120" +}, +emotions:{ +emotions_desc:"\uC774\uBAA8\uD2F0\uCF58" +}, +searchreplace:{ +search_desc:"\uAC80\uC0C9", +replace_desc:"\uAC80\uC0C9/\uCE58\uD658" +}, +advimage:{ +image_desc:"\uC774\uBBF8\uC9C0\uC758 \uC0BD\uC785/\uD3B8\uC9D1" +}, +advlink:{ +link_desc:"\uB9C1\uD06C\uC758 \uC0BD\uC785/\uD3B8\uC9D1" +}, +xhtmlxtras:{ +cite_desc:"\uC778\uC6A9\uCC98", +abbr_desc:"\uC57D\uAE30", +acronym_desc:"\uBA38\uB9AC \uAE00\uC790\uC5B4", +del_desc:"\uC0AD\uC81C", +ins_desc:"\uC0BD\uC785", +attribs_desc:"\uC18D\uC131 \uC0BD\uC785/\uD3B8\uC9D1" +}, +style:{ +desc:"CSS\uD3B8\uC9D1" +}, +paste:{ +paste_text_desc:"\uD14D\uC2A4\uD2B8\uCC98\uB7FC \uBD99\uC5EC\uB123\uAE30", +paste_word_desc:"Word\uB85C\uBD80\uD130 \uBD99\uC5EC\uB123\uAE30", +selectall_desc:"\uBAA8\uB450 \uC120\uD0DD", +plaintext_mode_sticky:"\uC77C\uBC18 \uD14D\uC2A4\uD2B8 \uBAA8\uB4DC\uC5D0\uC11C \uBD99\uC5EC\uB123\uAE30. \uD074\uB9AD\uD558\uBA74 \uC77C\uBC18 \uBD99\uC5EC\uB123\uAE30 \uBAA8\uB4DC\uB85C \uB2E4\uC2DC \uBCC0\uACBD\uB429\uB2C8\uB2E4. After you paste something you will be returned to regular paste mode.", +plaintext_mode:"\uC77C\uBC18 \uD14D\uC2A4\uD2B8 \uBAA8\uB4DC\uC5D0\uC11C \uBD99\uC5EC\uB123\uAE30. \uD074\uB9AD\uD558\uBA74 \uC77C\uBC18 \uBD99\uC5EC\uB123\uAE30 \uBAA8\uB4DC\uB85C \uB2E4\uC2DC \uBCC0\uACBD\uB429\uB2C8\uB2E4." +}, +paste_dlg:{ +text_title:"\uC708\uB3C4\uC6B0\uC5D0 \uD14D\uC2A4\uD2B8\uB97C \uBD99\uC774\uB824\uBA74 \uD0A4\uBCF4\uB4DC\uB85C Ctrl+V\uB97C \uC785\uB825\uD574 \uC8FC\uC138\uC694.", +text_linebreaks:"\uAC1C\uD589\uC744 \uBCF4\uAD00 \uC720\uC9C0", +word_title:"\uC708\uB3C4\uC6B0\uC5D0 \uD14D\uC2A4\uD2B8\uB97C \uBD99\uC774\uB824\uBA74 \uD0A4\uBCF4\uB4DC\uB85CCtrl+V\uB97C \uC785\uB825\uD574 \uC8FC\uC138\uC694." +}, +table:{ +desc:"\uC0C8 \uD14C\uC774\uBE14 \uC0BD\uC785", +row_before_desc:"\uC55E\uC5D0 \uD589 \uC0BD\uC785", +row_after_desc:"\uB4A4\uC5D0 \uD589 \uC0BD\uC785", +delete_row_desc:"\uD589 \uC0AD\uC81C", +col_before_desc:"\uC55E\uC5D0 \uC5F4\uC0BD\uC785", +col_after_desc:"\uB4A4\uC5D0 \uC5F4\uC0BD\uC785", +delete_col_desc:"\uC5F4\uC0AD\uC81C", +split_cells_desc:"\uACB0\uD569\uB41C \uC140\uC744 \uBD84\uD560", +merge_cells_desc:"\uC140\uC744 \uACB0\uD569", +row_desc:"\uD589\uC758 \uC18D\uC131", +cell_desc:"\uC140\uC758 \uC18D\uC131", +props_desc:"\uD14C\uC774\uBE14 \uC18D\uC131", +paste_row_before_desc:"\uC55E\uC5D0 \uD589\uC744 \uBD99\uC5EC\uB123\uAE30", +paste_row_after_desc:"\uB4A4\uB85C \uD589\uC744 \uBD99\uC5EC\uB123\uAE30", +cut_row_desc:"\uD589\uC744 \uC798\uB77C\uB0B4\uAE30", +copy_row_desc:"\uD589\uC744 \uBCF5\uC0AC", +del:"\uD14C\uC774\uBE14 \uC0AD\uC81C", +row:"\uD589", +col:"\uC5F4", +cell:"\uC140" +}, +autosave:{ +unload_msg:"\uB2E4\uB978 \uD398\uC774\uC9C0\uB85C \uC774\uB3D9\uD558\uBA74 \uD3B8\uC9D1\uD55C \uB0B4\uC6A9\uC774 \uCDE8\uC18C\uB429\uB2C8\uB2E4.", +restore_content:"\uC790\uB3D9 \uC800\uC7A5\uB41C \uB0B4\uC6A9 \uBCF5\uAD6C", +warning_message:"\uC800\uC7A5\uB41C \uB0B4\uC6A9\uC744 \uBCF5\uAD6C\uD558\uBA74 \uD604\uC7AC\uC758 \uB0B4\uC6A9\uC740 \uC0AD\uC81C\uB429\uB2C8\uB2E4.\n\n\uC815\uB9D0 \uC800\uC7A5\uB41C \uB0B4\uC6A9\uC744 \uBCF5\uAD6C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?" +}, +fullscreen:{ +desc:"\uC804\uCCB4\uD654\uBA74" +}, +media:{ +desc:"\uBBF8\uB514\uC5B4\uC758 \uC0BD\uC785/\uD3B8\uC9D1", +edit:"\uBBF8\uB514\uC5B4\uC758 \uD3B8\uC9D1" +}, +fullpage:{ +desc:"\uD398\uC774\uC9C0\uC758 \uC18D\uC131" +}, +template:{ +desc:"\uC815\uC758\uAC00 \uB05D\uB09C \uD15C\uD50C\uB9BF\uC758 \uC0BD\uC785" +}, +visualchars:{ +desc:"\uC81C\uC5B4 \uBB38\uC790\uC758 \uD45C\uC2DC \uC804\uD658" +}, +spellchecker:{ +desc:"\uC2A4\uD3A0\uB9C1 \uC804\uD658", +menu:"\uC2A4\uD3A0\uB9C1 \uC124\uC815", +ignore_word:"\uC774 \uC5B4\uAD6C\uB97C \uBB34\uC2DC", +ignore_words:"\uBAA8\uB450 \uBB34\uC2DC", +langs:"\uC5B8\uC5B4", +wait:"\uAE30\uB2E4\uB824 \uC8FC\uC138\uC694...", +sug:"\uD6C4\uBCF4", +no_sug:"\uD6C4\uBCF4 \uC5C6\uC74C", +no_mpell:"\uC624\uD0C8\uC790\uAC00 \uBC1C\uACAC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4." +}, +pagebreak:{ +desc:"\uC0C8\uD398\uC774\uC9C0 \uC0BD\uC785" +}, +advlist:{ +types:"\uD0C0\uC785", +def:"\uAE30\uBCF8", +lower_alpha:"\uC54C\uD30C\uBCB3 \uC18C\uBB38\uC790", +lower_greek:"\uADF8\uB9AC\uC2A4\uC5B4 \uC18C\uBB38\uC790", +lower_roman:"\uB85C\uB9C8 \uC18C\uBB38\uC790", +upper_alpha:"\uB300\uBB38\uC790 \uC54C\uD30C\uBCB3", +upper_roman:"\uB300\uBB38\uC790 \uB85C\uB9C8", +circle:"\uC6D0", +disc:"\uC6D0\uD615", +square:"\uC0AC\uACA9\uD615" +}}}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/license.txt b/webapps/totsys/common/js/tiny_mce/license.txt new file mode 100644 index 0000000..1837b0a --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/license.txt @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advhr/css/advhr.css b/webapps/totsys/common/js/tiny_mce/plugins/advhr/css/advhr.css new file mode 100644 index 0000000..3fe369c --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advhr/css/advhr.css @@ -0,0 +1,5 @@ +input.radio {border:1px none #000; background:transparent; vertical-align:middle;} +.panel_wrapper div.current {height:80px;} +#width {width:50px; vertical-align:middle;} +#width2 {width:50px; vertical-align:middle;} +#size {width:100px;} diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advhr/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/advhr/editor_plugin.js new file mode 100644 index 0000000..4d3b062 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advhr/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.AdvancedHRPlugin",{init:function(a,b){a.addCommand("mceAdvancedHr",function(){a.windowManager.open({file:b+"/rule.htm",width:250+parseInt(a.getLang("advhr.delta_width",0)),height:160+parseInt(a.getLang("advhr.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("advhr",{title:"advhr.advhr_desc",cmd:"mceAdvancedHr"});a.onNodeChange.add(function(d,c,e){c.setActive("advhr",e.nodeName=="HR")});a.onClick.add(function(c,d){d=d.target;if(d.nodeName==="HR"){c.selection.select(d)}})},getInfo:function(){return{longname:"Advanced HR",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advhr",tinymce.plugins.AdvancedHRPlugin)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advhr/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/advhr/editor_plugin_src.js new file mode 100644 index 0000000..5a4b725 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advhr/editor_plugin_src.js @@ -0,0 +1,57 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.AdvancedHRPlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceAdvancedHr', function() { + ed.windowManager.open({ + file : url + '/rule.htm', + width : 250 + parseInt(ed.getLang('advhr.delta_width', 0)), + height : 160 + parseInt(ed.getLang('advhr.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('advhr', { + title : 'advhr.advhr_desc', + cmd : 'mceAdvancedHr' + }); + + ed.onNodeChange.add(function(ed, cm, n) { + cm.setActive('advhr', n.nodeName == 'HR'); + }); + + ed.onClick.add(function(ed, e) { + e = e.target; + + if (e.nodeName === 'HR') + ed.selection.select(e); + }); + }, + + getInfo : function() { + return { + longname : 'Advanced HR', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advhr/js/rule.js b/webapps/totsys/common/js/tiny_mce/plugins/advhr/js/rule.js new file mode 100644 index 0000000..a60c35f --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advhr/js/rule.js @@ -0,0 +1,43 @@ +var AdvHRDialog = { + init : function(ed) { + var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w; + + w = dom.getAttrib(n, 'width'); + f.width.value = w ? parseInt(w) : (dom.getStyle('width') || ''); + f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || ''; + f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width'); + selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px'); + }, + + update : function() { + var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = ''; + + h = ' + + + {#advhr.advhr_desc} + + + + + + + +
    + + +
    +
    +
  • + + + + + + + + + + + + +
    + + +
    +
    + + +
    + + +
    + + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advimage/css/advimage.css b/webapps/totsys/common/js/tiny_mce/plugins/advimage/css/advimage.css new file mode 100644 index 0000000..228530f --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advimage/css/advimage.css @@ -0,0 +1,13 @@ +#src_list, #over_list, #out_list {width:280px;} +.mceActionPanel {margin-top:7px;} +.alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;} +.checkbox {border:0;} +.panel_wrapper div.current {height:305px;} +#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;} +#align, #classlist {width:150px;} +#width, #height {vertical-align:middle; width:50px; text-align:center;} +#vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;} +#class_list {width:180px;} +input {width: 280px;} +#constrain, #onmousemovecheck {width:auto;} +#id, #dir, #lang, #usemap, #longdesc {width:200px;} diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advimage/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/advimage/editor_plugin.js new file mode 100644 index 0000000..4c7a9c3 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advimage/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.AdvancedImagePlugin",{init:function(a,b){a.addCommand("mceAdvImage",function(){if(a.dom.getAttrib(a.selection.getNode(),"class").indexOf("mceItem")!=-1){return}a.windowManager.open({file:b+"/image.htm",width:480+parseInt(a.getLang("advimage.delta_width",0)),height:385+parseInt(a.getLang("advimage.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("image",{title:"advimage.image_desc",cmd:"mceAdvImage"})},getInfo:function(){return{longname:"Advanced image",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advimage",tinymce.plugins.AdvancedImagePlugin)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advimage/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/advimage/editor_plugin_src.js new file mode 100644 index 0000000..351542f --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advimage/editor_plugin_src.js @@ -0,0 +1,50 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.AdvancedImagePlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceAdvImage', function() { + // Internal image object like a flash placeholder + if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1) + return; + + ed.windowManager.open({ + file : url + '/image.htm', + width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)), + height : 385 + parseInt(ed.getLang('advimage.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('image', { + title : 'advimage.image_desc', + cmd : 'mceAdvImage' + }); + }, + + getInfo : function() { + return { + longname : 'Advanced image', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advimage/image.htm b/webapps/totsys/common/js/tiny_mce/plugins/advimage/image.htm new file mode 100644 index 0000000..7af5a00 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advimage/image.htm @@ -0,0 +1,232 @@ + + + + {#advimage_dlg.dialog_title} + + + + + + + + + +
    + + +
    +
    +
    + {#advimage_dlg.general} + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    +
    + +
    + {#advimage_dlg.preview} + +
    +
    + +
    +
    + {#advimage_dlg.tab_appearance} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + {#advimage_dlg.example_img} + Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam + nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum + edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam + erat volutpat. +
    +
    + x + px +
      + + + + +
    +
    +
    +
    + +
    +
    + {#advimage_dlg.swap_image} + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    + + + + +
     
    +
    + +
    + {#advimage_dlg.misc} + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + + + + +
     
    +
    +
    +
    + +
    + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advimage/img/sample.gif b/webapps/totsys/common/js/tiny_mce/plugins/advimage/img/sample.gif new file mode 100644 index 0000000..53bf689 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/advimage/img/sample.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advimage/js/image.js b/webapps/totsys/common/js/tiny_mce/plugins/advimage/js/image.js new file mode 100644 index 0000000..d08e469 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advimage/js/image.js @@ -0,0 +1,443 @@ +var ImageDialog = { + preInit : function() { + var url; + + tinyMCEPopup.requireLangPack(); + + if (url = tinyMCEPopup.getParam("external_image_list_url")) + document.write(''); + }, + + init : function(ed) { + var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(); + + tinyMCEPopup.resizeToInnerSize(); + this.fillClassList('class_list'); + this.fillFileList('src_list', 'tinyMCEImageList'); + this.fillFileList('over_list', 'tinyMCEImageList'); + this.fillFileList('out_list', 'tinyMCEImageList'); + TinyMCE_EditableSelects.init(); + + if (n.nodeName == 'IMG') { + nl.src.value = dom.getAttrib(n, 'src'); + nl.width.value = dom.getAttrib(n, 'width'); + nl.height.value = dom.getAttrib(n, 'height'); + nl.alt.value = dom.getAttrib(n, 'alt'); + nl.title.value = dom.getAttrib(n, 'title'); + nl.vspace.value = this.getAttrib(n, 'vspace'); + nl.hspace.value = this.getAttrib(n, 'hspace'); + nl.border.value = this.getAttrib(n, 'border'); + selectByValue(f, 'align', this.getAttrib(n, 'align')); + selectByValue(f, 'class_list', dom.getAttrib(n, 'class'), true, true); + nl.style.value = dom.getAttrib(n, 'style'); + nl.id.value = dom.getAttrib(n, 'id'); + nl.dir.value = dom.getAttrib(n, 'dir'); + nl.lang.value = dom.getAttrib(n, 'lang'); + nl.usemap.value = dom.getAttrib(n, 'usemap'); + nl.longdesc.value = dom.getAttrib(n, 'longdesc'); + nl.insert.value = ed.getLang('update'); + + if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseover'))) + nl.onmouseoversrc.value = dom.getAttrib(n, 'onmouseover').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1'); + + if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseout'))) + nl.onmouseoutsrc.value = dom.getAttrib(n, 'onmouseout').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1'); + + if (ed.settings.inline_styles) { + // Move attribs to styles + if (dom.getAttrib(n, 'align')) + this.updateStyle('align'); + + if (dom.getAttrib(n, 'hspace')) + this.updateStyle('hspace'); + + if (dom.getAttrib(n, 'border')) + this.updateStyle('border'); + + if (dom.getAttrib(n, 'vspace')) + this.updateStyle('vspace'); + } + } + + // Setup browse button + document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); + if (isVisible('srcbrowser')) + document.getElementById('src').style.width = '260px'; + + // Setup browse button + document.getElementById('onmouseoversrccontainer').innerHTML = getBrowserHTML('overbrowser','onmouseoversrc','image','theme_advanced_image'); + if (isVisible('overbrowser')) + document.getElementById('onmouseoversrc').style.width = '260px'; + + // Setup browse button + document.getElementById('onmouseoutsrccontainer').innerHTML = getBrowserHTML('outbrowser','onmouseoutsrc','image','theme_advanced_image'); + if (isVisible('outbrowser')) + document.getElementById('onmouseoutsrc').style.width = '260px'; + + // If option enabled default contrain proportions to checked + if (ed.getParam("advimage_constrain_proportions", true)) + f.constrain.checked = true; + + // Check swap image if valid data + if (nl.onmouseoversrc.value || nl.onmouseoutsrc.value) + this.setSwapImage(true); + else + this.setSwapImage(false); + + this.changeAppearance(); + this.showPreviewImage(nl.src.value, 1); + }, + + insert : function(file, title) { + var ed = tinyMCEPopup.editor, t = this, f = document.forms[0]; + + if (f.src.value === '') { + if (ed.selection.getNode().nodeName == 'IMG') { + ed.dom.remove(ed.selection.getNode()); + ed.execCommand('mceRepaint'); + } + + tinyMCEPopup.close(); + return; + } + + if (tinyMCEPopup.getParam("accessibility_warnings", 1)) { + if (!f.alt.value) { + tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) { + if (s) + t.insertAndClose(); + }); + + return; + } + } + + t.insertAndClose(); + }, + + insertAndClose : function() { + var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el; + + tinyMCEPopup.restoreSelection(); + + // Fixes crash in Safari + if (tinymce.isWebKit) + ed.getWin().focus(); + + if (!ed.settings.inline_styles) { + args = { + vspace : nl.vspace.value, + hspace : nl.hspace.value, + border : nl.border.value, + align : getSelectValue(f, 'align') + }; + } else { + // Remove deprecated values + args = { + vspace : '', + hspace : '', + border : '', + align : '' + }; + } + + tinymce.extend(args, { + src : nl.src.value, + width : nl.width.value, + height : nl.height.value, + alt : nl.alt.value, + title : nl.title.value, + 'class' : getSelectValue(f, 'class_list'), + style : nl.style.value, + id : nl.id.value, + dir : nl.dir.value, + lang : nl.lang.value, + usemap : nl.usemap.value, + longdesc : nl.longdesc.value + }); + + args.onmouseover = args.onmouseout = ''; + + if (f.onmousemovecheck.checked) { + if (nl.onmouseoversrc.value) + args.onmouseover = "this.src='" + nl.onmouseoversrc.value + "';"; + + if (nl.onmouseoutsrc.value) + args.onmouseout = "this.src='" + nl.onmouseoutsrc.value + "';"; + } + + el = ed.selection.getNode(); + + if (el && el.nodeName == 'IMG') { + ed.dom.setAttribs(el, args); + } else { + ed.execCommand('mceInsertContent', false, '', {skip_undo : 1}); + ed.dom.setAttribs('__mce_tmp', args); + ed.dom.setAttrib('__mce_tmp', 'id', ''); + ed.undoManager.add(); + } + + tinyMCEPopup.close(); + }, + + getAttrib : function(e, at) { + var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; + + if (ed.settings.inline_styles) { + switch (at) { + case 'align': + if (v = dom.getStyle(e, 'float')) + return v; + + if (v = dom.getStyle(e, 'vertical-align')) + return v; + + break; + + case 'hspace': + v = dom.getStyle(e, 'margin-left') + v2 = dom.getStyle(e, 'margin-right'); + + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'vspace': + v = dom.getStyle(e, 'margin-top') + v2 = dom.getStyle(e, 'margin-bottom'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'border': + v = 0; + + tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { + sv = dom.getStyle(e, 'border-' + sv + '-width'); + + // False or not the same as prev + if (!sv || (sv != v && v !== 0)) { + v = 0; + return false; + } + + if (sv) + v = sv; + }); + + if (v) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + } + } + + if (v = dom.getAttrib(e, at)) + return v; + + return ''; + }, + + setSwapImage : function(st) { + var f = document.forms[0]; + + f.onmousemovecheck.checked = st; + setBrowserDisabled('overbrowser', !st); + setBrowserDisabled('outbrowser', !st); + + if (f.over_list) + f.over_list.disabled = !st; + + if (f.out_list) + f.out_list.disabled = !st; + + f.onmouseoversrc.disabled = !st; + f.onmouseoutsrc.disabled = !st; + }, + + fillClassList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { + cl = []; + + tinymce.each(v.split(';'), function(v) { + var p = v.split('='); + + cl.push({'title' : p[0], 'class' : p[1]}); + }); + } else + cl = tinyMCEPopup.editor.dom.getClasses(); + + if (cl.length > 0) { + lst.options.length = 0; + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + + tinymce.each(cl, function(o) { + lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = window[l]; + lst.options.length = 0; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + resetImageData : function() { + var f = document.forms[0]; + + f.elements.width.value = f.elements.height.value = ''; + }, + + updateImageData : function(img, st) { + var f = document.forms[0]; + + if (!st) { + f.elements.width.value = img.width; + f.elements.height.value = img.height; + } + + this.preloadImg = img; + }, + + changeAppearance : function() { + var ed = tinyMCEPopup.editor, f = document.forms[0], img = document.getElementById('alignSampleImg'); + + if (img) { + if (ed.getParam('inline_styles')) { + ed.dom.setAttrib(img, 'style', f.style.value); + } else { + img.align = f.align.value; + img.border = f.border.value; + img.hspace = f.hspace.value; + img.vspace = f.vspace.value; + } + } + }, + + changeHeight : function() { + var f = document.forms[0], tp, t = this; + + if (!f.constrain.checked || !t.preloadImg) { + return; + } + + if (f.width.value == "" || f.height.value == "") + return; + + tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height; + f.height.value = tp.toFixed(0); + }, + + changeWidth : function() { + var f = document.forms[0], tp, t = this; + + if (!f.constrain.checked || !t.preloadImg) { + return; + } + + if (f.width.value == "" || f.height.value == "") + return; + + tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width; + f.width.value = tp.toFixed(0); + }, + + updateStyle : function(ty) { + var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value}); + + if (tinyMCEPopup.editor.settings.inline_styles) { + // Handle align + if (ty == 'align') { + dom.setStyle(img, 'float', ''); + dom.setStyle(img, 'vertical-align', ''); + + v = getSelectValue(f, 'align'); + if (v) { + if (v == 'left' || v == 'right') + dom.setStyle(img, 'float', v); + else + img.style.verticalAlign = v; + } + } + + // Handle border + if (ty == 'border') { + dom.setStyle(img, 'border', ''); + + v = f.border.value; + if (v || v == '0') { + if (v == '0') + img.style.border = '0'; + else + img.style.border = v + 'px solid black'; + } + } + + // Handle hspace + if (ty == 'hspace') { + dom.setStyle(img, 'marginLeft', ''); + dom.setStyle(img, 'marginRight', ''); + + v = f.hspace.value; + if (v) { + img.style.marginLeft = v + 'px'; + img.style.marginRight = v + 'px'; + } + } + + // Handle vspace + if (ty == 'vspace') { + dom.setStyle(img, 'marginTop', ''); + dom.setStyle(img, 'marginBottom', ''); + + v = f.vspace.value; + if (v) { + img.style.marginTop = v + 'px'; + img.style.marginBottom = v + 'px'; + } + } + + // Merge + dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText), 'img'); + } + }, + + changeMouseMove : function() { + }, + + showPreviewImage : function(u, st) { + if (!u) { + tinyMCEPopup.dom.setHTML('prev', ''); + return; + } + + if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true)) + this.resetImageData(); + + u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u); + + if (!st) + tinyMCEPopup.dom.setHTML('prev', ''); + else + tinyMCEPopup.dom.setHTML('prev', ''); + } +}; + +ImageDialog.preInit(); +tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advimage/langs/en_dlg.js b/webapps/totsys/common/js/tiny_mce/plugins/advimage/langs/en_dlg.js new file mode 100644 index 0000000..ef81f78 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advimage/langs/en_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('en.advimage_dlg',{ +tab_general:"General", +tab_appearance:"Appearance", +tab_advanced:"Advanced", +general:"General", +title:"Title", +preview:"Preview", +constrain_proportions:"Constrain proportions", +langdir:"Language direction", +langcode:"Language code", +long_desc:"Long description link", +style:"Style", +classes:"Classes", +ltr:"Left to right", +rtl:"Right to left", +id:"Id", +map:"Image map", +swap_image:"Swap image", +alt_image:"Alternative image", +mouseover:"for mouse over", +mouseout:"for mouse out", +misc:"Miscellaneous", +example_img:"Appearance preview image", +missing_alt:"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.", +dialog_title:"Insert/edit image", +src:"Image URL", +alt:"Image description", +list:"Image list", +border:"Border", +dimensions:"Dimensions", +vspace:"Vertical space", +hspace:"Horizontal space", +align:"Alignment", +align_baseline:"Baseline", +align_top:"Top", +align_middle:"Middle", +align_bottom:"Bottom", +align_texttop:"Text top", +align_textbottom:"Text bottom", +align_left:"Left", +align_right:"Right", +image_list:"Image list" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advimage/langs/ko_dlg.js b/webapps/totsys/common/js/tiny_mce/plugins/advimage/langs/ko_dlg.js new file mode 100644 index 0000000..4910df7 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advimage/langs/ko_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('ko.advimage_dlg',{ +tab_general:"\uC77C\uBC18", +tab_appearance:"\uD45C\uC2DC", +tab_advanced:"\uACE0\uAE09", +general:"\uC77C\uBC18", +title:"\uC81C\uBAA9", +preview:"\uBBF8\uB9AC\uBCF4\uAE30", +constrain_proportions:"\uC885\uD6A1\uBE44 \uBCF4\uC874", +langdir:"\uBB38\uC790 \uBC29\uD5A5", +langcode:"\uC5B8\uC5B4 \uCF54\uB4DC", +long_desc:"\uC124\uBA85 \uB9C1\uD06C", +style:"\uC2A4\uD0C0\uC77C", +classes:"\uD074\uB798\uC2A4", +ltr:"\uC67C\uCABD\uC5D0\uC11C \uC624\uB978\uCABD", +rtl:"\uC624\uB978\uCABD\uC5D0\uC11C \uC67C\uCABD", +id:"Id", +map:"\uC774\uBBF8\uC9C0 \uB9F5", +swap_image:"\uB864 \uC624\uBC84 \uD6A8\uACFC", +alt_image:"\uB300\uCCB4 \uC774\uBBF8\uC9C0", +mouseover:"\uB9C8\uC6B0\uC2A4 \uC624\uBC84 \uC774\uBBF8\uC9C0", +mouseout:"\uB9C8\uC6B0\uC2A4 \uC544\uC6C3 \uC774\uBBF8\uC9C0", +misc:"\uADF8 \uC678", +example_img:"\uBBF8\uB9AC\uBCF4\uAE30 \uC774\uBBF8\uC9C0", +missing_alt:"\uC774\uBBF8\uC9C0 \uC124\uBA85\uC774 \uC5C6\uC2B5\uB2C8\uB2E4\uB9CC \uC88B\uC2B5\uB2C8\uAE4C? \uC774\uBBF8\uC9C0 \uC124\uBA85\uC774 \uC5C6\uB294 \uACBD\uC6B0, \uB9F9\uC778\uC774\uB098 \uD14D\uC2A4\uD2B8 \uBE0C\uB77C\uC6B0\uC800\uB97C \uC774\uC6A9\uD558\uACE0 \uC788\uB294 \uBD84, \uB610 \uC774\uBBF8\uC9C0 \uD45C\uC2DC\uB97C OFF(\uC73C)\uB85C \uD558\uACE0 \uC788\uB294 \uC720\uC800\uC758 \uC811\uADFC\uC131\uC774 \uC800\uD558\uB429\uB2C8\uB2E4.", +dialog_title:"\uC774\uBBF8\uC9C0\uC758 \uC0BD\uC785/\uD3B8\uC9D1", +src:"\uC774\uBBF8\uC9C0 URL", +alt:"\uC774\uBBF8\uC9C0 \uC124\uBA85", +list:"\uC774\uBBF8\uC9C0 \uBAA9\uB85D", +border:"\uD14C\uB450\uB9AC\uC120", +dimensions:"\uD06C\uAE30", +vspace:"\uC0C1\uD558 \uC5EC\uBC31", +hspace:"\uC88C\uC6B0 \uC5EC\uBC31", +align:"\uC815\uB82C", +align_baseline:"\uAE30\uC900\uC120", +align_top:"\uC0C1", +align_middle:"\uC911\uC559", +align_bottom:"\uD558", +align_texttop:"\uBB38\uC790\uC5F4 \uC704\uB85C", +align_textbottom:"\uBB38\uC790\uC5F4 \uC544\uB798\uB85C", +align_left:"\uC88C", +align_right:"\uC6B0", +image_list:"\uC774\uBBF8\uC9C0 \uBAA9\uB85D" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advlink/css/advlink.css b/webapps/totsys/common/js/tiny_mce/plugins/advlink/css/advlink.css new file mode 100644 index 0000000..66c6549 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advlink/css/advlink.css @@ -0,0 +1,8 @@ +.mceLinkList, .mceAnchorList, #targetlist {width:280px;} +.mceActionPanel {margin-top:7px;} +.panel_wrapper div.current {height:320px;} +#classlist, #title, #href {width:280px;} +#popupurl, #popupname {width:200px;} +#popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;} +#id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;} +#events_panel input {width:200px;} diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advlink/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/advlink/editor_plugin.js new file mode 100644 index 0000000..983fe5a --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advlink/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.AdvancedLinkPlugin",{init:function(a,b){this.editor=a;a.addCommand("mceAdvLink",function(){var c=a.selection;if(c.isCollapsed()&&!a.dom.getParent(c.getNode(),"A")){return}a.windowManager.open({file:b+"/link.htm",width:480+parseInt(a.getLang("advlink.delta_width",0)),height:400+parseInt(a.getLang("advlink.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("link",{title:"advlink.link_desc",cmd:"mceAdvLink"});a.addShortcut("ctrl+k","advlink.advlink_desc","mceAdvLink");a.onNodeChange.add(function(d,c,f,e){c.setDisabled("link",e&&f.nodeName!="A");c.setActive("link",f.nodeName=="A"&&!f.name)})},getInfo:function(){return{longname:"Advanced link",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlink",tinymce.plugins.AdvancedLinkPlugin)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advlink/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/advlink/editor_plugin_src.js new file mode 100644 index 0000000..32ea8f3 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advlink/editor_plugin_src.js @@ -0,0 +1,61 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.AdvancedLinkPlugin', { + init : function(ed, url) { + this.editor = ed; + + // Register commands + ed.addCommand('mceAdvLink', function() { + var se = ed.selection; + + // No selection and not in link + if (se.isCollapsed() && !ed.dom.getParent(se.getNode(), 'A')) + return; + + ed.windowManager.open({ + file : url + '/link.htm', + width : 480 + parseInt(ed.getLang('advlink.delta_width', 0)), + height : 400 + parseInt(ed.getLang('advlink.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('link', { + title : 'advlink.link_desc', + cmd : 'mceAdvLink' + }); + + ed.addShortcut('ctrl+k', 'advlink.advlink_desc', 'mceAdvLink'); + + ed.onNodeChange.add(function(ed, cm, n, co) { + cm.setDisabled('link', co && n.nodeName != 'A'); + cm.setActive('link', n.nodeName == 'A' && !n.name); + }); + }, + + getInfo : function() { + return { + longname : 'Advanced link', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('advlink', tinymce.plugins.AdvancedLinkPlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advlink/js/advlink.js b/webapps/totsys/common/js/tiny_mce/plugins/advlink/js/advlink.js new file mode 100644 index 0000000..6fa37e8 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advlink/js/advlink.js @@ -0,0 +1,528 @@ +/* Functions for the advlink plugin popup */ + +tinyMCEPopup.requireLangPack(); + +var templates = { + "window.open" : "window.open('${url}','${target}','${options}')" +}; + +function preinit() { + var url; + + if (url = tinyMCEPopup.getParam("external_link_list_url")) + document.write(''); +} + +function changeClass() { + var f = document.forms[0]; + + f.classes.value = getSelectValue(f, 'classlist'); +} + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + var formObj = document.forms[0]; + var inst = tinyMCEPopup.editor; + var elm = inst.selection.getNode(); + var action = "insert"; + var html; + + document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink'); + document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink'); + document.getElementById('linklisthrefcontainer').innerHTML = getLinkListHTML('linklisthref','href'); + document.getElementById('anchorlistcontainer').innerHTML = getAnchorListHTML('anchorlist','href'); + document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target'); + + // Link list + html = getLinkListHTML('linklisthref','href'); + if (html == "") + document.getElementById("linklisthrefrow").style.display = 'none'; + else + document.getElementById("linklisthrefcontainer").innerHTML = html; + + // Resize some elements + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '260px'; + + if (isVisible('popupurlbrowser')) + document.getElementById('popupurl').style.width = '180px'; + + elm = inst.dom.getParent(elm, "A"); + if (elm != null && elm.nodeName == "A") + action = "update"; + + formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true); + + setPopupControlsDisabled(true); + + if (action == "update") { + var href = inst.dom.getAttrib(elm, 'href'); + var onclick = inst.dom.getAttrib(elm, 'onclick'); + + // Setup form data + setFormValue('href', href); + setFormValue('title', inst.dom.getAttrib(elm, 'title')); + setFormValue('id', inst.dom.getAttrib(elm, 'id')); + setFormValue('style', inst.dom.getAttrib(elm, "style")); + setFormValue('rel', inst.dom.getAttrib(elm, 'rel')); + setFormValue('rev', inst.dom.getAttrib(elm, 'rev')); + setFormValue('charset', inst.dom.getAttrib(elm, 'charset')); + setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang')); + setFormValue('dir', inst.dom.getAttrib(elm, 'dir')); + setFormValue('lang', inst.dom.getAttrib(elm, 'lang')); + setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); + setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); + setFormValue('type', inst.dom.getAttrib(elm, 'type')); + setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus')); + setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur')); + setFormValue('onclick', onclick); + setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick')); + setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown')); + setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup')); + setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover')); + setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove')); + setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout')); + setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress')); + setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown')); + setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup')); + setFormValue('target', inst.dom.getAttrib(elm, 'target')); + setFormValue('classes', inst.dom.getAttrib(elm, 'class')); + + // Parse onclick data + if (onclick != null && onclick.indexOf('window.open') != -1) + parseWindowOpen(onclick); + else + parseFunction(onclick); + + // Select by the values + selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir')); + selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel')); + selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev')); + selectByValue(formObj, 'linklisthref', href); + + if (href.charAt(0) == '#') + selectByValue(formObj, 'anchorlist', href); + + addClassesToList('classlist', 'advlink_styles'); + + selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true); + selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true); + } else + addClassesToList('classlist', 'advlink_styles'); +} + +function checkPrefix(n) { + if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email'))) + n.value = 'mailto:' + n.value; + + if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) + n.value = 'http://' + n.value; +} + +function setFormValue(name, value) { + document.forms[0].elements[name].value = value; +} + +function parseWindowOpen(onclick) { + var formObj = document.forms[0]; + + // Preprocess center code + if (onclick.indexOf('return false;') != -1) { + formObj.popupreturn.checked = true; + onclick = onclick.replace('return false;', ''); + } else + formObj.popupreturn.checked = false; + + var onClickData = parseLink(onclick); + + if (onClickData != null) { + formObj.ispopup.checked = true; + setPopupControlsDisabled(false); + + var onClickWindowOptions = parseOptions(onClickData['options']); + var url = onClickData['url']; + + formObj.popupname.value = onClickData['target']; + formObj.popupurl.value = url; + formObj.popupwidth.value = getOption(onClickWindowOptions, 'width'); + formObj.popupheight.value = getOption(onClickWindowOptions, 'height'); + + formObj.popupleft.value = getOption(onClickWindowOptions, 'left'); + formObj.popuptop.value = getOption(onClickWindowOptions, 'top'); + + if (formObj.popupleft.value.indexOf('screen') != -1) + formObj.popupleft.value = "c"; + + if (formObj.popuptop.value.indexOf('screen') != -1) + formObj.popuptop.value = "c"; + + formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes"; + formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes"; + formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes"; + formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes"; + formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes"; + formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes"; + formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes"; + + buildOnClick(); + } +} + +function parseFunction(onclick) { + var formObj = document.forms[0]; + var onClickData = parseLink(onclick); + + // TODO: Add stuff here +} + +function getOption(opts, name) { + return typeof(opts[name]) == "undefined" ? "" : opts[name]; +} + +function setPopupControlsDisabled(state) { + var formObj = document.forms[0]; + + formObj.popupname.disabled = state; + formObj.popupurl.disabled = state; + formObj.popupwidth.disabled = state; + formObj.popupheight.disabled = state; + formObj.popupleft.disabled = state; + formObj.popuptop.disabled = state; + formObj.popuplocation.disabled = state; + formObj.popupscrollbars.disabled = state; + formObj.popupmenubar.disabled = state; + formObj.popupresizable.disabled = state; + formObj.popuptoolbar.disabled = state; + formObj.popupstatus.disabled = state; + formObj.popupreturn.disabled = state; + formObj.popupdependent.disabled = state; + + setBrowserDisabled('popupurlbrowser', state); +} + +function parseLink(link) { + link = link.replace(new RegExp(''', 'g'), "'"); + + var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1"); + + // Is function name a template function + var template = templates[fnName]; + if (template) { + // Build regexp + var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi")); + var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\("; + var replaceStr = ""; + for (var i=0; i'); + for (var i=0; i'; + html += ''; + + for (i=0; i' + name + ''; + } + + html += ''; + + return html; +} + +function insertAction() { + var inst = tinyMCEPopup.editor; + var elm, elementArray, i; + + elm = inst.selection.getNode(); + checkPrefix(document.forms[0].href); + + elm = inst.dom.getParent(elm, "A"); + + // Remove element if there is no href + if (!document.forms[0].href.value) { + tinyMCEPopup.execCommand("mceBeginUndoLevel"); + i = inst.selection.getBookmark(); + inst.dom.remove(elm, 1); + inst.selection.moveToBookmark(i); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + return; + } + + tinyMCEPopup.execCommand("mceBeginUndoLevel"); + + // Create new anchor elements + if (elm == null) { + inst.getDoc().execCommand("unlink", false, null); + tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); + + elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); + for (i=0; i' + tinyMCELinkList[i][0] + ''; + + html += ''; + + return html; + + // tinyMCE.debug('-- image list start --', html, '-- image list end --'); +} + +function getTargetListHTML(elm_id, target_form_element) { + var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';'); + var html = ''; + + html += ''; + + return html; +} + +// While loading +preinit(); +tinyMCEPopup.onInit.add(init); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advlink/langs/en_dlg.js b/webapps/totsys/common/js/tiny_mce/plugins/advlink/langs/en_dlg.js new file mode 100644 index 0000000..8ef9c79 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advlink/langs/en_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('en.advlink_dlg',{ +title:"Insert/edit link", +url:"Link URL", +target:"Target", +titlefield:"Title", +is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", +is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", +list:"Link list", +general_tab:"General", +popup_tab:"Popup", +events_tab:"Events", +advanced_tab:"Advanced", +general_props:"General properties", +popup_props:"Popup properties", +event_props:"Events", +advanced_props:"Advanced properties", +popup_opts:"Options", +anchor_names:"Anchors", +target_same:"Open in this window / frame", +target_parent:"Open in parent window / frame", +target_top:"Open in top frame (replaces all frames)", +target_blank:"Open in new window", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"Window name", +popup_return:"Insert 'return false'", +popup_scrollbars:"Show scrollbars", +popup_statusbar:"Show status bar", +popup_toolbar:"Show toolbars", +popup_menubar:"Show menu bar", +popup_location:"Show location bar", +popup_resizable:"Make window resizable", +popup_dependent:"Dependent (Mozilla/Firefox only)", +popup_size:"Size", +popup_position:"Position (X/Y)", +id:"Id", +style:"Style", +classes:"Classes", +target_name:"Target name", +langdir:"Language direction", +target_langcode:"Target language", +langcode:"Language code", +encoding:"Target character encoding", +mime:"Target MIME type", +rel:"Relationship page to target", +rev:"Relationship target to page", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"Left to right", +rtl:"Right to left", +link_list:"Link list" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advlink/langs/ko_dlg.js b/webapps/totsys/common/js/tiny_mce/plugins/advlink/langs/ko_dlg.js new file mode 100644 index 0000000..90518c3 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advlink/langs/ko_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('ko.advlink_dlg',{ +title:"\uB9C1\uD06C\uC758 \uC0BD\uC785/\uD3B8\uC9D1", +url:"\uB9C1\uD06C URL", +target:"Target", +titlefield:"\uC81C\uBAA9", +is_email:"\uBA54\uC77C\uC8FC\uC18C\uAC00 \uC785\uB825\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBA54\uC77C\uC8FC\uC18C\uC758 \uC55E\uC5D0 mailto:\uB97C \uBD99\uC785\uB2C8\uAE4C?", +is_external:"\uC678\uBD80URL\uC774 \uC785\uB825\uB418\uC5C8\uC2B5\uB2C8\uB2E4.URL\uC758 \uC55E\uC5D0http://\uB97C \uBD99\uC785\uB2C8\uAE4C?", +list:"\uB9C1\uD06C \uBAA9\uB85D", +general_tab:"\uC77C\uBC18", +popup_tab:"\uD31D\uC5C5", +events_tab:"\uC774\uBCA4\uD2B8", +advanced_tab:"\uACE0\uAE09", +general_props:"\uC77C\uBC18 \uC124\uC815", +popup_props:"\uD31D\uC5C5 \uC124\uC815", +event_props:"\uC774\uBCA4\uD2B8", +advanced_props:"\uACE0\uAE09\uC758 \uC124\uC815", +popup_opts:"\uC635\uC158", +anchor_names:"\uC5E5\uCEE4", +target_same:"\uC774 \uCC3D/\uD504\uB808\uC784\uC73C\uB85C \uC5F4\uB9B0\uB2E4", +target_parent:"\uBD80\uBAA8\uCC3D/\uD504\uB808\uC784\uC73C\uB85C \uC5F4\uB9B0\uB2E4", +target_top:"\uCD5C\uC0C1\uC704 \uD504\uB808\uC784\uC73C\uB85C \uC5F4\uB9B0\uB2E4 (\uBAA8\uB4E0 \uD504\uB808\uC784 \uBCC0\uACBD)", +target_blank:"\uC0C8\uCC3D\uC73C\uB85C \uC5F4\uB9B0\uB2E4", +popup:"Javascript \uD31D\uC5C5", +popup_url:"\uD31D\uC5C5 URL", +popup_name:"Window \uC774\uB984", +popup_return:"'return false'\uB97C \uC0BD\uC785", +popup_scrollbars:"\uC2A4\uD06C\uB864\uBC14\uB97C \uD45C\uC2DC", +popup_statusbar:"\uC0C1\uD0DC\uC904\uC744 \uD45C\uC2DC", +popup_toolbar:"\uD234\uBC14\uB97C \uD45C\uC2DC", +popup_menubar:"\uBA54\uB274\uB97C \uD45C\uC2DC", +popup_location:"\uC8FC\uC18C\uBC14\uB97C \uD45C\uC2DC", +popup_resizable:"\uD06C\uAE30\uBCC0\uACBD \uAC00\uB2A5", +popup_dependent:"\uC5F0\uB3D9 (Mozilla/Firefox\uB9CC)", +popup_size:"\uD06C\uAE30", +popup_position:"\uC704\uCE58(X/Y)", +id:"Id", +style:"\uC2A4\uD0C0\uC77C", +classes:"\uD074\uB798\uC2A4", +target_name:"Target \uC774\uB984", +langdir:"\uD398\uC774\uC9C0 \uBB38\uC790 \uBC29\uD5A5", +target_langcode:"\uD398\uC774\uC9C0 \uC5B8\uC5B4", +langcode:"\uC5B8\uC5B4 \uCF54\uB4DC", +encoding:"\uBB38\uC790 \uC778\uCF54\uB529", +mime:"MIME\uD0C0\uC785", +rel:"\uB9C1\uD06C\uC5D0 \uAD00\uACC4", +rev:"\uB9C1\uD06C\uB85C\uBD80\uD130\uC758 \uAD00\uACC4", +tabindex:"\uD0ED \uC778\uB371\uC2A4", +accesskey:"\uC561\uC138\uC2A4 \uD0A4", +ltr:"\uC67C\uCABD\uC5D0\uC11C \uC624\uB978\uCABD", +rtl:"\uC624\uB978\uCABD\uC5D0\uC11C \uC67C\uCABD", +link_list:"\uB9C1\uD06C \uBAA9\uB85D" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advlink/link.htm b/webapps/totsys/common/js/tiny_mce/plugins/advlink/link.htm new file mode 100644 index 0000000..0b0e0bc --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advlink/link.htm @@ -0,0 +1,333 @@ + + + + {#advlink_dlg.title} + + + + + + + + +
    + + +
    +
    +
    + {#advlink_dlg.general_props} + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    + +
    +
    +
    + + + +
    +
    + {#advlink_dlg.advanced_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    +
    +
    +
    +
    + +
    +
    + {#advlink_dlg.event_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advlist/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/advlist/editor_plugin.js new file mode 100644 index 0000000..02d1697 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advlist/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square")},createControl:function(d,b){var f=this,e,h;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){h=f[d][0]}function c(i,k){var j=true;a(k.styles,function(m,l){if(f.editor.dom.getStyle(i,l)!=m){j=false;return false}});return j}function g(){var k,i=f.editor,l=i.dom,j=i.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,h)){i.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(h){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,h.styles);k.removeAttribute("_mce_style")}}}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){g()}});e.onRenderMenu.add(function(i,j){j.onShowMenu.add(function(){var m=f.editor.dom,l=m.getParent(f.editor.selection.getNode(),"ol,ul"),k;if(l||h){k=f[d];a(j.items,function(n){var o=true;n.setSelected(0);if(l&&!n.isDisabled()){a(k,function(p){if(p.id==n.id){if(!c(l,p)){o=false;return false}}});if(o){n.setSelected(1)}}});if(!l){j.items[h.id].setSelected(1)}}});j.add({id:f.editor.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle"}).setDisabled(1);a(f[d],function(k){k.id=f.editor.dom.uniqueId();j.add({id:k.id,title:k.title,onclick:function(){h=k;g()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/advlist/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/advlist/editor_plugin_src.js new file mode 100644 index 0000000..7a665fa --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/advlist/editor_plugin_src.js @@ -0,0 +1,154 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var each = tinymce.each; + + tinymce.create('tinymce.plugins.AdvListPlugin', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + function buildFormats(str) { + var formats = []; + + each(str.split(/,/), function(type) { + formats.push({ + title : 'advlist.' + (type == 'default' ? 'def' : type.replace(/-/g, '_')), + styles : { + listStyleType : type == 'default' ? '' : type + } + }); + }); + + return formats; + }; + + // Setup number formats from config or default + t.numlist = ed.getParam("advlist_number_styles") || buildFormats("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"); + t.bullist = ed.getParam("advlist_bullet_styles") || buildFormats("default,circle,disc,square"); + }, + + createControl: function(name, cm) { + var t = this, btn, format; + + if (name == 'numlist' || name == 'bullist') { + // Default to first item if it's a default item + if (t[name][0].title == 'advlist.def') + format = t[name][0]; + + function hasFormat(node, format) { + var state = true; + + each(format.styles, function(value, name) { + // Format doesn't match + if (t.editor.dom.getStyle(node, name) != value) { + state = false; + return false; + } + }); + + return state; + }; + + function applyListFormat() { + var list, ed = t.editor, dom = ed.dom, sel = ed.selection; + + // Check for existing list element + list = dom.getParent(sel.getNode(), 'ol,ul'); + + // Switch/add list type if needed + if (!list || list.nodeName == (name == 'bullist' ? 'OL' : 'UL') || hasFormat(list, format)) + ed.execCommand(name == 'bullist' ? 'InsertUnorderedList' : 'InsertOrderedList'); + + // Append styles to new list element + if (format) { + list = dom.getParent(sel.getNode(), 'ol,ul'); + + if (list) { + dom.setStyles(list, format.styles); + list.removeAttribute('_mce_style'); + } + } + }; + + btn = cm.createSplitButton(name, { + title : 'advanced.' + name + '_desc', + 'class' : 'mce_' + name, + onclick : function() { + applyListFormat(); + } + }); + + btn.onRenderMenu.add(function(btn, menu) { + menu.onShowMenu.add(function() { + var dom = t.editor.dom, list = dom.getParent(t.editor.selection.getNode(), 'ol,ul'), fmtList; + + if (list || format) { + fmtList = t[name]; + + // Unselect existing items + each(menu.items, function(item) { + var state = true; + + item.setSelected(0); + + if (list && !item.isDisabled()) { + each(fmtList, function(fmt) { + if (fmt.id == item.id) { + if (!hasFormat(list, fmt)) { + state = false; + return false; + } + } + }); + + if (state) + item.setSelected(1); + } + }); + + // Select the current format + if (!list) + menu.items[format.id].setSelected(1); + } + }); + + menu.add({id : t.editor.dom.uniqueId(), title : 'advlist.types', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + + each(t[name], function(item) { + item.id = t.editor.dom.uniqueId(); + + menu.add({id : item.id, title : item.title, onclick : function() { + format = item; + applyListFormat(); + }}); + }); + }); + + return btn; + } + }, + + getInfo : function() { + return { + longname : 'Advanced lists', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('advlist', tinymce.plugins.AdvListPlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/autoresize/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/autoresize/editor_plugin.js new file mode 100644 index 0000000..1676b15 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/autoresize/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this;if(a.getParam("fullscreen_is_enabled")){return}function b(){var h=a.getDoc(),e=h.body,j=h.documentElement,g=tinymce.DOM,i=d.autoresize_min_height,f;f=tinymce.isIE?e.scrollHeight:j.offsetHeight;if(f>d.autoresize_min_height){i=f}g.setStyle(g.get(a.id+"_ifr"),"height",i+"px");if(d.throbbing){a.setProgressState(false);a.setProgressState(true)}}d.editor=a;d.autoresize_min_height=a.getElement().offsetHeight;a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onInit.add(function(f,e){f.setProgressState(true);d.throbbing=true;f.getBody().style.overflowY="hidden"});a.onLoadContent.add(function(f,e){b();setTimeout(function(){b();f.setProgressState(false);d.throbbing=false},1250)})}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/autoresize/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/autoresize/editor_plugin_src.js new file mode 100644 index 0000000..c260b7a --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/autoresize/editor_plugin_src.js @@ -0,0 +1,119 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + /** + * Auto Resize + * + * This plugin automatically resizes the content area to fit its content height. + * It will retain a minimum height, which is the height of the content area when + * it's initialized. + */ + tinymce.create('tinymce.plugins.AutoResizePlugin', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed, url) { + var t = this; + + if (ed.getParam('fullscreen_is_enabled')) + return; + + /** + * This method gets executed each time the editor needs to resize. + */ + function resize() { + var d = ed.getDoc(), b = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight; + + // Get height differently depending on the browser used + myHeight = tinymce.isIE ? b.scrollHeight : de.offsetHeight; + + // Don't make it smaller than the minimum height + if (myHeight > t.autoresize_min_height) + resizeHeight = myHeight; + + // Resize content element + DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px'); + + // if we're throbbing, we'll re-throb to match the new size + if (t.throbbing) { + ed.setProgressState(false); + ed.setProgressState(true); + } + }; + + t.editor = ed; + + // Define minimum height + t.autoresize_min_height = ed.getElement().offsetHeight; + + // Add appropriate listeners for resizing content area + ed.onChange.add(resize); + ed.onSetContent.add(resize); + ed.onPaste.add(resize); + ed.onKeyUp.add(resize); + ed.onPostRender.add(resize); + + if (ed.getParam('autoresize_on_init', true)) { + // Things to do when the editor is ready + ed.onInit.add(function(ed, l) { + // Show throbber until content area is resized properly + ed.setProgressState(true); + t.throbbing = true; + + // Hide scrollbars + ed.getBody().style.overflowY = "hidden"; + }); + + ed.onLoadContent.add(function(ed, l) { + resize(); + + // Because the content area resizes when its content CSS loads, + // and we can't easily add a listener to its onload event, + // we'll just trigger a resize after a short loading period + setTimeout(function() { + resize(); + + // Disable throbber + ed.setProgressState(false); + t.throbbing = false; + }, 1250); + }); + } + + // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample'); + ed.addCommand('mceAutoResize', resize); + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Auto Resize', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/autosave/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/autosave/editor_plugin.js new file mode 100644 index 0000000..b33ebfb --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/autosave/editor_plugin.js @@ -0,0 +1 @@ +(function(e){var c="autosave",g="restoredraft",b=true,f,d,a=e.util.Dispatcher;e.create("tinymce.plugins.AutoSave",{init:function(i,j){var h=this,l=i.settings;h.editor=i;function k(n){var m={s:1000,m:60000};n=/^(\d+)([ms]?)$/.exec(""+n);return(n[2]?m[n[2]]:1)*parseInt(n)}e.each({ask_before_unload:b,interval:"30s",retention:"20m",minlength:50},function(n,m){m=c+"_"+m;if(l[m]===f){l[m]=n}});l.autosave_interval=k(l.autosave_interval);l.autosave_retention=k(l.autosave_retention);i.addButton(g,{title:c+".restore_content",onclick:function(){if(i.getContent().replace(/\s| |<\/?p[^>]*>|]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){h.storeDraft();i.nodeChanged()},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();m.save("TinyMCE")},getItem:function(l){var m=i.getElement();m.load("TinyMCE");return m.getAttribute(l)},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent();if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,i=h.storage;if(i){content=i.getItem(h.key);if(content){h.editor.setContent(content);h.onRestoreDraft.dispatch(h,{content:content})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime()]*>|]*>/gi, "").length > 0) { + // Show confirm dialog if the editor isn't empty + ed.windowManager.confirm( + PLUGIN_NAME + ".warning_message", + function(ok) { + if (ok) + self.restoreDraft(); + } + ); + } else + self.restoreDraft(); + } + }); + + // Enable/disable restoredraft button depending on if there is a draft stored or not + ed.onNodeChange.add(function() { + var controlManager = ed.controlManager; + + if (controlManager.get(RESTORE_DRAFT)) + controlManager.setDisabled(RESTORE_DRAFT, !self.hasDraft()); + }); + + ed.onInit.add(function() { + // Check if the user added the restore button, then setup auto storage logic + if (ed.controlManager.get(RESTORE_DRAFT)) { + // Setup storage engine + self.setupStorage(ed); + + // Auto save contents each interval time + setInterval(function() { + self.storeDraft(); + ed.nodeChanged(); + }, settings.autosave_interval); + } + }); + + /** + * This event gets fired when a draft is stored to local storage. + * + * @event onStoreDraft + * @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event. + * @param {Object} draft Draft object containing the HTML contents of the editor. + */ + self.onStoreDraft = new Dispatcher(self); + + /** + * This event gets fired when a draft is restored from local storage. + * + * @event onStoreDraft + * @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event. + * @param {Object} draft Draft object containing the HTML contents of the editor. + */ + self.onRestoreDraft = new Dispatcher(self); + + /** + * This event gets fired when a draft removed/expired. + * + * @event onRemoveDraft + * @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event. + * @param {Object} draft Draft object containing the HTML contents of the editor. + */ + self.onRemoveDraft = new Dispatcher(self); + + // Add ask before unload dialog only add one unload handler + if (!unloadHandlerAdded) { + window.onbeforeunload = tinymce.plugins.AutoSave._beforeUnloadHandler; + unloadHandlerAdded = TRUE; + } + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @method getInfo + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Auto save', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + /** + * Returns an expiration date UTC string. + * + * @method getExpDate + * @return {String} Expiration date UTC string. + */ + getExpDate : function() { + return new Date( + new Date().getTime() + this.editor.settings.autosave_retention + ).toUTCString(); + }, + + /** + * This method will setup the storage engine. If the browser has support for it. + * + * @method setupStorage + */ + setupStorage : function(ed) { + var self = this, testKey = PLUGIN_NAME + '_test', testVal = "OK"; + + self.key = PLUGIN_NAME + ed.id; + + // Loop though each storage engine type until we find one that works + tinymce.each([ + function() { + // Try HTML5 Local Storage + if (localStorage) { + localStorage.setItem(testKey, testVal); + + if (localStorage.getItem(testKey) === testVal) { + localStorage.removeItem(testKey); + + return localStorage; + } + } + }, + + function() { + // Try HTML5 Session Storage + if (sessionStorage) { + sessionStorage.setItem(testKey, testVal); + + if (sessionStorage.getItem(testKey) === testVal) { + sessionStorage.removeItem(testKey); + + return sessionStorage; + } + } + }, + + function() { + // Try IE userData + if (tinymce.isIE) { + ed.getElement().style.behavior = "url('#default#userData')"; + + // Fake localStorage on old IE + return { + autoExpires : TRUE, + + setItem : function(key, value) { + var userDataElement = ed.getElement(); + + userDataElement.setAttribute(key, value); + userDataElement.expires = self.getExpDate(); + userDataElement.save("TinyMCE"); + }, + + getItem : function(key) { + var userDataElement = ed.getElement(); + + userDataElement.load("TinyMCE"); + + return userDataElement.getAttribute(key); + }, + + removeItem : function(key) { + ed.getElement().removeAttribute(key); + } + }; + } + }, + ], function(setup) { + // Try executing each function to find a suitable storage engine + try { + self.storage = setup(); + + if (self.storage) + return false; + } catch (e) { + // Ignore + } + }); + }, + + /** + * This method will store the current contents in the the storage engine. + * + * @method storeDraft + */ + storeDraft : function() { + var self = this, storage = self.storage, editor = self.editor, expires, content; + + // Is the contents dirty + if (storage) { + // If there is no existing key and the contents hasn't been changed since + // it's original value then there is no point in saving a draft + if (!storage.getItem(self.key) && !editor.isDirty()) + return; + + // Store contents if the contents if longer than the minlength of characters + content = editor.getContent(); + if (content.length > editor.settings.autosave_minlength) { + expires = self.getExpDate(); + + // Store expiration date if needed IE userData has auto expire built in + if (!self.storage.autoExpires) + self.storage.setItem(self.key + "_expires", expires); + + self.storage.setItem(self.key, content); + self.onStoreDraft.dispatch(self, { + expires : expires, + content : content + }); + } + } + }, + + /** + * This method will restore the contents from the storage engine back to the editor. + * + * @method restoreDraft + */ + restoreDraft : function() { + var self = this, storage = self.storage; + + if (storage) { + content = storage.getItem(self.key); + + if (content) { + self.editor.setContent(content); + self.onRestoreDraft.dispatch(self, { + content : content + }); + } + } + }, + + /** + * This method will return true/false if there is a local storage draft available. + * + * @method hasDraft + * @return {boolean} true/false state if there is a local draft. + */ + hasDraft : function() { + var self = this, storage = self.storage, expDate, exists; + + if (storage) { + // Does the item exist at all + exists = !!storage.getItem(self.key); + if (exists) { + // Storage needs autoexpire + if (!self.storage.autoExpires) { + expDate = new Date(storage.getItem(self.key + "_expires")); + + // Contents hasn't expired + if (new Date().getTime() < expDate.getTime()) + return TRUE; + + // Remove it if it has + self.removeDraft(); + } else + return TRUE; + } + } + + return false; + }, + + /** + * Removes the currently stored draft. + * + * @method removeDraft + */ + removeDraft : function() { + var self = this, storage = self.storage, key = self.key, content; + + if (storage) { + // Get current contents and remove the existing draft + content = storage.getItem(key); + storage.removeItem(key); + storage.removeItem(key + "_expires"); + + // Dispatch remove event if we had any contents + if (content) { + self.onRemoveDraft.dispatch(self, { + content : content + }); + } + } + }, + + "static" : { + // Internal unload handler will be called before the page is unloaded + _beforeUnloadHandler : function(e) { + var msg; + + tinymce.each(tinyMCE.editors, function(ed) { + // Store a draft for each editor instance + if (ed.plugins.autosave) + ed.plugins.autosave.storeDraft(); + + // Never ask in fullscreen mode + if (ed.getParam("fullscreen_is_enabled")) + return; + + // Setup a return message if the editor is dirty + if (!msg && ed.isDirty() && ed.getParam("autosave_ask_before_unload")) + msg = ed.getLang("autosave.unload_msg"); + }); + + return msg; + } + } + }); + + tinymce.PluginManager.add('autosave', tinymce.plugins.AutoSave); +})(tinymce); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/autosave/langs/en.js b/webapps/totsys/common/js/tiny_mce/plugins/autosave/langs/en.js new file mode 100644 index 0000000..219f769 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/autosave/langs/en.js @@ -0,0 +1,4 @@ +tinyMCE.addI18n('en.autosave',{ +restore_content: "Restore auto-saved content", +warning_message: "If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/bbcode/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/bbcode/editor_plugin.js new file mode 100644 index 0000000..930fdff --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/bbcode/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a,b){var d=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.onBeforeSetContent.add(function(e,f){f.content=d["_"+c+"_bbcode2html"](f.content)});a.onPostProcess.add(function(e,f){if(f.set){f.content=d["_"+c+"_bbcode2html"](f.content)}if(f.get){f.content=d["_"+c+"_html2bbcode"](f.content)}})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_punbb_html2bbcode:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/(.*?)<\/a>/gi,"[url=$1]$2[/url]");b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/(.*?)<\/span>/gi,"[color=$1]$2[/color]");b(/(.*?)<\/font>/gi,"[color=$1]$2[/color]");b(/(.*?)<\/span>/gi,"[size=$1]$2[/size]");b(/(.*?)<\/font>/gi,"$1");b(//gi,"[img]$1[/img]");b(/(.*?)<\/span>/gi,"[code]$1[/code]");b(/(.*?)<\/span>/gi,"[quote]$1[/quote]");b(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");b(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");b(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");b(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");b(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");b(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");b(/<\/(strong|b)>/gi,"[/b]");b(/<(strong|b)>/gi,"[b]");b(/<\/(em|i)>/gi,"[/i]");b(/<(em|i)>/gi,"[i]");b(/<\/u>/gi,"[/u]");b(/(.*?)<\/span>/gi,"[u]$1[/u]");b(//gi,"[u]");b(/]*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/
    /gi,"\n");b(//gi,"\n");b(/
    /gi,"\n");b(/

    /gi,"");b(/<\/p>/gi,"\n");b(/ /gi," ");b(/"/gi,'"');b(/</gi,"<");b(/>/gi,">");b(/&/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"
    ");b(/\[b\]/gi,"");b(/\[\/b\]/gi,"");b(/\[i\]/gi,"");b(/\[\/i\]/gi,"");b(/\[u\]/gi,"");b(/\[\/u\]/gi,"");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2');b(/\[url\](.*?)\[\/url\]/gi,'$1');b(/\[img\](.*?)\[\/img\]/gi,'');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2');b(/\[code\](.*?)\[\/code\]/gi,'$1 ');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 ');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/bbcode/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/bbcode/editor_plugin_src.js new file mode 100644 index 0000000..3d27c46 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/bbcode/editor_plugin_src.js @@ -0,0 +1,120 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.BBCodePlugin', { + init : function(ed, url) { + var t = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase(); + + ed.onBeforeSetContent.add(function(ed, o) { + o.content = t['_' + dialect + '_bbcode2html'](o.content); + }); + + ed.onPostProcess.add(function(ed, o) { + if (o.set) + o.content = t['_' + dialect + '_bbcode2html'](o.content); + + if (o.get) + o.content = t['_' + dialect + '_html2bbcode'](o.content); + }); + }, + + getInfo : function() { + return { + longname : 'BBCode Plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + // HTML -> BBCode in PunBB dialect + _punbb_html2bbcode : function(s) { + s = tinymce.trim(s); + + function rep(re, str) { + s = s.replace(re, str); + }; + + // example: to [b] + rep(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"); + rep(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); + rep(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); + rep(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); + rep(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); + rep(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"); + rep(/(.*?)<\/font>/gi,"[color=$1]$2[/color]"); + rep(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"); + rep(/(.*?)<\/font>/gi,"$1"); + rep(//gi,"[img]$1[/img]"); + rep(/(.*?)<\/span>/gi,"[code]$1[/code]"); + rep(/(.*?)<\/span>/gi,"[quote]$1[/quote]"); + rep(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"); + rep(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"); + rep(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"); + rep(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"); + rep(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"); + rep(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"); + rep(/<\/(strong|b)>/gi,"[/b]"); + rep(/<(strong|b)>/gi,"[b]"); + rep(/<\/(em|i)>/gi,"[/i]"); + rep(/<(em|i)>/gi,"[i]"); + rep(/<\/u>/gi,"[/u]"); + rep(/(.*?)<\/span>/gi,"[u]$1[/u]"); + rep(//gi,"[u]"); + rep(/]*>/gi,"[quote]"); + rep(/<\/blockquote>/gi,"[/quote]"); + rep(/
    /gi,"\n"); + rep(//gi,"\n"); + rep(/
    /gi,"\n"); + rep(/

    /gi,""); + rep(/<\/p>/gi,"\n"); + rep(/ /gi," "); + rep(/"/gi,"\""); + rep(/</gi,"<"); + rep(/>/gi,">"); + rep(/&/gi,"&"); + + return s; + }, + + // BBCode -> HTML from PunBB dialect + _punbb_bbcode2html : function(s) { + s = tinymce.trim(s); + + function rep(re, str) { + s = s.replace(re, str); + }; + + // example: [b] to + rep(/\n/gi,"
    "); + rep(/\[b\]/gi,""); + rep(/\[\/b\]/gi,""); + rep(/\[i\]/gi,""); + rep(/\[\/i\]/gi,""); + rep(/\[u\]/gi,""); + rep(/\[\/u\]/gi,""); + rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"$2"); + rep(/\[url\](.*?)\[\/url\]/gi,"$1"); + rep(/\[img\](.*?)\[\/img\]/gi,""); + rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"$2"); + rep(/\[code\](.*?)\[\/code\]/gi,"$1 "); + rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"$1 "); + + return s; + } + }); + + // Register plugin + tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/contextmenu/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/contextmenu/editor_plugin.js new file mode 100644 index 0000000..52cf79e --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/contextmenu/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(d){var f=this,g;f.editor=d;f.onContextMenu=new tinymce.util.Dispatcher(this);d.onContextMenu.add(function(h,i){if(!i.ctrlKey){if(g){h.selection.setRng(g)}f._getMenu(h).showMenu(i.clientX,i.clientY);a.add(h.getDoc(),"click",e);a.cancel(i)}});function e(h,i){g=null;if(i&&i.button==2){g=h.selection.getRng();return}if(f._menu){f._menu.removeAll();f._menu.destroy();a.remove(h.getDoc(),"click",e)}}d.onMouseDown.add(e);d.onKeyDown.add(e)},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(h){var l=this,f=l._menu,i=h.selection,e=i.isCollapsed(),d=i.getNode()||h.getBody(),g,k,j;if(f){f.removeAll();f.destroy()}k=b.getPos(h.getContentAreaContainer());j=b.getPos(h.getContainer());f=h.controlManager.createDropMenu("contextmenu",{offset_x:k.x+h.getParam("contextmenu_offset_x",0),offset_y:k.y+h.getParam("contextmenu_offset_y",0),constrain:1});l._menu=f;f.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(e);f.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(e);f.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((d.nodeName=="A"&&!h.dom.getAttrib(d,"name"))||!e){f.addSeparator();f.add({title:"advanced.link_desc",icon:"link",cmd:h.plugins.advlink?"mceAdvLink":"mceLink",ui:true});f.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}f.addSeparator();f.add({title:"advanced.image_desc",icon:"image",cmd:h.plugins.advimage?"mceAdvImage":"mceImage",ui:true});f.addSeparator();g=f.addMenu({title:"contextmenu.align"});g.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});g.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});g.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});g.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});l.onContextMenu.dispatch(l,f,d,e);return f}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js new file mode 100644 index 0000000..e83cb7e --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js @@ -0,0 +1,140 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM; + + /** + * This plugin a context menu to TinyMCE editor instances. + * + * @class tinymce.plugins.ContextMenu + */ + tinymce.create('tinymce.plugins.ContextMenu', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @method init + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed) { + var t = this, lastRng; + + t.editor = ed; + + /** + * This event gets fired when the context menu is shown. + * + * @event onContextMenu + * @param {tinymce.plugins.ContextMenu} sender Plugin instance sending the event. + * @param {tinymce.ui.DropMenu} menu Drop down menu to fill with more items if needed. + */ + t.onContextMenu = new tinymce.util.Dispatcher(this); + + ed.onContextMenu.add(function(ed, e) { + if (!e.ctrlKey) { + // Restore the last selection since it was removed + if (lastRng) + ed.selection.setRng(lastRng); + + t._getMenu(ed).showMenu(e.clientX, e.clientY); + Event.add(ed.getDoc(), 'click', hide); + Event.cancel(e); + } + }); + + function hide(ed, e) { + lastRng = null; + + // Since the contextmenu event moves + // the selection we need to store it away + if (e && e.button == 2) { + lastRng = ed.selection.getRng(); + return; + } + + if (t._menu) { + t._menu.removeAll(); + t._menu.destroy(); + Event.remove(ed.getDoc(), 'click', hide); + } + }; + + ed.onMouseDown.add(hide); + ed.onKeyDown.add(hide); + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @method getInfo + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Contextmenu', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + _getMenu : function(ed) { + var t = this, m = t._menu, se = ed.selection, col = se.isCollapsed(), el = se.getNode() || ed.getBody(), am, p1, p2; + + if (m) { + m.removeAll(); + m.destroy(); + } + + p1 = DOM.getPos(ed.getContentAreaContainer()); + p2 = DOM.getPos(ed.getContainer()); + + m = ed.controlManager.createDropMenu('contextmenu', { + offset_x : p1.x + ed.getParam('contextmenu_offset_x', 0), + offset_y : p1.y + ed.getParam('contextmenu_offset_y', 0), + constrain : 1 + }); + + t._menu = m; + + m.add({title : 'advanced.cut_desc', icon : 'cut', cmd : 'Cut'}).setDisabled(col); + m.add({title : 'advanced.copy_desc', icon : 'copy', cmd : 'Copy'}).setDisabled(col); + m.add({title : 'advanced.paste_desc', icon : 'paste', cmd : 'Paste'}); + + if ((el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) || !col) { + m.addSeparator(); + m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); + m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); + } + + m.addSeparator(); + m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); + + m.addSeparator(); + am = m.addMenu({title : 'contextmenu.align'}); + am.add({title : 'contextmenu.left', icon : 'justifyleft', cmd : 'JustifyLeft'}); + am.add({title : 'contextmenu.center', icon : 'justifycenter', cmd : 'JustifyCenter'}); + am.add({title : 'contextmenu.right', icon : 'justifyright', cmd : 'JustifyRight'}); + am.add({title : 'contextmenu.full', icon : 'justifyfull', cmd : 'JustifyFull'}); + + t.onContextMenu.dispatch(t, m, el, col); + + return m; + } + }); + + // Register plugin + tinymce.PluginManager.add('contextmenu', tinymce.plugins.ContextMenu); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/directionality/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/directionality/editor_plugin.js new file mode 100644 index 0000000..bce8e73 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/directionality/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Directionality",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceDirectionLTR",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="ltr"){a.dom.setAttrib(d,"dir","ltr")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addCommand("mceDirectionRTL",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="rtl"){a.dom.setAttrib(d,"dir","rtl")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});a.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});a.onNodeChange.add(c._nodeChange,c)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/directionality/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/directionality/editor_plugin_src.js new file mode 100644 index 0000000..205d02c --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/directionality/editor_plugin_src.js @@ -0,0 +1,82 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Directionality', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + ed.addCommand('mceDirectionLTR', function() { + var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock); + + if (e) { + if (ed.dom.getAttrib(e, "dir") != "ltr") + ed.dom.setAttrib(e, "dir", "ltr"); + else + ed.dom.setAttrib(e, "dir", ""); + } + + ed.nodeChanged(); + }); + + ed.addCommand('mceDirectionRTL', function() { + var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock); + + if (e) { + if (ed.dom.getAttrib(e, "dir") != "rtl") + ed.dom.setAttrib(e, "dir", "rtl"); + else + ed.dom.setAttrib(e, "dir", ""); + } + + ed.nodeChanged(); + }); + + ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'}); + ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'}); + + ed.onNodeChange.add(t._nodeChange, t); + }, + + getInfo : function() { + return { + longname : 'Directionality', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + _nodeChange : function(ed, cm, n) { + var dom = ed.dom, dir; + + n = dom.getParent(n, dom.isBlock); + if (!n) { + cm.setDisabled('ltr', 1); + cm.setDisabled('rtl', 1); + return; + } + + dir = dom.getAttrib(n, 'dir'); + cm.setActive('ltr', dir == "ltr"); + cm.setDisabled('ltr', 0); + cm.setActive('rtl', dir == "rtl"); + cm.setDisabled('rtl', 0); + } + }); + + // Register plugin + tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/emotions/editor_plugin.js new file mode 100644 index 0000000..dbdd8ff --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/emotions/editor_plugin.js @@ -0,0 +1 @@ +(function(a){a.create("tinymce.plugins.EmotionsPlugin",{init:function(b,c){b.addCommand("mceEmotion",function(){b.windowManager.open({file:c+"/emotions.htm",width:250+parseInt(b.getLang("emotions.delta_width",0)),height:160+parseInt(b.getLang("emotions.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("emotions",{title:"emotions.emotions_desc",cmd:"mceEmotion"})},getInfo:function(){return{longname:"Emotions",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("emotions",a.plugins.EmotionsPlugin)})(tinymce); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/emotions/editor_plugin_src.js new file mode 100644 index 0000000..aeee199 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/emotions/editor_plugin_src.js @@ -0,0 +1,43 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + tinymce.create('tinymce.plugins.EmotionsPlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceEmotion', function() { + ed.windowManager.open({ + file : url + '/emotions.htm', + width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)), + height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'}); + }, + + getInfo : function() { + return { + longname : 'Emotions', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin); +})(tinymce); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/emotions.htm b/webapps/totsys/common/js/tiny_mce/plugins/emotions/emotions.htm new file mode 100644 index 0000000..5927b60 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/emotions/emotions.htm @@ -0,0 +1,40 @@ + + + + {#emotions_dlg.title} + + + + +

    +
    {#emotions_dlg.title}:

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {#emotions_dlg.cool}{#emotions_dlg.cry}{#emotions_dlg.embarassed}{#emotions_dlg.foot_in_mouth}
    {#emotions_dlg.frown}{#emotions_dlg.innocent}{#emotions_dlg.kiss}{#emotions_dlg.laughing}
    {#emotions_dlg.money_mouth}{#emotions_dlg.sealed}{#emotions_dlg.smile}{#emotions_dlg.surprised}
    {#emotions_dlg.tongue-out}{#emotions_dlg.undecided}{#emotions_dlg.wink}{#emotions_dlg.yell}
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-cool.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-cool.gif new file mode 100644 index 0000000..ba90cc3 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-cool.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-cry.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-cry.gif new file mode 100644 index 0000000..74d897a Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-cry.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-embarassed.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-embarassed.gif new file mode 100644 index 0000000..963a96b Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-embarassed.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif new file mode 100644 index 0000000..16f68cc Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-frown.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-frown.gif new file mode 100644 index 0000000..716f55e Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-frown.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-innocent.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-innocent.gif new file mode 100644 index 0000000..334d49e Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-innocent.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-kiss.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-kiss.gif new file mode 100644 index 0000000..4efd549 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-kiss.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-laughing.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-laughing.gif new file mode 100644 index 0000000..1606c11 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-laughing.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif new file mode 100644 index 0000000..ca2451e Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-sealed.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-sealed.gif new file mode 100644 index 0000000..b33d3cc Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-sealed.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-smile.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-smile.gif new file mode 100644 index 0000000..e6a9e60 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-smile.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-surprised.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-surprised.gif new file mode 100644 index 0000000..cb99cdd Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-surprised.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif new file mode 100644 index 0000000..2075dc1 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-undecided.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-undecided.gif new file mode 100644 index 0000000..bef7e25 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-undecided.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-wink.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-wink.gif new file mode 100644 index 0000000..9faf1af Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-wink.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-yell.gif b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-yell.gif new file mode 100644 index 0000000..648e6e8 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/emotions/img/smiley-yell.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/js/emotions.js b/webapps/totsys/common/js/tiny_mce/plugins/emotions/js/emotions.js new file mode 100644 index 0000000..e5c950f --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/emotions/js/emotions.js @@ -0,0 +1,22 @@ +tinyMCEPopup.requireLangPack(); + +var EmotionsDialog = { + init : function(ed) { + tinyMCEPopup.resizeToInnerSize(); + }, + + insert : function(file, title) { + var ed = tinyMCEPopup.editor, dom = ed.dom; + + tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('img', { + src : tinyMCEPopup.getWindowArg('plugin_url') + '/img/' + file, + alt : ed.getLang(title), + title : ed.getLang(title), + border : 0 + })); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/langs/en_dlg.js b/webapps/totsys/common/js/tiny_mce/plugins/emotions/langs/en_dlg.js new file mode 100644 index 0000000..f6d5f4b --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/emotions/langs/en_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('en.emotions_dlg',{ +title:"Insert emotion", +desc:"Emotions", +cool:"Cool", +cry:"Cry", +embarassed:"Embarassed", +foot_in_mouth:"Foot in mouth", +frown:"Frown", +innocent:"Innocent", +kiss:"Kiss", +laughing:"Laughing", +money_mouth:"Money mouth", +sealed:"Sealed", +smile:"Smile", +surprised:"Surprised", +tongue_out:"Tongue out", +undecided:"Undecided", +wink:"Wink", +yell:"Yell" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/emotions/langs/ko_dlg.js b/webapps/totsys/common/js/tiny_mce/plugins/emotions/langs/ko_dlg.js new file mode 100644 index 0000000..e4e2cf9 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/emotions/langs/ko_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('ko.emotions_dlg',{ +title:"\uC774\uBAA8\uD2F0\uCF58 \uC0BD\uC785", +desc:"\uC774\uBAA8\uD2F0\uCF58", +cool:"\uCFE8", +cry:"\uC6B8\uC74C", +embarassed:"\uBD80\uB044\uB7EC\uC6C0", +foot_in_mouth:"\uC2E4\uC5B8", +frown:"\uCC21\uADF8\uB9B0 \uC5BC\uAD74", +innocent:"\uCC9C\uC9C4\uB09C\uB9CC", +kiss:"Kiss", +laughing:"\uC6C3\uC74C", +money_mouth:"\uB3C8", +sealed:"\uBD09\uC778", +smile:"\uC2A4\uB9C8\uC77C", +surprised:"\uB180\uB77C\uC6C0", +tongue_out:"\uBA54\uB871", +undecided:"\uACE0\uBBFC\uD55C\uB2E4", +wink:"\uC719\uD06C", +yell:"\uC678\uCE5C\uB2E4" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/example/dialog.htm b/webapps/totsys/common/js/tiny_mce/plugins/example/dialog.htm new file mode 100644 index 0000000..d6f2856 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/example/dialog.htm @@ -0,0 +1,22 @@ + + + + {#example_dlg.title} + + + + + +
    +

    Here is a example dialog.

    +

    Selected text:

    +

    Custom arg:

    + +
    + + +
    +
    + + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/example/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/example/editor_plugin.js new file mode 100644 index 0000000..ec1f81e --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/example/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.PluginManager.requireLangPack("example");tinymce.create("tinymce.plugins.ExamplePlugin",{init:function(a,b){a.addCommand("mceExample",function(){a.windowManager.open({file:b+"/dialog.htm",width:320+parseInt(a.getLang("example.delta_width",0)),height:120+parseInt(a.getLang("example.delta_height",0)),inline:1},{plugin_url:b,some_custom_arg:"custom arg"})});a.addButton("example",{title:"example.desc",cmd:"mceExample",image:b+"/img/example.gif"});a.onNodeChange.add(function(d,c,e){c.setActive("example",e.nodeName=="IMG")})},createControl:function(b,a){return null},getInfo:function(){return{longname:"Example plugin",author:"Some author",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example",version:"1.0"}}});tinymce.PluginManager.add("example",tinymce.plugins.ExamplePlugin)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/example/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/example/editor_plugin_src.js new file mode 100644 index 0000000..edc1e77 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/example/editor_plugin_src.js @@ -0,0 +1,84 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + // Load plugin specific language pack + tinymce.PluginManager.requireLangPack('example'); + + tinymce.create('tinymce.plugins.ExamplePlugin', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed, url) { + // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample'); + ed.addCommand('mceExample', function() { + ed.windowManager.open({ + file : url + '/dialog.htm', + width : 320 + parseInt(ed.getLang('example.delta_width', 0)), + height : 120 + parseInt(ed.getLang('example.delta_height', 0)), + inline : 1 + }, { + plugin_url : url, // Plugin absolute URL + some_custom_arg : 'custom arg' // Custom argument + }); + }); + + // Register example button + ed.addButton('example', { + title : 'example.desc', + cmd : 'mceExample', + image : url + '/img/example.gif' + }); + + // Add a node change handler, selects the button in the UI when a image is selected + ed.onNodeChange.add(function(ed, cm, n) { + cm.setActive('example', n.nodeName == 'IMG'); + }); + }, + + /** + * Creates control instances based in the incomming name. This method is normally not + * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons + * but you sometimes need to create more complex controls like listboxes, split buttons etc then this + * method can be used to create those. + * + * @param {String} n Name of the control to create. + * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control. + * @return {tinymce.ui.Control} New control instance or null if no control was created. + */ + createControl : function(n, cm) { + return null; + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Example plugin', + author : 'Some author', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example', + version : "1.0" + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/example/img/example.gif b/webapps/totsys/common/js/tiny_mce/plugins/example/img/example.gif new file mode 100644 index 0000000..1ab5da4 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/example/img/example.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/example/js/dialog.js b/webapps/totsys/common/js/tiny_mce/plugins/example/js/dialog.js new file mode 100644 index 0000000..a7ee507 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/example/js/dialog.js @@ -0,0 +1,19 @@ +tinyMCEPopup.requireLangPack(); + +var ExampleDialog = { + init : function() { + var f = document.forms[0]; + + // Get the selected contents as text and place it in the input + f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'}); + f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg'); + }, + + insert : function() { + // Insert the contents from the input into the document + tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value); + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/example/langs/en.js b/webapps/totsys/common/js/tiny_mce/plugins/example/langs/en.js new file mode 100644 index 0000000..f3721d3 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/example/langs/en.js @@ -0,0 +1,3 @@ +tinyMCE.addI18n('en.example',{ + desc : 'This is just a template button' +}); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/example/langs/en_dlg.js b/webapps/totsys/common/js/tiny_mce/plugins/example/langs/en_dlg.js new file mode 100644 index 0000000..a9cd65f --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/example/langs/en_dlg.js @@ -0,0 +1,3 @@ +tinyMCE.addI18n('en.example_dlg',{ + title : 'This is just a example title' +}); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/fullpage/css/fullpage.css b/webapps/totsys/common/js/tiny_mce/plugins/fullpage/css/fullpage.css new file mode 100644 index 0000000..1854eca --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/fullpage/css/fullpage.css @@ -0,0 +1,182 @@ +/* Hide the advanced tab */ +#advanced_tab { + display: none; +} + +#metatitle, #metakeywords, #metadescription, #metaauthor, #metacopyright { + width: 280px; +} + +#doctype, #docencoding { + width: 200px; +} + +#langcode { + width: 30px; +} + +#bgimage { + width: 220px; +} + +#fontface { + width: 240px; +} + +#leftmargin, #rightmargin, #topmargin, #bottommargin { + width: 50px; +} + +.panel_wrapper div.current { + height: 400px; +} + +#stylesheet, #style { + width: 240px; +} + +/* Head list classes */ + +.headlistwrapper { + width: 100%; +} + +.addbutton, .removebutton, .moveupbutton, .movedownbutton { + border-top: 1px solid; + border-left: 1px solid; + border-bottom: 1px solid; + border-right: 1px solid; + border-color: #F0F0EE; + cursor: default; + display: block; + width: 20px; + height: 20px; +} + +#doctypes { + width: 200px; +} + +.addbutton:hover, .removebutton:hover, .moveupbutton:hover, .movedownbutton:hover { + border: 1px solid #0A246A; + background-color: #B6BDD2; +} + +.addbutton { + background-image: url('../images/add.gif'); + float: left; + margin-right: 3px; +} + +.removebutton { + background-image: url('../images/remove.gif'); + float: left; +} + +.moveupbutton { + background-image: url('../images/move_up.gif'); + float: left; + margin-right: 3px; +} + +.movedownbutton { + background-image: url('../images/move_down.gif'); + float: left; +} + +.selected { + border: 1px solid #0A246A; + background-color: #B6BDD2; +} + +.toolbar { + width: 100%; +} + +#headlist { + width: 100%; + margin-top: 3px; + font-size: 11px; +} + +#info, #title_element, #meta_element, #script_element, #style_element, #base_element, #link_element, #comment_element, #unknown_element { + display: none; +} + +#addmenu { + position: absolute; + border: 1px solid gray; + display: none; + z-index: 100; + background-color: white; +} + +#addmenu a { + display: block; + width: 100%; + line-height: 20px; + text-decoration: none; + background-color: white; +} + +#addmenu a:hover { + background-color: #B6BDD2; + color: black; +} + +#addmenu span { + padding-left: 10px; + padding-right: 10px; +} + +#updateElementPanel { + display: none; +} + +#script_element .panel_wrapper div.current { + height: 108px; +} + +#style_element .panel_wrapper div.current { + height: 108px; +} + +#link_element .panel_wrapper div.current { + height: 140px; +} + +#element_script_value { + width: 100%; + height: 100px; +} + +#element_comment_value { + width: 100%; + height: 120px; +} + +#element_style_value { + width: 100%; + height: 100px; +} + +#element_title, #element_script_src, #element_meta_name, #element_meta_content, #element_base_href, #element_link_href, #element_link_title { + width: 250px; +} + +.updateElementButton { + margin-top: 3px; +} + +/* MSIE specific styles */ + +* html .addbutton, * html .removebutton, * html .moveupbutton, * html .movedownbutton { + width: 22px; + height: 22px; +} + +textarea { + height: 55px; +} + +.panel_wrapper div.current {height:420px;} \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/fullpage/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/fullpage/editor_plugin.js new file mode 100644 index 0000000..8e11bfc --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/fullpage/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.FullPagePlugin",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceFullPageProperties",function(){a.windowManager.open({file:b+"/fullpage.htm",width:430+parseInt(a.getLang("fullpage.delta_width",0)),height:495+parseInt(a.getLang("fullpage.delta_height",0)),inline:1},{plugin_url:b,head_html:c.head})});a.addButton("fullpage",{title:"fullpage.desc",cmd:"mceFullPageProperties"});a.onBeforeSetContent.add(c._setContent,c);a.onSetContent.add(c._setBodyAttribs,c);a.onGetContent.add(c._getContent,c)},getInfo:function(){return{longname:"Fullpage",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_setBodyAttribs:function(d,a){var l,c,e,g,b,h,j,f=this.head.match(/body(.*?)>/i);if(f&&f[1]){l=f[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g);if(l){for(c=0,e=l.length;c",a);h.head=f.substring(0,a+1);j=f.indexOf("\n'}h.head+=d.getParam("fullpage_default_doctype",'');h.head+="\n\n\n"+d.getParam("fullpage_default_title","Untitled document")+"\n";if(g=d.getParam("fullpage_default_encoding")){h.head+='\n'}if(g=d.getParam("fullpage_default_font_family")){i+="font-family: "+g+";"}if(g=d.getParam("fullpage_default_font_size")){i+="font-size: "+g+";"}if(g=d.getParam("fullpage_default_text_color")){i+="color: "+g+";"}h.head+="\n\n";h.foot="\n\n"}},_getContent:function(a,c){var b=this;if(!c.source_view||!a.getParam("fullpage_hide_in_source_view")){c.content=tinymce.trim(b.head)+"\n"+tinymce.trim(c.content)+"\n"+tinymce.trim(b.foot)}}});tinymce.PluginManager.add("fullpage",tinymce.plugins.FullPagePlugin)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/fullpage/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/fullpage/editor_plugin_src.js new file mode 100644 index 0000000..fc7f988 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/fullpage/editor_plugin_src.js @@ -0,0 +1,149 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.FullPagePlugin', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceFullPageProperties', function() { + ed.windowManager.open({ + file : url + '/fullpage.htm', + width : 430 + parseInt(ed.getLang('fullpage.delta_width', 0)), + height : 495 + parseInt(ed.getLang('fullpage.delta_height', 0)), + inline : 1 + }, { + plugin_url : url, + head_html : t.head + }); + }); + + // Register buttons + ed.addButton('fullpage', {title : 'fullpage.desc', cmd : 'mceFullPageProperties'}); + + ed.onBeforeSetContent.add(t._setContent, t); + ed.onSetContent.add(t._setBodyAttribs, t); + ed.onGetContent.add(t._getContent, t); + }, + + getInfo : function() { + return { + longname : 'Fullpage', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private plugin internal methods + + _setBodyAttribs : function(ed, o) { + var bdattr, i, len, kv, k, v, t, attr = this.head.match(/body(.*?)>/i); + + if (attr && attr[1]) { + bdattr = attr[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g); + + if (bdattr) { + for(i = 0, len = bdattr.length; i < len; i++) { + kv = bdattr[i].split('='); + k = kv[0].replace(/\s/,''); + v = kv[1]; + + if (v) { + v = v.replace(/^\s+/,'').replace(/\s+$/,''); + t = v.match(/^["'](.*)["']$/); + + if (t) + v = t[1]; + } else + v = k; + + ed.dom.setAttrib(ed.getBody(), 'style', v); + } + } + } + }, + + _createSerializer : function() { + return new tinymce.dom.Serializer({ + dom : this.editor.dom, + apply_source_formatting : true + }); + }, + + _setContent : function(ed, o) { + var t = this, sp, ep, c = o.content, v, st = ''; + + if (o.source_view && ed.getParam('fullpage_hide_in_source_view')) + return; + + // Parse out head, body and footer + c = c.replace(/<(\/?)BODY/gi, '<$1body'); + sp = c.indexOf('', sp); + t.head = c.substring(0, sp + 1); + + ep = c.indexOf('\n'; + + t.head += ed.getParam('fullpage_default_doctype', ''); + t.head += '\n\n\n' + ed.getParam('fullpage_default_title', 'Untitled document') + '\n'; + + if (v = ed.getParam('fullpage_default_encoding')) + t.head += '\n'; + + if (v = ed.getParam('fullpage_default_font_family')) + st += 'font-family: ' + v + ';'; + + if (v = ed.getParam('fullpage_default_font_size')) + st += 'font-size: ' + v + ';'; + + if (v = ed.getParam('fullpage_default_text_color')) + st += 'color: ' + v + ';'; + + t.head += '\n\n'; + t.foot = '\n\n'; + } + }, + + _getContent : function(ed, o) { + var t = this; + + if (!o.source_view || !ed.getParam('fullpage_hide_in_source_view')) + o.content = tinymce.trim(t.head) + '\n' + tinymce.trim(o.content) + '\n' + tinymce.trim(t.foot); + } + }); + + // Register plugin + tinymce.PluginManager.add('fullpage', tinymce.plugins.FullPagePlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/fullpage/fullpage.htm b/webapps/totsys/common/js/tiny_mce/plugins/fullpage/fullpage.htm new file mode 100644 index 0000000..d8e62fb --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/fullpage/fullpage.htm @@ -0,0 +1,571 @@ + + + + {#fullpage_dlg.title} + + + + + + + +
    + + +
    +
    +
    + {#fullpage_dlg.meta_props} + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     
     
     
      + +
    +
    + +
    + {#fullpage_dlg.langprops} + + + + + + + + + + + + + + + + + + + + + + +
    + +
      + +
     
    + +
     
    +
    +
    + +
    +
    + {#fullpage_dlg.appearance_textprops} + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + +
     
    +
    +
    + +
    + {#fullpage_dlg.appearance_bgprops} + + + + + + + + + + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    +
    + +
    + {#fullpage_dlg.appearance_marginprops} + + + + + + + + + + + + + + +
    +
    + +
    + {#fullpage_dlg.appearance_linkprops} + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
     
    +
    + + + + + +
     
    +
      
    +
    + +
    + {#fullpage_dlg.appearance_style} + + + + + + + + + + +
    + + + + +
     
    +
    +
    + +
    + + +
    + {#fullpage_dlg.head_elements} + +
    +
    +
    + + +
    +
    + + +
    +
    +
    + +
    +
    + +
    + {#fullpage_dlg.meta_element} + + + + + + + + + + + + + + +
    + + +
    + +
    + {#fullpage_dlg.title_element} + + + + + + +
    + + +
    + +
    + {#fullpage_dlg.script_element} + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + +
    + + + + +
     
    +
    + +
    + +
    +
    + + +
    + +
    + {#fullpage_dlg.style_element} + + + +
    + +
    +
    + + + + + + + + + +
    +
    + +
    + +
    +
    + + +
    + +
    + {#fullpage_dlg.base_element} + + + + + + + + + + +
    + + +
    + + + +
    + {#fullpage_dlg.comment_element} + + + + +
    +
    +
    + +
    + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/fullpage/js/fullpage.js b/webapps/totsys/common/js/tiny_mce/plugins/fullpage/js/fullpage.js new file mode 100644 index 0000000..7a80fcd --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/fullpage/js/fullpage.js @@ -0,0 +1,471 @@ +/** + * fullpage.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +tinyMCEPopup.requireLangPack(); + +var doc; + +var defaultDocTypes = + 'XHTML 1.0 Transitional=,' + + 'XHTML 1.0 Frameset=,' + + 'XHTML 1.0 Strict=,' + + 'XHTML 1.1=,' + + 'HTML 4.01 Transitional=,' + + 'HTML 4.01 Strict=,' + + 'HTML 4.01 Frameset='; + +var defaultEncodings = + 'Western european (iso-8859-1)=iso-8859-1,' + + 'Central European (iso-8859-2)=iso-8859-2,' + + 'Unicode (UTF-8)=utf-8,' + + 'Chinese traditional (Big5)=big5,' + + 'Cyrillic (iso-8859-5)=iso-8859-5,' + + 'Japanese (iso-2022-jp)=iso-2022-jp,' + + 'Greek (iso-8859-7)=iso-8859-7,' + + 'Korean (iso-2022-kr)=iso-2022-kr,' + + 'ASCII (us-ascii)=us-ascii'; + +var defaultMediaTypes = + 'all=all,' + + 'screen=screen,' + + 'print=print,' + + 'tty=tty,' + + 'tv=tv,' + + 'projection=projection,' + + 'handheld=handheld,' + + 'braille=braille,' + + 'aural=aural'; + +var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings'; +var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px'; + +function init() { + var f = document.forms['fullpage'], el = f.elements, e, i, p, doctypes, encodings, mediaTypes, fonts, ed = tinyMCEPopup.editor, dom = tinyMCEPopup.dom, style; + + // Setup doctype select box + doctypes = ed.getParam("fullpage_doctypes", defaultDocTypes).split(','); + for (i=0; i 1) + addSelectValue(f, 'doctypes', p[0], p[1]); + } + + // Setup fonts select box + fonts = ed.getParam("fullpage_fonts", defaultFontNames).split(';'); + for (i=0; i 1) + addSelectValue(f, 'fontface', p[0], p[1]); + } + + // Setup fontsize select box + fonts = ed.getParam("fullpage_fontsizes", defaultFontSizes).split(','); + for (i=0; i 1) { + addSelectValue(f, 'element_style_media', p[0], p[1]); + addSelectValue(f, 'element_link_media', p[0], p[1]); + } + } + + // Setup encodings select box + encodings = ed.getParam("fullpage_encodings", defaultEncodings).split(','); + for (i=0; i 1) { + addSelectValue(f, 'docencoding', p[0], p[1]); + addSelectValue(f, 'element_script_charset', p[0], p[1]); + addSelectValue(f, 'element_link_charset', p[0], p[1]); + } + } + + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color'); + //document.getElementById('hover_color_pickcontainer').innerHTML = getColorPickerHTML('hover_color_pick','hover_color'); + document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color'); + document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color'); + document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor'); + document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage'); + document.getElementById('link_href_pickcontainer').innerHTML = getBrowserHTML('link_href_browser','element_link_href','file','fullpage'); + document.getElementById('script_src_pickcontainer').innerHTML = getBrowserHTML('script_src_browser','element_script_src','file','fullpage'); + document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage'); + + // Resize some elements + if (isVisible('stylesheetbrowser')) + document.getElementById('stylesheet').style.width = '220px'; + + if (isVisible('link_href_browser')) + document.getElementById('element_link_href').style.width = '230px'; + + if (isVisible('bgimage_browser')) + document.getElementById('bgimage').style.width = '210px'; + + // Add iframe + dom.add(document.body, 'iframe', {id : 'documentIframe', src : 'javascript:""', style : {display : 'none'}}); + doc = dom.get('documentIframe').contentWindow.document; + h = tinyMCEPopup.getWindowArg('head_html'); + + // Preprocess the HTML disable scripts and urls + h = h.replace(/ + + + +
    + +
    + + + + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/iespell/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/iespell/editor_plugin.js new file mode 100644 index 0000000..e9cba10 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/iespell/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.IESpell",{init:function(a,b){var c=this,d;if(!tinymce.isIE){return}c.editor=a;a.addCommand("mceIESpell",function(){try{d=new ActiveXObject("ieSpell.ieSpellExtension");d.CheckDocumentNode(a.getDoc().documentElement)}catch(f){if(f.number==-2146827859){a.windowManager.confirm(a.getLang("iespell.download"),function(e){if(e){window.open("http://www.iespell.com/download.php","ieSpellDownload","")}})}else{a.windowManager.alert("Error Loading ieSpell: Exception "+f.number)}}});a.addButton("iespell",{title:"iespell.iespell_desc",cmd:"mceIESpell"})},getInfo:function(){return{longname:"IESpell (IE Only)",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("iespell",tinymce.plugins.IESpell)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/iespell/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/iespell/editor_plugin_src.js new file mode 100644 index 0000000..61edf1e --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/iespell/editor_plugin_src.js @@ -0,0 +1,54 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.IESpell', { + init : function(ed, url) { + var t = this, sp; + + if (!tinymce.isIE) + return; + + t.editor = ed; + + // Register commands + ed.addCommand('mceIESpell', function() { + try { + sp = new ActiveXObject("ieSpell.ieSpellExtension"); + sp.CheckDocumentNode(ed.getDoc().documentElement); + } catch (e) { + if (e.number == -2146827859) { + ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) { + if (s) + window.open('http://www.iespell.com/download.php', 'ieSpellDownload', ''); + }); + } else + ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number); + } + }); + + // Register buttons + ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'}); + }, + + getInfo : function() { + return { + longname : 'IESpell (IE Only)', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/editor_plugin.js new file mode 100644 index 0000000..07ea477 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/editor_plugin.js @@ -0,0 +1 @@ +(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(r,j){var y=this,i,k="",q=y.editor,g=0,s=0,h,m,n,o,l,v,x;r=r||{};j=j||{};if(!r.inline){return y.parent(r,j)}if(!r.type){y.bookmark=q.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();r.width=parseInt(r.width||320);r.height=parseInt(r.height||240)+(tinymce.isIE?8:0);r.min_width=parseInt(r.min_width||150);r.min_height=parseInt(r.min_height||100);r.max_width=parseInt(r.max_width||2000);r.max_height=parseInt(r.max_height||2000);r.left=r.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(r.width/2)));r.top=r.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(r.height/2)));r.movable=r.resizable=true;j.mce_width=r.width;j.mce_height=r.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=r.auto_focus;y.features=r;y.params=j;y.onOpen.dispatch(y,r,j);if(r.type){k+=" mceModal";if(r.type){k+=" mce"+r.type.substring(0,1).toUpperCase()+r.type.substring(1)}r.resizable=false}if(r.statusbar){k+=" mceStatusbar"}if(r.resizable){k+=" mceResizable"}if(r.minimizable){k+=" mceMinimizable"}if(r.maximizable){k+=" mceMaximizable"}if(r.movable){k+=" mceMovable"}y._addAll(d.doc.body,["div",{id:i,"class":q.settings.inlinepopups_skin||"clearlooks2",style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},r.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!r.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;s+=d.get(i+"_top").clientHeight;s+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:r.top,left:r.left,width:r.width+g,height:r.height+s});x=r.url||r.file;if(x){if(tinymce.relaxedDomain){x+=(x.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}x=tinymce._addVer(x)}if(!r.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:r.width,height:r.height});d.setAttrib(i+"_ifr","src",x)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(r.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",r.content.replace("\n","
    "))}n=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=y.windows[i];y.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return y._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return y._startDrag(i,t,u.className.substring(13))}}}}}});o=a.add(i,"click",function(f){var p=f.target;y.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":y.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":r.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});v=y.windows[i]={id:i,mousedown_func:n,click_func:o,element:new b(i,{blocker:1,container:q.getContainer()}),iframeElement:new b(i+"_ifr"),features:r,deltaWidth:g,deltaHeight:s};v.iframeElement.on("focus",function(){y.focus(i)});if(y.count==0&&y.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(y.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:y.zIndex-1}});d.show("mceModalBlocker")}else{d.setStyle("mceModalBlocker","z-index",y.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}y.focus(i);y._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}y.count++;return v},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;gf){i=m;f=m.zIndex}});if(i){h.focus(i.id)}}},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js new file mode 100644 index 0000000..10ce4d9 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js @@ -0,0 +1,635 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is; + + tinymce.create('tinymce.plugins.InlinePopups', { + init : function(ed, url) { + // Replace window manager + ed.onBeforeRenderUI.add(function() { + ed.windowManager = new tinymce.InlineWindowManager(ed); + DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css"); + }); + }, + + getInfo : function() { + return { + longname : 'InlinePopups', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', { + InlineWindowManager : function(ed) { + var t = this; + + t.parent(ed); + t.zIndex = 300000; + t.count = 0; + t.windows = {}; + }, + + open : function(f, p) { + var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u; + + f = f || {}; + p = p || {}; + + // Run native windows + if (!f.inline) + return t.parent(f, p); + + // Only store selection if the type is a normal window + if (!f.type) + t.bookmark = ed.selection.getBookmark(1); + + id = DOM.uniqueId(); + vp = DOM.getViewPort(); + f.width = parseInt(f.width || 320); + f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0); + f.min_width = parseInt(f.min_width || 150); + f.min_height = parseInt(f.min_height || 100); + f.max_width = parseInt(f.max_width || 2000); + f.max_height = parseInt(f.max_height || 2000); + f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0))); + f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0))); + f.movable = f.resizable = true; + p.mce_width = f.width; + p.mce_height = f.height; + p.mce_inline = true; + p.mce_window_id = id; + p.mce_auto_focus = f.auto_focus; + + // Transpose +// po = DOM.getPos(ed.getContainer()); +// f.left -= po.x; +// f.top -= po.y; + + t.features = f; + t.params = p; + t.onOpen.dispatch(t, f, p); + + if (f.type) { + opt += ' mceModal'; + + if (f.type) + opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1); + + f.resizable = false; + } + + if (f.statusbar) + opt += ' mceStatusbar'; + + if (f.resizable) + opt += ' mceResizable'; + + if (f.minimizable) + opt += ' mceMinimizable'; + + if (f.maximizable) + opt += ' mceMaximizable'; + + if (f.movable) + opt += ' mceMovable'; + + // Create DOM objects + t._addAll(DOM.doc.body, + ['div', {id : id, 'class' : ed.settings.inlinepopups_skin || 'clearlooks2', style : 'width:100px;height:100px'}, + ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt}, + ['div', {id : id + '_top', 'class' : 'mceTop'}, + ['div', {'class' : 'mceLeft'}], + ['div', {'class' : 'mceCenter'}], + ['div', {'class' : 'mceRight'}], + ['span', {id : id + '_title'}, f.title || ''] + ], + + ['div', {id : id + '_middle', 'class' : 'mceMiddle'}, + ['div', {id : id + '_left', 'class' : 'mceLeft'}], + ['span', {id : id + '_content'}], + ['div', {id : id + '_right', 'class' : 'mceRight'}] + ], + + ['div', {id : id + '_bottom', 'class' : 'mceBottom'}, + ['div', {'class' : 'mceLeft'}], + ['div', {'class' : 'mceCenter'}], + ['div', {'class' : 'mceRight'}], + ['span', {id : id + '_status'}, 'Content'] + ], + + ['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}], + ['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}] + ] + ] + ); + + DOM.setStyles(id, {top : -10000, left : -10000}); + + // Fix gecko rendering bug, where the editors iframe messed with window contents + if (tinymce.isGecko) + DOM.setStyle(id, 'overflow', 'auto'); + + // Measure borders + if (!f.type) { + dw += DOM.get(id + '_left').clientWidth; + dw += DOM.get(id + '_right').clientWidth; + dh += DOM.get(id + '_top').clientHeight; + dh += DOM.get(id + '_bottom').clientHeight; + } + + // Resize window + DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh}); + + u = f.url || f.file; + if (u) { + if (tinymce.relaxedDomain) + u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain; + + u = tinymce._addVer(u); + } + + if (!f.type) { + DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'}); + DOM.setStyles(id + '_ifr', {width : f.width, height : f.height}); + DOM.setAttrib(id + '_ifr', 'src', u); + } else { + DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok'); + + if (f.type == 'confirm') + DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel'); + + DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'}); + DOM.setHTML(id + '_content', f.content.replace('\n', '
    ')); + } + + // Register events + mdf = Event.add(id, 'mousedown', function(e) { + var n = e.target, w, vp; + + w = t.windows[id]; + t.focus(id); + + if (n.nodeName == 'A' || n.nodeName == 'a') { + if (n.className == 'mceMax') { + w.oldPos = w.element.getXY(); + w.oldSize = w.element.getSize(); + + vp = DOM.getViewPort(); + + // Reduce viewport size to avoid scrollbars + vp.w -= 2; + vp.h -= 2; + + w.element.moveTo(vp.x, vp.y); + w.element.resizeTo(vp.w, vp.h); + DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight}); + DOM.addClass(id + '_wrapper', 'mceMaximized'); + } else if (n.className == 'mceMed') { + // Reset to old size + w.element.moveTo(w.oldPos.x, w.oldPos.y); + w.element.resizeTo(w.oldSize.w, w.oldSize.h); + w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight); + + DOM.removeClass(id + '_wrapper', 'mceMaximized'); + } else if (n.className == 'mceMove') + return t._startDrag(id, e, n.className); + else if (DOM.hasClass(n, 'mceResize')) + return t._startDrag(id, e, n.className.substring(13)); + } + }); + + clf = Event.add(id, 'click', function(e) { + var n = e.target; + + t.focus(id); + + if (n.nodeName == 'A' || n.nodeName == 'a') { + switch (n.className) { + case 'mceClose': + t.close(null, id); + return Event.cancel(e); + + case 'mceButton mceOk': + case 'mceButton mceCancel': + f.button_func(n.className == 'mceButton mceOk'); + return Event.cancel(e); + } + } + }); + + // Add window + w = t.windows[id] = { + id : id, + mousedown_func : mdf, + click_func : clf, + element : new Element(id, {blocker : 1, container : ed.getContainer()}), + iframeElement : new Element(id + '_ifr'), + features : f, + deltaWidth : dw, + deltaHeight : dh + }; + + w.iframeElement.on('focus', function() { + t.focus(id); + }); + + // Setup blocker + if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') { + DOM.add(DOM.doc.body, 'div', { + id : 'mceModalBlocker', + 'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker', + style : {zIndex : t.zIndex - 1} + }); + + DOM.show('mceModalBlocker'); // Reduces flicker in IE + } else + DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1); + + if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel)) + DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2}); + + t.focus(id); + t._fixIELayout(id, 1); + + // Focus ok button + if (DOM.get(id + '_ok')) + DOM.get(id + '_ok').focus(); + + t.count++; + + return w; + }, + + focus : function(id) { + var t = this, w; + + if (w = t.windows[id]) { + w.zIndex = this.zIndex++; + w.element.setStyle('zIndex', w.zIndex); + w.element.update(); + + id = id + '_wrapper'; + DOM.removeClass(t.lastId, 'mceFocus'); + DOM.addClass(id, 'mceFocus'); + t.lastId = id; + } + }, + + _addAll : function(te, ne) { + var i, n, t = this, dom = tinymce.DOM; + + if (is(ne, 'string')) + te.appendChild(dom.doc.createTextNode(ne)); + else if (ne.length) { + te = te.appendChild(dom.create(ne[0], ne[1])); + + for (i=2; i ix) { + fw = w; + ix = w.zIndex; + } + }); + + if (fw) + t.focus(fw.id); + } + }, + + setTitle : function(w, ti) { + var e; + + w = this._findId(w); + + if (e = DOM.get(w + '_title')) + e.innerHTML = DOM.encode(ti); + }, + + alert : function(txt, cb, s) { + var t = this, w; + + w = t.open({ + title : t, + type : 'alert', + button_func : function(s) { + if (cb) + cb.call(s || t, s); + + t.close(null, w.id); + }, + content : DOM.encode(t.editor.getLang(txt, txt)), + inline : 1, + width : 400, + height : 130 + }); + }, + + confirm : function(txt, cb, s) { + var t = this, w; + + w = t.open({ + title : t, + type : 'confirm', + button_func : function(s) { + if (cb) + cb.call(s || t, s); + + t.close(null, w.id); + }, + content : DOM.encode(t.editor.getLang(txt, txt)), + inline : 1, + width : 400, + height : 130 + }); + }, + + // Internal functions + + _findId : function(w) { + var t = this; + + if (typeof(w) == 'string') + return w; + + each(t.windows, function(wo) { + var ifr = DOM.get(wo.id + '_ifr'); + + if (ifr && w == ifr.contentWindow) { + w = wo.id; + return false; + } + }); + + return w; + }, + + _fixIELayout : function(id, s) { + var w, img; + + if (!tinymce.isIE6) + return; + + // Fixes the bug where hover flickers and does odd things in IE6 + each(['n','s','w','e','nw','ne','sw','se'], function(v) { + var e = DOM.get(id + '_resize_' + v); + + DOM.setStyles(e, { + width : s ? e.clientWidth : '', + height : s ? e.clientHeight : '', + cursor : DOM.getStyle(e, 'cursor', 1) + }); + + DOM.setStyle(id + "_bottom", 'bottom', '-1px'); + + e = 0; + }); + + // Fixes graphics glitch + if (w = this.windows[id]) { + // Fixes rendering bug after resize + w.element.hide(); + w.element.show(); + + // Forced a repaint of the window + //DOM.get(id).style.filter = ''; + + // IE has a bug where images used in CSS won't get loaded + // sometimes when the cache in the browser is disabled + // This fix tries to solve it by loading the images using the image object + each(DOM.select('div,a', id), function(e, i) { + if (e.currentStyle.backgroundImage != 'none') { + img = new Image(); + img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1'); + } + }); + + DOM.get(id).style.filter = ''; + } + } + }); + + // Register plugin + tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups); +})(); + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif new file mode 100644 index 0000000..94abd08 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif new file mode 100644 index 0000000..e671094 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif new file mode 100644 index 0000000..6baf64a Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif new file mode 100644 index 0000000..497307a Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif new file mode 100644 index 0000000..c894b2e Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif new file mode 100644 index 0000000..c2a2ad4 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif new file mode 100644 index 0000000..43a735f Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css new file mode 100644 index 0000000..5e6fd7d --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css @@ -0,0 +1,90 @@ +/* Clearlooks 2 */ + +/* Reset */ +.clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block} + +/* General */ +.clearlooks2 {position:absolute; direction:ltr} +.clearlooks2 .mceWrapper {position:static} +.mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%} +.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)} +.clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none} + +/* Top */ +.clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px} +.clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)} +.clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)} +.clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0} +.clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold} +.clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0} +.clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px} +.clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0} +.clearlooks2 .mceFocus .mceTop span {color:#FFF} + +/* Middle */ +.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0} +.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)} +.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0} +.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF} +.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)} + +/* Bottom */ +.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px} +.clearlooks2 .mceBottom {left:0; bottom:0; width:100%} +.clearlooks2 .mceBottom div {top:0} +.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px} +.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px} +.clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0} +.clearlooks2 .mceBottom span {display:none} +.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px} +.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0} +.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px} +.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0} +.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px} + +/* Actions */ +.clearlooks2 a {width:29px; height:16px; top:3px;} +.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0} +.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0} +.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0} +.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0} +.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px} +.clearlooks2 .mceMovable .mceMove {display:block} +.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px} +.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px} +.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px} +.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px} +.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} +.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} +.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px} +.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px} +.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px} + +/* Resize */ +.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px} +.clearlooks2 .mceResizable .mceResize {display:block} +.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none} +.clearlooks2 .mceMinimizable .mceMin {display:block} +.clearlooks2 .mceMaximizable .mceMax {display:block} +.clearlooks2 .mceMaximized .mceMed {display:block} +.clearlooks2 .mceMaximized .mceMax {display:none} +.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize} +.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize} +.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize} +.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;} +.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize} +.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize} +.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize} +.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize} + +/* Alert/Confirm */ +.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0} +.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px} +.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal} +.clearlooks2 a:hover {font-weight:bold;} +.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5} +.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px} +.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)} +.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px} +.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto} +.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)} \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/template.htm b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/template.htm new file mode 100644 index 0000000..c98fe41 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/inlinepopups/template.htm @@ -0,0 +1,387 @@ + + + +Template for dialogs + + + + +
    +
    +
    +
    +
    +
    +
    + Blured +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Focused +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Statusbar +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Statusbar, Resizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Resizable, Maximizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Blurred, Maximizable, Statusbar, Resizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Maximized, Maximizable, Minimizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Blured +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Alert +
    + +
    +
    + + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + +
    +
    +
    + +
    +
    +
    +
    +
    + + + Ok + +
    +
    + +
    +
    +
    +
    +
    +
    + Confirm +
    + +
    +
    + + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + +
    +
    +
    + +
    +
    +
    +
    +
    + + + Ok + Cancel + +
    +
    +
    + + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/insertdatetime/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/insertdatetime/editor_plugin.js new file mode 100644 index 0000000..938ce6b --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/insertdatetime/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.InsertDateTime",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertDate",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_dateFormat",a.getLang("insertdatetime.date_fmt")));a.execCommand("mceInsertContent",false,d)});a.addCommand("mceInsertTime",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_timeFormat",a.getLang("insertdatetime.time_fmt")));a.execCommand("mceInsertContent",false,d)});a.addButton("insertdate",{title:"insertdatetime.insertdate_desc",cmd:"mceInsertDate"});a.addButton("inserttime",{title:"insertdatetime.inserttime_desc",cmd:"mceInsertTime"})},getInfo:function(){return{longname:"Insert date/time",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getDateTime:function(e,a){var c=this.editor;function b(g,d){g=""+g;if(g.length-1){a[c].style.zIndex=g[j];a[j].style.zIndex=g[c]}else{if(g[c]>0){a[c].style.zIndex=g[c]-1}}}else{for(f=0;fg[c]){j=f;break}}if(j>-1){a[c].style.zIndex=g[j];a[j].style.zIndex=g[c]}else{a[c].style.zIndex=g[c]+1}}b.execCommand("mceRepaint")},_getParentLayer:function(a){return this.editor.dom.getParent(a,function(b){return b.nodeType==1&&/^(absolute|relative|static)$/i.test(b.style.position)})},_insertLayer:function(){var a=this.editor,b=a.dom.getPos(a.dom.getParent(a.selection.getNode(),"*"));a.dom.add(a.getBody(),"div",{style:{position:"absolute",left:b.x,top:(b.y>20?b.y:20),width:100,height:100},"class":"mceItemVisualAid"},a.selection.getContent()||a.getLang("layer.content"))},_toggleAbsolute:function(){var a=this.editor,b=this._getParentLayer(a.selection.getNode());if(!b){b=a.dom.getParent(a.selection.getNode(),"DIV,P,IMG")}if(b){if(b.style.position.toLowerCase()=="absolute"){a.dom.setStyles(b,{position:"",left:"",top:"",width:"",height:""});a.dom.removeClass(b,"mceItemVisualAid")}else{if(b.style.left==""){b.style.left=20+"px"}if(b.style.top==""){b.style.top=20+"px"}if(b.style.width==""){b.style.width=b.width?(b.width+"px"):"100px"}if(b.style.height==""){b.style.height=b.height?(b.height+"px"):"100px"}b.style.position="absolute";a.addVisual(a.getBody())}a.execCommand("mceRepaint");a.nodeChanged()}}});tinymce.PluginManager.add("layer",tinymce.plugins.Layer)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/layer/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/layer/editor_plugin_src.js new file mode 100644 index 0000000..701de1a --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/layer/editor_plugin_src.js @@ -0,0 +1,212 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Layer', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceInsertLayer', t._insertLayer, t); + + ed.addCommand('mceMoveForward', function() { + t._move(1); + }); + + ed.addCommand('mceMoveBackward', function() { + t._move(-1); + }); + + ed.addCommand('mceMakeAbsolute', function() { + t._toggleAbsolute(); + }); + + // Register buttons + ed.addButton('moveforward', {title : 'layer.forward_desc', cmd : 'mceMoveForward'}); + ed.addButton('movebackward', {title : 'layer.backward_desc', cmd : 'mceMoveBackward'}); + ed.addButton('absolute', {title : 'layer.absolute_desc', cmd : 'mceMakeAbsolute'}); + ed.addButton('insertlayer', {title : 'layer.insertlayer_desc', cmd : 'mceInsertLayer'}); + + ed.onInit.add(function() { + if (tinymce.isIE) + ed.getDoc().execCommand('2D-Position', false, true); + }); + + ed.onNodeChange.add(t._nodeChange, t); + ed.onVisualAid.add(t._visualAid, t); + }, + + getInfo : function() { + return { + longname : 'Layer', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + _nodeChange : function(ed, cm, n) { + var le, p; + + le = this._getParentLayer(n); + p = ed.dom.getParent(n, 'DIV,P,IMG'); + + if (!p) { + cm.setDisabled('absolute', 1); + cm.setDisabled('moveforward', 1); + cm.setDisabled('movebackward', 1); + } else { + cm.setDisabled('absolute', 0); + cm.setDisabled('moveforward', !le); + cm.setDisabled('movebackward', !le); + cm.setActive('absolute', le && le.style.position.toLowerCase() == "absolute"); + } + }, + + // Private methods + + _visualAid : function(ed, e, s) { + var dom = ed.dom; + + tinymce.each(dom.select('div,p', e), function(e) { + if (/^(absolute|relative|static)$/i.test(e.style.position)) { + if (s) + dom.addClass(e, 'mceItemVisualAid'); + else + dom.removeClass(e, 'mceItemVisualAid'); + } + }); + }, + + _move : function(d) { + var ed = this.editor, i, z = [], le = this._getParentLayer(ed.selection.getNode()), ci = -1, fi = -1, nl; + + nl = []; + tinymce.walk(ed.getBody(), function(n) { + if (n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position)) + nl.push(n); + }, 'childNodes'); + + // Find z-indexes + for (i=0; i -1) { + nl[ci].style.zIndex = z[fi]; + nl[fi].style.zIndex = z[ci]; + } else { + if (z[ci] > 0) + nl[ci].style.zIndex = z[ci] - 1; + } + } else { + // Move forward + + // Try find a higher one + for (i=0; i z[ci]) { + fi = i; + break; + } + } + + if (fi > -1) { + nl[ci].style.zIndex = z[fi]; + nl[fi].style.zIndex = z[ci]; + } else + nl[ci].style.zIndex = z[ci] + 1; + } + + ed.execCommand('mceRepaint'); + }, + + _getParentLayer : function(n) { + return this.editor.dom.getParent(n, function(n) { + return n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position); + }); + }, + + _insertLayer : function() { + var ed = this.editor, p = ed.dom.getPos(ed.dom.getParent(ed.selection.getNode(), '*')); + + ed.dom.add(ed.getBody(), 'div', { + style : { + position : 'absolute', + left : p.x, + top : (p.y > 20 ? p.y : 20), + width : 100, + height : 100 + }, + 'class' : 'mceItemVisualAid' + }, ed.selection.getContent() || ed.getLang('layer.content')); + }, + + _toggleAbsolute : function() { + var ed = this.editor, le = this._getParentLayer(ed.selection.getNode()); + + if (!le) + le = ed.dom.getParent(ed.selection.getNode(), 'DIV,P,IMG'); + + if (le) { + if (le.style.position.toLowerCase() == "absolute") { + ed.dom.setStyles(le, { + position : '', + left : '', + top : '', + width : '', + height : '' + }); + + ed.dom.removeClass(le, 'mceItemVisualAid'); + } else { + if (le.style.left == "") + le.style.left = 20 + 'px'; + + if (le.style.top == "") + le.style.top = 20 + 'px'; + + if (le.style.width == "") + le.style.width = le.width ? (le.width + 'px') : '100px'; + + if (le.style.height == "") + le.style.height = le.height ? (le.height + 'px') : '100px'; + + le.style.position = "absolute"; + ed.addVisual(ed.getBody()); + } + + ed.execCommand('mceRepaint'); + ed.nodeChanged(); + } + } + }); + + // Register plugin + tinymce.PluginManager.add('layer', tinymce.plugins.Layer); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/legacyoutput/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/legacyoutput/editor_plugin.js new file mode 100644 index 0000000..29d43c5 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/legacyoutput/editor_plugin.js @@ -0,0 +1 @@ +(function(a){a.onAddEditor.addToTop(function(c,b){b.settings.inline_styles=false});a.create("tinymce.plugins.LegacyOutput",{init:function(b){b.onInit.add(function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",e=a.explode(b.settings.font_size_style_values),d=b.serializer;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignfull:{selector:c,attributes:{align:"full"}},bold:{inline:"b"},italic:{inline:"i"},underline:{inline:"u"},strikethrough:{inline:"strike"},fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(f){return a.inArray(e,f.value)+1}}},forecolor:{inline:"font",styles:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}});d._setup();a.each("b,i,u,strike".split(","),function(f){var g=d.rules[f];if(!g){d.addRules(f)}});if(!d.rules.font){d.addRules("font[face|size|color|style]")}a.each(c.split(","),function(f){var h=d.rules[f],g;if(h){a.each(h.attribs,function(j,i){if(i.name=="align"){g=true;return false}});if(!g){h.attribs.push({name:"align"})}}});b.onNodeChange.add(function(g,k){var j,f,h,i;f=g.dom.getParent(g.selection.getNode(),"font");if(f){h=f.face;i=f.size}if(j=k.get("fontselect")){j.select(function(l){return l==h})}if(j=k.get("fontsizeselect")){j.select(function(m){var l=a.inArray(e,m.fontSize);return l+1==i})}})})},getInfo:function(){return{longname:"LegacyOutput",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("legacyoutput",a.plugins.LegacyOutput)})(tinymce); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/legacyoutput/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/legacyoutput/editor_plugin_src.js new file mode 100644 index 0000000..3bbdb7b --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/legacyoutput/editor_plugin_src.js @@ -0,0 +1,136 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + * + * This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u elements, align + * attributes and so forth. There are a few cases where these old items might be needed for example in email applications or with Flash + * + * However you should NOT use this plugin if you are building some system that produces web contents such as a CMS. All these elements are + * not apart of the newer specifications for HTML and XHTML. + */ + +(function(tinymce) { + // Override inline_styles setting to force TinyMCE to produce deprecated contents + tinymce.onAddEditor.addToTop(function(tinymce, editor) { + editor.settings.inline_styles = false; + }); + + // Create the legacy ouput plugin + tinymce.create('tinymce.plugins.LegacyOutput', { + init : function(editor) { + editor.onInit.add(function() { + var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', + fontSizes = tinymce.explode(editor.settings.font_size_style_values), + serializer = editor.serializer; + + // Override some internal formats to produce legacy elements and attributes + editor.formatter.register({ + // Change alignment formats to use the deprecated align attribute + alignleft : {selector : alignElements, attributes : {align : 'left'}}, + aligncenter : {selector : alignElements, attributes : {align : 'center'}}, + alignright : {selector : alignElements, attributes : {align : 'right'}}, + alignfull : {selector : alignElements, attributes : {align : 'full'}}, + + // Change the basic formatting elements to use deprecated element types + bold : {inline : 'b'}, + italic : {inline : 'i'}, + underline : {inline : 'u'}, + strikethrough : {inline : 'strike'}, + + // Change font size and font family to use the deprecated font element + fontname : {inline : 'font', attributes : {face : '%value'}}, + fontsize : { + inline : 'font', + attributes : { + size : function(vars) { + return tinymce.inArray(fontSizes, vars.value) + 1; + } + } + }, + + // Setup font elements for colors as well + forecolor : {inline : 'font', styles : {color : '%value'}}, + hilitecolor : {inline : 'font', styles : {backgroundColor : '%value'}} + }); + + // Force parsing of the serializer rules + serializer._setup(); + + // Check that deprecated elements are allowed if not add them + tinymce.each('b,i,u,strike'.split(','), function(name) { + var rule = serializer.rules[name]; + + if (!rule) + serializer.addRules(name); + }); + + // Add font element if it's missing + if (!serializer.rules["font"]) + serializer.addRules("font[face|size|color|style]"); + + // Add the missing and depreacted align attribute for the serialization engine + tinymce.each(alignElements.split(','), function(name) { + var rule = serializer.rules[name], found; + + if (rule) { + tinymce.each(rule.attribs, function(name, attr) { + if (attr.name == 'align') { + found = true; + return false; + } + }); + + if (!found) + rule.attribs.push({name : 'align'}); + } + }); + + // Listen for the onNodeChange event so that we can do special logic for the font size and font name drop boxes + editor.onNodeChange.add(function(editor, control_manager) { + var control, fontElm, fontName, fontSize; + + // Find font element get it's name and size + fontElm = editor.dom.getParent(editor.selection.getNode(), 'font'); + if (fontElm) { + fontName = fontElm.face; + fontSize = fontElm.size; + } + + // Select/unselect the font name in droplist + if (control = control_manager.get('fontselect')) { + control.select(function(value) { + return value == fontName; + }); + } + + // Select/unselect the font size in droplist + if (control = control_manager.get('fontsizeselect')) { + control.select(function(value) { + var index = tinymce.inArray(fontSizes, value.fontSize); + + return index + 1 == fontSize; + }); + } + }); + }); + }, + + getInfo : function() { + return { + longname : 'LegacyOutput', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('legacyoutput', tinymce.plugins.LegacyOutput); +})(tinymce); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/media/css/content.css b/webapps/totsys/common/js/tiny_mce/plugins/media/css/content.css new file mode 100644 index 0000000..7739381 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/media/css/content.css @@ -0,0 +1,6 @@ +.mceItemFlash, .mceItemShockWave, .mceItemQuickTime, .mceItemWindowsMedia, .mceItemRealMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc;} +.mceItemShockWave {background-image: url(../img/shockwave.gif);} +.mceItemFlash {background-image:url(../img/flash.gif);} +.mceItemQuickTime {background-image:url(../img/quicktime.gif);} +.mceItemWindowsMedia {background-image:url(../img/windowsmedia.gif);} +.mceItemRealMedia {background-image:url(../img/realmedia.gif);} diff --git a/webapps/totsys/common/js/tiny_mce/plugins/media/css/media.css b/webapps/totsys/common/js/tiny_mce/plugins/media/css/media.css new file mode 100644 index 0000000..7b2253b --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/media/css/media.css @@ -0,0 +1,16 @@ +#id, #name, #hspace, #vspace, #class_name, #align { width: 100px } +#hspace, #vspace { width: 50px } +#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px } +#flash_base, #flash_flashvars { width: 240px } +#width, #height { width: 40px } +#src, #media_type { width: 250px } +#class { width: 120px } +#prev { margin: 0; border: 1px solid black; width: 380px; height: 230px; overflow: auto } +.panel_wrapper div.current { height: 390px; overflow: auto } +#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none } +.mceAddSelectValue { background-color: #DDDDDD } +#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px } +#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px } +#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px } +#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px } +#qt_qtsrc { width: 200px } diff --git a/webapps/totsys/common/js/tiny_mce/plugins/media/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/media/editor_plugin.js new file mode 100644 index 0000000..4bbe367 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/media/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.MediaPlugin",{init:function(b,c){var e=this;e.editor=b;e.url=c;function f(g){return/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(g.className)}b.onPreInit.add(function(){b.serializer.addRules("param[name|value|_mce_value]")});b.addCommand("mceMedia",function(){b.windowManager.open({file:c+"/media.htm",width:430+parseInt(b.getLang("media.delta_width",0)),height:470+parseInt(b.getLang("media.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("media",{title:"media.desc",cmd:"mceMedia"});b.onNodeChange.add(function(h,g,i){g.setActive("media",i.nodeName=="IMG"&&f(i))});b.onInit.add(function(){var g={mceItemFlash:"flash",mceItemShockWave:"shockwave",mceItemWindowsMedia:"windowsmedia",mceItemQuickTime:"quicktime",mceItemRealMedia:"realmedia"};b.selection.onSetContent.add(function(){e._spansToImgs(b.getBody())});b.selection.onBeforeSetContent.add(e._objectsToSpans,e);if(b.settings.content_css!==false){b.dom.loadCSS(c+"/css/content.css")}if(b.theme&&b.theme.onResolveName){b.theme.onResolveName.add(function(h,i){if(i.name=="img"){a(g,function(l,j){if(b.dom.hasClass(i.node,j)){i.name=l;i.title=b.dom.getAttrib(i.node,"title");return false}})}})}if(b&&b.plugins.contextmenu){b.plugins.contextmenu.onContextMenu.add(function(i,h,j){if(j.nodeName=="IMG"&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(j.className)){h.add({title:"media.edit",icon:"media",cmd:"mceMedia"})}})}});b.onBeforeSetContent.add(e._objectsToSpans,e);b.onSetContent.add(function(){e._spansToImgs(b.getBody())});b.onPreProcess.add(function(g,i){var h=g.dom;if(i.set){e._spansToImgs(i.node);a(h.select("IMG",i.node),function(k){var j;if(f(k)){j=e._parse(k.title);h.setAttrib(k,"width",h.getAttrib(k,"width",j.width||100));h.setAttrib(k,"height",h.getAttrib(k,"height",j.height||100))}})}if(i.get){a(h.select("IMG",i.node),function(m){var l,j,k;if(g.getParam("media_use_script")){if(f(m)){m.className=m.className.replace(/mceItem/g,"mceTemp")}return}switch(m.className){case"mceItemFlash":l="d27cdb6e-ae6d-11cf-96b8-444553540000";j="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0";k="application/x-shockwave-flash";break;case"mceItemShockWave":l="166b1bca-3f9c-11cf-8075-444553540000";j="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0";k="application/x-director";break;case"mceItemWindowsMedia":l=g.getParam("media_wmp6_compatible")?"05589fa1-c356-11ce-bf01-00aa0055595a":"6bf52a52-394a-11d3-b153-00c04f79faa6";j="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701";k="application/x-mplayer2";break;case"mceItemQuickTime":l="02bf25d5-8c17-4b23-bc80-d3488abddc6b";j="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0";k="video/quicktime";break;case"mceItemRealMedia":l="cfcdaa03-8be4-11cf-b84b-0020afbbccfa";j="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0";k="audio/x-pn-realaudio-plugin";break}if(l){h.replace(e._buildObj({classid:l,codebase:j,type:k},m),m)}})}});b.onPostProcess.add(function(g,h){h.content=h.content.replace(/_mce_value=/g,"value=")});function d(g,h){h=new RegExp(h+'="([^"]+)"',"g").exec(g);return h?b.dom.decode(h[1]):""}b.onPostProcess.add(function(g,h){if(g.getParam("media_use_script")){h.content=h.content.replace(/]+>/g,function(j){var i=d(j,"class");if(/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(i)){at=e._parse(d(j,"title"));at.width=d(j,"width");at.height=d(j,"height");j=''; + } + + return im; + }); + } + }); + }, + + getInfo : function() { + return { + longname : 'Media', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + _objectsToSpans : function(ed, o) { + var t = this, h = o.content; + + h = h.replace(/]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi, function(a, b, c) { + var o = t._parse(c); + + return '' + }); + + h = h.replace(/]*)>/gi, ''); + h = h.replace(/]*)\/?>/gi, ''); + h = h.replace(/]*)>/gi, ''); + h = h.replace(/<\/(object)([^>]*)>/gi, ''); + h = h.replace(/<\/embed>/gi, ''); + h = h.replace(/]*)>/gi, function(a, b) {return ''}); + h = h.replace(/\/ class=\"mceItemParam\"><\/span>/gi, 'class="mceItemParam">'); + + o.content = h; + }, + + _buildObj : function(o, n) { + var ob, ed = this.editor, dom = ed.dom, p = this._parse(n.title), stc; + + stc = ed.getParam('media_strict', true) && o.type == 'application/x-shockwave-flash'; + + p.width = o.width = dom.getAttrib(n, 'width') || 100; + p.height = o.height = dom.getAttrib(n, 'height') || 100; + + if (p.src) + p.src = ed.convertURL(p.src, 'src', n); + + if (stc) { + ob = dom.create('span', { + id : p.id, + _mce_name : 'object', + type : 'application/x-shockwave-flash', + data : p.src, + style : dom.getAttrib(n, 'style'), + width : o.width, + height : o.height + }); + } else { + ob = dom.create('span', { + id : p.id, + _mce_name : 'object', + classid : "clsid:" + o.classid, + style : dom.getAttrib(n, 'style'), + codebase : o.codebase, + width : o.width, + height : o.height + }); + } + + each (p, function(v, k) { + if (!/^(width|height|codebase|classid|id|_cx|_cy)$/.test(k)) { + // Use url instead of src in IE for Windows media + if (o.type == 'application/x-mplayer2' && k == 'src' && !p.url) + k = 'url'; + + if (v) + dom.add(ob, 'span', {_mce_name : 'param', name : k, '_mce_value' : v}); + } + }); + + if (!stc) + dom.add(ob, 'span', tinymce.extend({_mce_name : 'embed', type : o.type, style : dom.getAttrib(n, 'style')}, p)); + + return ob; + }, + + _spansToImgs : function(p) { + var t = this, dom = t.editor.dom, im, ci; + + each(dom.select('span', p), function(n) { + // Convert object into image + if (dom.getAttrib(n, 'class') == 'mceItemObject') { + ci = dom.getAttrib(n, "classid").toLowerCase().replace(/\s+/g, ''); + + switch (ci) { + case 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000': + dom.replace(t._createImg('mceItemFlash', n), n); + break; + + case 'clsid:166b1bca-3f9c-11cf-8075-444553540000': + dom.replace(t._createImg('mceItemShockWave', n), n); + break; + + case 'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6': + case 'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95': + case 'clsid:05589fa1-c356-11ce-bf01-00aa0055595a': + dom.replace(t._createImg('mceItemWindowsMedia', n), n); + break; + + case 'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b': + dom.replace(t._createImg('mceItemQuickTime', n), n); + break; + + case 'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa': + dom.replace(t._createImg('mceItemRealMedia', n), n); + break; + + default: + dom.replace(t._createImg('mceItemFlash', n), n); + } + + return; + } + + // Convert embed into image + if (dom.getAttrib(n, 'class') == 'mceItemEmbed') { + switch (dom.getAttrib(n, 'type')) { + case 'application/x-shockwave-flash': + dom.replace(t._createImg('mceItemFlash', n), n); + break; + + case 'application/x-director': + dom.replace(t._createImg('mceItemShockWave', n), n); + break; + + case 'application/x-mplayer2': + dom.replace(t._createImg('mceItemWindowsMedia', n), n); + break; + + case 'video/quicktime': + dom.replace(t._createImg('mceItemQuickTime', n), n); + break; + + case 'audio/x-pn-realaudio-plugin': + dom.replace(t._createImg('mceItemRealMedia', n), n); + break; + + default: + dom.replace(t._createImg('mceItemFlash', n), n); + } + } + }); + }, + + _createImg : function(cl, n) { + var im, dom = this.editor.dom, pa = {}, ti = '', args; + + args = ['id', 'name', 'width', 'height', 'bgcolor', 'align', 'flashvars', 'src', 'wmode', 'allowfullscreen', 'quality', 'data']; + + // Create image + im = dom.create('img', { + src : this.url + '/img/trans.gif', + width : dom.getAttrib(n, 'width') || 100, + height : dom.getAttrib(n, 'height') || 100, + style : dom.getAttrib(n, 'style'), + 'class' : cl + }); + + // Setup base parameters + each(args, function(na) { + var v = dom.getAttrib(n, na); + + if (v) + pa[na] = v; + }); + + // Add optional parameters + each(dom.select('span', n), function(n) { + if (dom.hasClass(n, 'mceItemParam')) + pa[dom.getAttrib(n, 'name')] = dom.getAttrib(n, '_mce_value'); + }); + + // Use src not movie + if (pa.movie) { + pa.src = pa.movie; + delete pa.movie; + } + + // No src try data + if (!pa.src) { + pa.src = pa.data; + delete pa.data; + } + + // Merge with embed args + n = dom.select('.mceItemEmbed', n)[0]; + if (n) { + each(args, function(na) { + var v = dom.getAttrib(n, na); + + if (v && !pa[na]) + pa[na] = v; + }); + } + + delete pa.width; + delete pa.height; + + im.title = this._serialize(pa); + + return im; + }, + + _parse : function(s) { + return tinymce.util.JSON.parse('{' + s + '}'); + }, + + _serialize : function(o) { + return tinymce.util.JSON.serialize(o).replace(/[{}]/g, ''); + } + }); + + // Register plugin + tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/media/img/flash.gif b/webapps/totsys/common/js/tiny_mce/plugins/media/img/flash.gif new file mode 100644 index 0000000..cb192e6 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/media/img/flash.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/media/img/flv_player.swf b/webapps/totsys/common/js/tiny_mce/plugins/media/img/flv_player.swf new file mode 100644 index 0000000..70739fd Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/media/img/flv_player.swf differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/media/img/quicktime.gif b/webapps/totsys/common/js/tiny_mce/plugins/media/img/quicktime.gif new file mode 100644 index 0000000..3b04991 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/media/img/quicktime.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/media/img/realmedia.gif b/webapps/totsys/common/js/tiny_mce/plugins/media/img/realmedia.gif new file mode 100644 index 0000000..fdfe0b9 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/media/img/realmedia.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/media/img/shockwave.gif b/webapps/totsys/common/js/tiny_mce/plugins/media/img/shockwave.gif new file mode 100644 index 0000000..5f235df Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/media/img/shockwave.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/media/img/trans.gif b/webapps/totsys/common/js/tiny_mce/plugins/media/img/trans.gif new file mode 100644 index 0000000..3884865 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/media/img/trans.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/media/img/windowsmedia.gif b/webapps/totsys/common/js/tiny_mce/plugins/media/img/windowsmedia.gif new file mode 100644 index 0000000..ab50f2d Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/media/img/windowsmedia.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/media/js/embed.js b/webapps/totsys/common/js/tiny_mce/plugins/media/js/embed.js new file mode 100644 index 0000000..6fe25de --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/media/js/embed.js @@ -0,0 +1,73 @@ +/** + * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. + */ + +function writeFlash(p) { + writeEmbed( + 'D27CDB6E-AE6D-11cf-96B8-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'application/x-shockwave-flash', + p + ); +} + +function writeShockWave(p) { + writeEmbed( + '166B1BCA-3F9C-11CF-8075-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', + 'application/x-director', + p + ); +} + +function writeQuickTime(p) { + writeEmbed( + '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', + 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', + 'video/quicktime', + p + ); +} + +function writeRealMedia(p) { + writeEmbed( + 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'audio/x-pn-realaudio-plugin', + p + ); +} + +function writeWindowsMedia(p) { + p.url = p.src; + writeEmbed( + '6BF52A52-394A-11D3-B153-00C04F79FAA6', + 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', + 'application/x-mplayer2', + p + ); +} + +function writeEmbed(cls, cb, mt, p) { + var h = '', n; + + h += ''; + + h += ''); + +function init() { + var pl = "", f, val; + var type = "flash", fe, i; + + ed = tinyMCEPopup.editor; + + tinyMCEPopup.resizeToInnerSize(); + f = document.forms[0] + + fe = ed.selection.getNode(); + if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) { + pl = fe.title; + + switch (ed.dom.getAttrib(fe, 'class')) { + case 'mceItemFlash': + type = 'flash'; + break; + + case 'mceItemFlashVideo': + type = 'flv'; + break; + + case 'mceItemShockWave': + type = 'shockwave'; + break; + + case 'mceItemWindowsMedia': + type = 'wmp'; + break; + + case 'mceItemQuickTime': + type = 'qt'; + break; + + case 'mceItemRealMedia': + type = 'rmp'; + break; + } + + document.forms[0].insert.value = ed.getLang('update', 'Insert', true); + } + + document.getElementById('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media'); + document.getElementById('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','qt_qtsrc','media','media'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + + var html = getMediaListHTML('medialist','src','media','media'); + if (html == "") + document.getElementById("linklistrow").style.display = 'none'; + else + document.getElementById("linklistcontainer").innerHTML = html; + + // Resize some elements + if (isVisible('filebrowser')) + document.getElementById('src').style.width = '230px'; + + // Setup form + if (pl != "") { + pl = tinyMCEPopup.editor.plugins.media._parse(pl); + + switch (type) { + case "flash": + setBool(pl, 'flash', 'play'); + setBool(pl, 'flash', 'loop'); + setBool(pl, 'flash', 'menu'); + setBool(pl, 'flash', 'swliveconnect'); + setStr(pl, 'flash', 'quality'); + setStr(pl, 'flash', 'scale'); + setStr(pl, 'flash', 'salign'); + setStr(pl, 'flash', 'wmode'); + setStr(pl, 'flash', 'base'); + setStr(pl, 'flash', 'flashvars'); + break; + + case "qt": + setBool(pl, 'qt', 'loop'); + setBool(pl, 'qt', 'autoplay'); + setBool(pl, 'qt', 'cache'); + setBool(pl, 'qt', 'controller'); + setBool(pl, 'qt', 'correction'); + setBool(pl, 'qt', 'enablejavascript'); + setBool(pl, 'qt', 'kioskmode'); + setBool(pl, 'qt', 'autohref'); + setBool(pl, 'qt', 'playeveryframe'); + setBool(pl, 'qt', 'tarsetcache'); + setStr(pl, 'qt', 'scale'); + setStr(pl, 'qt', 'starttime'); + setStr(pl, 'qt', 'endtime'); + setStr(pl, 'qt', 'tarset'); + setStr(pl, 'qt', 'qtsrcchokespeed'); + setStr(pl, 'qt', 'volume'); + setStr(pl, 'qt', 'qtsrc'); + break; + + case "shockwave": + setBool(pl, 'shockwave', 'sound'); + setBool(pl, 'shockwave', 'progress'); + setBool(pl, 'shockwave', 'autostart'); + setBool(pl, 'shockwave', 'swliveconnect'); + setStr(pl, 'shockwave', 'swvolume'); + setStr(pl, 'shockwave', 'swstretchstyle'); + setStr(pl, 'shockwave', 'swstretchhalign'); + setStr(pl, 'shockwave', 'swstretchvalign'); + break; + + case "wmp": + setBool(pl, 'wmp', 'autostart'); + setBool(pl, 'wmp', 'enabled'); + setBool(pl, 'wmp', 'enablecontextmenu'); + setBool(pl, 'wmp', 'fullscreen'); + setBool(pl, 'wmp', 'invokeurls'); + setBool(pl, 'wmp', 'mute'); + setBool(pl, 'wmp', 'stretchtofit'); + setBool(pl, 'wmp', 'windowlessvideo'); + setStr(pl, 'wmp', 'balance'); + setStr(pl, 'wmp', 'baseurl'); + setStr(pl, 'wmp', 'captioningid'); + setStr(pl, 'wmp', 'currentmarker'); + setStr(pl, 'wmp', 'currentposition'); + setStr(pl, 'wmp', 'defaultframe'); + setStr(pl, 'wmp', 'playcount'); + setStr(pl, 'wmp', 'rate'); + setStr(pl, 'wmp', 'uimode'); + setStr(pl, 'wmp', 'volume'); + break; + + case "rmp": + setBool(pl, 'rmp', 'autostart'); + setBool(pl, 'rmp', 'loop'); + setBool(pl, 'rmp', 'autogotourl'); + setBool(pl, 'rmp', 'center'); + setBool(pl, 'rmp', 'imagestatus'); + setBool(pl, 'rmp', 'maintainaspect'); + setBool(pl, 'rmp', 'nojava'); + setBool(pl, 'rmp', 'prefetch'); + setBool(pl, 'rmp', 'shuffle'); + setStr(pl, 'rmp', 'console'); + setStr(pl, 'rmp', 'controls'); + setStr(pl, 'rmp', 'numloop'); + setStr(pl, 'rmp', 'scriptcallbacks'); + break; + } + + setStr(pl, null, 'src'); + setStr(pl, null, 'id'); + setStr(pl, null, 'name'); + setStr(pl, null, 'vspace'); + setStr(pl, null, 'hspace'); + setStr(pl, null, 'bgcolor'); + setStr(pl, null, 'align'); + setStr(pl, null, 'width'); + setStr(pl, null, 'height'); + + if ((val = ed.dom.getAttrib(fe, "width")) != "") + pl.width = f.width.value = val; + + if ((val = ed.dom.getAttrib(fe, "height")) != "") + pl.height = f.height.value = val; + + oldWidth = pl.width ? parseInt(pl.width) : 0; + oldHeight = pl.height ? parseInt(pl.height) : 0; + } else + oldWidth = oldHeight = 0; + + selectByValue(f, 'media_type', type); + changedType(type); + updateColor('bgcolor_pick', 'bgcolor'); + + TinyMCE_EditableSelects.init(); + generatePreview(); +} + +function insertMedia() { + var fe, f = document.forms[0], h; + + tinyMCEPopup.restoreSelection(); + + if (!AutoValidator.validate(f)) { + tinyMCEPopup.alert(ed.getLang('invalid_data')); + return false; + } + + f.width.value = f.width.value == "" ? 100 : f.width.value; + f.height.value = f.height.value == "" ? 100 : f.height.value; + + fe = ed.selection.getNode(); + if (fe != null && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) { + switch (f.media_type.options[f.media_type.selectedIndex].value) { + case "flash": + fe.className = "mceItemFlash"; + break; + + case "flv": + fe.className = "mceItemFlashVideo"; + break; + + case "shockwave": + fe.className = "mceItemShockWave"; + break; + + case "qt": + fe.className = "mceItemQuickTime"; + break; + + case "wmp": + fe.className = "mceItemWindowsMedia"; + break; + + case "rmp": + fe.className = "mceItemRealMedia"; + break; + } + + if (fe.width != f.width.value || fe.height != f.height.value) + ed.execCommand('mceRepaint'); + + fe.title = serializeParameters(); + fe.width = f.width.value; + fe.height = f.height.value; + fe.style.width = f.width.value + (f.width.value.indexOf('%') == -1 ? 'px' : ''); + fe.style.height = f.height.value + (f.height.value.indexOf('%') == -1 ? 'px' : ''); + fe.align = f.align.options[f.align.selectedIndex].value; + } else { + h = ' 0) { + var html = ""; + + html += ''; + + return html; + } + + return ""; +} + +function getType(v) { + var fo, i, c, el, x, f = document.forms[0]; + + fo = ed.getParam("media_types", "flash=swf;flv=flv;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';'); + + // YouTube + if (v.match(/watch\?v=(.+)(.*)/)) { + f.width.value = '425'; + f.height.value = '350'; + f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1]; + return 'flash'; + } + + // Google video + if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) { + f.width.value = '425'; + f.height.value = '326'; + f.src.value = 'http://video.google.com/googleplayer.swf?docId=' + v.substring('http://video.google.com/videoplay?docid='.length) + '&hl=en'; + return 'flash'; + } + + for (i=0; i 0 ? s.substring(0, s.length - 1) : s; + + return s; +} + +function setBool(pl, p, n) { + if (typeof(pl[n]) == "undefined") + return; + + document.forms[0].elements[p + "_" + n].checked = pl[n] != 'false'; +} + +function setStr(pl, p, n) { + var f = document.forms[0], e = f.elements[(p != null ? p + "_" : '') + n]; + + if (typeof(pl[n]) == "undefined") + return; + + if (e.type == "text") + e.value = pl[n]; + else + selectByValue(f, (p != null ? p + "_" : '') + n, pl[n]); +} + +function getBool(p, n, d, tv, fv) { + var v = document.forms[0].elements[p + "_" + n].checked; + + tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'"; + fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'"; + + return (v == d) ? '' : n + (v ? ':' + tv + ',' : ":\'" + fv + "\',"); +} + +function getStr(p, n, d) { + var e = document.forms[0].elements[(p != null ? p + "_" : "") + n]; + var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value; + + if (n == 'src') + v = tinyMCEPopup.editor.convertURL(v, 'src', null); + + return ((n == d || v == '') ? '' : n + ":'" + jsEncode(v) + "',"); +} + +function getInt(p, n, d) { + var e = document.forms[0].elements[(p != null ? p + "_" : "") + n]; + var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value; + + return ((n == d || v == '') ? '' : n + ":" + v.replace(/[^0-9]+/g, '') + ","); +} + +function jsEncode(s) { + s = s.replace(new RegExp('\\\\', 'g'), '\\\\'); + s = s.replace(new RegExp('"', 'g'), '\\"'); + s = s.replace(new RegExp("'", 'g'), "\\'"); + + return s; +} + +function generatePreview(c) { + var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh; + + p.innerHTML = ''; + + nw = parseInt(f.width.value); + nh = parseInt(f.height.value); + + if (f.width.value != "" && f.height.value != "") { + if (f.constrain.checked) { + if (c == 'width' && oldWidth != 0) { + wp = nw / oldWidth; + nh = Math.round(wp * nh); + f.height.value = nh; + } else if (c == 'height' && oldHeight != 0) { + hp = nh / oldHeight; + nw = Math.round(hp * nw); + f.width.value = nw; + } + } + } + + if (f.width.value != "") + oldWidth = nw; + + if (f.height.value != "") + oldHeight = nh; + + // After constrain + pl = serializeParameters(); + + switch (f.media_type.options[f.media_type.selectedIndex].value) { + case "flash": + cls = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'; + codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'; + type = 'application/x-shockwave-flash'; + break; + + case "shockwave": + cls = 'clsid:166B1BCA-3F9C-11CF-8075-444553540000'; + codebase = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0'; + type = 'application/x-director'; + break; + + case "qt": + cls = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B'; + codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'; + type = 'video/quicktime'; + break; + + case "wmp": + cls = ed.getParam('media_wmp6_compatible') ? 'clsid:05589FA1-C356-11CE-BF01-00AA0055595A' : 'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6'; + codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; + type = 'application/x-mplayer2'; + break; + + case "rmp": + cls = 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'; + codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; + type = 'audio/x-pn-realaudio-plugin'; + break; + } + + if (pl == '') { + p.innerHTML = ''; + return; + } + + pl = tinyMCEPopup.editor.plugins.media._parse(pl); + + if (!pl.src) { + p.innerHTML = ''; + return; + } + + pl.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(pl.src); + pl.width = !pl.width ? 100 : pl.width; + pl.height = !pl.height ? 100 : pl.height; + pl.id = !pl.id ? 'obj' : pl.id; + pl.name = !pl.name ? 'eobj' : pl.name; + pl.align = !pl.align ? '' : pl.align; + + // Avoid annoying warning about insecure items + if (!tinymce.isIE || document.location.protocol != 'https:') { + h += ''; + + for (n in pl) { + h += ''; + + // Add extra url parameter if it's an absolute URL + if (n == 'src' && pl[n].indexOf('://') != -1) + h += ''; + } + } + + h += ' + + + {#media_dlg.title} + + + + + + + + + +
    + + +
    +
    +
    + {#media_dlg.general} + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
     
    +
    + + + + + + +
    x   
    +
    +
    + +
    + {#media_dlg.preview} + +
    +
    + +
    +
    + {#media_dlg.advanced} + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + +
     
    +
    +
    + +
    + {#media_dlg.flash_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + + + + + + + +
    +
    + +
    + {#media_dlg.flv_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + {#media_dlg.qt_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +  
    + + + + + +
     
    +
    +
    + +
    + {#media_dlg.wmp_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + {#media_dlg.rmp_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +   +
    +
    + +
    + {#media_dlg.shockwave_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    +
    +
    + +
    + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/nonbreaking/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/nonbreaking/editor_plugin.js new file mode 100644 index 0000000..f2dbbff --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/nonbreaking/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?'·':" ")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(tinymce.isIE&&f.keyCode==9){d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");tinymce.dom.Event.cancel(f)}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js new file mode 100644 index 0000000..a9e68af --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js @@ -0,0 +1,53 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Nonbreaking', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceNonBreaking', function() { + ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '·' : ' '); + }); + + // Register buttons + ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'}); + + if (ed.getParam('nonbreaking_force_tab')) { + ed.onKeyDown.add(function(ed, e) { + if (tinymce.isIE && e.keyCode == 9) { + ed.execCommand('mceNonBreaking'); + ed.execCommand('mceNonBreaking'); + ed.execCommand('mceNonBreaking'); + tinymce.dom.Event.cancel(e); + } + }); + } + }, + + getInfo : function() { + return { + longname : 'Nonbreaking space', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + + // Private methods + }); + + // Register plugin + tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/noneditable/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/noneditable/editor_plugin.js new file mode 100644 index 0000000..9945cd8 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/noneditable/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.dom.Event;tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(d,e){var f=this,c,b;f.editor=d;c=d.getParam("noneditable_editable_class","mceEditable");b=d.getParam("noneditable_noneditable_class","mceNonEditable");d.onNodeChange.addToTop(function(h,g,k){var j,i;j=h.dom.getParent(h.selection.getStart(),function(l){return h.dom.hasClass(l,b)});i=h.dom.getParent(h.selection.getEnd(),function(l){return h.dom.hasClass(l,b)});if(j||i){f._setDisabled(1);return false}else{f._setDisabled(0)}})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_block:function(c,d){var b=d.keyCode;if((b>32&&b<41)||(b>111&&b<124)){return}return a.cancel(d)},_setDisabled:function(d){var c=this,b=c.editor;tinymce.each(b.controlManager.controls,function(e){e.setDisabled(d)});if(d!==c.disabled){if(d){b.onKeyDown.addToTop(c._block);b.onKeyPress.addToTop(c._block);b.onKeyUp.addToTop(c._block);b.onPaste.addToTop(c._block)}else{b.onKeyDown.remove(c._block);b.onKeyPress.remove(c._block);b.onKeyUp.remove(c._block);b.onPaste.remove(c._block)}c.disabled=d}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/noneditable/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/noneditable/editor_plugin_src.js new file mode 100644 index 0000000..54a7b36 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/noneditable/editor_plugin_src.js @@ -0,0 +1,90 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var Event = tinymce.dom.Event; + + tinymce.create('tinymce.plugins.NonEditablePlugin', { + init : function(ed, url) { + var t = this, editClass, nonEditClass; + + t.editor = ed; + editClass = ed.getParam("noneditable_editable_class", "mceEditable"); + nonEditClass = ed.getParam("noneditable_noneditable_class", "mceNonEditable"); + + ed.onNodeChange.addToTop(function(ed, cm, n) { + var sc, ec; + + // Block if start or end is inside a non editable element + sc = ed.dom.getParent(ed.selection.getStart(), function(n) { + return ed.dom.hasClass(n, nonEditClass); + }); + + ec = ed.dom.getParent(ed.selection.getEnd(), function(n) { + return ed.dom.hasClass(n, nonEditClass); + }); + + // Block or unblock + if (sc || ec) { + t._setDisabled(1); + return false; + } else + t._setDisabled(0); + }); + }, + + getInfo : function() { + return { + longname : 'Non editable elements', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + _block : function(ed, e) { + var k = e.keyCode; + + // Don't block arrow keys, pg up/down, and F1-F12 + if ((k > 32 && k < 41) || (k > 111 && k < 124)) + return; + + return Event.cancel(e); + }, + + _setDisabled : function(s) { + var t = this, ed = t.editor; + + tinymce.each(ed.controlManager.controls, function(c) { + c.setDisabled(s); + }); + + if (s !== t.disabled) { + if (s) { + ed.onKeyDown.addToTop(t._block); + ed.onKeyPress.addToTop(t._block); + ed.onKeyUp.addToTop(t._block); + ed.onPaste.addToTop(t._block); + } else { + ed.onKeyDown.remove(t._block); + ed.onKeyPress.remove(t._block); + ed.onKeyUp.remove(t._block); + ed.onPaste.remove(t._block); + } + + t.disabled = s; + } + } + }); + + // Register plugin + tinymce.PluginManager.add('noneditable', tinymce.plugins.NonEditablePlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/pagebreak/css/content.css b/webapps/totsys/common/js/tiny_mce/plugins/pagebreak/css/content.css new file mode 100644 index 0000000..c949d58 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/pagebreak/css/content.css @@ -0,0 +1 @@ +.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../img/pagebreak.gif) no-repeat center top;} diff --git a/webapps/totsys/common/js/tiny_mce/plugins/pagebreak/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/pagebreak/editor_plugin.js new file mode 100644 index 0000000..a212f69 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/pagebreak/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='',a="mcePageBreak",c=b.getParam("pagebreak_separator",""),e;e=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(g){return"\\"+g}),"g");b.addCommand("mcePageBreak",function(){b.execCommand("mceInsertContent",0,f)});b.addButton("pagebreak",{title:"pagebreak.desc",cmd:a});b.onInit.add(function(){if(b.settings.content_css!==false){b.dom.loadCSS(d+"/css/content.css")}if(b.theme.onResolveName){b.theme.onResolveName.add(function(g,h){if(h.node.nodeName=="IMG"&&b.dom.hasClass(h.node,a)){h.name="pagebreak"}})}});b.onClick.add(function(g,h){h=h.target;if(h.nodeName==="IMG"&&g.dom.hasClass(h,a)){g.selection.select(h)}});b.onNodeChange.add(function(h,g,i){g.setActive("pagebreak",i.nodeName==="IMG"&&h.dom.hasClass(i,a))});b.onBeforeSetContent.add(function(g,h){h.content=h.content.replace(e,f)});b.onPostProcess.add(function(g,h){if(h.get){h.content=h.content.replace(/]+>/g,function(i){if(i.indexOf('class="mcePageBreak')!==-1){i=c}return i})}})},getInfo:function(){return{longname:"PageBreak",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("pagebreak",tinymce.plugins.PageBreakPlugin)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/pagebreak/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/pagebreak/editor_plugin_src.js new file mode 100644 index 0000000..905a743 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/pagebreak/editor_plugin_src.js @@ -0,0 +1,77 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.PageBreakPlugin', { + init : function(ed, url) { + var pb = '', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', ''), pbRE; + + pbRE = new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(a) {return '\\' + a;}), 'g'); + + // Register commands + ed.addCommand('mcePageBreak', function() { + ed.execCommand('mceInsertContent', 0, pb); + }); + + // Register buttons + ed.addButton('pagebreak', {title : 'pagebreak.desc', cmd : cls}); + + ed.onInit.add(function() { + if (ed.settings.content_css !== false) + ed.dom.loadCSS(url + "/css/content.css"); + + if (ed.theme.onResolveName) { + ed.theme.onResolveName.add(function(th, o) { + if (o.node.nodeName == 'IMG' && ed.dom.hasClass(o.node, cls)) + o.name = 'pagebreak'; + }); + } + }); + + ed.onClick.add(function(ed, e) { + e = e.target; + + if (e.nodeName === 'IMG' && ed.dom.hasClass(e, cls)) + ed.selection.select(e); + }); + + ed.onNodeChange.add(function(ed, cm, n) { + cm.setActive('pagebreak', n.nodeName === 'IMG' && ed.dom.hasClass(n, cls)); + }); + + ed.onBeforeSetContent.add(function(ed, o) { + o.content = o.content.replace(pbRE, pb); + }); + + ed.onPostProcess.add(function(ed, o) { + if (o.get) + o.content = o.content.replace(/]+>/g, function(im) { + if (im.indexOf('class="mcePageBreak') !== -1) + im = sep; + + return im; + }); + }); + }, + + getInfo : function() { + return { + longname : 'PageBreak', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('pagebreak', tinymce.plugins.PageBreakPlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/pagebreak/img/pagebreak.gif b/webapps/totsys/common/js/tiny_mce/plugins/pagebreak/img/pagebreak.gif new file mode 100644 index 0000000..acdf408 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/pagebreak/img/pagebreak.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/pagebreak/img/trans.gif b/webapps/totsys/common/js/tiny_mce/plugins/pagebreak/img/trans.gif new file mode 100644 index 0000000..3884865 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/pagebreak/img/trans.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/paste/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/paste/editor_plugin.js new file mode 100644 index 0000000..b4a77c3 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/paste/editor_plugin.js @@ -0,0 +1 @@ +(function(){var c=tinymce.each,d=null,a={paste_auto_cleanup_on_paste:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_text_use_dialog:false,paste_text_sticky:false,paste_text_notifyalways:false,paste_text_linebreaktype:"p",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(e,f){return e.getParam(f,a[f])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(e,f){var g=this;g.editor=e;g.url=f;g.onPreProcess=new tinymce.util.Dispatcher(g);g.onPostProcess=new tinymce.util.Dispatcher(g);g.onPreProcess.add(g._preProcess);g.onPostProcess.add(g._postProcess);g.onPreProcess.add(function(j,k){e.execCallback("paste_preprocess",j,k)});g.onPostProcess.add(function(j,k){e.execCallback("paste_postprocess",j,k)});e.pasteAsPlainText=false;function i(l,j){var k=e.dom;g.onPreProcess.dispatch(g,l);l.node=k.create("div",0,l.content);g.onPostProcess.dispatch(g,l);l.content=e.serializer.serialize(l.node,{getInner:1});if((!j)&&(e.pasteAsPlainText)){g._insertPlainText(e,k,l.content);if(!b(e,"paste_text_sticky")){e.pasteAsPlainText=false;e.controlManager.setActive("pastetext",false)}}else{if(/<(p|h[1-6]|ul|ol)/.test(l.content)){g._insertBlockContent(e,k,l.content)}else{g._insert(l.content)}}}e.addCommand("mceInsertClipboardContent",function(j,k){i(k,true)});if(!b(e,"paste_text_use_dialog")){e.addCommand("mcePasteText",function(k,j){var l=tinymce.util.Cookie;e.pasteAsPlainText=!e.pasteAsPlainText;e.controlManager.setActive("pastetext",e.pasteAsPlainText);if((e.pasteAsPlainText)&&(!l.get("tinymcePasteText"))){if(b(e,"paste_text_sticky")){e.windowManager.alert(e.translate("paste.plaintext_mode_sticky"))}else{e.windowManager.alert(e.translate("paste.plaintext_mode_sticky"))}if(!b(e,"paste_text_notifyalways")){l.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}e.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});e.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function h(s){var m,q,k,l=e.selection,p=e.dom,r=e.getBody(),j;if(p.get("_mcePaste")){return}m=p.add(r,"div",{id:"_mcePaste","class":"mcePaste"},"\uFEFF");if(r!=e.getDoc().body){j=p.getPos(e.selection.getStart(),r).y}else{j=r.scrollTop}p.setStyles(m,{position:"absolute",left:-10000,top:j,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){k=p.doc.body.createTextRange();k.moveToElementText(m);k.execCommand("Paste");p.remove(m);if(m.innerHTML==="\uFEFF"){e.execCommand("mcePasteWord");s.preventDefault();return}i({content:m.innerHTML});return tinymce.dom.Event.cancel(s)}else{function o(n){n.preventDefault()}p.bind(e.getDoc(),"mousedown",o);p.bind(e.getDoc(),"keydown",o);q=e.selection.getRng();m=m.firstChild;k=e.getDoc().createRange();k.setStart(m,0);k.setEnd(m,1);l.setRng(k);window.setTimeout(function(){var t="",n=p.select("div.mcePaste");c(n,function(u){c(p.select("div.mcePaste",u),function(v){p.remove(v,1)});t+=(p.select("> span.Apple-style-span div",u)[0]||p.select("> span.Apple-style-span",u)[0]||u).innerHTML});c(n,function(u){p.remove(u)});if(q){l.setRng(q)}i({content:t});p.unbind(e.getDoc(),"mousedown",o);p.unbind(e.getDoc(),"keydown",o)},0)}}if(b(e,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){e.onKeyDown.add(function(j,k){if(((tinymce.isMac?k.metaKey:k.ctrlKey)&&k.keyCode==86)||(k.shiftKey&&k.keyCode==45)){h(k)}})}else{e.onPaste.addToTop(function(j,k){return h(k)})}}if(b(e,"paste_block_drop")){e.onInit.add(function(){e.dom.bind(e.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(j){j.preventDefault();j.stopPropagation();return false})})}g._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(i,f){var l=this.editor,k=f.content,q=tinymce.grep,p=tinymce.explode,g=tinymce.trim,m,j;function e(h){c(h,function(o){if(o.constructor==RegExp){k=k.replace(o,"")}else{k=k.replace(o[0],o[1])}})}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(k)||f.wordContent){f.wordContent=true;e([/^\s*( )+/gi,/( |]*>)+\s*$/gi]);if(b(l,"paste_convert_headers_to_strong")){k=k.replace(/

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"

    $1

    ")}if(b(l,"paste_convert_middot_lists")){e([[//gi,"$&__MCE_ITEM__"],[/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"]])}e([//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{m=k.length;k=k.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(m!=k.length);if(b(l,"paste_retain_style_properties").replace(/^none$/i,"").length==0){k=k.replace(/<\/?span[^>]*>/gi,"")}else{e([[/([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(u,h,t){var v=[],o=0,r=p(g(t).replace(/"/gi,"'"),";");c(r,function(s){var w,y,z=p(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":v[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":v[o++]="text-align:"+y;return;case"vert-align":v[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":v[o++]="color:"+y;return;case"mso-background":case"mso-highlight":v[o++]="background:"+y;return;case"mso-default-height":v[o++]="min-height:"+x(y);return;case"mso-default-width":v[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":v[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){v[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){v[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}v[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+v.join(";")+'"'}else{return h}}]])}}if(b(l,"paste_convert_headers_to_strong")){e([[/]*>/gi,"

    "],[/<\/h[1-6][^>]*>/gi,"

    "]])}j=b(l,"paste_strip_class_attributes");if(j!=="none"){function n(r,o){if(j==="all"){return""}var h=q(p(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(s){return(/^(?!mso)/i.test(s))});return h.length?' class="'+h.join(" ")+'"':""}k=k.replace(/ class="([^"]+)"/gi,n);k=k.replace(/ class=(\w+)/gi,n)}if(b(l,"paste_remove_spans")){k=k.replace(/<\/?span[^>]*>/gi,"")}f.content=k},_postProcess:function(h,j){var g=this,f=g.editor,i=f.dom,e;if(j.wordContent){c(i.select("a",j.node),function(k){if(!k.href||k.href.indexOf("#_Toc")!=-1){i.remove(k,1)}});if(b(f,"paste_convert_middot_lists")){g._convertLists(h,j)}e=b(f,"paste_retain_style_properties");if((tinymce.is(e,"string"))&&(e!=="all")&&(e!=="*")){e=tinymce.explode(e.replace(/^none$/i,""));c(i.select("*",j.node),function(n){var o={},l=0,m,p,k;if(e){for(m=0;m0){i.setStyles(n,o)}else{if(n.nodeName=="SPAN"&&!n.className){i.remove(n,true)}}})}}if(b(f,"paste_remove_styles")||(b(f,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(i.select("*[style]",j.node),function(k){k.removeAttribute("style");k.removeAttribute("_mce_style")})}else{if(tinymce.isWebKit){c(i.select("*",j.node),function(k){k.removeAttribute("_mce_style")})}}},_convertLists:function(h,f){var j=h.editor.dom,i,m,e=-1,g,n=[],l,k;c(j.select("p",f.node),function(u){var r,v="",t,s,o,q;for(r=u.firstChild;r&&r.nodeType==3;r=r.nextSibling){v+=r.nodeValue}v=u.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(v)){t="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(v)){t="ol"}if(t){g=parseFloat(u.style.marginLeft||0);if(g>e){n.push(g)}if(!i||t!=l){i=j.create(t);j.insertAfter(i,u)}else{if(g>e){i=m.appendChild(j.create(t))}else{if(g]*>/gi,"");if(t=="ul"&&/^[\u2022\u00b7\u00a7\u00d8o]/.test(p)){j.remove(w)}else{if(/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){j.remove(w)}}});s=u.innerHTML;if(t=="ul"){s=u.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/,"")}else{s=u.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}m=i.appendChild(j.create("li",0,s));j.remove(u);e=g;l=t}else{i=e=0}});k=f.node.innerHTML;if(k.indexOf("__MCE_ITEM__")!=-1){f.node.innerHTML=k.replace(/__MCE_ITEM__/g,"")}},_insertBlockContent:function(l,h,m){var f,j,g=l.selection,q,n,e,o,i,k="mce_marker";function p(t){var s;if(tinymce.isIE){s=l.getDoc().body.createTextRange();s.moveToElementText(t);s.collapse(false);s.select()}else{g.select(t,1);g.collapse(false)}}this._insert(' ',1);j=h.get(k);f=h.getParent(j,"p,h1,h2,h3,h4,h5,h6,ul,ol,th,td");if(f&&!/TD|TH/.test(f.nodeName)){j=h.split(f,j);c(h.create("div",0,m).childNodes,function(r){q=j.parentNode.insertBefore(r.cloneNode(true),j)});p(q)}else{h.setOuterHTML(j,m);g.select(l.getBody(),1);g.collapse(0)}while(n=h.get(k)){h.remove(n)}n=g.getStart();e=h.getViewPort(l.getWin());o=l.dom.getPos(n).y;i=n.clientHeight;if(oe.y+e.h){l.getDoc().body.scrollTop=o0)){if(!d){d=("34,quot,38,amp,39,apos,60,lt,62,gt,"+j.serializer.settings.entities).split(",")}if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(v)){q([/[\n\r]+/g])}else{q([/\r+/g])}q([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/&(#\d+|[a-z0-9]{1,10});/gi,function(i,h){if(h.charAt(0)==="#"){return String.fromCharCode(h.slice(1))}else{return((i=y(d,h))>0)?String.fromCharCode(d[i-1]):" "}}],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"],/^\s+|\s+$/g]);v=x.encode(v);if(!s.isCollapsed()){z.execCommand("Delete",false,null)}if(m(o,"array")||(m(o,"array"))){q(o)}else{if(m(o,"string")){q(new RegExp(o,"gi"))}}if(g=="none"){q([[/\n+/g," "]])}else{if(g=="br"){q([[/\n/g,"
    "]])}else{q([/^\s+|\s+$/g,[/\n\n/g,"

    "],[/\n/g,"
    "]])}}if((l=v.indexOf("

    "))!=-1){k=v.lastIndexOf("

    ");r=s.getNode();e=[];do{if(r.nodeType==1){if(r.nodeName=="TD"||r.nodeName=="BODY"){break}e[e.length]=r}}while(r=r.parentNode);if(e.length>0){p=v.substring(0,l);f="";for(t=0,u=e.length;t";f+="<"+e[e.length-t-1].nodeName.toLowerCase()+">"}if(l==k){v=p+f+v.substring(l+7)}else{v=p+v.substring(l+4,k+4)+f+v.substring(k+7)}}}j.execCommand("mceInsertRawHTML",false,v+' ');window.setTimeout(function(){var h=x.get("_plain_text_marker"),B,i,A,w;s.select(h,false);z.execCommand("Delete",false,null);h=null;B=s.getStart();i=x.getViewPort(n);A=x.getPos(B).y;w=B.clientHeight;if((Ai.y+i.h)){z.body.scrollTop=A

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "

    $1

    "); + } + + if (getParam(ed, "paste_convert_middot_lists")) { + process([ + [//gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker + [/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol spans to item markers + ]); + } + + process([ + // Word comments like conditional comments etc + //gi, + + // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags + /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi, + + // Convert into for line-though + [/<(\/?)s>/gi, "<$1strike>"], + + // Replace nsbp entites to char since it's easier to handle + [/ /gi, "\u00a0"] + ]); + + // Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag. + // If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot. + do { + len = h.length; + h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1"); + } while (len != h.length); + + // Remove all spans if no styles is to be retained + if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) { + h = h.replace(/<\/?span[^>]*>/gi, ""); + } else { + // We're keeping styles, so at least clean them up. + // CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx + + process([ + // Convert ___ to string of alternating breaking/non-breaking spaces of same length + [/([\s\u00a0]*)<\/span>/gi, + function(str, spaces) { + return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : ""; + } + ], + + // Examine all styles: delete junk, transform some, and keep the rest + [/(<[a-z][^>]*)\sstyle="([^"]*)"/gi, + function(str, tag, style) { + var n = [], + i = 0, + s = explode(trim(style).replace(/"/gi, "'"), ";"); + + // Examine each style definition within the tag's style attribute + each(s, function(v) { + var name, value, + parts = explode(v, ":"); + + function ensureUnits(v) { + return v + ((v !== "0") && (/\d$/.test(v)))? "px" : ""; + } + + if (parts.length == 2) { + name = parts[0].toLowerCase(); + value = parts[1].toLowerCase(); + + // Translate certain MS Office styles into their CSS equivalents + switch (name) { + case "mso-padding-alt": + case "mso-padding-top-alt": + case "mso-padding-right-alt": + case "mso-padding-bottom-alt": + case "mso-padding-left-alt": + case "mso-margin-alt": + case "mso-margin-top-alt": + case "mso-margin-right-alt": + case "mso-margin-bottom-alt": + case "mso-margin-left-alt": + case "mso-table-layout-alt": + case "mso-height": + case "mso-width": + case "mso-vertical-align-alt": + n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value); + return; + + case "horiz-align": + n[i++] = "text-align:" + value; + return; + + case "vert-align": + n[i++] = "vertical-align:" + value; + return; + + case "font-color": + case "mso-foreground": + n[i++] = "color:" + value; + return; + + case "mso-background": + case "mso-highlight": + n[i++] = "background:" + value; + return; + + case "mso-default-height": + n[i++] = "min-height:" + ensureUnits(value); + return; + + case "mso-default-width": + n[i++] = "min-width:" + ensureUnits(value); + return; + + case "mso-padding-between-alt": + n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value); + return; + + case "text-line-through": + if ((value == "single") || (value == "double")) { + n[i++] = "text-decoration:line-through"; + } + return; + + case "mso-zero-height": + if (value == "yes") { + n[i++] = "display:none"; + } + return; + } + + // Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name + if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) { + return; + } + + // If it reached this point, it must be a valid CSS style + n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case + } + }); + + // If style attribute contained any valid styles the re-write it; otherwise delete style attribute. + if (i > 0) { + return tag + ' style="' + n.join(';') + '"'; + } else { + return tag; + } + } + ] + ]); + } + } + + // Replace headers with + if (getParam(ed, "paste_convert_headers_to_strong")) { + process([ + [/]*>/gi, "

    "], + [/<\/h[1-6][^>]*>/gi, "

    "] + ]); + } + + // Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso"). + // Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation. + stripClass = getParam(ed, "paste_strip_class_attributes"); + + if (stripClass !== "none") { + function removeClasses(match, g1) { + if (stripClass === "all") + return ''; + + var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "), + function(v) { + return (/^(?!mso)/i.test(v)); + } + ); + + return cls.length ? ' class="' + cls.join(" ") + '"' : ''; + }; + + h = h.replace(/ class="([^"]+)"/gi, removeClasses); + h = h.replace(/ class=(\w+)/gi, removeClasses); + } + + // Remove spans option + if (getParam(ed, "paste_remove_spans")) { + h = h.replace(/<\/?span[^>]*>/gi, ""); + } + + //console.log('After preprocess:' + h); + + o.content = h; + }, + + /** + * Various post process items. + */ + _postProcess : function(pl, o) { + var t = this, ed = t.editor, dom = ed.dom, styleProps; + + if (o.wordContent) { + // Remove named anchors or TOC links + each(dom.select('a', o.node), function(a) { + if (!a.href || a.href.indexOf('#_Toc') != -1) + dom.remove(a, 1); + }); + + if (getParam(ed, "paste_convert_middot_lists")) { + t._convertLists(pl, o); + } + + // Process styles + styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties + + // Process only if a string was specified and not equal to "all" or "*" + if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) { + styleProps = tinymce.explode(styleProps.replace(/^none$/i, "")); + + // Retains some style properties + each(dom.select('*', o.node), function(el) { + var newStyle = {}, npc = 0, i, sp, sv; + + // Store a subset of the existing styles + if (styleProps) { + for (i = 0; i < styleProps.length; i++) { + sp = styleProps[i]; + sv = dom.getStyle(el, sp); + + if (sv) { + newStyle[sp] = sv; + npc++; + } + } + } + + // Remove all of the existing styles + dom.setAttrib(el, 'style', ''); + + if (styleProps && npc > 0) + dom.setStyles(el, newStyle); // Add back the stored subset of styles + else // Remove empty span tags that do not have class attributes + if (el.nodeName == 'SPAN' && !el.className) + dom.remove(el, true); + }); + } + } + + // Remove all style information or only specifically on WebKit to avoid the style bug on that browser + if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) { + each(dom.select('*[style]', o.node), function(el) { + el.removeAttribute('style'); + el.removeAttribute('_mce_style'); + }); + } else { + if (tinymce.isWebKit) { + // We need to compress the styles on WebKit since if you paste it will become + // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles + each(dom.select('*', o.node), function(el) { + el.removeAttribute('_mce_style'); + }); + } + } + }, + + /** + * Converts the most common bullet and number formats in Office into a real semantic UL/LI list. + */ + _convertLists : function(pl, o) { + var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html; + + // Convert middot lists into real semantic lists + each(dom.select('p', o.node), function(p) { + var sib, val = '', type, html, idx, parents; + + // Get text node value at beginning of paragraph + for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling) + val += sib.nodeValue; + + val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/ /g, '\u00a0'); + + // Detect unordered lists look for bullets + if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(val)) + type = 'ul'; + + // Detect ordered lists 1., a. or ixv. + if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(val)) + type = 'ol'; + + // Check if node value matches the list pattern: o   + if (type) { + margin = parseFloat(p.style.marginLeft || 0); + + if (margin > lastMargin) + levels.push(margin); + + if (!listElm || type != lastType) { + listElm = dom.create(type); + dom.insertAfter(listElm, p); + } else { + // Nested list element + if (margin > lastMargin) { + listElm = li.appendChild(dom.create(type)); + } else if (margin < lastMargin) { + // Find parent level based on margin value + idx = tinymce.inArray(levels, margin); + parents = dom.getParents(listElm.parentNode, type); + listElm = parents[parents.length - 1 - idx] || listElm; + } + } + + // Remove middot or number spans if they exists + each(dom.select('span', p), function(span) { + var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, ''); + + // Remove span with the middot or the number + if (type == 'ul' && /^[\u2022\u00b7\u00a7\u00d8o]/.test(html)) + dom.remove(span); + else if (/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(html)) + dom.remove(span); + }); + + html = p.innerHTML; + + // Remove middot/list items + if (type == 'ul') + html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/, ''); + else + html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.( |\u00a0)+\s*/, ''); + + // Create li and add paragraph data into the new li + li = listElm.appendChild(dom.create('li', 0, html)); + dom.remove(p); + + lastMargin = margin; + lastType = type; + } else + listElm = lastMargin = 0; // End list element + }); + + // Remove any left over makers + html = o.node.innerHTML; + if (html.indexOf('__MCE_ITEM__') != -1) + o.node.innerHTML = html.replace(/__MCE_ITEM__/g, ''); + }, + + /** + * This method will split the current block parent and insert the contents inside the split position. + * This logic can be improved so text nodes at the start/end remain in the start/end block elements + */ + _insertBlockContent : function(ed, dom, content) { + var parentBlock, marker, sel = ed.selection, last, elm, vp, y, elmHeight, markerId = 'mce_marker'; + + function select(n) { + var r; + + if (tinymce.isIE) { + r = ed.getDoc().body.createTextRange(); + r.moveToElementText(n); + r.collapse(false); + r.select(); + } else { + sel.select(n, 1); + sel.collapse(false); + } + } + + // Insert a marker for the caret position + this._insert(' ', 1); + marker = dom.get(markerId); + parentBlock = dom.getParent(marker, 'p,h1,h2,h3,h4,h5,h6,ul,ol,th,td'); + + // If it's a parent block but not a table cell + if (parentBlock && !/TD|TH/.test(parentBlock.nodeName)) { + // Split parent block + marker = dom.split(parentBlock, marker); + + // Insert nodes before the marker + each(dom.create('div', 0, content).childNodes, function(n) { + last = marker.parentNode.insertBefore(n.cloneNode(true), marker); + }); + + // Move caret after marker + select(last); + } else { + dom.setOuterHTML(marker, content); + sel.select(ed.getBody(), 1); + sel.collapse(0); + } + + // Remove marker if it's left + while (elm = dom.get(markerId)) + dom.remove(elm); + + // Get element, position and height + elm = sel.getStart(); + vp = dom.getViewPort(ed.getWin()); + y = ed.dom.getPos(elm).y; + elmHeight = elm.clientHeight; + + // Is element within viewport if not then scroll it into view + if (y < vp.y || y + elmHeight > vp.y + vp.h) + ed.getDoc().body.scrollTop = y < vp.y ? y : y - vp.h + 25; + }, + + /** + * Inserts the specified contents at the caret position. + */ + _insert : function(h, skip_undo) { + var ed = this.editor; + + // First delete the contents seems to work better on WebKit + if (!ed.selection.isCollapsed()) + ed.getDoc().execCommand('Delete', false, null); + + // It's better to use the insertHTML method on Gecko since it will combine paragraphs correctly before inserting the contents + ed.execCommand(tinymce.isGecko ? 'insertHTML' : 'mceInsertContent', false, h, {skip_undo : skip_undo}); + }, + + /** + * Instead of the old plain text method which tried to re-create a paste operation, the + * new approach adds a plain text mode toggle switch that changes the behavior of paste. + * This function is passed the same input that the regular paste plugin produces. + * It performs additional scrubbing and produces (and inserts) the plain text. + * This approach leverages all of the great existing functionality in the paste + * plugin, and requires minimal changes to add the new functionality. + * Speednet - June 2009 + */ + _insertPlainText : function(ed, dom, h) { + var i, len, pos, rpos, node, breakElms, before, after, + w = ed.getWin(), + d = ed.getDoc(), + sel = ed.selection, + is = tinymce.is, + inArray = tinymce.inArray, + linebr = getParam(ed, "paste_text_linebreaktype"), + rl = getParam(ed, "paste_text_replacements"); + + function process(items) { + each(items, function(v) { + if (v.constructor == RegExp) + h = h.replace(v, ""); + else + h = h.replace(v[0], v[1]); + }); + }; + + if ((typeof(h) === "string") && (h.length > 0)) { + if (!entities) + entities = ("34,quot,38,amp,39,apos,60,lt,62,gt," + ed.serializer.settings.entities).split(","); + + // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line + if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(h)) { + process([ + /[\n\r]+/g + ]); + } else { + // Otherwise just get rid of carriage returns (only need linefeeds) + process([ + /\r+/g + ]); + } + + process([ + [/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them + [/]*>|<\/tr>/gi, "\n"], // Single linebreak for
    tags and table rows + [/<\/t[dh]>\s*]*>/gi, "\t"], // Table cells get tabs betweem them + /<[a-z!\/?][^>]*>/gi, // Delete all remaining tags + [/ /gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*) + [ + // HTML entity + /&(#\d+|[a-z0-9]{1,10});/gi, + + // Replace with actual character + function(e, s) { + if (s.charAt(0) === "#") { + return String.fromCharCode(s.slice(1)); + } + else { + return ((e = inArray(entities, s)) > 0)? String.fromCharCode(entities[e-1]) : " "; + } + } + ], + [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"], // Cool little RegExp deletes whitespace around linebreak chars. + [/\n{3,}/g, "\n\n"], // Max. 2 consecutive linebreaks + /^\s+|\s+$/g // Trim the front & back + ]); + + h = dom.encode(h); + + // Delete any highlighted text before pasting + if (!sel.isCollapsed()) { + d.execCommand("Delete", false, null); + } + + // Perform default or custom replacements + if (is(rl, "array") || (is(rl, "array"))) { + process(rl); + } + else if (is(rl, "string")) { + process(new RegExp(rl, "gi")); + } + + // Treat paragraphs as specified in the config + if (linebr == "none") { + process([ + [/\n+/g, " "] + ]); + } + else if (linebr == "br") { + process([ + [/\n/g, "
    "] + ]); + } + else { + process([ + /^\s+|\s+$/g, + [/\n\n/g, "

    "], + [/\n/g, "
    "] + ]); + } + + // This next piece of code handles the situation where we're pasting more than one paragraph of plain + // text, and we are pasting the content into the middle of a block node in the editor. The block + // node gets split at the selection point into "Para A" and "Para B" (for the purposes of explaining). + // The first paragraph of the pasted text is appended to "Para A", and the last paragraph of the + // pasted text is prepended to "Para B". Any other paragraphs of pasted text are placed between + // "Para A" and "Para B". This code solves a host of problems with the original plain text plugin and + // now handles styles correctly. (Pasting plain text into a styled paragraph is supposed to make the + // plain text take the same style as the existing paragraph.) + if ((pos = h.indexOf("

    ")) != -1) { + rpos = h.lastIndexOf("

    "); + node = sel.getNode(); + breakElms = []; // Get list of elements to break + + do { + if (node.nodeType == 1) { + // Don't break tables and break at body + if (node.nodeName == "TD" || node.nodeName == "BODY") { + break; + } + + breakElms[breakElms.length] = node; + } + } while (node = node.parentNode); + + // Are we in the middle of a block node? + if (breakElms.length > 0) { + before = h.substring(0, pos); + after = ""; + + for (i=0, len=breakElms.length; i"; + after += "<" + breakElms[breakElms.length-i-1].nodeName.toLowerCase() + ">"; + } + + if (pos == rpos) { + h = before + after + h.substring(pos+7); + } + else { + h = before + h.substring(pos+4, rpos+4) + after + h.substring(rpos+7); + } + } + } + + // Insert content at the caret, plus add a marker for repositioning the caret + ed.execCommand("mceInsertRawHTML", false, h + ' '); + + // Reposition the caret to the marker, which was placed immediately after the inserted content. + // Needs to be done asynchronously (in window.setTimeout) or else it doesn't work in all browsers. + // The second part of the code scrolls the content up if the caret is positioned off-screen. + // This is only necessary for WebKit browsers, but it doesn't hurt to use for all. + window.setTimeout(function() { + var marker = dom.get('_plain_text_marker'), + elm, vp, y, elmHeight; + + sel.select(marker, false); + d.execCommand("Delete", false, null); + marker = null; + + // Get element, position and height + elm = sel.getStart(); + vp = dom.getViewPort(w); + y = dom.getPos(elm).y; + elmHeight = elm.clientHeight; + + // Is element within viewport if not then scroll it into view + if ((y < vp.y) || (y + elmHeight > vp.y + vp.h)) { + d.body.scrollTop = y < vp.y ? y : y - vp.h + 25; + } + }, 0); + } + }, + + /** + * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine. + */ + _legacySupport : function() { + var t = this, ed = t.editor; + + // Register command(s) for backwards compatibility + ed.addCommand("mcePasteWord", function() { + ed.windowManager.open({ + file: t.url + "/pasteword.htm", + width: parseInt(getParam(ed, "paste_dialog_width")), + height: parseInt(getParam(ed, "paste_dialog_height")), + inline: 1 + }); + }); + + if (getParam(ed, "paste_text_use_dialog")) { + ed.addCommand("mcePasteText", function() { + ed.windowManager.open({ + file : t.url + "/pastetext.htm", + width: parseInt(getParam(ed, "paste_dialog_width")), + height: parseInt(getParam(ed, "paste_dialog_height")), + inline : 1 + }); + }); + } + + // Register button for backwards compatibility + ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"}); + } + }); + + // Register plugin + tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin); +})(); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/paste/js/pastetext.js b/webapps/totsys/common/js/tiny_mce/plugins/paste/js/pastetext.js new file mode 100644 index 0000000..81b1d6a --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/paste/js/pastetext.js @@ -0,0 +1,36 @@ +tinyMCEPopup.requireLangPack(); + +var PasteTextDialog = { + init : function() { + this.resize(); + }, + + insert : function() { + var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines; + + // Convert linebreaks into paragraphs + if (document.getElementById('linebreaks').checked) { + lines = h.split(/\r?\n/); + if (lines.length > 1) { + h = ''; + tinymce.each(lines, function(row) { + h += '

    ' + row + '

    '; + }); + } + } + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h}); + tinyMCEPopup.close(); + }, + + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; + + el = document.getElementById('content'); + + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; + } +}; + +tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/paste/js/pasteword.js b/webapps/totsys/common/js/tiny_mce/plugins/paste/js/pasteword.js new file mode 100644 index 0000000..959bf39 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/paste/js/pasteword.js @@ -0,0 +1,51 @@ +tinyMCEPopup.requireLangPack(); + +var PasteWordDialog = { + init : function() { + var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = ''; + + // Create iframe + el.innerHTML = ''; + ifr = document.getElementById('iframe'); + doc = ifr.contentWindow.document; + + // Force absolute CSS urls + css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")]; + css = css.concat(tinymce.explode(ed.settings.content_css) || []); + tinymce.each(css, function(u) { + cssHTML += ''; + }); + + // Write content into iframe + doc.open(); + doc.write('' + cssHTML + ''); + doc.close(); + + doc.designMode = 'on'; + this.resize(); + + window.setTimeout(function() { + ifr.contentWindow.focus(); + }, 10); + }, + + insert : function() { + var h = document.getElementById('iframe').contentWindow.document.body.innerHTML; + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true}); + tinyMCEPopup.close(); + }, + + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; + + el = document.getElementById('iframe'); + + if (el) { + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; + } + } +}; + +tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/paste/langs/en_dlg.js b/webapps/totsys/common/js/tiny_mce/plugins/paste/langs/en_dlg.js new file mode 100644 index 0000000..823eb16 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/paste/langs/en_dlg.js @@ -0,0 +1,5 @@ +tinyMCE.addI18n('en.paste_dlg',{ +text_title:"Use CTRL+V on your keyboard to paste the text into the window.", +text_linebreaks:"Keep linebreaks", +word_title:"Use CTRL+V on your keyboard to paste the text into the window." +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/paste/langs/ko_dlg.js b/webapps/totsys/common/js/tiny_mce/plugins/paste/langs/ko_dlg.js new file mode 100644 index 0000000..c02a8cb --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/paste/langs/ko_dlg.js @@ -0,0 +1,5 @@ +tinyMCE.addI18n('ko.paste_dlg',{ +text_title:"\uC708\uB3C4\uC6B0\uC5D0 \uD14D\uC2A4\uD2B8\uB97C \uBD99\uC774\uB824\uBA74 \uD0A4\uBCF4\uB4DC\uB85C Ctrl+V\uB97C \uC785\uB825\uD574 \uC8FC\uC138\uC694.", +text_linebreaks:"\uAC1C\uD589\uC744 \uBCF4\uAD00 \uC720\uC9C0", +word_title:"\uC708\uB3C4\uC6B0\uC5D0 \uD14D\uC2A4\uD2B8\uB97C \uBD99\uC774\uB824\uBA74 \uD0A4\uBCF4\uB4DC\uB85CCtrl+V\uB97C \uC785\uB825\uD574 \uC8FC\uC138\uC694." +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/paste/pastetext.htm b/webapps/totsys/common/js/tiny_mce/plugins/paste/pastetext.htm new file mode 100644 index 0000000..8ccfbb9 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/paste/pastetext.htm @@ -0,0 +1,27 @@ + + + {#paste.paste_text_desc} + + + + +
    +
    {#paste.paste_text_desc}
    + +
    + +
    + +
    + +
    {#paste_dlg.text_title}
    + + + +
    + + +
    +
    + + \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/paste/pasteword.htm b/webapps/totsys/common/js/tiny_mce/plugins/paste/pasteword.htm new file mode 100644 index 0000000..7731f39 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/paste/pasteword.htm @@ -0,0 +1,21 @@ + + + {#paste.paste_word_desc} + + + + +
    +
    {#paste.paste_word_desc}
    + +
    {#paste_dlg.word_title}
    + +
    + +
    + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/preview/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/preview/editor_plugin.js new file mode 100644 index 0000000..507909c --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/preview/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Preview",{init:function(a,b){var d=this,c=tinymce.explode(a.settings.content_css);d.editor=a;tinymce.each(c,function(f,e){c[e]=a.documentBaseURI.toAbsolute(f)});a.addCommand("mcePreview",function(){a.windowManager.open({file:a.getParam("plugin_preview_pageurl",b+"/preview.html"),width:parseInt(a.getParam("plugin_preview_width","550")),height:parseInt(a.getParam("plugin_preview_height","600")),resizable:"yes",scrollbars:"yes",popup_css:c?c.join(","):a.baseURI.toAbsolute("themes/"+a.settings.theme+"/skins/"+a.settings.skin+"/content.css"),inline:a.getParam("plugin_preview_inline",1)},{base:a.documentBaseURI.getURI()})});a.addButton("preview",{title:"preview.preview_desc",cmd:"mcePreview"})},getInfo:function(){return{longname:"Preview",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("preview",tinymce.plugins.Preview)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/preview/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/preview/editor_plugin_src.js new file mode 100644 index 0000000..80f00f0 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/preview/editor_plugin_src.js @@ -0,0 +1,53 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Preview', { + init : function(ed, url) { + var t = this, css = tinymce.explode(ed.settings.content_css); + + t.editor = ed; + + // Force absolute CSS urls + tinymce.each(css, function(u, k) { + css[k] = ed.documentBaseURI.toAbsolute(u); + }); + + ed.addCommand('mcePreview', function() { + ed.windowManager.open({ + file : ed.getParam("plugin_preview_pageurl", url + "/preview.html"), + width : parseInt(ed.getParam("plugin_preview_width", "550")), + height : parseInt(ed.getParam("plugin_preview_height", "600")), + resizable : "yes", + scrollbars : "yes", + popup_css : css ? css.join(',') : ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css"), + inline : ed.getParam("plugin_preview_inline", 1) + }, { + base : ed.documentBaseURI.getURI() + }); + }); + + ed.addButton('preview', {title : 'preview.preview_desc', cmd : 'mcePreview'}); + }, + + getInfo : function() { + return { + longname : 'Preview', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('preview', tinymce.plugins.Preview); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/preview/example.html b/webapps/totsys/common/js/tiny_mce/plugins/preview/example.html new file mode 100644 index 0000000..4820222 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/preview/example.html @@ -0,0 +1,28 @@ + + + + + +Example of a custom preview page + + + +Editor contents:
    +
    + +
    + + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/preview/jscripts/embed.js b/webapps/totsys/common/js/tiny_mce/plugins/preview/jscripts/embed.js new file mode 100644 index 0000000..6fe25de --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/preview/jscripts/embed.js @@ -0,0 +1,73 @@ +/** + * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. + */ + +function writeFlash(p) { + writeEmbed( + 'D27CDB6E-AE6D-11cf-96B8-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'application/x-shockwave-flash', + p + ); +} + +function writeShockWave(p) { + writeEmbed( + '166B1BCA-3F9C-11CF-8075-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', + 'application/x-director', + p + ); +} + +function writeQuickTime(p) { + writeEmbed( + '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', + 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', + 'video/quicktime', + p + ); +} + +function writeRealMedia(p) { + writeEmbed( + 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'audio/x-pn-realaudio-plugin', + p + ); +} + +function writeWindowsMedia(p) { + p.url = p.src; + writeEmbed( + '6BF52A52-394A-11D3-B153-00C04F79FAA6', + 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', + 'application/x-mplayer2', + p + ); +} + +function writeEmbed(cls, cb, mt, p) { + var h = '', n; + + h += ''; + + h += ' + + + + + +{#preview.preview_desc} + + + + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/print/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/print/editor_plugin.js new file mode 100644 index 0000000..b5b3a55 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/print/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Print",{init:function(a,b){a.addCommand("mcePrint",function(){a.getWin().print()});a.addButton("print",{title:"print.print_desc",cmd:"mcePrint"})},getInfo:function(){return{longname:"Print",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("print",tinymce.plugins.Print)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/print/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/print/editor_plugin_src.js new file mode 100644 index 0000000..47e666a --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/print/editor_plugin_src.js @@ -0,0 +1,34 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Print', { + init : function(ed, url) { + ed.addCommand('mcePrint', function() { + ed.getWin().print(); + }); + + ed.addButton('print', {title : 'print.print_desc', cmd : 'mcePrint'}); + }, + + getInfo : function() { + return { + longname : 'Print', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('print', tinymce.plugins.Print); +})(); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/save/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/save/editor_plugin.js new file mode 100644 index 0000000..8e93996 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/save/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Save",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceSave",c._save,c);a.addCommand("mceCancel",c._cancel,c);a.addButton("save",{title:"save.save_desc",cmd:"mceSave"});a.addButton("cancel",{title:"save.cancel_desc",cmd:"mceCancel"});a.onNodeChange.add(c._nodeChange,c);a.addShortcut("ctrl+s",a.getLang("save.save_desc"),"mceSave")},getInfo:function(){return{longname:"Save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,c){var b=this.editor;if(b.getParam("save_enablewhendirty")){a.setDisabled("save",!b.isDirty());a.setDisabled("cancel",!b.isDirty())}},_save:function(){var c=this.editor,a,e,d,b;a=tinymce.DOM.get(c.id).form||tinymce.DOM.getParent(c.id,"form");if(c.getParam("save_enablewhendirty")&&!c.isDirty()){return}tinyMCE.triggerSave();if(e=c.getParam("save_onsavecallback")){if(c.execCallback("save_onsavecallback",c)){c.startContent=tinymce.trim(c.getContent({format:"raw"}));c.nodeChanged()}return}if(a){c.isNotDirty=true;if(a.onsubmit==null||a.onsubmit()!=false){a.submit()}c.nodeChanged()}else{c.windowManager.alert("Error: No form element found.")}},_cancel:function(){var a=this.editor,c,b=tinymce.trim(a.startContent);if(c=a.getParam("save_oncancelcallback")){a.execCallback("save_oncancelcallback",a);return}a.setContent(b);a.undoManager.clear();a.nodeChanged()}});tinymce.PluginManager.add("save",tinymce.plugins.Save)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/save/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/save/editor_plugin_src.js new file mode 100644 index 0000000..5ab6491 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/save/editor_plugin_src.js @@ -0,0 +1,101 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Save', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceSave', t._save, t); + ed.addCommand('mceCancel', t._cancel, t); + + // Register buttons + ed.addButton('save', {title : 'save.save_desc', cmd : 'mceSave'}); + ed.addButton('cancel', {title : 'save.cancel_desc', cmd : 'mceCancel'}); + + ed.onNodeChange.add(t._nodeChange, t); + ed.addShortcut('ctrl+s', ed.getLang('save.save_desc'), 'mceSave'); + }, + + getInfo : function() { + return { + longname : 'Save', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + _nodeChange : function(ed, cm, n) { + var ed = this.editor; + + if (ed.getParam('save_enablewhendirty')) { + cm.setDisabled('save', !ed.isDirty()); + cm.setDisabled('cancel', !ed.isDirty()); + } + }, + + // Private methods + + _save : function() { + var ed = this.editor, formObj, os, i, elementId; + + formObj = tinymce.DOM.get(ed.id).form || tinymce.DOM.getParent(ed.id, 'form'); + + if (ed.getParam("save_enablewhendirty") && !ed.isDirty()) + return; + + tinyMCE.triggerSave(); + + // Use callback instead + if (os = ed.getParam("save_onsavecallback")) { + if (ed.execCallback('save_onsavecallback', ed)) { + ed.startContent = tinymce.trim(ed.getContent({format : 'raw'})); + ed.nodeChanged(); + } + + return; + } + + if (formObj) { + ed.isNotDirty = true; + + if (formObj.onsubmit == null || formObj.onsubmit() != false) + formObj.submit(); + + ed.nodeChanged(); + } else + ed.windowManager.alert("Error: No form element found."); + }, + + _cancel : function() { + var ed = this.editor, os, h = tinymce.trim(ed.startContent); + + // Use callback instead + if (os = ed.getParam("save_oncancelcallback")) { + ed.execCallback('save_oncancelcallback', ed); + return; + } + + ed.setContent(h); + ed.undoManager.clear(); + ed.nodeChanged(); + } + }); + + // Register plugin + tinymce.PluginManager.add('save', tinymce.plugins.Save); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/css/searchreplace.css b/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/css/searchreplace.css new file mode 100644 index 0000000..3e2eaf3 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/css/searchreplace.css @@ -0,0 +1,6 @@ +.panel_wrapper {height:85px;} +.panel_wrapper div.current {height:85px;} + +/* IE */ +* html .panel_wrapper {height:100px;} +* html .panel_wrapper div.current {height:100px;} diff --git a/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/editor_plugin.js new file mode 100644 index 0000000..cd9c985 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:170+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/editor_plugin_src.js new file mode 100644 index 0000000..e9b3ee8 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/editor_plugin_src.js @@ -0,0 +1,57 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.SearchReplacePlugin', { + init : function(ed, url) { + function open(m) { + ed.windowManager.open({ + file : url + '/searchreplace.htm', + width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)), + height : 170 + parseInt(ed.getLang('searchreplace.delta_height', 0)), + inline : 1, + auto_focus : 0 + }, { + mode : m, + search_string : ed.selection.getContent({format : 'text'}), + plugin_url : url + }); + }; + + // Register commands + ed.addCommand('mceSearch', function() { + open('search'); + }); + + ed.addCommand('mceReplace', function() { + open('replace'); + }); + + // Register buttons + ed.addButton('search', {title : 'searchreplace.search_desc', cmd : 'mceSearch'}); + ed.addButton('replace', {title : 'searchreplace.replace_desc', cmd : 'mceReplace'}); + + ed.addShortcut('ctrl+f', 'searchreplace.search_desc', 'mceSearch'); + }, + + getInfo : function() { + return { + longname : 'Search/Replace', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('searchreplace', tinymce.plugins.SearchReplacePlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/js/searchreplace.js b/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/js/searchreplace.js new file mode 100644 index 0000000..4cc0f40 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/js/searchreplace.js @@ -0,0 +1,130 @@ +tinyMCEPopup.requireLangPack(); + +var SearchReplaceDialog = { + init : function(ed) { + var f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode"); + + this.switchMode(m); + + f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string"); + + // Focus input field + f[m + '_panel_searchstring'].focus(); + }, + + switchMode : function(m) { + var f, lm = this.lastMode; + + if (lm != m) { + f = document.forms[0]; + + if (lm) { + f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value; + f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked; + f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked; + f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked; + } + + mcTabs.displayTab(m + '_tab', m + '_panel'); + document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none"; + document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none"; + this.lastMode = m; + } + }, + + searchNext : function(a) { + var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0; + + // Get input + f = document.forms[0]; + s = f[m + '_panel_searchstring'].value; + b = f[m + '_panel_backwardsu'].checked; + ca = f[m + '_panel_casesensitivebox'].checked; + rs = f['replace_panel_replacestring'].value; + + if (s == '') + return; + + function fix() { + // Correct Firefox graphics glitches + r = se.getRng().cloneRange(); + ed.getDoc().execCommand('SelectAll', false, null); + se.setRng(r); + }; + + function replace() { + if (tinymce.isIE) + ed.selection.getRng().duplicate().pasteHTML(rs); // Needs to be duplicated due to selection bug in IE + else + ed.getDoc().execCommand('InsertHTML', false, rs); + }; + + // IE flags + if (ca) + fl = fl | 4; + + switch (a) { + case 'all': + // Move caret to beginning of text + ed.execCommand('SelectAll'); + ed.selection.collapse(true); + + if (tinymce.isIE) { + while (r.findText(s, b ? -1 : 1, fl)) { + r.scrollIntoView(); + r.select(); + replace(); + fo = 1; + + if (b) { + r.moveEnd("character", -(rs.length)); // Otherwise will loop forever + } + } + + tinyMCEPopup.storeSelection(); + } else { + while (w.find(s, ca, b, false, false, false, false)) { + replace(); + fo = 1; + } + } + + if (fo) + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.allreplaced')); + else + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); + + return; + + case 'current': + if (!ed.selection.isCollapsed()) + replace(); + + break; + } + + se.collapse(b); + r = se.getRng(); + + // Whats the point + if (!s) + return; + + if (tinymce.isIE) { + if (r.findText(s, b ? -1 : 1, fl)) { + r.scrollIntoView(); + r.select(); + } else + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); + + tinyMCEPopup.storeSelection(); + } else { + if (!w.find(s, ca, b, false, false, false, false)) + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); + else + fix(); + } + } +}; + +tinyMCEPopup.onInit.add(SearchReplaceDialog.init, SearchReplaceDialog); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/langs/en_dlg.js b/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/langs/en_dlg.js new file mode 100644 index 0000000..3dd3453 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/langs/en_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('en.searchreplace_dlg',{ +searchnext_desc:"Find again", +notfound:"The search has been completed. The search string could not be found.", +search_title:"Find", +replace_title:"Find/Replace", +allreplaced:"All occurrences of the search string were replaced.", +findwhat:"Find what", +replacewith:"Replace with", +direction:"Direction", +up:"Up", +down:"Down", +mcase:"Match case", +findnext:"Find next", +replace:"Replace", +replaceall:"Replace all" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/langs/ko_dlg.js b/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/langs/ko_dlg.js new file mode 100644 index 0000000..a619ae7 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/langs/ko_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('ko.searchreplace_dlg',{ +searchnext_desc:"\uC7AC\uAC80\uC0C9", +notfound:"\uAC80\uC0C9\uC774 \uC644\uB8CC\uD588\uC2B5\uB2C8\uB2E4. \uAC80\uC0C9 \uBB38\uC790\uC5F4\uC740 \uBC1C\uACAC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.", +search_title:"\uAC80\uC0C9", +replace_title:"\uAC80\uC0C9/\uCE58\uD658", +allreplaced:"\uBAA8\uB450 \uCE58\uD658\uB418\uC5C8\uC2B5\uB2C8\uB2E4.", +findwhat:"\uAC80\uC0C9 \uBB38\uC790\uC5F4", +replacewith:"\uCE58\uD658 \uBB38\uC790\uC5F4", +direction:"\uBC29\uD5A5", +up:"\uC704\uC5D0", +down:"\uC544\uB798\uC5D0", +mcase:"\uB300\uBB38\uC790/\uC18C\uBB38\uC790\uB97C \uAD6C\uBCC4", +findnext:"\uAC80\uC0C9", +replace:"\uCE58\uD658", +replaceall:"\uBAA8\uB450 \uCE58\uD658" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/searchreplace.htm b/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/searchreplace.htm new file mode 100644 index 0000000..243a4bc --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/searchreplace/searchreplace.htm @@ -0,0 +1,99 @@ + + + + {#searchreplace_dlg.replace_title} + + + + + + + +
    + + +
    +
    + + + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + + + + + + + + + + + + + + + +
    + + + + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + +
    + + + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/spellchecker/css/content.css b/webapps/totsys/common/js/tiny_mce/plugins/spellchecker/css/content.css new file mode 100644 index 0000000..656ce1e --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/spellchecker/css/content.css @@ -0,0 +1 @@ +.mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;} diff --git a/webapps/totsys/common/js/tiny_mce/plugins/spellchecker/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/spellchecker/editor_plugin.js new file mode 100644 index 0000000..a0ba5a6 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/spellchecker/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});e.onInit.add(function(){if(e.settings.content_css!==false){e.dom.loadCSS(f+"/css/content.css")}});e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}����������������\u201d\u201c');for(d=0;d$1$2');q=q.replace(g,'$1$2');j.replace(j.create("span",{"class":"mceItemHidden"},q),r)}}});l.moveToBookmark(m)},_showMenu:function(g,i){var h=this,g=h.editor,d=h._menu,k,j=g.dom,f=j.getViewPort(g.getWin());if(!d){k=b.getPos(g.getContentAreaContainer());d=g.controlManager.createDropMenu("spellcheckermenu",{offset_x:k.x,offset_y:k.y,"class":"mceNoIcons"});h._menu=d}if(j.hasClass(i.target,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);h._sendRPC("getSuggestions",[h.selectedLang,j.decode(i.target.innerHTML)],function(l){var e;d.removeAll();if(l.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(l,function(m){d.add({title:m,onclick:function(){j.replace(g.getDoc().createTextNode(m),i.target);h._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}e=h.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var m=i.target.innerHTML;j.remove(i.target,1);h._checkDone();if(e){g.setProgressState(1);h._sendRPC("ignoreWord",[h.selectedLang,m],function(n){g.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var m=i.target.innerHTML;h._removeWords(j.decode(m));h._checkDone();if(e){g.setProgressState(1);h._sendRPC("ignoreWords",[h.selectedLang,m],function(n){g.setProgressState(0)})}}});if(h.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var m=i.target.innerHTML;j.remove(i.target,1);h._checkDone();g.setProgressState(1);h._sendRPC("learnWord",[h.selectedLang,m],function(n){g.setProgressState(0)})}})}d.update()});g.selection.select(i.target);k=j.getPos(i.target);d.showMenu(k.x,k.y+i.target.offsetHeight-f.y);return tinymce.dom.Event.cancel(i)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js new file mode 100644 index 0000000..b4ad4d8 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js @@ -0,0 +1,415 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM; + + tinymce.create('tinymce.plugins.SpellcheckerPlugin', { + getInfo : function() { + return { + longname : 'Spellchecker', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + init : function(ed, url) { + var t = this, cm; + + t.url = url; + t.editor = ed; + t.rpcUrl = ed.getParam("spellchecker_rpc_url", "{backend}"); + + if (t.rpcUrl == '{backend}') { + // Sniff if the browser supports native spellchecking (Don't know of a better way) + if (tinymce.isIE) + return; + + t.hasSupport = true; + + // Disable the context menu when spellchecking is active + ed.onContextMenu.addToTop(function(ed, e) { + if (t.active) + return false; + }); + } + + // Register commands + ed.addCommand('mceSpellCheck', function() { + if (t.rpcUrl == '{backend}') { + // Enable/disable native spellchecker + t.editor.getBody().spellcheck = t.active = !t.active; + return; + } + + if (!t.active) { + ed.setProgressState(1); + t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) { + if (r.length > 0) { + t.active = 1; + t._markWords(r); + ed.setProgressState(0); + ed.nodeChanged(); + } else { + ed.setProgressState(0); + + if (ed.getParam('spellchecker_report_no_misspellings', true)) + ed.windowManager.alert('spellchecker.no_mpell'); + } + }); + } else + t._done(); + }); + + ed.onInit.add(function() { + if (ed.settings.content_css !== false) + ed.dom.loadCSS(url + '/css/content.css'); + }); + + ed.onClick.add(t._showMenu, t); + ed.onContextMenu.add(t._showMenu, t); + ed.onBeforeGetContent.add(function() { + if (t.active) + t._removeWords(); + }); + + ed.onNodeChange.add(function(ed, cm) { + cm.setActive('spellchecker', t.active); + }); + + ed.onSetContent.add(function() { + t._done(); + }); + + ed.onBeforeGetContent.add(function() { + t._done(); + }); + + ed.onBeforeExecCommand.add(function(ed, cmd) { + if (cmd == 'mceFullScreen') + t._done(); + }); + + // Find selected language + t.languages = {}; + each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) { + if (k.indexOf('+') === 0) { + k = k.substring(1); + t.selectedLang = v; + } + + t.languages[k] = v; + }); + }, + + createControl : function(n, cm) { + var t = this, c, ed = t.editor; + + if (n == 'spellchecker') { + // Use basic button if we use the native spellchecker + if (t.rpcUrl == '{backend}') { + // Create simple toggle button if we have native support + if (t.hasSupport) + c = cm.createButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); + + return c; + } + + c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); + + c.onRenderMenu.add(function(c, m) { + m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + each(t.languages, function(v, k) { + var o = {icon : 1}, mi; + + o.onclick = function() { + mi.setSelected(1); + t.selectedItem.setSelected(0); + t.selectedItem = mi; + t.selectedLang = v; + }; + + o.title = k; + mi = m.add(o); + mi.setSelected(v == t.selectedLang); + + if (v == t.selectedLang) + t.selectedItem = mi; + }) + }); + + return c; + } + }, + + // Internal functions + + _walk : function(n, f) { + var d = this.editor.getDoc(), w; + + if (d.createTreeWalker) { + w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false); + + while ((n = w.nextNode()) != null) + f.call(this, n); + } else + tinymce.walk(n, f, 'childNodes'); + }, + + _getSeparators : function() { + var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}����������������\u201d\u201c'); + + // Build word separator regexp + for (i=0; i$1$2'); + v = v.replace(r3, '$1$2'); + + dom.replace(dom.create('span', {'class' : 'mceItemHidden'}, v), n); + } + } + }); + + se.moveToBookmark(b); + }, + + _showMenu : function(ed, e) { + var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()); + + if (!m) { + p1 = DOM.getPos(ed.getContentAreaContainer()); + //p2 = DOM.getPos(ed.getContainer()); + + m = ed.controlManager.createDropMenu('spellcheckermenu', { + offset_x : p1.x, + offset_y : p1.y, + 'class' : 'mceNoIcons' + }); + + t._menu = m; + } + + if (dom.hasClass(e.target, 'mceItemHiddenSpellWord')) { + m.removeAll(); + m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + + t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(e.target.innerHTML)], function(r) { + var ignoreRpc; + + m.removeAll(); + + if (r.length > 0) { + m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + each(r, function(v) { + m.add({title : v, onclick : function() { + dom.replace(ed.getDoc().createTextNode(v), e.target); + t._checkDone(); + }}); + }); + + m.addSeparator(); + } else + m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + + ignoreRpc = t.editor.getParam("spellchecker_enable_ignore_rpc", ''); + m.add({ + title : 'spellchecker.ignore_word', + onclick : function() { + var word = e.target.innerHTML; + + dom.remove(e.target, 1); + t._checkDone(); + + // tell the server if we need to + if (ignoreRpc) { + ed.setProgressState(1); + t._sendRPC('ignoreWord', [t.selectedLang, word], function(r) { + ed.setProgressState(0); + }); + } + } + }); + + m.add({ + title : 'spellchecker.ignore_words', + onclick : function() { + var word = e.target.innerHTML; + + t._removeWords(dom.decode(word)); + t._checkDone(); + + // tell the server if we need to + if (ignoreRpc) { + ed.setProgressState(1); + t._sendRPC('ignoreWords', [t.selectedLang, word], function(r) { + ed.setProgressState(0); + }); + } + } + }); + + + if (t.editor.getParam("spellchecker_enable_learn_rpc")) { + m.add({ + title : 'spellchecker.learn_word', + onclick : function() { + var word = e.target.innerHTML; + + dom.remove(e.target, 1); + t._checkDone(); + + ed.setProgressState(1); + t._sendRPC('learnWord', [t.selectedLang, word], function(r) { + ed.setProgressState(0); + }); + } + }); + } + + m.update(); + }); + + ed.selection.select(e.target); + p1 = dom.getPos(e.target); + m.showMenu(p1.x, p1.y + e.target.offsetHeight - vp.y); + + return tinymce.dom.Event.cancel(e); + } else + m.hideMenu(); + }, + + _checkDone : function() { + var t = this, ed = t.editor, dom = ed.dom, o; + + each(dom.select('span'), function(n) { + if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) { + o = true; + return false; + } + }); + + if (!o) + t._done(); + }, + + _done : function() { + var t = this, la = t.active; + + if (t.active) { + t.active = 0; + t._removeWords(); + + if (t._menu) + t._menu.hideMenu(); + + if (la) + t.editor.nodeChanged(); + } + }, + + _sendRPC : function(m, p, cb) { + var t = this; + + JSONRequest.sendRPC({ + url : t.rpcUrl, + method : m, + params : p, + success : cb, + error : function(e, x) { + t.editor.setProgressState(0); + t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText)); + } + }); + } + }); + + // Register plugin + tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin); +})(); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/spellchecker/img/wline.gif b/webapps/totsys/common/js/tiny_mce/plugins/spellchecker/img/wline.gif new file mode 100644 index 0000000..7d0a4db Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/plugins/spellchecker/img/wline.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/plugins/style/css/props.css b/webapps/totsys/common/js/tiny_mce/plugins/style/css/props.css new file mode 100644 index 0000000..5550b09 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/style/css/props.css @@ -0,0 +1,13 @@ +#text_font {width:250px;} +#text_size {width:70px;} +.mceAddSelectValue {background:#DDD;} +select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;} +#box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;} +#positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;} +#positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;} +.panel_wrapper div.current {padding-top:10px;height:230px;} +.delim {border-left:1px solid gray;} +.tdelim {border-bottom:1px solid gray;} +#block_display {width:145px;} +#list_type {width:115px;} +.disabled {background:#EEE;} diff --git a/webapps/totsys/common/js/tiny_mce/plugins/style/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/style/editor_plugin.js new file mode 100644 index 0000000..cab2153 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/style/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:320+parseInt(a.getLang("style.delta_height",0)),inline:1},{plugin_url:b,style_text:a.selection.getNode().style.cssText})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/style/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/style/editor_plugin_src.js new file mode 100644 index 0000000..c09d5e8 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/style/editor_plugin_src.js @@ -0,0 +1,55 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.StylePlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceStyleProps', function() { + ed.windowManager.open({ + file : url + '/props.htm', + width : 480 + parseInt(ed.getLang('style.delta_width', 0)), + height : 320 + parseInt(ed.getLang('style.delta_height', 0)), + inline : 1 + }, { + plugin_url : url, + style_text : ed.selection.getNode().style.cssText + }); + }); + + ed.addCommand('mceSetElementStyle', function(ui, v) { + if (e = ed.selection.getNode()) { + ed.dom.setAttrib(e, 'style', v); + ed.execCommand('mceRepaint'); + } + }); + + ed.onNodeChange.add(function(ed, cm, n) { + cm.setDisabled('styleprops', n.nodeName === 'BODY'); + }); + + // Register buttons + ed.addButton('styleprops', {title : 'style.desc', cmd : 'mceStyleProps'}); + }, + + getInfo : function() { + return { + longname : 'Style', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('style', tinymce.plugins.StylePlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/style/js/props.js b/webapps/totsys/common/js/tiny_mce/plugins/style/js/props.js new file mode 100644 index 0000000..1e73806 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/style/js/props.js @@ -0,0 +1,641 @@ +tinyMCEPopup.requireLangPack(); + +var defaultFonts = "" + + "Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" + + "Times New Roman, Times, serif=Times New Roman, Times, serif;" + + "Courier New, Courier, mono=Courier New, Courier, mono;" + + "Times New Roman, Times, serif=Times New Roman, Times, serif;" + + "Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" + + "Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" + + "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif"; + +var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger"; +var defaultMeasurement = "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; +var defaultSpacingMeasurement = "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%"; +var defaultIndentMeasurement = "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; +var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900"; +var defaultTextStyle = "normal;italic;oblique"; +var defaultVariant = "normal;small-caps"; +var defaultLineHeight = "normal"; +var defaultAttachment = "fixed;scroll"; +var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y"; +var defaultPosH = "left;center;right"; +var defaultPosV = "top;center;bottom"; +var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom"; +var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none"; +var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset"; +var defaultBorderWidth = "thin;medium;thick"; +var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none"; + +function init() { + var ce = document.getElementById('container'), h; + + ce.style.cssText = tinyMCEPopup.getWindowArg('style_text'); + + h = getBrowserHTML('background_image_browser','background_image','image','advimage'); + document.getElementById("background_image_browser").innerHTML = h; + + document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color'); + document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color'); + document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top'); + document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right'); + document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom'); + document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left'); + + fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true); + fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true); + fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true); + fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true); + fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true); + fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true); + fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true); + fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true); + fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true); + + fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true); + fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true); + + fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true); + fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true); + fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true); + fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true); + fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true); + fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true); + fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true); + fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true); + fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true); + + fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true); + fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true); + fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true); + + fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true); + + fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true); + fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true); + + fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true); + fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true); + + fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true); + + fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true); + + TinyMCE_EditableSelects.init(); + setupFormData(); + showDisabledControls(); +} + +function setupFormData() { + var ce = document.getElementById('container'), f = document.forms[0], s, b, i; + + // Setup text fields + + selectByValue(f, 'text_font', ce.style.fontFamily, true, true); + selectByValue(f, 'text_size', getNum(ce.style.fontSize), true, true); + selectByValue(f, 'text_size_measurement', getMeasurement(ce.style.fontSize)); + selectByValue(f, 'text_weight', ce.style.fontWeight, true, true); + selectByValue(f, 'text_style', ce.style.fontStyle, true, true); + selectByValue(f, 'text_lineheight', getNum(ce.style.lineHeight), true, true); + selectByValue(f, 'text_lineheight_measurement', getMeasurement(ce.style.lineHeight)); + selectByValue(f, 'text_case', ce.style.textTransform, true, true); + selectByValue(f, 'text_variant', ce.style.fontVariant, true, true); + f.text_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.color); + updateColor('text_color_pick', 'text_color'); + f.text_underline.checked = inStr(ce.style.textDecoration, 'underline'); + f.text_overline.checked = inStr(ce.style.textDecoration, 'overline'); + f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through'); + f.text_blink.checked = inStr(ce.style.textDecoration, 'blink'); + + // Setup background fields + + f.background_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.backgroundColor); + updateColor('background_color_pick', 'background_color'); + f.background_image.value = ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + selectByValue(f, 'background_repeat', ce.style.backgroundRepeat, true, true); + selectByValue(f, 'background_attachment', ce.style.backgroundAttachment, true, true); + selectByValue(f, 'background_hpos', getNum(getVal(ce.style.backgroundPosition, 0)), true, true); + selectByValue(f, 'background_hpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 0))); + selectByValue(f, 'background_vpos', getNum(getVal(ce.style.backgroundPosition, 1)), true, true); + selectByValue(f, 'background_vpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 1))); + + // Setup block fields + + selectByValue(f, 'block_wordspacing', getNum(ce.style.wordSpacing), true, true); + selectByValue(f, 'block_wordspacing_measurement', getMeasurement(ce.style.wordSpacing)); + selectByValue(f, 'block_letterspacing', getNum(ce.style.letterSpacing), true, true); + selectByValue(f, 'block_letterspacing_measurement', getMeasurement(ce.style.letterSpacing)); + selectByValue(f, 'block_vertical_alignment', ce.style.verticalAlign, true, true); + selectByValue(f, 'block_text_align', ce.style.textAlign, true, true); + f.block_text_indent.value = getNum(ce.style.textIndent); + selectByValue(f, 'block_text_indent_measurement', getMeasurement(ce.style.textIndent)); + selectByValue(f, 'block_whitespace', ce.style.whiteSpace, true, true); + selectByValue(f, 'block_display', ce.style.display, true, true); + + // Setup box fields + + f.box_width.value = getNum(ce.style.width); + selectByValue(f, 'box_width_measurement', getMeasurement(ce.style.width)); + + f.box_height.value = getNum(ce.style.height); + selectByValue(f, 'box_height_measurement', getMeasurement(ce.style.height)); + + if (tinymce.isGecko) + selectByValue(f, 'box_float', ce.style.cssFloat, true, true); + else + selectByValue(f, 'box_float', ce.style.styleFloat, true, true); + + selectByValue(f, 'box_clear', ce.style.clear, true, true); + + setupBox(f, ce, 'box_padding', 'padding', ''); + setupBox(f, ce, 'box_margin', 'margin', ''); + + // Setup border fields + + setupBox(f, ce, 'border_style', 'border', 'Style'); + setupBox(f, ce, 'border_width', 'border', 'Width'); + setupBox(f, ce, 'border_color', 'border', 'Color'); + + updateColor('border_color_top_pick', 'border_color_top'); + updateColor('border_color_right_pick', 'border_color_right'); + updateColor('border_color_bottom_pick', 'border_color_bottom'); + updateColor('border_color_left_pick', 'border_color_left'); + + f.elements.border_color_top.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_top.value); + f.elements.border_color_right.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_right.value); + f.elements.border_color_bottom.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_bottom.value); + f.elements.border_color_left.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_left.value); + + // Setup list fields + + selectByValue(f, 'list_type', ce.style.listStyleType, true, true); + selectByValue(f, 'list_position', ce.style.listStylePosition, true, true); + f.list_bullet_image.value = ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + + // Setup box fields + + selectByValue(f, 'positioning_type', ce.style.position, true, true); + selectByValue(f, 'positioning_visibility', ce.style.visibility, true, true); + selectByValue(f, 'positioning_overflow', ce.style.overflow, true, true); + f.positioning_zindex.value = ce.style.zIndex ? ce.style.zIndex : ""; + + f.positioning_width.value = getNum(ce.style.width); + selectByValue(f, 'positioning_width_measurement', getMeasurement(ce.style.width)); + + f.positioning_height.value = getNum(ce.style.height); + selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height)); + + setupBox(f, ce, 'positioning_placement', '', '', ['top', 'right', 'bottom', 'left']); + + s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1"); + s = s.replace(/,/g, ' '); + + if (!hasEqualValues([getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)])) { + f.positioning_clip_top.value = getNum(getVal(s, 0)); + selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); + f.positioning_clip_right.value = getNum(getVal(s, 1)); + selectByValue(f, 'positioning_clip_right_measurement', getMeasurement(getVal(s, 1))); + f.positioning_clip_bottom.value = getNum(getVal(s, 2)); + selectByValue(f, 'positioning_clip_bottom_measurement', getMeasurement(getVal(s, 2))); + f.positioning_clip_left.value = getNum(getVal(s, 3)); + selectByValue(f, 'positioning_clip_left_measurement', getMeasurement(getVal(s, 3))); + } else { + f.positioning_clip_top.value = getNum(getVal(s, 0)); + selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); + f.positioning_clip_right.value = f.positioning_clip_bottom.value = f.positioning_clip_left.value; + } + +// setupBox(f, ce, '', 'border', 'Color'); +} + +function getMeasurement(s) { + return s.replace(/^([0-9.]+)(.*)$/, "$2"); +} + +function getNum(s) { + if (new RegExp('^(?:[0-9.]+)(?:[a-z%]+)$', 'gi').test(s)) + return s.replace(/[^0-9.]/g, ''); + + return s; +} + +function inStr(s, n) { + return new RegExp(n, 'gi').test(s); +} + +function getVal(s, i) { + var a = s.split(' '); + + if (a.length > 1) + return a[i]; + + return ""; +} + +function setValue(f, n, v) { + if (f.elements[n].type == "text") + f.elements[n].value = v; + else + selectByValue(f, n, v, true, true); +} + +function setupBox(f, ce, fp, pr, sf, b) { + if (typeof(b) == "undefined") + b = ['Top', 'Right', 'Bottom', 'Left']; + + if (isSame(ce, pr, sf, b)) { + f.elements[fp + "_same"].checked = true; + + setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); + f.elements[fp + "_top"].disabled = false; + + f.elements[fp + "_right"].value = ""; + f.elements[fp + "_right"].disabled = true; + f.elements[fp + "_bottom"].value = ""; + f.elements[fp + "_bottom"].disabled = true; + f.elements[fp + "_left"].value = ""; + f.elements[fp + "_left"].disabled = true; + + if (f.elements[fp + "_top_measurement"]) { + selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); + f.elements[fp + "_left_measurement"].disabled = true; + f.elements[fp + "_bottom_measurement"].disabled = true; + f.elements[fp + "_right_measurement"].disabled = true; + } + } else { + f.elements[fp + "_same"].checked = false; + + setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); + f.elements[fp + "_top"].disabled = false; + + setValue(f, fp + "_right", getNum(ce.style[pr + b[1] + sf])); + f.elements[fp + "_right"].disabled = false; + + setValue(f, fp + "_bottom", getNum(ce.style[pr + b[2] + sf])); + f.elements[fp + "_bottom"].disabled = false; + + setValue(f, fp + "_left", getNum(ce.style[pr + b[3] + sf])); + f.elements[fp + "_left"].disabled = false; + + if (f.elements[fp + "_top_measurement"]) { + selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); + selectByValue(f, fp + '_right_measurement', getMeasurement(ce.style[pr + b[1] + sf])); + selectByValue(f, fp + '_bottom_measurement', getMeasurement(ce.style[pr + b[2] + sf])); + selectByValue(f, fp + '_left_measurement', getMeasurement(ce.style[pr + b[3] + sf])); + f.elements[fp + "_left_measurement"].disabled = false; + f.elements[fp + "_bottom_measurement"].disabled = false; + f.elements[fp + "_right_measurement"].disabled = false; + } + } +} + +function isSame(e, pr, sf, b) { + var a = [], i, x; + + if (typeof(b) == "undefined") + b = ['Top', 'Right', 'Bottom', 'Left']; + + if (typeof(sf) == "undefined" || sf == null) + sf = ""; + + a[0] = e.style[pr + b[0] + sf]; + a[1] = e.style[pr + b[1] + sf]; + a[2] = e.style[pr + b[2] + sf]; + a[3] = e.style[pr + b[3] + sf]; + + for (i=0; i 0 ? s.substring(1) : s; + + if (f.text_none.checked) + s = "none"; + + ce.style.textDecoration = s; + + // Build background styles + + ce.style.backgroundColor = f.background_color.value; + ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : ""; + ce.style.backgroundRepeat = f.background_repeat.value; + ce.style.backgroundAttachment = f.background_attachment.value; + + if (f.background_hpos.value != "") { + s = ""; + s += f.background_hpos.value + (isNum(f.background_hpos.value) ? f.background_hpos_measurement.value : "") + " "; + s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : ""); + ce.style.backgroundPosition = s; + } + + // Build block styles + + ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : ""); + ce.style.letterSpacing = f.block_letterspacing.value + (isNum(f.block_letterspacing.value) ? f.block_letterspacing_measurement.value : ""); + ce.style.verticalAlign = f.block_vertical_alignment.value; + ce.style.textAlign = f.block_text_align.value; + ce.style.textIndent = f.block_text_indent.value + (isNum(f.block_text_indent.value) ? f.block_text_indent_measurement.value : ""); + ce.style.whiteSpace = f.block_whitespace.value; + ce.style.display = f.block_display.value; + + // Build box styles + + ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : ""); + ce.style.height = f.box_height.value + (isNum(f.box_height.value) ? f.box_height_measurement.value : ""); + ce.style.styleFloat = f.box_float.value; + + if (tinymce.isGecko) + ce.style.cssFloat = f.box_float.value; + + ce.style.clear = f.box_clear.value; + + if (!f.box_padding_same.checked) { + ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); + ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : ""); + ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : ""); + ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : ""); + } else + ce.style.padding = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); + + if (!f.box_margin_same.checked) { + ce.style.marginTop = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); + ce.style.marginRight = f.box_margin_right.value + (isNum(f.box_margin_right.value) ? f.box_margin_right_measurement.value : ""); + ce.style.marginBottom = f.box_margin_bottom.value + (isNum(f.box_margin_bottom.value) ? f.box_margin_bottom_measurement.value : ""); + ce.style.marginLeft = f.box_margin_left.value + (isNum(f.box_margin_left.value) ? f.box_margin_left_measurement.value : ""); + } else + ce.style.margin = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); + + // Build border styles + + if (!f.border_style_same.checked) { + ce.style.borderTopStyle = f.border_style_top.value; + ce.style.borderRightStyle = f.border_style_right.value; + ce.style.borderBottomStyle = f.border_style_bottom.value; + ce.style.borderLeftStyle = f.border_style_left.value; + } else + ce.style.borderStyle = f.border_style_top.value; + + if (!f.border_width_same.checked) { + ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); + ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : ""); + ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : ""); + ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : ""); + } else + ce.style.borderWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); + + if (!f.border_color_same.checked) { + ce.style.borderTopColor = f.border_color_top.value; + ce.style.borderRightColor = f.border_color_right.value; + ce.style.borderBottomColor = f.border_color_bottom.value; + ce.style.borderLeftColor = f.border_color_left.value; + } else + ce.style.borderColor = f.border_color_top.value; + + // Build list styles + + ce.style.listStyleType = f.list_type.value; + ce.style.listStylePosition = f.list_position.value; + ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : ""; + + // Build positioning styles + + ce.style.position = f.positioning_type.value; + ce.style.visibility = f.positioning_visibility.value; + + if (ce.style.width == "") + ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : ""); + + if (ce.style.height == "") + ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : ""); + + ce.style.zIndex = f.positioning_zindex.value; + ce.style.overflow = f.positioning_overflow.value; + + if (!f.positioning_placement_same.checked) { + ce.style.top = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); + ce.style.right = f.positioning_placement_right.value + (isNum(f.positioning_placement_right.value) ? f.positioning_placement_right_measurement.value : ""); + ce.style.bottom = f.positioning_placement_bottom.value + (isNum(f.positioning_placement_bottom.value) ? f.positioning_placement_bottom_measurement.value : ""); + ce.style.left = f.positioning_placement_left.value + (isNum(f.positioning_placement_left.value) ? f.positioning_placement_left_measurement.value : ""); + } else { + s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); + ce.style.top = s; + ce.style.right = s; + ce.style.bottom = s; + ce.style.left = s; + } + + if (!f.positioning_clip_same.checked) { + s = "rect("; + s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto"); + s += ")"; + + if (s != "rect(auto auto auto auto)") + ce.style.clip = s; + } else { + s = "rect("; + t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto"; + s += t + " "; + s += t + " "; + s += t + " "; + s += t + ")"; + + if (s != "rect(auto auto auto auto)") + ce.style.clip = s; + } + + ce.style.cssText = ce.style.cssText; +} + +function isNum(s) { + return new RegExp('[0-9]+', 'g').test(s); +} + +function showDisabledControls() { + var f = document.forms, i, a; + + for (i=0; i 1) { + addSelectValue(f, s, p[0], p[1]); + + if (se) + selectByValue(f, s, p[1]); + } else { + addSelectValue(f, s, p[0], p[0]); + + if (se) + selectByValue(f, s, p[0]); + } + } +} + +function toggleSame(ce, pre) { + var el = document.forms[0].elements, i; + + if (ce.checked) { + el[pre + "_top"].disabled = false; + el[pre + "_right"].disabled = true; + el[pre + "_bottom"].disabled = true; + el[pre + "_left"].disabled = true; + + if (el[pre + "_top_measurement"]) { + el[pre + "_top_measurement"].disabled = false; + el[pre + "_right_measurement"].disabled = true; + el[pre + "_bottom_measurement"].disabled = true; + el[pre + "_left_measurement"].disabled = true; + } + } else { + el[pre + "_top"].disabled = false; + el[pre + "_right"].disabled = false; + el[pre + "_bottom"].disabled = false; + el[pre + "_left"].disabled = false; + + if (el[pre + "_top_measurement"]) { + el[pre + "_top_measurement"].disabled = false; + el[pre + "_right_measurement"].disabled = false; + el[pre + "_bottom_measurement"].disabled = false; + el[pre + "_left_measurement"].disabled = false; + } + } + + showDisabledControls(); +} + +function synch(fr, to) { + var f = document.forms[0]; + + f.elements[to].value = f.elements[fr].value; + + if (f.elements[fr + "_measurement"]) + selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value); +} + +tinyMCEPopup.onInit.add(init); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/style/langs/en_dlg.js b/webapps/totsys/common/js/tiny_mce/plugins/style/langs/en_dlg.js new file mode 100644 index 0000000..d9d7762 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/style/langs/en_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('en.style_dlg',{ +title:"Edit CSS Style", +apply:"Apply", +text_tab:"Text", +background_tab:"Background", +block_tab:"Block", +box_tab:"Box", +border_tab:"Border", +list_tab:"List", +positioning_tab:"Positioning", +text_props:"Text", +text_font:"Font", +text_size:"Size", +text_weight:"Weight", +text_style:"Style", +text_variant:"Variant", +text_lineheight:"Line height", +text_case:"Case", +text_color:"Color", +text_decoration:"Decoration", +text_overline:"overline", +text_underline:"underline", +text_striketrough:"strikethrough", +text_blink:"blink", +text_none:"none", +background_color:"Background color", +background_image:"Background image", +background_repeat:"Repeat", +background_attachment:"Attachment", +background_hpos:"Horizontal position", +background_vpos:"Vertical position", +block_wordspacing:"Word spacing", +block_letterspacing:"Letter spacing", +block_vertical_alignment:"Vertical alignment", +block_text_align:"Text align", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"Width", +box_height:"Height", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Same for all", +top:"Top", +right:"Right", +bottom:"Bottom", +left:"Left", +margin:"Margin", +style:"Style", +width:"Width", +height:"Height", +color:"Color", +list_type:"Type", +bullet_image:"Bullet image", +position:"Position", +positioning_type:"Type", +visibility:"Visibility", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/style/langs/ko_dlg.js b/webapps/totsys/common/js/tiny_mce/plugins/style/langs/ko_dlg.js new file mode 100644 index 0000000..c30f37d --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/style/langs/ko_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('ko.style_dlg',{ +title:"CSS\uD3B8\uC9D1", +apply:"\uC801\uC6A9", +text_tab:"\uD14D\uC2A4\uD2B8", +background_tab:"\uBC30\uACBD", +block_tab:"\uBE14\uB85D", +box_tab:"\uBC15\uC2A4", +border_tab:"\uD14C\uB450\uB9AC\uC120", +list_tab:"\uB9AC\uC2A4\uD2B8", +positioning_tab:"\uC704\uCE58", +text_props:"\uD14D\uC2A4\uD2B8", +text_font:"\uD3F0\uD2B8", +text_size:"\uD06C\uAE30", +text_weight:"\uAD75\uAE30", +text_style:"\uC2A4\uD0C0\uC77C", +text_variant:"Variant", +text_lineheight:"\uD589 \uB192\uC774", +text_case:"\uB300/\uC18C\uBB38\uC790", +text_color:"\uC0C9", +text_decoration:"\uC7A5\uC2DD", +text_overline:"\uC717\uC904", +text_underline:"\uBC11\uC904", +text_striketrough:"\uCDE8\uC18C\uC120", +text_blink:"\uC810\uBA78", +text_none:"\uC5C6\uC74C", +background_color:"\uBC30\uACBD\uC0C9", +background_image:"\uBC30\uACBD \uC774\uBBF8\uC9C0", +background_repeat:"\uBC18\uBCF5", +background_attachment:"\uCCA8\uBD80", +background_hpos:"\uC218\uD3C9 \uC704\uCE58", +background_vpos:"\uC218\uC9C1 \uC704\uCE58", +block_wordspacing:"\uB2E8\uC5B4 \uAC04\uACA9", +block_letterspacing:"\uBB38\uC790 \uAC04\uACA9", +block_vertical_alignment:"\uC218\uC9C1 \uC704\uCE58", +block_text_align:"\uD14D\uC2A4\uD2B8 \uC815\uB82C", +block_text_indent:"\uB4E4\uC5EC\uC4F0\uAE30", +block_whitespace:"\uACF5\uBC31 \uBB38\uC790", +block_display:"\uD45C\uC2DC", +box_width:"\uD3ED", +box_height:"\uB192\uC774", +box_float:"float", +box_clear:"Clear", +padding:"padding", +same:"\uBAA8\uB450 \uB611\uAC19\uC774", +top:"\uC0C1", +right:"\uC6B0", +bottom:"\uD558", +left:"\uC88C", +margin:"\uB9C8\uC9C4", +style:"\uC2A4\uD0C0\uC77C", +width:"\uD3ED", +height:"\uB192\uC774", +color:"\uC0C9", +list_type:"\uBAA9\uB85D\uC885\uB958", +bullet_image:"\uBE14\uB9BF \uC774\uBBF8\uC9C0", +position:"\uC704\uCE58", +positioning_type:"\uD0C0\uC785", +visibility:"\uAC00\uC2DC\uC131", +zindex:"Z-index", +overflow:"\uC624\uBC84\uD50C\uB85C\uC6B0", +placement:"\uC704\uCE58(placement)", +clip:"Clip" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/style/props.htm b/webapps/totsys/common/js/tiny_mce/plugins/style/props.htm new file mode 100644 index 0000000..549ed04 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/style/props.htm @@ -0,0 +1,723 @@ + + + + {#style_dlg.title} + + + + + + + + + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + +
     
    +
    + +
    + + + +
    + + + + + + +
    + +  
    +
    + +
    + + + + + +
     
    +
    {#style_dlg.text_decoration} + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
     
    +
    + + + + +
     
    +
    + + + + + + +
     
    +
    + + + + + + +
     
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
     
    +
    + + + + + + +
     
    +
    + + + + + + +
     
    +
    +
    + +
    + + + + + + + + + + + + + + +
    + + + + + + +
     
    +
       
    + + + + + + +
     
    +
       
    +
    +
    + {#style_dlg.padding} + + + + + + + + + + + + + + + + + + + + + + +
     
    + + + + + + +
     
    +
    + + + + + + +
     
    +
    + + + + + + +
     
    +
    + + + + + + +
     
    +
    +
    +
    + +
    +
    + {#style_dlg.margin} + + + + + + + + + + + + + + + + + + + + + + +
     
    + + + + + + +
     
    +
    + + + + + + +
     
    +
    + + + + + + +
     
    +
    + + + + + + +
     
    +
    +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      {#style_dlg.style} {#style_dlg.width} {#style_dlg.color}
          
    {#style_dlg.top}   + + + + + + +
     
    +
      + + + + + +
     
    +
    {#style_dlg.right}   + + + + + + +
     
    +
      + + + + + +
     
    +
    {#style_dlg.bottom}   + + + + + + +
     
    +
      + + + + + +
     
    +
    {#style_dlg.left}   + + + + + + +
     
    +
      + + + + + +
     
    +
    +
    + +
    + + + + + + + + + + + + + + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + +
       
    + + + + + + +
     
    +
       
    + + + + + + +
     
    +
       
    + +
    +
    + {#style_dlg.placement} + + + + + + + + + + + + + + + + + + + + + + +
     
    {#style_dlg.top} + + + + + + +
     
    +
    {#style_dlg.right} + + + + + + +
     
    +
    {#style_dlg.bottom} + + + + + + +
     
    +
    {#style_dlg.left} + + + + + + +
     
    +
    +
    +
    + +
    +
    + {#style_dlg.clip} + + + + + + + + + + + + + + + + + + + + + + +
     
    {#style_dlg.top} + + + + + + +
     
    +
    {#style_dlg.right} + + + + + + +
     
    +
    {#style_dlg.bottom} + + + + + + +
     
    +
    {#style_dlg.left} + + + + + + +
     
    +
    +
    +
    +
    +
    +
    + +
    + + + +
    +
    + +
    +
    +
    + + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/tabfocus/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/tabfocus/editor_plugin.js new file mode 100644 index 0000000..27d2440 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/tabfocus/editor_plugin.js @@ -0,0 +1 @@ +(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(i){o=c.getParent(l.id,"form");n=o.elements;if(o){d(n,function(s,r){if(s.id==l.id){j=r;return false}});if(i>0){for(m=j+1;m=0;m--){if(n[m].type!="hidden"){return n[m]}}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(l=tinymce.get(n.id||n.name)){l.focus()}else{window.setTimeout(function(){window.focus();n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}f.onInit.add(function(){d(c.select("a:first,a:last",f.getContainer()),function(i){a.add(i,"focus",function(){f.focus()})})})},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js new file mode 100644 index 0000000..e0e9635 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js @@ -0,0 +1,112 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode; + + tinymce.create('tinymce.plugins.TabFocusPlugin', { + init : function(ed, url) { + function tabCancel(ed, e) { + if (e.keyCode === 9) + return Event.cancel(e); + }; + + function tabHandler(ed, e) { + var x, i, f, el, v; + + function find(d) { + f = DOM.getParent(ed.id, 'form'); + el = f.elements; + + if (f) { + each(el, function(e, i) { + if (e.id == ed.id) { + x = i; + return false; + } + }); + + if (d > 0) { + for (i = x + 1; i < el.length; i++) { + if (el[i].type != 'hidden') + return el[i]; + } + } else { + for (i = x - 1; i >= 0; i--) { + if (el[i].type != 'hidden') + return el[i]; + } + } + } + + return null; + }; + + if (e.keyCode === 9) { + v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next'))); + + if (v.length == 1) { + v[1] = v[0]; + v[0] = ':prev'; + } + + // Find element to focus + if (e.shiftKey) { + if (v[0] == ':prev') + el = find(-1); + else + el = DOM.get(v[0]); + } else { + if (v[1] == ':next') + el = find(1); + else + el = DOM.get(v[1]); + } + + if (el) { + if (ed = tinymce.get(el.id || el.name)) + ed.focus(); + else + window.setTimeout(function() {window.focus();el.focus();}, 10); + + return Event.cancel(e); + } + } + }; + + ed.onKeyUp.add(tabCancel); + + if (tinymce.isGecko) { + ed.onKeyPress.add(tabHandler); + ed.onKeyDown.add(tabCancel); + } else + ed.onKeyDown.add(tabHandler); + + ed.onInit.add(function() { + each(DOM.select('a:first,a:last', ed.getContainer()), function(n) { + Event.add(n, 'focus', function() {ed.focus();}); + }); + }); + }, + + getInfo : function() { + return { + longname : 'Tabfocus', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/table/cell.htm b/webapps/totsys/common/js/tiny_mce/plugins/table/cell.htm new file mode 100644 index 0000000..af7e003 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/table/cell.htm @@ -0,0 +1,178 @@ + + + + {#table_dlg.cell_title} + + + + + + + + +
    + + +
    +
    +
    + {#table_dlg.general_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + +
    +
    +
    + +
    +
    + {#table_dlg.advanced_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    + + + + + +
     
    +
    +
    +
    +
    + +
    +
    + +
    + + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/table/css/cell.css b/webapps/totsys/common/js/tiny_mce/plugins/table/css/cell.css new file mode 100644 index 0000000..a47cc1a --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/table/css/cell.css @@ -0,0 +1,17 @@ +/* CSS file for cell dialog in the table plugin */ + +.panel_wrapper div.current { + height: 200px; +} + +.advfield { + width: 200px; +} + +#action { + margin-bottom: 3px; +} + +#class { + width: 150px; +} \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/table/css/row.css b/webapps/totsys/common/js/tiny_mce/plugins/table/css/row.css new file mode 100644 index 0000000..0e397db --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/table/css/row.css @@ -0,0 +1,25 @@ +/* CSS file for row dialog in the table plugin */ + +.panel_wrapper div.current { + height: 200px; +} + +.advfield { + width: 200px; +} + +#action { + margin-bottom: 3px; +} + +#rowtype,#align,#valign,#class,#height { + width: 150px; +} + +#height { + width: 50px; +} + +.col2 { + padding-left: 20px; +} diff --git a/webapps/totsys/common/js/tiny_mce/plugins/table/css/table.css b/webapps/totsys/common/js/tiny_mce/plugins/table/css/table.css new file mode 100644 index 0000000..8f10783 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/table/css/table.css @@ -0,0 +1,13 @@ +/* CSS file for table dialog in the table plugin */ + +.panel_wrapper div.current { + height: 245px; +} + +.advfield { + width: 200px; +} + +#class { + width: 150px; +} diff --git a/webapps/totsys/common/js/tiny_mce/plugins/table/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/table/editor_plugin.js new file mode 100644 index 0000000..266d7d5 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/table/editor_plugin.js @@ -0,0 +1 @@ +(function(b){var c=b.each;function a(F,E,I){var e,J,B,n;r();n=E.getParent(I.getStart(),"th,td");if(n){J=D(n);B=G();n=v(J.x,J.y)}function w(L,K){L=L.cloneNode(K);L.removeAttribute("id");return L}function r(){var K=0;e=[];c(["thead","tbody","tfoot"],function(L){var M=E.select(L+" tr",F);c(M,function(N,O){O+=K;c(E.select("td,th",N),function(U,P){var Q,R,S,T;if(e[O]){while(e[O][P]){P++}}S=g(U,"rowspan");T=g(U,"colspan");for(R=O;R'}return false}},"childNodes");K=w(K,false);K.rowSpan=K.colSpan=1;if(L){K.appendChild(L)}else{if(!b.isIE){K.innerHTML='
    '}}return K}function p(){var K=E.createRng();c(E.select("tr",F),function(L){if(L.cells.length==0){E.remove(L)}});if(E.select("tr",F).length==0){K.setStartAfter(F);K.setEndAfter(F);I.setRng(K);E.remove(F);return}c(E.select("thead,tbody,tfoot",F),function(L){if(L.rows.length==0){E.remove(L)}});r();row=e[Math.min(e.length-1,J.y)];if(row){I.select(row[Math.min(row.length-1,J.x)].elm,true);I.collapse(true)}}function s(Q,O,S,P){var N,L,K,M,R;N=e[O][Q].elm.parentNode;for(K=1;K<=S;K++){N=E.getNext(N,"tr");if(N){for(L=Q;L>=0;L--){R=e[O+K][L].elm;if(R.parentNode==N){for(M=1;M<=P;M++){E.insertAfter(d(R),R)}break}}if(L==-1){for(M=1;M<=P;M++){N.insertBefore(d(N.cells[0]),N.cells[0])}}}}}function A(){c(e,function(K,L){c(K,function(N,M){var Q,P,R,O;if(h(N)){N=N.elm;Q=g(N,"colspan");P=g(N,"rowspan");if(Q>1||P>1){N.colSpan=N.rowSpan=1;for(O=0;O1){P.rowSpan=rowSpan+1;continue}}else{if(K>0&&e[K-1][O]){S=e[K-1][O].elm;rowSpan=g(S,"rowspan");if(rowSpan>1){S.rowSpan=rowSpan+1;continue}}}L=d(P);L.colSpan=P.colSpan;R.appendChild(L);M=P}}if(R.hasChildNodes()){if(!N){E.insertAfter(R,Q)}else{Q.parentNode.insertBefore(R,Q)}}}function f(L){var M,K;c(e,function(N,O){c(N,function(Q,P){if(h(Q)){M=P;if(L){return false}}});if(L){return !M}});c(e,function(Q,R){var N=Q[M].elm,O,P;if(N!=K){P=g(N,"colspan");O=g(N,"rowspan");if(P==1){if(!L){E.insertAfter(d(N),N);s(M,R,O-1,P)}else{N.parentNode.insertBefore(d(N),N);s(M,R,O-1,P)}}else{N.colSpan++}K=N}})}function m(){var K=[];c(e,function(L,M){c(L,function(O,N){if(h(O)&&b.inArray(K,N)===-1){c(e,function(R){var P=R[N].elm,Q;Q=g(P,"colspan");if(Q>1){P.colSpan=Q-1}else{E.remove(P)}});K.push(N)}})});p()}function l(){var L;function K(O){var N,P,M;N=E.getNext(O,"tr");c(O.cells,function(Q){var R=g(Q,"rowspan");if(R>1){Q.rowSpan=R-1;P=D(Q);s(P.x,P.y,1,1)}});P=D(O.cells[0]);c(e[P.y],function(Q){var R;Q=Q.elm;if(Q!=M){R=g(Q,"rowspan");if(R<=1){E.remove(Q)}else{Q.rowSpan=R-1}M=Q}})}L=j();c(L.reverse(),function(M){K(M)});p()}function C(){var K=j();E.remove(K);p();return K}function H(){var K=j();c(K,function(M,L){K[L]=w(M,true)});return K}function z(M,L){var N=j(),K=N[L?0:N.length-1],O=K.cells.length;c(e,function(Q){var P;O=0;c(Q,function(S,R){if(S.real){O+=S.colspan}if(S.elm.parentNode==K){P=1}});if(P){return false}});if(!L){M.reverse()}c(M,function(R){var Q=R.cells.length,P;for(i=0;iL){L=P}if(O>K){K=O}if(Q.real){S=Q.colspan-1;R=Q.rowspan-1;if(S){if(P+S>L){L=P+S}}if(R){if(O+R>K){K=O+R}}}}})});return{x:L,y:K}}function t(Q){var N,M,S,R,L,K,O,P;B=D(Q);if(J&&B){N=Math.min(J.x,B.x);M=Math.min(J.y,B.y);S=Math.max(J.x,B.x);R=Math.max(J.y,B.y);L=S;K=R;for(y=M;y<=K;y++){Q=e[y][N];if(!Q.real){if(N-(Q.colspan-1)L){L=x+O}}if(P){if(y+P>K){K=y+P}}}}}E.removeClass(E.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=M;y<=K;y++){for(x=N;x<=L;x++){E.addClass(e[y][x].elm,"mceSelected")}}}}b.extend(this,{deleteTable:q,split:A,merge:o,insertRow:k,insertCol:f,deleteCols:m,deleteRows:l,cutRows:C,copyRows:H,pasteRows:z,getPos:D,setStartCell:u,setEndCell:t})}b.create("tinymce.plugins.TablePlugin",{init:function(e,f){var d,j;function h(m){var l=e.selection,k=e.dom.getParent(m||l.getNode(),"table");if(k){return new a(k,e.dom,l)}}function g(){e.getBody().style.webkitUserSelect="";e.dom.removeClass(e.dom.select("td.mceSelected,th.mceSelected"),"mceSelected")}c([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(k){e.addButton(k[0],{title:k[1],cmd:k[2],ui:k[3]})});if(!b.isIE){e.onClick.add(function(k,l){l=l.target;if(l.nodeName==="TABLE"){k.selection.select(l)}})}e.onNodeChange.add(function(l,k,o){var m;o=l.selection.getStart();m=l.dom.getParent(o,"td,th,caption");k.setActive("table",o.nodeName==="TABLE"||!!m);if(m&&m.nodeName==="CAPTION"){m=0}k.setDisabled("delete_table",!m);k.setDisabled("delete_col",!m);k.setDisabled("delete_table",!m);k.setDisabled("delete_row",!m);k.setDisabled("col_after",!m);k.setDisabled("col_before",!m);k.setDisabled("row_after",!m);k.setDisabled("row_before",!m);k.setDisabled("row_props",!m);k.setDisabled("cell_props",!m);k.setDisabled("split_cells",!m);k.setDisabled("merge_cells",!m)});e.onInit.add(function(l){var k,o,p=l.dom,m;d=l.windowManager;l.onMouseDown.add(function(q,r){if(r.button!=2){g();o=p.getParent(r.target,"td,th");k=p.getParent(o,"table")}});p.bind(l.getDoc(),"mouseover",function(t){var r,q,s=t.target;if(o&&(m||s!=o)&&(s.nodeName=="TD"||s.nodeName=="TH")){q=p.getParent(s,"table");if(q==k){if(!m){m=h(q);m.setStartCell(o);l.getBody().style.webkitUserSelect="none"}m.setEndCell(s)}r=l.selection.getSel();if(r.removeAllRanges){r.removeAllRanges()}else{r.empty()}t.preventDefault()}});l.onMouseUp.add(function(z,A){var r,t=z.selection,B,C=t.getSel(),q,u,s,w;if(o){if(m){z.getBody().style.webkitUserSelect=""}function v(D,F){var E=new b.dom.TreeWalker(D,D);do{if(D.nodeType==3&&b.trim(D.nodeValue).length!=0){if(F){r.setStart(D,0)}else{r.setEnd(D,D.nodeValue.length)}return}if(D.nodeName=="BR"){if(F){r.setStartBefore(D)}else{r.setEndBefore(D)}return}}while(D=(F?E.next():E.prev()))}B=p.select("td.mceSelected,th.mceSelected");if(B.length>0){r=p.createRng();u=B[0];w=B[B.length-1];v(u,1);q=new b.dom.TreeWalker(u,p.getParent(B[0],"table"));do{if(u.nodeName=="TD"||u.nodeName=="TH"){if(!p.hasClass(u,"mceSelected")){break}s=u}}while(u=q.next());v(s);t.setRng(r)}z.nodeChanged();o=m=k=null}});l.onKeyUp.add(function(q,r){g()});if(l&&l.plugins.contextmenu){l.plugins.contextmenu.onContextMenu.add(function(s,q,u){var v,t=l.selection,r=t.getNode()||l.getBody();if(l.dom.getParent(u,"td")||l.dom.getParent(u,"th")||l.dom.select("td.mceSelected,th.mceSelected").length){q.removeAll();if(r.nodeName=="A"&&!l.dom.getAttrib(r,"name")){q.add({title:"advanced.link_desc",icon:"link",cmd:l.plugins.advlink?"mceAdvLink":"mceLink",ui:true});q.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});q.addSeparator()}if(r.nodeName=="IMG"&&r.className.indexOf("mceItem")==-1){q.add({title:"advanced.image_desc",icon:"image",cmd:l.plugins.advimage?"mceAdvImage":"mceImage",ui:true});q.addSeparator()}q.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});q.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});q.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});q.addSeparator();v=q.addMenu({title:"table.cell"});v.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});v.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});v.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});v=q.addMenu({title:"table.row"});v.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});v.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});v.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});v.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});v.addSeparator();v.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});v.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});v.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!j);v.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!j);v=q.addMenu({title:"table.col"});v.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});v.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});v.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{q.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(!b.isIE){function n(){var q;for(q=l.getBody().lastChild;q&&q.nodeType==3&&!q.nodeValue.length;q=q.previousSibling){}if(q&&q.nodeName=="TABLE"){l.dom.add(l.getBody(),"p",null,'
    ')}}if(b.isGecko){l.onKeyDown.add(function(r,t){var q,s,u=r.dom;if(t.keyCode==37||t.keyCode==38){q=r.selection.getRng();s=u.getParent(q.startContainer,"table");if(s&&r.getBody().firstChild==s){if(isAtStart(q,s)){q=u.createRng();q.setStartBefore(s);q.setEndBefore(s);r.selection.setRng(q);t.preventDefault()}}}})}l.onKeyUp.add(n);l.onSetContent.add(n);l.onVisualAid.add(n);l.onPreProcess.add(function(q,s){var r=s.node.lastChild;if(r&&r.childNodes.length==1&&r.firstChild.nodeName=="BR"){q.dom.remove(r)}});n()}});c({mceTableSplitCells:function(k){k.split()},mceTableMergeCells:function(l){var m,n,k;k=e.dom.getParent(e.selection.getNode(),"th,td");if(k){m=k.rowSpan;n=k.colSpan}if(!e.dom.select("td.mceSelected,th.mceSelected").length){d.open({url:f+"/merge_cells.htm",width:240+parseInt(e.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(e.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:m,cols:n,onaction:function(o){l.merge(k,o.cols,o.rows)},plugin_url:f})}else{l.merge()}},mceTableInsertRowBefore:function(k){k.insertRow(true)},mceTableInsertRowAfter:function(k){k.insertRow()},mceTableInsertColBefore:function(k){k.insertCol(true)},mceTableInsertColAfter:function(k){k.insertCol()},mceTableDeleteCol:function(k){k.deleteCols()},mceTableDeleteRow:function(k){k.deleteRows()},mceTableCutRow:function(k){j=k.cutRows()},mceTableCopyRow:function(k){j=k.copyRows()},mceTablePasteRowBefore:function(k){k.pasteRows(j,true)},mceTablePasteRowAfter:function(k){k.pasteRows(j)},mceTableDelete:function(k){k.deleteTable()}},function(l,k){e.addCommand(k,function(){var m=h();if(m){l(m);e.execCommand("mceRepaint");g()}})});c({mceInsertTable:function(k){d.open({url:f+"/table.htm",width:400+parseInt(e.getLang("table.table_delta_width",0)),height:320+parseInt(e.getLang("table.table_delta_height",0)),inline:1},{plugin_url:f,action:k?k.action:0})},mceTableRowProps:function(){d.open({url:f+"/row.htm",width:400+parseInt(e.getLang("table.rowprops_delta_width",0)),height:295+parseInt(e.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:f})},mceTableCellProps:function(){d.open({url:f+"/cell.htm",width:400+parseInt(e.getLang("table.cellprops_delta_width",0)),height:295+parseInt(e.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:f})}},function(l,k){e.addCommand(k,function(m,n){l(n)})})}});b.PluginManager.add("table",b.plugins.TablePlugin)})(tinymce); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/table/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/table/editor_plugin_src.js new file mode 100644 index 0000000..0195e96 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/table/editor_plugin_src.js @@ -0,0 +1,1125 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var each = tinymce.each; + + /** + * Table Grid class. + */ + function TableGrid(table, dom, selection) { + var grid, startPos, endPos, selectedCell; + + buildGrid(); + selectedCell = dom.getParent(selection.getStart(), 'th,td'); + if (selectedCell) { + startPos = getPos(selectedCell); + endPos = findEndPos(); + selectedCell = getCell(startPos.x, startPos.y); + } + + function cloneNode(node, children) { + node = node.cloneNode(children); + node.removeAttribute('id'); + + return node; + } + + function buildGrid() { + var startY = 0; + + grid = []; + + each(['thead', 'tbody', 'tfoot'], function(part) { + var rows = dom.select(part + ' tr', table); + + each(rows, function(tr, y) { + y += startY; + + each(dom.select('td,th', tr), function(td, x) { + var x2, y2, rowspan, colspan; + + // Skip over existing cells produced by rowspan + if (grid[y]) { + while (grid[y][x]) + x++; + } + + // Get col/rowspan from cell + rowspan = getSpanVal(td, 'rowspan'); + colspan = getSpanVal(td, 'colspan'); + + // Fill out rowspan/colspan right and down + for (y2 = y; y2 < y + rowspan; y2++) { + if (!grid[y2]) + grid[y2] = []; + + for (x2 = x; x2 < x + colspan; x2++) { + grid[y2][x2] = { + part : part, + real : y2 == y && x2 == x, + elm : td, + rowspan : rowspan, + colspan : colspan + }; + } + } + }); + }); + + startY += rows.length; + }); + }; + + function getCell(x, y) { + var row; + + row = grid[y]; + if (row) + return row[x]; + }; + + function getSpanVal(td, name) { + return parseInt(td.getAttribute(name) || 1); + }; + + function isCellSelected(cell) { + return dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell; + }; + + function getSelectedRows() { + var rows = []; + + each(table.rows, function(row) { + each(row.cells, function(cell) { + if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) { + rows.push(row); + return false; + } + }); + }); + + return rows; + }; + + function deleteTable() { + var rng = dom.createRng(); + + rng.setStartAfter(table); + rng.setEndAfter(table); + + selection.setRng(rng); + + dom.remove(table); + }; + + function cloneCell(cell) { + var formatNode; + + // Clone formats + tinymce.walk(cell, function(node) { + var curNode; + + if (node.nodeType == 3) { + each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) { + node = cloneNode(node, false); + + if (!formatNode) + formatNode = curNode = node; + else if (curNode) + curNode.appendChild(node); + + curNode = node; + }); + + // Add something to the inner node + if (curNode) + curNode.innerHTML = tinymce.isIE ? ' ' : '
    '; + + return false; + } + }, 'childNodes'); + + cell = cloneNode(cell, false); + cell.rowSpan = cell.colSpan = 1; + + if (formatNode) { + cell.appendChild(formatNode); + } else { + if (!tinymce.isIE) + cell.innerHTML = '
    '; + } + + return cell; + }; + + function cleanup() { + var rng = dom.createRng(); + + // Empty rows + each(dom.select('tr', table), function(tr) { + if (tr.cells.length == 0) + dom.remove(tr); + }); + + // Empty table + if (dom.select('tr', table).length == 0) { + rng.setStartAfter(table); + rng.setEndAfter(table); + selection.setRng(rng); + dom.remove(table); + return; + } + + // Empty header/body/footer + each(dom.select('thead,tbody,tfoot', table), function(part) { + if (part.rows.length == 0) + dom.remove(part); + }); + + // Restore selection to start position if it still exists + buildGrid(); + + // Restore the selection to the closest table position + row = grid[Math.min(grid.length - 1, startPos.y)]; + if (row) { + selection.select(row[Math.min(row.length - 1, startPos.x)].elm, true); + selection.collapse(true); + } + }; + + function fillLeftDown(x, y, rows, cols) { + var tr, x2, r, c, cell; + + tr = grid[y][x].elm.parentNode; + for (r = 1; r <= rows; r++) { + tr = dom.getNext(tr, 'tr'); + + if (tr) { + // Loop left to find real cell + for (x2 = x; x2 >= 0; x2--) { + cell = grid[y + r][x2].elm; + + if (cell.parentNode == tr) { + // Append clones after + for (c = 1; c <= cols; c++) + dom.insertAfter(cloneCell(cell), cell); + + break; + } + } + + if (x2 == -1) { + // Insert nodes before first cell + for (c = 1; c <= cols; c++) + tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]); + } + } + } + }; + + function split() { + each(grid, function(row, y) { + each(row, function(cell, x) { + var colSpan, rowSpan, newCell, i; + + if (isCellSelected(cell)) { + cell = cell.elm; + colSpan = getSpanVal(cell, 'colspan'); + rowSpan = getSpanVal(cell, 'rowspan'); + + if (colSpan > 1 || rowSpan > 1) { + cell.colSpan = cell.rowSpan = 1; + + // Insert cells right + for (i = 0; i < colSpan - 1; i++) + dom.insertAfter(cloneCell(cell), cell); + + fillLeftDown(x, y, rowSpan - 1, colSpan); + } + } + }); + }); + }; + + function merge(cell, cols, rows) { + var startX, startY, endX, endY, x, y, startCell, endCell, cell, children; + + // Use specified cell and cols/rows + if (cell) { + pos = getPos(cell); + startX = pos.x; + startY = pos.y; + endX = startX + (cols - 1); + endY = startY + (rows - 1); + } else { + // Use selection + startX = startPos.x; + startY = startPos.y; + endX = endPos.x; + endY = endPos.y; + } + + // Find start/end cells + startCell = getCell(startX, startY); + endCell = getCell(endX, endY); + + // Check if the cells exists and if they are of the same part for example tbody = tbody + if (startCell && endCell && startCell.part == endCell.part) { + // Split and rebuild grid + split(); + buildGrid(); + + // Set row/col span to start cell + startCell = getCell(startX, startY).elm; + startCell.colSpan = (endX - startX) + 1; + startCell.rowSpan = (endY - startY) + 1; + + // Remove other cells and add it's contents to the start cell + for (y = startY; y <= endY; y++) { + for (x = startX; x <= endX; x++) { + cell = grid[y][x].elm; + + if (cell != startCell) { + // Move children to startCell + children = tinymce.grep(cell.childNodes); + each(children, function(node, i) { + // Jump over last BR element + if (node.nodeName != 'BR' || i != children.length - 1) + startCell.appendChild(node); + }); + + // Remove cell + dom.remove(cell); + } + } + } + + // Remove empty rows etc and restore caret location + cleanup(); + } + }; + + function insertRow(before) { + var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell; + + // Find first/last row + each(grid, function(row, y) { + each(row, function(cell, x) { + if (isCellSelected(cell)) { + cell = cell.elm; + rowElm = cell.parentNode; + newRow = cloneNode(rowElm, false); + posY = y; + + if (before) + return false; + } + }); + + if (before) + return !posY; + }); + + for (x = 0; x < grid[0].length; x++) { + cell = grid[posY][x].elm; + + if (cell != lastCell) { + if (!before) { + rowSpan = getSpanVal(cell, 'rowspan'); + if (rowSpan > 1) { + cell.rowSpan = rowSpan + 1; + continue; + } + } else { + // Check if cell above can be expanded + if (posY > 0 && grid[posY - 1][x]) { + otherCell = grid[posY - 1][x].elm; + rowSpan = getSpanVal(otherCell, 'rowspan'); + if (rowSpan > 1) { + otherCell.rowSpan = rowSpan + 1; + continue; + } + } + } + + // Insert new cell into new row + newCell = cloneCell(cell) + newCell.colSpan = cell.colSpan; + newRow.appendChild(newCell); + + lastCell = cell; + } + } + + if (newRow.hasChildNodes()) { + if (!before) + dom.insertAfter(newRow, rowElm); + else + rowElm.parentNode.insertBefore(newRow, rowElm); + } + }; + + function insertCol(before) { + var posX, lastCell; + + // Find first/last column + each(grid, function(row, y) { + each(row, function(cell, x) { + if (isCellSelected(cell)) { + posX = x; + + if (before) + return false; + } + }); + + if (before) + return !posX; + }); + + each(grid, function(row, y) { + var cell = row[posX].elm, rowSpan, colSpan; + + if (cell != lastCell) { + colSpan = getSpanVal(cell, 'colspan'); + rowSpan = getSpanVal(cell, 'rowspan'); + + if (colSpan == 1) { + if (!before) { + dom.insertAfter(cloneCell(cell), cell); + fillLeftDown(posX, y, rowSpan - 1, colSpan); + } else { + cell.parentNode.insertBefore(cloneCell(cell), cell); + fillLeftDown(posX, y, rowSpan - 1, colSpan); + } + } else + cell.colSpan++; + + lastCell = cell; + } + }); + }; + + function deleteCols() { + var cols = []; + + // Get selected column indexes + each(grid, function(row, y) { + each(row, function(cell, x) { + if (isCellSelected(cell) && tinymce.inArray(cols, x) === -1) { + each(grid, function(row) { + var cell = row[x].elm, colSpan; + + colSpan = getSpanVal(cell, 'colspan'); + + if (colSpan > 1) + cell.colSpan = colSpan - 1; + else + dom.remove(cell); + }); + + cols.push(x); + } + }); + }); + + cleanup(); + }; + + function deleteRows() { + var rows; + + function deleteRow(tr) { + var nextTr, pos, lastCell; + + nextTr = dom.getNext(tr, 'tr'); + + // Move down row spanned cells + each(tr.cells, function(cell) { + var rowSpan = getSpanVal(cell, 'rowspan'); + + if (rowSpan > 1) { + cell.rowSpan = rowSpan - 1; + pos = getPos(cell); + fillLeftDown(pos.x, pos.y, 1, 1); + } + }); + + // Delete cells + pos = getPos(tr.cells[0]); + each(grid[pos.y], function(cell) { + var rowSpan; + + cell = cell.elm; + + if (cell != lastCell) { + rowSpan = getSpanVal(cell, 'rowspan'); + + if (rowSpan <= 1) + dom.remove(cell); + else + cell.rowSpan = rowSpan - 1; + + lastCell = cell; + } + }); + }; + + // Get selected rows and move selection out of scope + rows = getSelectedRows(); + + // Delete all selected rows + each(rows.reverse(), function(tr) { + deleteRow(tr); + }); + + cleanup(); + }; + + function cutRows() { + var rows = getSelectedRows(); + + dom.remove(rows); + cleanup(); + + return rows; + }; + + function copyRows() { + var rows = getSelectedRows(); + + each(rows, function(row, i) { + rows[i] = cloneNode(row, true); + }); + + return rows; + }; + + function pasteRows(rows, before) { + var selectedRows = getSelectedRows(), + targetRow = selectedRows[before ? 0 : selectedRows.length - 1], + targetCellCount = targetRow.cells.length; + + // Calc target cell count + each(grid, function(row) { + var match; + + targetCellCount = 0; + each(row, function(cell, x) { + if (cell.real) + targetCellCount += cell.colspan; + + if (cell.elm.parentNode == targetRow) + match = 1; + }); + + if (match) + return false; + }); + + if (!before) + rows.reverse(); + + each(rows, function(row) { + var cellCount = row.cells.length, cell; + + // Remove col/rowspans + for (i = 0; i < cellCount; i++) { + cell = row.cells[i]; + cell.colSpan = cell.rowSpan = 1; + } + + // Needs more cells + for (i = cellCount; i < targetCellCount; i++) + row.appendChild(cloneCell(row.cells[cellCount - 1])); + + // Needs less cells + for (i = targetCellCount; i < cellCount; i++) + dom.remove(row.cells[i]); + + // Add before/after + if (before) + targetRow.parentNode.insertBefore(row, targetRow); + else + dom.insertAfter(row, targetRow); + }); + }; + + function getPos(target) { + var pos; + + each(grid, function(row, y) { + each(row, function(cell, x) { + if (cell.elm == target) { + pos = {x : x, y : y}; + return false; + } + }); + + return !pos; + }); + + return pos; + }; + + function setStartCell(cell) { + startPos = getPos(cell); + }; + + function findEndPos() { + var pos, maxX, maxY; + + maxX = maxY = 0; + + each(grid, function(row, y) { + each(row, function(cell, x) { + var colSpan, rowSpan; + + if (isCellSelected(cell)) { + cell = grid[y][x]; + + if (x > maxX) + maxX = x; + + if (y > maxY) + maxY = y; + + if (cell.real) { + colSpan = cell.colspan - 1; + rowSpan = cell.rowspan - 1; + + if (colSpan) { + if (x + colSpan > maxX) + maxX = x + colSpan; + } + + if (rowSpan) { + if (y + rowSpan > maxY) + maxY = y + rowSpan; + } + } + } + }); + }); + + return {x : maxX, y : maxY}; + }; + + function setEndCell(cell) { + var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan; + + endPos = getPos(cell); + + if (startPos && endPos) { + // Get start/end positions + startX = Math.min(startPos.x, endPos.x); + startY = Math.min(startPos.y, endPos.y); + endX = Math.max(startPos.x, endPos.x); + endY = Math.max(startPos.y, endPos.y); + + // Expand end positon to include spans + maxX = endX; + maxY = endY; + + // Expand startX + for (y = startY; y <= maxY; y++) { + cell = grid[y][startX]; + + if (!cell.real) { + if (startX - (cell.colspan - 1) < startX) + startX -= cell.colspan - 1; + } + } + + // Expand startY + for (x = startX; x <= maxX; x++) { + cell = grid[startY][x]; + + if (!cell.real) { + if (startY - (cell.rowspan - 1) < startY) + startY -= cell.rowspan - 1; + } + } + + // Find max X, Y + for (y = startY; y <= endY; y++) { + for (x = startX; x <= endX; x++) { + cell = grid[y][x]; + + if (cell.real) { + colSpan = cell.colspan - 1; + rowSpan = cell.rowspan - 1; + + if (colSpan) { + if (x + colSpan > maxX) + maxX = x + colSpan; + } + + if (rowSpan) { + if (y + rowSpan > maxY) + maxY = y + rowSpan; + } + } + } + } + + // Remove current selection + dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); + + // Add new selection + for (y = startY; y <= maxY; y++) { + for (x = startX; x <= maxX; x++) + dom.addClass(grid[y][x].elm, 'mceSelected'); + } + } + }; + + // Expose to public + tinymce.extend(this, { + deleteTable : deleteTable, + split : split, + merge : merge, + insertRow : insertRow, + insertCol : insertCol, + deleteCols : deleteCols, + deleteRows : deleteRows, + cutRows : cutRows, + copyRows : copyRows, + pasteRows : pasteRows, + getPos : getPos, + setStartCell : setStartCell, + setEndCell : setEndCell + }); + }; + + tinymce.create('tinymce.plugins.TablePlugin', { + init : function(ed, url) { + var winMan, clipboardRows; + + function createTableGrid(node) { + var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table'); + + if (tblElm) + return new TableGrid(tblElm, ed.dom, selection); + }; + + function cleanup() { + // Restore selection possibilities + ed.getBody().style.webkitUserSelect = ''; + ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); + }; + + // Register buttons + each([ + ['table', 'table.desc', 'mceInsertTable', true], + ['delete_table', 'table.del', 'mceTableDelete'], + ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'], + ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'], + ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'], + ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'], + ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'], + ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'], + ['row_props', 'table.row_desc', 'mceTableRowProps', true], + ['cell_props', 'table.cell_desc', 'mceTableCellProps', true], + ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true], + ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true] + ], function(c) { + ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]}); + }); + + // Select whole table is a table border is clicked + if (!tinymce.isIE) { + ed.onClick.add(function(ed, e) { + e = e.target; + + if (e.nodeName === 'TABLE') + ed.selection.select(e); + }); + } + + // Handle node change updates + ed.onNodeChange.add(function(ed, cm, n) { + var p; + + n = ed.selection.getStart(); + p = ed.dom.getParent(n, 'td,th,caption'); + cm.setActive('table', n.nodeName === 'TABLE' || !!p); + + // Disable table tools if we are in caption + if (p && p.nodeName === 'CAPTION') + p = 0; + + cm.setDisabled('delete_table', !p); + cm.setDisabled('delete_col', !p); + cm.setDisabled('delete_table', !p); + cm.setDisabled('delete_row', !p); + cm.setDisabled('col_after', !p); + cm.setDisabled('col_before', !p); + cm.setDisabled('row_after', !p); + cm.setDisabled('row_before', !p); + cm.setDisabled('row_props', !p); + cm.setDisabled('cell_props', !p); + cm.setDisabled('split_cells', !p); + cm.setDisabled('merge_cells', !p); + }); + + ed.onInit.add(function(ed) { + var startTable, startCell, dom = ed.dom, tableGrid; + + winMan = ed.windowManager; + + // Add cell selection logic + ed.onMouseDown.add(function(ed, e) { + if (e.button != 2) { + cleanup(); + + startCell = dom.getParent(e.target, 'td,th'); + startTable = dom.getParent(startCell, 'table'); + } + }); + + dom.bind(ed.getDoc(), 'mouseover', function(e) { + var sel, table, target = e.target; + + if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) { + table = dom.getParent(target, 'table'); + if (table == startTable) { + if (!tableGrid) { + tableGrid = createTableGrid(table); + tableGrid.setStartCell(startCell); + + ed.getBody().style.webkitUserSelect = 'none'; + } + + tableGrid.setEndCell(target); + } + + // Remove current selection + sel = ed.selection.getSel(); + + if (sel.removeAllRanges) + sel.removeAllRanges(); + else + sel.empty(); + + e.preventDefault(); + } + }); + + ed.onMouseUp.add(function(ed, e) { + var rng, sel = ed.selection, selectedCells, nativeSel = sel.getSel(), walker, node, lastNode, endNode; + + // Move selection to startCell + if (startCell) { + if (tableGrid) + ed.getBody().style.webkitUserSelect = ''; + + function setPoint(node, start) { + var walker = new tinymce.dom.TreeWalker(node, node); + + do { + // Text node + if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) { + if (start) + rng.setStart(node, 0); + else + rng.setEnd(node, node.nodeValue.length); + + return; + } + + // BR element + if (node.nodeName == 'BR') { + if (start) + rng.setStartBefore(node); + else + rng.setEndBefore(node); + + return; + } + } while (node = (start ? walker.next() : walker.prev())); + }; + + // Try to expand text selection as much as we can only Gecko supports cell selection + selectedCells = dom.select('td.mceSelected,th.mceSelected'); + if (selectedCells.length > 0) { + rng = dom.createRng(); + node = selectedCells[0]; + endNode = selectedCells[selectedCells.length - 1]; + + setPoint(node, 1); + walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table')); + + do { + if (node.nodeName == 'TD' || node.nodeName == 'TH') { + if (!dom.hasClass(node, 'mceSelected')) + break; + + lastNode = node; + } + } while (node = walker.next()); + + setPoint(lastNode); + + sel.setRng(rng); + } + + ed.nodeChanged(); + startCell = tableGrid = startTable = null; + } + }); + + ed.onKeyUp.add(function(ed, e) { + cleanup(); + }); + + // Add context menu + if (ed && ed.plugins.contextmenu) { + ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { + var sm, se = ed.selection, el = se.getNode() || ed.getBody(); + + if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th') || ed.dom.select('td.mceSelected,th.mceSelected').length) { + m.removeAll(); + + if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) { + m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); + m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); + m.addSeparator(); + } + + if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) { + m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); + m.addSeparator(); + } + + m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', value : {action : 'insert'}}); + m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable'}); + m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete'}); + m.addSeparator(); + + // Cell menu + sm = m.addMenu({title : 'table.cell'}); + sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps'}); + sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells'}); + sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells'}); + + // Row menu + sm = m.addMenu({title : 'table.row'}); + sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps'}); + sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'}); + sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'}); + sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'}); + sm.addSeparator(); + sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'}); + sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'}); + sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}).setDisabled(!clipboardRows); + sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}).setDisabled(!clipboardRows); + + // Column menu + sm = m.addMenu({title : 'table.col'}); + sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'}); + sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'}); + sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'}); + } else + m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable'}); + }); + } + + // Fixes an issue on Gecko where it's impossible to place the caret behind a table + // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled + if (!tinymce.isIE) { + function fixTableCaretPos() { + var last; + + // Skip empty text nodes form the end + for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ; + + if (last && last.nodeName == 'TABLE') + ed.dom.add(ed.getBody(), 'p', null, '
    '); + }; + + // Fixes an bug where it's impossible to place the caret before a table in Gecko + // this fix solves it by detecting when the caret is at the beginning of such a table + // and then manually moves the caret infront of the table + if (tinymce.isGecko) { + ed.onKeyDown.add(function(ed, e) { + var rng, table, dom = ed.dom; + + // On gecko it's not possible to place the caret before a table + if (e.keyCode == 37 || e.keyCode == 38) { + rng = ed.selection.getRng(); + table = dom.getParent(rng.startContainer, 'table'); + + if (table && ed.getBody().firstChild == table) { + if (isAtStart(rng, table)) { + rng = dom.createRng(); + + rng.setStartBefore(table); + rng.setEndBefore(table); + + ed.selection.setRng(rng); + + e.preventDefault(); + } + } + } + }); + } + + ed.onKeyUp.add(fixTableCaretPos); + ed.onSetContent.add(fixTableCaretPos); + ed.onVisualAid.add(fixTableCaretPos); + + ed.onPreProcess.add(function(ed, o) { + var last = o.node.lastChild; + + if (last && last.childNodes.length == 1 && last.firstChild.nodeName == 'BR') + ed.dom.remove(last); + }); + + fixTableCaretPos(); + } + }); + + // Register action commands + each({ + mceTableSplitCells : function(grid) { + grid.split(); + }, + + mceTableMergeCells : function(grid) { + var rowSpan, colSpan, cell; + + cell = ed.dom.getParent(ed.selection.getNode(), 'th,td'); + if (cell) { + rowSpan = cell.rowSpan; + colSpan = cell.colSpan; + } + + if (!ed.dom.select('td.mceSelected,th.mceSelected').length) { + winMan.open({ + url : url + '/merge_cells.htm', + width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)), + height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)), + inline : 1 + }, { + rows : rowSpan, + cols : colSpan, + onaction : function(data) { + grid.merge(cell, data.cols, data.rows); + }, + plugin_url : url + }); + } else + grid.merge(); + }, + + mceTableInsertRowBefore : function(grid) { + grid.insertRow(true); + }, + + mceTableInsertRowAfter : function(grid) { + grid.insertRow(); + }, + + mceTableInsertColBefore : function(grid) { + grid.insertCol(true); + }, + + mceTableInsertColAfter : function(grid) { + grid.insertCol(); + }, + + mceTableDeleteCol : function(grid) { + grid.deleteCols(); + }, + + mceTableDeleteRow : function(grid) { + grid.deleteRows(); + }, + + mceTableCutRow : function(grid) { + clipboardRows = grid.cutRows(); + }, + + mceTableCopyRow : function(grid) { + clipboardRows = grid.copyRows(); + }, + + mceTablePasteRowBefore : function(grid) { + grid.pasteRows(clipboardRows, true); + }, + + mceTablePasteRowAfter : function(grid) { + grid.pasteRows(clipboardRows); + }, + + mceTableDelete : function(grid) { + grid.deleteTable(); + } + }, function(func, name) { + ed.addCommand(name, function() { + var grid = createTableGrid(); + + if (grid) { + func(grid); + ed.execCommand('mceRepaint'); + cleanup(); + } + }); + }); + + // Register dialog commands + each({ + mceInsertTable : function(val) { + winMan.open({ + url : url + '/table.htm', + width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)), + height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)), + inline : 1 + }, { + plugin_url : url, + action : val ? val.action : 0 + }); + }, + + mceTableRowProps : function() { + winMan.open({ + url : url + '/row.htm', + width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)), + height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }, + + mceTableCellProps : function() { + winMan.open({ + url : url + '/cell.htm', + width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)), + height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + } + }, function(func, name) { + ed.addCommand(name, function(ui, val) { + func(val); + }); + }); + } + }); + + // Register plugin + tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin); +})(tinymce); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/table/js/cell.js b/webapps/totsys/common/js/tiny_mce/plugins/table/js/cell.js new file mode 100644 index 0000000..fae7e6f --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/table/js/cell.js @@ -0,0 +1,286 @@ +tinyMCEPopup.requireLangPack(); + +var ed; + +function init() { + ed = tinyMCEPopup.editor; + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor') + + var inst = ed; + var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th"); + var formObj = document.forms[0]; + var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style")); + + // Get table cell data + var celltype = tdElm.nodeName.toLowerCase(); + var align = ed.dom.getAttrib(tdElm, 'align'); + var valign = ed.dom.getAttrib(tdElm, 'valign'); + var width = trimSize(getStyle(tdElm, 'width', 'width')); + var height = trimSize(getStyle(tdElm, 'height', 'height')); + var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor')); + var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor')); + var className = ed.dom.getAttrib(tdElm, 'class'); + var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + var id = ed.dom.getAttrib(tdElm, 'id'); + var lang = ed.dom.getAttrib(tdElm, 'lang'); + var dir = ed.dom.getAttrib(tdElm, 'dir'); + var scope = ed.dom.getAttrib(tdElm, 'scope'); + + // Setup form + addClassesToList('class', 'table_cell_styles'); + TinyMCE_EditableSelects.init(); + + if (!ed.dom.hasClass(tdElm, 'mceSelected')) { + formObj.bordercolor.value = bordercolor; + formObj.bgcolor.value = bgcolor; + formObj.backgroundimage.value = backgroundimage; + formObj.width.value = width; + formObj.height.value = height; + formObj.id.value = id; + formObj.lang.value = lang; + formObj.style.value = ed.dom.serializeStyle(st); + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'valign', valign); + selectByValue(formObj, 'class', className, true, true); + selectByValue(formObj, 'celltype', celltype); + selectByValue(formObj, 'dir', dir); + selectByValue(formObj, 'scope', scope); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + updateColor('bordercolor_pick', 'bordercolor'); + updateColor('bgcolor_pick', 'bgcolor'); + } else + tinyMCEPopup.dom.hide('action'); +} + +function updateAction() { + var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0]; + + tinyMCEPopup.restoreSelection(); + el = ed.selection.getStart(); + tdElm = ed.dom.getParent(el, "td,th"); + trElm = ed.dom.getParent(el, "tr"); + tableElm = ed.dom.getParent(el, "table"); + + // Cell is selected + if (ed.dom.hasClass(tdElm, 'mceSelected')) { + // Update all selected sells + tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) { + updateCell(td); + }); + + ed.addVisual(); + ed.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + return; + } + + ed.execCommand('mceBeginUndoLevel'); + + switch (getSelectValue(formObj, 'action')) { + case "cell": + var celltype = getSelectValue(formObj, 'celltype'); + var scope = getSelectValue(formObj, 'scope'); + + function doUpdate(s) { + if (s) { + updateCell(tdElm); + + ed.addVisual(); + ed.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + } + }; + + if (ed.getParam("accessibility_warnings", 1)) { + if (celltype == "th" && scope == "") + tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate); + else + doUpdate(1); + + return; + } + + updateCell(tdElm); + break; + + case "row": + var cell = trElm.firstChild; + + if (cell.nodeName != "TD" && cell.nodeName != "TH") + cell = nextCell(cell); + + do { + cell = updateCell(cell, true); + } while ((cell = nextCell(cell)) != null); + + break; + + case "all": + var rows = tableElm.getElementsByTagName("tr"); + + for (var i=0; i 0) { + tinymce.each(tableElm.rows, function(tr) { + var i; + + for (i = 0; i < tr.cells.length; i++) { + if (dom.hasClass(tr.cells[i], 'mceSelected')) { + updateRow(tr, true); + return; + } + } + }); + + inst.addVisual(); + inst.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + return; + } + + inst.execCommand('mceBeginUndoLevel'); + + switch (action) { + case "row": + updateRow(trElm); + break; + + case "all": + var rows = tableElm.getElementsByTagName("tr"); + + for (var i=0; i colLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit)); + return false; + } else if (rowLimit && rows > rowLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit)); + return false; + } else if (cellLimit && cols * rows > cellLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit)); + return false; + } + + // Update table + if (action == "update") { + inst.execCommand('mceBeginUndoLevel'); + + dom.setAttrib(elm, 'cellPadding', cellpadding, true); + dom.setAttrib(elm, 'cellSpacing', cellspacing, true); + dom.setAttrib(elm, 'border', border); + dom.setAttrib(elm, 'align', align); + dom.setAttrib(elm, 'frame', frame); + dom.setAttrib(elm, 'rules', rules); + dom.setAttrib(elm, 'class', className); + dom.setAttrib(elm, 'style', style); + dom.setAttrib(elm, 'id', id); + dom.setAttrib(elm, 'summary', summary); + dom.setAttrib(elm, 'dir', dir); + dom.setAttrib(elm, 'lang', lang); + + capEl = inst.dom.select('caption', elm)[0]; + + if (capEl && !caption) + capEl.parentNode.removeChild(capEl); + + if (!capEl && caption) { + capEl = elm.ownerDocument.createElement('caption'); + + if (!tinymce.isIE) + capEl.innerHTML = '
    '; + + elm.insertBefore(capEl, elm.firstChild); + } + + if (width && inst.settings.inline_styles) { + dom.setStyle(elm, 'width', width); + dom.setAttrib(elm, 'width', ''); + } else { + dom.setAttrib(elm, 'width', width, true); + dom.setStyle(elm, 'width', ''); + } + + // Remove these since they are not valid XHTML + dom.setAttrib(elm, 'borderColor', ''); + dom.setAttrib(elm, 'bgColor', ''); + dom.setAttrib(elm, 'background', ''); + + if (height && inst.settings.inline_styles) { + dom.setStyle(elm, 'height', height); + dom.setAttrib(elm, 'height', ''); + } else { + dom.setAttrib(elm, 'height', height, true); + dom.setStyle(elm, 'height', ''); + } + + if (background != '') + elm.style.backgroundImage = "url('" + background + "')"; + else + elm.style.backgroundImage = ''; + +/* if (tinyMCEPopup.getParam("inline_styles")) { + if (width != '') + elm.style.width = getCSSSize(width); + }*/ + + if (bordercolor != "") { + elm.style.borderColor = bordercolor; + elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle; + elm.style.borderWidth = border == "" ? "1px" : border; + } else + elm.style.borderColor = ''; + + elm.style.backgroundColor = bgcolor; + elm.style.height = getCSSSize(height); + + inst.addVisual(); + + // Fix for stange MSIE align bug + //elm.outerHTML = elm.outerHTML; + + inst.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + + // Repaint if dimensions changed + if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight) + inst.execCommand('mceRepaint'); + + tinyMCEPopup.close(); + return true; + } + + // Create new table + html += ''); + + tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) { + if (patt) + patt += ','; + + patt += n + ' ._mce_marker'; + }); + + tinymce.each(inst.dom.select(patt), function(n) { + inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n); + }); + + dom.setOuterHTML(dom.select('br._mce_marker')[0], html); + } else + inst.execCommand('mceInsertContent', false, html); + + tinymce.each(dom.select('table[_mce_new]'), function(node) { + var td = dom.select('td', node); + + inst.selection.select(td[0], true); + inst.selection.collapse(); + + dom.setAttrib(node, '_mce_new', ''); + }); + + inst.addVisual(); + inst.execCommand('mceEndUndoLevel'); + + tinyMCEPopup.close(); +} + +function makeAttrib(attrib, value) { + var formObj = document.forms[0]; + var valueElm = formObj.elements[attrib]; + + if (typeof(value) == "undefined" || value == null) { + value = ""; + + if (valueElm) + value = valueElm.value; + } + + if (value == "") + return ""; + + // XML encode it + value = value.replace(/&/g, '&'); + value = value.replace(/\"/g, '"'); + value = value.replace(//g, '>'); + + return ' ' + attrib + '="' + value + '"'; +} + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + + var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', ''); + var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = ""; + var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules, frame; + var inst = tinyMCEPopup.editor, dom = inst.dom; + var formObj = document.forms[0]; + var elm = dom.getParent(inst.selection.getNode(), "table"); + + action = tinyMCEPopup.getWindowArg('action'); + + if (!action) + action = elm ? "update" : "insert"; + + if (elm && action != "insert") { + var rowsAr = elm.rows; + var cols = 0; + for (var i=0; i cols) + cols = rowsAr[i].cells.length; + + cols = cols; + rows = rowsAr.length; + + st = dom.parseStyle(dom.getAttrib(elm, "style")); + border = trimSize(getStyle(elm, 'border', 'borderWidth')); + cellpadding = dom.getAttrib(elm, 'cellpadding', ""); + cellspacing = dom.getAttrib(elm, 'cellspacing', ""); + width = trimSize(getStyle(elm, 'width', 'width')); + height = trimSize(getStyle(elm, 'height', 'height')); + bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor')); + bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor')); + align = dom.getAttrib(elm, 'align', align); + frame = dom.getAttrib(elm, 'frame'); + rules = dom.getAttrib(elm, 'rules'); + className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, '')); + id = dom.getAttrib(elm, 'id'); + summary = dom.getAttrib(elm, 'summary'); + style = dom.serializeStyle(st); + dir = dom.getAttrib(elm, 'dir'); + lang = dom.getAttrib(elm, 'lang'); + background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + formObj.caption.checked = elm.getElementsByTagName('caption').length > 0; + + orgTableWidth = width; + orgTableHeight = height; + + action = "update"; + formObj.insert.value = inst.getLang('update'); + } + + addClassesToList('class', "table_styles"); + TinyMCE_EditableSelects.init(); + + // Update form + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'tframe', frame); + selectByValue(formObj, 'rules', rules); + selectByValue(formObj, 'class', className, true, true); + formObj.cols.value = cols; + formObj.rows.value = rows; + formObj.border.value = border; + formObj.cellpadding.value = cellpadding; + formObj.cellspacing.value = cellspacing; + formObj.width.value = width; + formObj.height.value = height; + formObj.bordercolor.value = bordercolor; + formObj.bgcolor.value = bgcolor; + formObj.id.value = id; + formObj.summary.value = summary; + formObj.style.value = style; + formObj.dir.value = dir; + formObj.lang.value = lang; + formObj.backgroundimage.value = background; + + updateColor('bordercolor_pick', 'bordercolor'); + updateColor('bgcolor_pick', 'bgcolor'); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + // Disable some fields in update mode + if (action == "update") { + formObj.cols.disabled = true; + formObj.rows.disabled = true; + } +} + +function changedSize() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + +/* var width = formObj.width.value; + if (width != "") + st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : ""; + else + st['width'] = "";*/ + + var height = formObj.height.value; + if (height != "") + st['height'] = getCSSSize(height); + else + st['height'] = ""; + + formObj.style.value = dom.serializeStyle(st); +} + +function changedBackgroundImage() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + st['background-image'] = "url('" + formObj.backgroundimage.value + "')"; + + formObj.style.value = dom.serializeStyle(st); +} + +function changedBorder() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + // Update border width if the element has a color + if (formObj.border.value != "" && formObj.bordercolor.value != "") + st['border-width'] = formObj.border.value + "px"; + + formObj.style.value = dom.serializeStyle(st); +} + +function changedColor() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + st['background-color'] = formObj.bgcolor.value; + + if (formObj.bordercolor.value != "") { + st['border-color'] = formObj.bordercolor.value; + + // Add border-width if it's missing + if (!st['border-width']) + st['border-width'] = formObj.border.value == "" ? "1px" : formObj.border.value + "px"; + } + + formObj.style.value = dom.serializeStyle(st); +} + +function changedStyle() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + if (st['background-image']) + formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + else + formObj.backgroundimage.value = ''; + + if (st['width']) + formObj.width.value = trimSize(st['width']); + + if (st['height']) + formObj.height.value = trimSize(st['height']); + + if (st['background-color']) { + formObj.bgcolor.value = st['background-color']; + updateColor('bgcolor_pick','bgcolor'); + } + + if (st['border-color']) { + formObj.bordercolor.value = st['border-color']; + updateColor('bordercolor_pick','bordercolor'); + } +} + +tinyMCEPopup.onInit.add(init); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/table/langs/en_dlg.js b/webapps/totsys/common/js/tiny_mce/plugins/table/langs/en_dlg.js new file mode 100644 index 0000000..a33c987 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/table/langs/en_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('en.table_dlg',{ +general_tab:"General", +advanced_tab:"Advanced", +general_props:"General properties", +advanced_props:"Advanced properties", +rowtype:"Row in table part", +title:"Insert/Modify table", +width:"Width", +height:"Height", +cols:"Cols", +rows:"Rows", +cellspacing:"Cellspacing", +cellpadding:"Cellpadding", +border:"Border", +align:"Alignment", +align_default:"Default", +align_left:"Left", +align_right:"Right", +align_middle:"Center", +row_title:"Table row properties", +cell_title:"Table cell properties", +cell_type:"Cell type", +valign:"Vertical alignment", +align_top:"Top", +align_bottom:"Bottom", +bordercolor:"Border color", +bgcolor:"Background color", +merge_cells_title:"Merge table cells", +id:"Id", +style:"Style", +langdir:"Language direction", +langcode:"Language code", +mime:"Target MIME type", +ltr:"Left to right", +rtl:"Right to left", +bgimage:"Background image", +summary:"Summary", +td:"Data", +th:"Header", +cell_cell:"Update current cell", +cell_row:"Update all cells in row", +cell_all:"Update all cells in table", +row_row:"Update current row", +row_odd:"Update odd rows in table", +row_even:"Update even rows in table", +row_all:"Update all rows in table", +thead:"Table Head", +tbody:"Table Body", +tfoot:"Table Foot", +scope:"Scope", +rowgroup:"Row Group", +colgroup:"Col Group", +col_limit:"You've exceeded the maximum number of columns of {$cols}.", +row_limit:"You've exceeded the maximum number of rows of {$rows}.", +cell_limit:"You've exceeded the maximum number of cells of {$cells}.", +missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", +caption:"Table caption", +frame:"Frame", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"Rules", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/table/langs/ko_dlg.js b/webapps/totsys/common/js/tiny_mce/plugins/table/langs/ko_dlg.js new file mode 100644 index 0000000..4b44200 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/table/langs/ko_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('ko.table_dlg',{ +general_tab:"\uC77C\uBC18", +advanced_tab:"\uACE0\uAE09", +general_props:"\uC77C\uBC18 \uC124\uC815", +advanced_props:"\uACE0\uAE09 \uC124\uC815", +rowtype:"\uD589", +title:"\uD14C\uC774\uBE14\uC758 \uC0BD\uC785/\uD3B8\uC9D1", +width:"\uD3ED", +height:"\uB192\uC774", +cols:"\uB82C", +rows:"\uD589", +cellspacing:"\uC140 \uAC04\uACA9", +cellpadding:"\uC140\uB0B4 \uC5EC\uBC31", +border:"\uD14C\uB450\uB9AC\uC120", +align:"\uC815\uB82C", +align_default:"\uAE30\uBCF8\uAC12", +align_left:"\uC67C\uCABD \uB9DE\uCDA4", +align_right:"\uC624\uB978\uCABD \uB9DE\uCDA4", +align_middle:"\uAC00\uC6B4\uB370 \uB9DE\uCDA4", +row_title:"\uD589 \uC124\uC815", +cell_title:"\uC140 \uC124\uC815", +cell_type:"\uC140 \uC885\uB958", +valign:"\uC218\uC9C1 \uC704\uCE58", +align_top:"\uC0C1", +align_bottom:"\uD558", +bordercolor:"\uD14C\uB450\uB9AC\uC120\uC0C9", +bgcolor:"\uBC30\uACBD\uC0C9", +merge_cells_title:"\uC140 \uACB0\uD569", +id:"Id", +style:"\uC2A4\uD0C0\uC77C", +langdir:"\uBB38\uC790 \uBC29\uD5A5", +langcode:"\uC5B8\uC5B4 \uCF54\uB4DC", +mime:"Target MIME \uD0C0\uC785", +ltr:"\uC67C\uCABD\uC5D0\uC11C \uC624\uB978\uCABD", +rtl:"\uC624\uB978\uCABD\uC5D0\uC11C \uC67C\uCABD", +bgimage:"\uBC30\uACBD \uC774\uBBF8\uC9C0", +summary:"\uC694\uC57D", +td:"Data", +th:"Header", +cell_cell:"\uD604\uC7AC\uC758 \uC140\uC744 \uAC31\uC2E0", +cell_row:"\uD589\uC758 \uC804\uC140\uC744 \uAC31\uC2E0", +cell_all:"\uD14C\uC774\uBE14\uC758 \uBAA8\uB4E0 \uC140\uC744 \uAC31\uC2E0", +row_row:"\uD604\uC7AC\uC758 \uD589\uC744 \uAC31\uC2E0", +row_odd:"\uD640\uC218\uD589\uC744 \uAC31\uC2E0", +row_even:"\uC9DD\uC218\uD589\uC744 \uAC31\uC2E0", +row_all:"\uC804\uD589\uC744 \uAC31\uC2E0", +thead:"Table Head", +tbody:"Table Body", +tfoot:"\uD14C\uC774\uBE14 \uD48B\uD130", +scope:"Scope", +rowgroup:"\uD589\uADF8\uB8F9", +colgroup:"\uC5F4\uADF8\uB8F9", +col_limit:"\uB82C\uC218\uC758 \uC0C1\uD55C{$cols}\uB97C \uB118\uC5C8\uC2B5\uB2C8\uB2E4.", +row_limit:"\uD589\uC218\uC758 \uC0C1\uD55C{$rows}\uB97C \uB118\uC5C8\uC2B5\uB2C8\uB2E4.", +cell_limit:"\uC140\uC218\uC758 \uC0C1\uD55C{$cells}\uB97C \uB118\uC5C8\uC2B5\uB2C8\uB2E4.", +missing_scope:"\uC774 \uD45C \uD5E4\uB354\uC140\uC5D0 scope\uC18D\uC131\uC744 \uC9C0\uC815\uD558\uC9C0\uC54A\uC544\uB3C4 \uAD1C\uCC2E\uC2B5\uB2C8\uAE4C? \uC9C0\uC815\uD558\uC9C0 \uC54A\uB294 \uACBD\uC6B0, \uC2DC\uAC04\uC801\uC73C\uB85C \uD14C\uC774\uBE14\uC758 \uAD6C\uC870\uB97C \uD30C\uC545\uD558\uB294 \uAC83\uC774 \uC5B4\uB824\uC6B4 \uBD84\uC758 \uC811\uADFC\uC131\uC774 \uC800\uD558\uD569\uB2C8\uB2E4.", +caption:"\uD45C\uC81C", +frame:"Frame", +frame_none:"\uC5C6\uC74C", +frame_groups:"\uADF8\uB8F9", +frame_rows:"\uD589", +frame_cols:"\uC5F4", +frame_all:"\uBAA8\uB450", +rules:"Rules", +rules_void:"Void", +rules_above:"\uC704", +rules_below:"\uC544\uB798", +rules_hsides:"\uC0C1\uD558\uBC94\uC704\uB9CC", +rules_lhs:"\uC88C\uCE21 \uBC94\uC704\uB9CC", +rules_rhs:"\uC6B0\uCE21 \uBC94\uC704\uB9CC", +rules_vsides:"\uC88C\uC6B0\uBC94\uC704\uB9CC", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/table/merge_cells.htm b/webapps/totsys/common/js/tiny_mce/plugins/table/merge_cells.htm new file mode 100644 index 0000000..b1a8d9b --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/table/merge_cells.htm @@ -0,0 +1,32 @@ + + + + {#table_dlg.merge_cells_title} + + + + + + +
    +
    + {#table_dlg.merge_cells_title} + + + + + + + + + +
    {#table_dlg.cols}:
    {#table_dlg.rows}:
    +
    + +
    + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/table/row.htm b/webapps/totsys/common/js/tiny_mce/plugins/table/row.htm new file mode 100644 index 0000000..33fc9cc --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/table/row.htm @@ -0,0 +1,155 @@ + + + + {#table_dlg.row_title} + + + + + + + + +
    + + +
    +
    +
    + {#table_dlg.general_props} + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + +
    +
    +
    + +
    +
    + {#table_dlg.advanced_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    +
    +
    +
    + +
    +
    + +
    + + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/table/table.htm b/webapps/totsys/common/js/tiny_mce/plugins/table/table.htm new file mode 100644 index 0000000..122b04a --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/table/table.htm @@ -0,0 +1,187 @@ + + + + {#table_dlg.title} + + + + + + + + + +
    + + +
    +
    +
    + {#table_dlg.general_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    + {#table_dlg.advanced_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
     
    +
    + +
    + +
    + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    +
    +
    +
    + +
    + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/template/blank.htm b/webapps/totsys/common/js/tiny_mce/plugins/template/blank.htm new file mode 100644 index 0000000..538a3b1 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/template/blank.htm @@ -0,0 +1,12 @@ + + + blank_page + + + + + + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/template/css/template.css b/webapps/totsys/common/js/tiny_mce/plugins/template/css/template.css new file mode 100644 index 0000000..0a03f2e --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/template/css/template.css @@ -0,0 +1,23 @@ +#frmbody { + padding: 10px; + background-color: #FFF; + border: 1px solid #CCC; +} + +.frmRow { + margin-bottom: 10px; +} + +#templatesrc { + border: none; + width: 320px; + height: 240px; +} + +.title { + padding-bottom: 5px; +} + +.mceActionPanel { + padding-top: 5px; +} diff --git a/webapps/totsys/common/js/tiny_mce/plugins/template/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/template/editor_plugin.js new file mode 100644 index 0000000..ebe3c27 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/template/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.TemplatePlugin",{init:function(b,c){var d=this;d.editor=b;b.addCommand("mceTemplate",function(e){b.windowManager.open({file:c+"/template.htm",width:b.getParam("template_popup_width",750),height:b.getParam("template_popup_height",600),inline:1},{plugin_url:c})});b.addCommand("mceInsertTemplate",d._insertTemplate,d);b.addButton("template",{title:"template.desc",cmd:"mceTemplate"});b.onPreProcess.add(function(e,g){var f=e.dom;a(f.select("div",g.node),function(h){if(f.hasClass(h,"mceTmpl")){a(f.select("*",h),function(i){if(f.hasClass(i,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){i.innerHTML=d._getDateTime(new Date(),e.getParam("template_mdate_format",e.getLang("template.mdate_format")))}});d._replaceVals(h)}})})},getInfo:function(){return{longname:"Template plugin",author:"Moxiecode Systems AB",authorurl:"http://www.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_insertTemplate:function(i,j){var k=this,g=k.editor,f,c,d=g.dom,b=g.selection.getContent();f=j.content;a(k.editor.getParam("template_replace_values"),function(l,h){if(typeof(l)!="function"){f=f.replace(new RegExp("\\{\\$"+h+"\\}","g"),l)}});c=d.create("div",null,f);n=d.select(".mceTmpl",c);if(n&&n.length>0){c=d.create("div",null);c.appendChild(n[0].cloneNode(true))}function e(l,h){return new RegExp("\\b"+h+"\\b","g").test(l.className)}a(d.select("*",c),function(h){if(e(h,g.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_cdate_format",g.getLang("template.cdate_format")))}if(e(h,g.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_mdate_format",g.getLang("template.mdate_format")))}if(e(h,g.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))){h.innerHTML=b}});k._replaceVals(c);g.execCommand("mceInsertContent",false,c.innerHTML);g.addVisual()},_replaceVals:function(c){var d=this.editor.dom,b=this.editor.getParam("template_replace_values");a(d.select("*",c),function(f){a(b,function(g,e){if(d.hasClass(f,e)){if(typeof(b[e])=="function"){b[e](f)}}})})},_getDateTime:function(e,b){if(!b){return""}function c(g,d){var f;g=""+g;if(g.length 0) { + el = dom.create('div', null); + el.appendChild(n[0].cloneNode(true)); + } + + function hasClass(n, c) { + return new RegExp('\\b' + c + '\\b', 'g').test(n.className); + }; + + each(dom.select('*', el), function(n) { + // Replace cdate + if (hasClass(n, ed.getParam('template_cdate_classes', 'cdate').replace(/\s+/g, '|'))) + n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_cdate_format", ed.getLang("template.cdate_format"))); + + // Replace mdate + if (hasClass(n, ed.getParam('template_mdate_classes', 'mdate').replace(/\s+/g, '|'))) + n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_mdate_format", ed.getLang("template.mdate_format"))); + + // Replace selection + if (hasClass(n, ed.getParam('template_selected_content_classes', 'selcontent').replace(/\s+/g, '|'))) + n.innerHTML = sel; + }); + + t._replaceVals(el); + + ed.execCommand('mceInsertContent', false, el.innerHTML); + ed.addVisual(); + }, + + _replaceVals : function(e) { + var dom = this.editor.dom, vl = this.editor.getParam('template_replace_values'); + + each(dom.select('*', e), function(e) { + each(vl, function(v, k) { + if (dom.hasClass(e, k)) { + if (typeof(vl[k]) == 'function') + vl[k](e); + } + }); + }); + }, + + _getDateTime : function(d, fmt) { + if (!fmt) + return ""; + + function addZeros(value, len) { + var i; + + value = "" + value; + + if (value.length < len) { + for (i=0; i<(len-value.length); i++) + value = "0" + value; + } + + return value; + } + + fmt = fmt.replace("%D", "%m/%d/%y"); + fmt = fmt.replace("%r", "%I:%M:%S %p"); + fmt = fmt.replace("%Y", "" + d.getFullYear()); + fmt = fmt.replace("%y", "" + d.getYear()); + fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2)); + fmt = fmt.replace("%d", addZeros(d.getDate(), 2)); + fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2)); + fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2)); + fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2)); + fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1)); + fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM")); + fmt = fmt.replace("%B", "" + this.editor.getLang("template_months_long").split(',')[d.getMonth()]); + fmt = fmt.replace("%b", "" + this.editor.getLang("template_months_short").split(',')[d.getMonth()]); + fmt = fmt.replace("%A", "" + this.editor.getLang("template_day_long").split(',')[d.getDay()]); + fmt = fmt.replace("%a", "" + this.editor.getLang("template_day_short").split(',')[d.getDay()]); + fmt = fmt.replace("%%", "%"); + + return fmt; + } + }); + + // Register plugin + tinymce.PluginManager.add('template', tinymce.plugins.TemplatePlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/template/js/template.js b/webapps/totsys/common/js/tiny_mce/plugins/template/js/template.js new file mode 100644 index 0000000..7eab2eb --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/template/js/template.js @@ -0,0 +1,106 @@ +tinyMCEPopup.requireLangPack(); + +var TemplateDialog = { + preInit : function() { + var url = tinyMCEPopup.getParam("template_external_list_url"); + + if (url != null) + document.write(''); + }, + + init : function() { + var ed = tinyMCEPopup.editor, tsrc, sel, x, u; + + tsrc = ed.getParam("template_templates", false); + sel = document.getElementById('tpath'); + + // Setup external template list + if (!tsrc && typeof(tinyMCETemplateList) != 'undefined') { + for (x=0, tsrc = []; x'); + }); + }, + + selectTemplate : function(u, ti) { + var d = window.frames['templatesrc'].document, x, tsrc = this.tsrc; + + if (!u) + return; + + d.body.innerHTML = this.templateHTML = this.getFileContents(u); + + for (x=0; x + + {#template_dlg.title} + + + + + +
    +
    +
    {#template_dlg.desc}
    +
    + +
    +
    +
    +
    + {#template_dlg.preview} + +
    +
    + +
    + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/visualchars/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/visualchars/editor_plugin.js new file mode 100644 index 0000000..53d31c4 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/visualchars/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.VisualChars",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceVisualChars",c._toggleVisualChars,c);a.addButton("visualchars",{title:"visualchars.desc",cmd:"mceVisualChars"});a.onBeforeGetContent.add(function(d,e){if(c.state){c.state=true;c._toggleVisualChars()}})},getInfo:function(){return{longname:"Visual characters",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_toggleVisualChars:function(){var m=this,g=m.editor,a,e,f,k=g.getDoc(),l=g.getBody(),j,n=g.selection,c;m.state=!m.state;g.controlManager.setActive("visualchars",m.state);if(m.state){a=[];tinymce.walk(l,function(b){if(b.nodeType==3&&b.nodeValue&&b.nodeValue.indexOf("\u00a0")!=-1){a.push(b)}},"childNodes");for(e=0;e$1');j=j.replace(/\u00a0/g,"\u00b7");g.dom.setOuterHTML(a[e],j,k)}}else{a=tinymce.grep(g.dom.select("span",l),function(b){return g.dom.hasClass(b,"mceVisualNbsp")});for(e=0;e$1'); + nv = nv.replace(/\u00a0/g, '\u00b7'); + ed.dom.setOuterHTML(nl[i], nv, d); + } + } else { + nl = tinymce.grep(ed.dom.select('span', b), function(n) { + return ed.dom.hasClass(n, 'mceVisualNbsp'); + }); + + for (i=0; i0')}}else{tinymce.DOM.add(h,"span",{},'0')}});a.onInit.add(function(e){e.selection.onSetContent.add(function(){c._count(e)});c._count(e)});a.onSetContent.add(function(e){c._count(e)});a.onKeyUp.add(function(f,g){if(g.keyCode==d){return}if(13==g.keyCode||8==d||46==d){c._count(f)}d=g.keyCode})},_count:function(b){var c=this,a=0;if(c.block){return}c.block=1;setTimeout(function(){var d=b.getContent({format:"raw"});if(d){d=d.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ");d=d.replace(c.cleanre,"");d.replace(c.countre,function(){a++})}tinymce.DOM.setHTML(c.id,a.toString());setTimeout(function(){c.block=0},2000)},1)},getInfo:function(){return{longname:"Word Count plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("wordcount",tinymce.plugins.WordCount)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/wordcount/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/wordcount/editor_plugin_src.js new file mode 100644 index 0000000..92d19cb --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/wordcount/editor_plugin_src.js @@ -0,0 +1,98 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.WordCount', { + block : 0, + id : null, + countre : null, + cleanre : null, + + init : function(ed, url) { + var t = this, last = 0; + + t.countre = ed.getParam('wordcount_countregex', /\S\s+/g); + t.cleanre = ed.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$�'"_+=\\/-]*/g); + t.id = ed.id + '-word-count'; + + ed.onPostRender.add(function(ed, cm) { + var row, id; + + // Add it to the specified id or the theme advanced path + id = ed.getParam('wordcount_target_id'); + if (!id) { + row = tinymce.DOM.get(ed.id + '_path_row'); + + if (row) + tinymce.DOM.add(row.parentNode, 'div', {'style': 'float: right'}, ed.getLang('wordcount.words', 'Words: ') + '0'); + } else + tinymce.DOM.add(id, 'span', {}, '0'); + }); + + ed.onInit.add(function(ed) { + ed.selection.onSetContent.add(function() { + t._count(ed); + }); + + t._count(ed); + }); + + ed.onSetContent.add(function(ed) { + t._count(ed); + }); + + ed.onKeyUp.add(function(ed, e) { + if (e.keyCode == last) + return; + + if (13 == e.keyCode || 8 == last || 46 == last) + t._count(ed); + + last = e.keyCode; + }); + }, + + _count : function(ed) { + var t = this, tc = 0; + + // Keep multiple calls from happening at the same time + if (t.block) + return; + + t.block = 1; + + setTimeout(function() { + var tx = ed.getContent({format : 'raw'}); + + if (tx) { + tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' '); // remove html tags and space chars + tx = tx.replace(t.cleanre, ''); // remove numbers and punctuation + tx.replace(t.countre, function() {tc++;}); // count the words + } + + tinymce.DOM.setHTML(t.id, tc.toString()); + + setTimeout(function() {t.block = 0;}, 2000); + }, 1); + }, + + getInfo: function() { + return { + longname : 'Word Count plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + tinymce.PluginManager.add('wordcount', tinymce.plugins.WordCount); +})(); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/abbr.htm b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/abbr.htm new file mode 100644 index 0000000..0282fff --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/abbr.htm @@ -0,0 +1,141 @@ + + + + {#xhtmlxtras_dlg.title_abbr_element} + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/acronym.htm b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/acronym.htm new file mode 100644 index 0000000..e0ed031 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/acronym.htm @@ -0,0 +1,141 @@ + + + + {#xhtmlxtras_dlg.title_acronym_element} + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/attributes.htm b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/attributes.htm new file mode 100644 index 0000000..fc5ba97 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/attributes.htm @@ -0,0 +1,148 @@ + + + + {#xhtmlxtras_dlg.attribs_title} + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.attribute_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.attribute_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/cite.htm b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/cite.htm new file mode 100644 index 0000000..b23becc --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/cite.htm @@ -0,0 +1,141 @@ + + + + {#xhtmlxtras_dlg.title_cite_element} + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/css/attributes.css b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/css/attributes.css new file mode 100644 index 0000000..85b1b37 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/css/attributes.css @@ -0,0 +1,11 @@ +.panel_wrapper div.current { + height: 290px; +} + +#id, #style, #title, #dir, #hreflang, #lang, #classlist, #tabindex, #accesskey { + width: 200px; +} + +#events_panel input { + width: 200px; +} diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/css/popup.css b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/css/popup.css new file mode 100644 index 0000000..034b985 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/css/popup.css @@ -0,0 +1,9 @@ +input.field, select.field {width:200px;} +input.picker {width:179px; margin-left: 5px;} +input.disabled {border-color:#F2F2F2;} +img.picker {vertical-align:text-bottom; cursor:pointer;} +h1 {padding: 0 0 5px 0;} +.panel_wrapper div.current {height:160px;} +#xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;} +a.browse span {display:block; width:20px; height:20px; background:url('../../../themes/advanced/img/icons.gif') -140px -20px;} +#datetime {width:180px;} diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/del.htm b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/del.htm new file mode 100644 index 0000000..bc80944 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/del.htm @@ -0,0 +1,161 @@ + + + + {#xhtmlxtras_dlg.title_del_element} + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_general_tab} + + + + + + + + + +
    : + + + + + +
    +
    :
    +
    +
    + {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/editor_plugin.js b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/editor_plugin.js new file mode 100644 index 0000000..e519526 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(b,c){b.addCommand("mceCite",function(){b.windowManager.open({file:c+"/cite.htm",width:350+parseInt(b.getLang("xhtmlxtras.cite_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.cite_delta_height",0)),inline:1},{plugin_url:c})});b.addCommand("mceAcronym",function(){b.windowManager.open({file:c+"/acronym.htm",width:350+parseInt(b.getLang("xhtmlxtras.acronym_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.acronym_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceAbbr",function(){b.windowManager.open({file:c+"/abbr.htm",width:350+parseInt(b.getLang("xhtmlxtras.abbr_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.abbr_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceDel",function(){b.windowManager.open({file:c+"/del.htm",width:340+parseInt(b.getLang("xhtmlxtras.del_delta_width",0)),height:310+parseInt(b.getLang("xhtmlxtras.del_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceIns",function(){b.windowManager.open({file:c+"/ins.htm",width:340+parseInt(b.getLang("xhtmlxtras.ins_delta_width",0)),height:310+parseInt(b.getLang("xhtmlxtras.ins_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceAttributes",function(){b.windowManager.open({file:c+"/attributes.htm",width:380,height:370,inline:1},{plugin_url:c})});b.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"});b.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"});b.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"});b.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"});b.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"});b.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"});if(tinymce.isIE){function a(d,e){if(e.set){e.content=e.content.replace(/]+)>/gi,"");e.content=e.content.replace(/<\/abbr>/gi,"")}}b.onBeforeSetContent.add(a);b.onPostProcess.add(a)}b.onNodeChange.add(function(e,d,g,f){g=e.dom.getParent(g,"CITE,ACRONYM,ABBR,DEL,INS");d.setDisabled("cite",f);d.setDisabled("acronym",f);d.setDisabled("abbr",f);d.setDisabled("del",f);d.setDisabled("ins",f);d.setDisabled("attribs",g&&g.nodeName=="BODY");d.setActive("cite",0);d.setActive("acronym",0);d.setActive("abbr",0);d.setActive("del",0);d.setActive("ins",0);if(g){do{d.setDisabled(g.nodeName.toLowerCase(),0);d.setActive(g.nodeName.toLowerCase(),1)}while(g=g.parentNode)}});b.onPreInit.add(function(){b.dom.create("abbr")})},getInfo:function(){return{longname:"XHTML Xtras Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js new file mode 100644 index 0000000..ceac275 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js @@ -0,0 +1,144 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.XHTMLXtrasPlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceCite', function() { + ed.windowManager.open({ + file : url + '/cite.htm', + width : 350 + parseInt(ed.getLang('xhtmlxtras.cite_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.cite_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceAcronym', function() { + ed.windowManager.open({ + file : url + '/acronym.htm', + width : 350 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_width', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceAbbr', function() { + ed.windowManager.open({ + file : url + '/abbr.htm', + width : 350 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceDel', function() { + ed.windowManager.open({ + file : url + '/del.htm', + width : 340 + parseInt(ed.getLang('xhtmlxtras.del_delta_width', 0)), + height : 310 + parseInt(ed.getLang('xhtmlxtras.del_delta_width', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceIns', function() { + ed.windowManager.open({ + file : url + '/ins.htm', + width : 340 + parseInt(ed.getLang('xhtmlxtras.ins_delta_width', 0)), + height : 310 + parseInt(ed.getLang('xhtmlxtras.ins_delta_width', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceAttributes', function() { + ed.windowManager.open({ + file : url + '/attributes.htm', + width : 380, + height : 370, + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('cite', {title : 'xhtmlxtras.cite_desc', cmd : 'mceCite'}); + ed.addButton('acronym', {title : 'xhtmlxtras.acronym_desc', cmd : 'mceAcronym'}); + ed.addButton('abbr', {title : 'xhtmlxtras.abbr_desc', cmd : 'mceAbbr'}); + ed.addButton('del', {title : 'xhtmlxtras.del_desc', cmd : 'mceDel'}); + ed.addButton('ins', {title : 'xhtmlxtras.ins_desc', cmd : 'mceIns'}); + ed.addButton('attribs', {title : 'xhtmlxtras.attribs_desc', cmd : 'mceAttributes'}); + + if (tinymce.isIE) { + function fix(ed, o) { + if (o.set) { + o.content = o.content.replace(/]+)>/gi, ''); + o.content = o.content.replace(/<\/abbr>/gi, ''); + } + }; + + ed.onBeforeSetContent.add(fix); + ed.onPostProcess.add(fix); + } + + ed.onNodeChange.add(function(ed, cm, n, co) { + n = ed.dom.getParent(n, 'CITE,ACRONYM,ABBR,DEL,INS'); + + cm.setDisabled('cite', co); + cm.setDisabled('acronym', co); + cm.setDisabled('abbr', co); + cm.setDisabled('del', co); + cm.setDisabled('ins', co); + cm.setDisabled('attribs', n && n.nodeName == 'BODY'); + cm.setActive('cite', 0); + cm.setActive('acronym', 0); + cm.setActive('abbr', 0); + cm.setActive('del', 0); + cm.setActive('ins', 0); + + // Activate all + if (n) { + do { + cm.setDisabled(n.nodeName.toLowerCase(), 0); + cm.setActive(n.nodeName.toLowerCase(), 1); + } while (n = n.parentNode); + } + }); + + ed.onPreInit.add(function() { + // Fixed IE issue where it can't handle these elements correctly + ed.dom.create('abbr'); + }); + }, + + getInfo : function() { + return { + longname : 'XHTML Xtras Plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('xhtmlxtras', tinymce.plugins.XHTMLXtrasPlugin); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/ins.htm b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/ins.htm new file mode 100644 index 0000000..9448d67 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/ins.htm @@ -0,0 +1,161 @@ + + + + {#xhtmlxtras_dlg.title_ins_element} + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_general_tab} + + + + + + + + + +
    : + + + + + +
    +
    :
    +
    +
    + {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/abbr.js b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/abbr.js new file mode 100644 index 0000000..1790e83 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/abbr.js @@ -0,0 +1,28 @@ +/** + * abbr.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('abbr'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertAbbr() { + SXE.insertElement('abbr'); + tinyMCEPopup.close(); +} + +function removeAbbr() { + SXE.removeElement('abbr'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/acronym.js b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/acronym.js new file mode 100644 index 0000000..93b8d25 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/acronym.js @@ -0,0 +1,28 @@ +/** + * acronym.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('acronym'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertAcronym() { + SXE.insertElement('acronym'); + tinyMCEPopup.close(); +} + +function removeAcronym() { + SXE.removeElement('acronym'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/attributes.js b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/attributes.js new file mode 100644 index 0000000..c7e0e7f --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/attributes.js @@ -0,0 +1,126 @@ +/** + * attributes.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + tinyMCEPopup.resizeToInnerSize(); + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + var elm = inst.selection.getNode(); + var f = document.forms[0]; + var onclick = dom.getAttrib(elm, 'onclick'); + + setFormValue('title', dom.getAttrib(elm, 'title')); + setFormValue('id', dom.getAttrib(elm, 'id')); + setFormValue('style', dom.getAttrib(elm, "style")); + setFormValue('dir', dom.getAttrib(elm, 'dir')); + setFormValue('lang', dom.getAttrib(elm, 'lang')); + setFormValue('tabindex', dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); + setFormValue('accesskey', dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); + setFormValue('onfocus', dom.getAttrib(elm, 'onfocus')); + setFormValue('onblur', dom.getAttrib(elm, 'onblur')); + setFormValue('onclick', onclick); + setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick')); + setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown')); + setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup')); + setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover')); + setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove')); + setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout')); + setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress')); + setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown')); + setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup')); + className = dom.getAttrib(elm, 'class'); + + addClassesToList('classlist', 'advlink_styles'); + selectByValue(f, 'classlist', className, true); + + TinyMCE_EditableSelects.init(); +} + +function setFormValue(name, value) { + if(value && document.forms[0].elements[name]){ + document.forms[0].elements[name].value = value; + } +} + +function insertAction() { + var inst = tinyMCEPopup.editor; + var elm = inst.selection.getNode(); + + tinyMCEPopup.execCommand("mceBeginUndoLevel"); + setAllAttribs(elm); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); +} + +function setAttrib(elm, attrib, value) { + var formObj = document.forms[0]; + var valueElm = formObj.elements[attrib.toLowerCase()]; + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + + if (typeof(value) == "undefined" || value == null) { + value = ""; + + if (valueElm) + value = valueElm.value; + } + + if (value != "") { + dom.setAttrib(elm, attrib.toLowerCase(), value); + + if (attrib == "style") + attrib = "style.cssText"; + + if (attrib.substring(0, 2) == 'on') + value = 'return true;' + value; + + if (attrib == "class") + attrib = "className"; + + elm[attrib]=value; + } else + elm.removeAttribute(attrib); +} + +function setAllAttribs(elm) { + var f = document.forms[0]; + + setAttrib(elm, 'title'); + setAttrib(elm, 'id'); + setAttrib(elm, 'style'); + setAttrib(elm, 'class', getSelectValue(f, 'classlist')); + setAttrib(elm, 'dir'); + setAttrib(elm, 'lang'); + setAttrib(elm, 'tabindex'); + setAttrib(elm, 'accesskey'); + setAttrib(elm, 'onfocus'); + setAttrib(elm, 'onblur'); + setAttrib(elm, 'onclick'); + setAttrib(elm, 'ondblclick'); + setAttrib(elm, 'onmousedown'); + setAttrib(elm, 'onmouseup'); + setAttrib(elm, 'onmouseover'); + setAttrib(elm, 'onmousemove'); + setAttrib(elm, 'onmouseout'); + setAttrib(elm, 'onkeypress'); + setAttrib(elm, 'onkeydown'); + setAttrib(elm, 'onkeyup'); + + // Refresh in old MSIE +// if (tinyMCE.isMSIE5) +// elm.outerHTML = elm.outerHTML; +} + +function insertAttribute() { + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); +tinyMCEPopup.requireLangPack(); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/cite.js b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/cite.js new file mode 100644 index 0000000..b73ef47 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/cite.js @@ -0,0 +1,28 @@ +/** + * cite.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('cite'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertCite() { + SXE.insertElement('cite'); + tinyMCEPopup.close(); +} + +function removeCite() { + SXE.removeElement('cite'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/del.js b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/del.js new file mode 100644 index 0000000..d5dd8e4 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/del.js @@ -0,0 +1,63 @@ +/** + * del.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('del'); + if (SXE.currentAction == "update") { + setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); + setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); + SXE.showRemoveButton(); + } +} + +function setElementAttribs(elm) { + setAllCommonAttribs(elm); + setAttrib(elm, 'datetime'); + setAttrib(elm, 'cite'); +} + +function insertDel() { + var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL'); + + tinyMCEPopup.execCommand('mceBeginUndoLevel'); + if (elm == null) { + var s = SXE.inst.selection.getContent(); + if(s.length > 0) { + insertInlineElement('del'); + var elementArray = tinymce.grep(SXE.inst.dom.select('del'), function(n) {return n.id == '#sxe_temp_del#';}); + for (var i=0; i 0) { + tagName = element_name; + + insertInlineElement(element_name); + var elementArray = tinymce.grep(SXE.inst.dom.select(element_name)); + for (var i=0; i -1) ? true : false; +} + +SXE.removeClass = function(elm,cl) { + if(elm.className == null || elm.className == "" || !SXE.containsClass(elm,cl)) { + return true; + } + var classNames = elm.className.split(" "); + var newClassNames = ""; + for (var x = 0, cnl = classNames.length; x < cnl; x++) { + if (classNames[x] != cl) { + newClassNames += (classNames[x] + " "); + } + } + elm.className = newClassNames.substring(0,newClassNames.length-1); //removes extra space at the end +} + +SXE.addClass = function(elm,cl) { + if(!SXE.containsClass(elm,cl)) elm.className ? elm.className += " " + cl : elm.className = cl; + return true; +} + +function insertInlineElement(en) { + var ed = tinyMCEPopup.editor, dom = ed.dom; + + ed.getDoc().execCommand('FontName', false, 'mceinline'); + tinymce.each(dom.select('span,font'), function(n) { + if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline') + dom.replace(dom.create(en, {_mce_new : 1}), n, 1); + }); +} diff --git a/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/ins.js b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/ins.js new file mode 100644 index 0000000..8d29d53 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/plugins/xhtmlxtras/js/ins.js @@ -0,0 +1,62 @@ +/** + * ins.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('ins'); + if (SXE.currentAction == "update") { + setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); + setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); + SXE.showRemoveButton(); + } +} + +function setElementAttribs(elm) { + setAllCommonAttribs(elm); + setAttrib(elm, 'datetime'); + setAttrib(elm, 'cite'); +} + +function insertIns() { + var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS'); + tinyMCEPopup.execCommand('mceBeginUndoLevel'); + if (elm == null) { + var s = SXE.inst.selection.getContent(); + if(s.length > 0) { + insertInlineElement('INS'); + var elementArray = tinymce.grep(SXE.inst.dom.select('ins'), function(n) {return n.id == '#sxe_temp_ins#';}); + for (var i=0; i + + + {#advanced_dlg.about_title} + + + + + + + +
    +
    +

    {#advanced_dlg.about_title}

    +

    Version: ()

    +

    TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL + by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.

    +

    Copyright © 2003-2008, Moxiecode Systems AB, All rights reserved.

    +

    For more information about this software visit the TinyMCE website.

    + +
    + Got Moxie? + Hosted By Sourceforge + Also on freshmeat +
    +
    + +
    +
    +

    {#advanced_dlg.about_loaded}

    + +
    +
    + +

     

    +
    +
    + +
    +
    +
    +
    + +
    + +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/anchor.htm b/webapps/totsys/common/js/tiny_mce/themes/advanced/anchor.htm new file mode 100644 index 0000000..9c70f9b --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/anchor.htm @@ -0,0 +1,26 @@ + + + + {#advanced_dlg.anchor_title} + + + + +
    + + + + + + + + +
    {#advanced_dlg.anchor_title}
    {#advanced_dlg.anchor_name}:
    + +
    + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/charmap.htm b/webapps/totsys/common/js/tiny_mce/themes/advanced/charmap.htm new file mode 100644 index 0000000..c36c237 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/charmap.htm @@ -0,0 +1,52 @@ + + + + {#advanced_dlg.charmap_title} + + + + + + + + + + + + + + + +
    {#advanced_dlg.charmap_title}
    + + + + + + + + + +
     
     
    +
    + + + + + + + + + + + + + + + + +
    HTML-Code
     
     
    NUM-Code
     
    +
    + + + diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/color_picker.htm b/webapps/totsys/common/js/tiny_mce/themes/advanced/color_picker.htm new file mode 100644 index 0000000..148550f --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/color_picker.htm @@ -0,0 +1,73 @@ + + + + {#advanced_dlg.colorpicker_title} + + + + + +
    + + +
    +
    +
    + {#advanced_dlg.colorpicker_picker_title} +
    + + +
    + +
    + +
    +
    +
    +
    + +
    +
    + {#advanced_dlg.colorpicker_palette_title} +
    + +
    + +
    +
    +
    + +
    +
    + {#advanced_dlg.colorpicker_named_title} +
    + +
    + +
    + +
    + {#advanced_dlg.colorpicker_name} +
    +
    +
    +
    + +
    + + +
    + +
    + +
    +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/editor_template.js b/webapps/totsys/common/js/tiny_mce/themes/advanced/editor_template.js new file mode 100644 index 0000000..cd3e586 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/editor_template.js @@ -0,0 +1 @@ +(function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l)}if(j.settings.content_css!==false){j.dom.loadCSS(j.baseURI.toAbsolute("themes/advanced/skins/"+j.settings.skin+"/content.css"))}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",attributes:{"class":n["class"]},selector:"*"});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();p=i.formatter.matchAll(n);if(p[0]==o){i.formatter.remove(o)}else{i.formatter.apply(o)}return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r,selector:"*"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){i.execCommand("FontName",false,l);return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){if(i["class"]){k.focus();k.formatter.toggle("fontsize_class",{value:i["class"]})}else{k.execCommand("FontSize",false,i.fontSize)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){n.add(i,o)})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",cmd:"FormatBlock"});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;m=j=d.create("span",{id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=d.stdMode?u.getElementsByTagName("tr"):u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},""),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_tbl");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,l){var j=this.editor,k=this.settings,m=d.get(j.id+"_tbl"),n=d.get(j.id+"_ifr");i=Math.max(k.theme_advanced_resizing_min_width||100,i);l=Math.max(k.theme_advanced_resizing_min_height||100,l);i=Math.min(k.theme_advanced_resizing_max_width||65535,i);l=Math.min(k.theme_advanced_resizing_max_height||65535,l);d.setStyle(m,"height","");d.setStyle(n,"height",l);if(k.theme_advanced_resize_horizontal){d.setStyle(m,"width","");d.setStyle(n,"width",i);if(i"))}q.push(d.createHTML("a",{href:"#",accesskey:"q",title:r.getLang("advanced.toolbar_focus")},""));for(p=1;(y=A["theme_advanced_buttons"+p]);p++){m=j.createToolbar("toolbar"+p,{"class":"mceToolbarRow"+p});if(A["theme_advanced_buttons"+p+"_add"]){y+=","+A["theme_advanced_buttons"+p+"_add"]}if(A["theme_advanced_buttons"+p+"_add_before"]){y=A["theme_advanced_buttons"+p+"_add_before"]+","+y}z._addControls(y,m);q.push(m.renderHTML());k.deltaHeight-=A.theme_advanced_row_height}q.push(d.createHTML("a",{href:"#",accesskey:"z",title:r.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+r.id+"').focus();"},""));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row"},w.theme_advanced_path?p.translate("advanced.path")+": ":" ");d.add(k,"a",{href:"#",accesskey:"x"});if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}v.resizeTo(n.cw,n.ch)})}p.onPostRender.add(function(){b.add(p.id+"_resize","mousedown",function(D){var t,r,s,o,C,z,A,F,n,E,x;function y(G){n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E)}function B(G){b.remove(d.doc,"mousemove",t);b.remove(p.getDoc(),"mousemove",r);b.remove(d.doc,"mouseup",s);b.remove(p.getDoc(),"mouseup",o);if(w.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+p.id+"_size",{cw:n,ch:E})}}D.preventDefault();C=D.screenX;z=D.screenY;x=d.get(v.editor.id+"_ifr");A=n=x.clientWidth;F=E=x.clientHeight;t=b.add(d.doc,"mousemove",y);r=b.add(p.getDoc(),"mousemove",y);s=b.add(d.doc,"mouseup",B);o=b.add(p.getDoc(),"mouseup",B)})})}j.deltaHeight-=21;k=m=null},_nodeChanged:function(r,z,l,x,j){var C=this,i,y=0,B,u,D=C.settings,A,k,w,m,q;e.each(C.stateControls,function(n){z.setActive(n,r.queryCommandState(C.controls[n][1]))});function o(p){var s,n=j.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s= 1 && v <= 7) { + k = v + ' (' + t.sizes[v - 1] + 'pt)'; + cl = s.font_size_classes[v - 1]; + v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt'); + } + + if (/^\s*\./.test(v)) + cl = v.replace(/\./g, ''); + + o[k] = cl ? {'class' : cl} : {fontSize : v}; + }); + + s.theme_advanced_font_sizes = o; + } + + if ((v = s.theme_advanced_path_location) && v != 'none') + s.theme_advanced_statusbar_location = s.theme_advanced_path_location; + + if (s.theme_advanced_statusbar_location == 'none') + s.theme_advanced_statusbar_location = 0; + + // Init editor + ed.onInit.add(function() { + if (!ed.settings.readonly) + ed.onNodeChange.add(t._nodeChanged, t); + + if (ed.settings.content_css !== false) + ed.dom.loadCSS(ed.baseURI.toAbsolute("themes/advanced/skins/" + ed.settings.skin + "/content.css")); + }); + + ed.onSetProgressState.add(function(ed, b, ti) { + var co, id = ed.id, tb; + + if (b) { + t.progressTimer = setTimeout(function() { + co = ed.getContainer(); + co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild); + tb = DOM.get(ed.id + '_tbl'); + + DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}}); + DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}}); + }, ti || 0); + } else { + DOM.remove(id + '_blocker'); + DOM.remove(id + '_progress'); + clearTimeout(t.progressTimer); + } + }); + + DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css"); + + if (s.skin_variant) + DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css"); + }, + + createControl : function(n, cf) { + var cd, c; + + if (c = cf.createControl(n)) + return c; + + switch (n) { + case "styleselect": + return this._createStyleSelect(); + + case "formatselect": + return this._createBlockFormats(); + + case "fontselect": + return this._createFontSelect(); + + case "fontsizeselect": + return this._createFontSizeSelect(); + + case "forecolor": + return this._createForeColorMenu(); + + case "backcolor": + return this._createBackColorMenu(); + } + + if ((cd = this.controls[n])) + return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]}); + }, + + execCommand : function(cmd, ui, val) { + var f = this['_' + cmd]; + + if (f) { + f.call(this, ui, val); + return true; + } + + return false; + }, + + _importClasses : function(e) { + var ed = this.editor, ctrl = ed.controlManager.get('styleselect'); + + if (ctrl.getLength() == 0) { + each(ed.dom.getClasses(), function(o, idx) { + var name = 'style_' + idx; + + ed.formatter.register(name, { + inline : 'span', + attributes : {'class' : o['class']}, + selector : '*' + }); + + ctrl.add(o['class'], name); + }); + } + }, + + _createStyleSelect : function(n) { + var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl; + + // Setup style select box + ctrl = ctrlMan.createListBox('styleselect', { + title : 'advanced.style_select', + onselect : function(name) { + var matches, formatNames = []; + + each(ctrl.items, function(item) { + formatNames.push(item.value); + }); + + ed.focus(); + + // Toggle off the current format + matches = ed.formatter.matchAll(formatNames); + if (matches[0] == name) + ed.formatter.remove(name); + else + ed.formatter.apply(name); + + return false; // No auto select + } + }); + + // Handle specified format + ed.onInit.add(function() { + var counter = 0, formats = ed.getParam('style_formats'); + + if (formats) { + each(formats, function(fmt) { + var name, keys = 0; + + each(fmt, function() {keys++;}); + + if (keys > 1) { + name = fmt.name = fmt.name || 'style_' + (counter++); + ed.formatter.register(name, fmt); + ctrl.add(fmt.title, name); + } else + ctrl.add(fmt.title); + }); + } else { + each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) { + var name; + + if (val) { + name = 'style_' + (counter++); + + ed.formatter.register(name, { + inline : 'span', + classes : val, + selector : '*' + }); + + ctrl.add(t.editor.translate(key), name); + } + }); + } + }); + + // Auto import classes if the ctrl box is empty + if (ctrl.getLength() == 0) { + ctrl.onPostRender.add(function(ed, n) { + if (!ctrl.NativeListBox) { + Event.add(n.id + '_text', 'focus', t._importClasses, t); + Event.add(n.id + '_text', 'mousedown', t._importClasses, t); + Event.add(n.id + '_open', 'focus', t._importClasses, t); + Event.add(n.id + '_open', 'mousedown', t._importClasses, t); + } else + Event.add(n.id, 'focus', t._importClasses, t); + }); + } + + return ctrl; + }, + + _createFontSelect : function() { + var c, t = this, ed = t.editor; + + c = ed.controlManager.createListBox('fontselect', { + title : 'advanced.fontdefault', + onselect : function(v) { + ed.execCommand('FontName', false, v); + return false; // No auto select + } + }); + + if (c) { + each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) { + c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''}); + }); + } + + return c; + }, + + _createFontSizeSelect : function() { + var t = this, ed = t.editor, c, i = 0, cl = []; + + c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) { + if (v['class']) { + ed.focus(); + ed.formatter.toggle('fontsize_class', {value : v['class']}); + } else + ed.execCommand('FontSize', false, v.fontSize); + + return false; // No auto select + }}); + + if (c) { + each(t.settings.theme_advanced_font_sizes, function(v, k) { + c.add(k, v); + }); + } + + return c; + }, + + _createBlockFormats : function() { + var c, fmts = { + p : 'advanced.paragraph', + address : 'advanced.address', + pre : 'advanced.pre', + h1 : 'advanced.h1', + h2 : 'advanced.h2', + h3 : 'advanced.h3', + h4 : 'advanced.h4', + h5 : 'advanced.h5', + h6 : 'advanced.h6', + div : 'advanced.div', + blockquote : 'advanced.blockquote', + code : 'advanced.code', + dt : 'advanced.dt', + dd : 'advanced.dd', + samp : 'advanced.samp' + }, t = this; + + c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', cmd : 'FormatBlock'}); + if (c) { + each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) { + c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v}); + }); + } + + return c; + }, + + _createForeColorMenu : function() { + var c, t = this, s = t.settings, o = {}, v; + + if (s.theme_advanced_more_colors) { + o.more_colors_func = function() { + t._mceColorPicker(0, { + color : c.value, + func : function(co) { + c.setColor(co); + } + }); + }; + } + + if (v = s.theme_advanced_text_colors) + o.colors = v; + + if (s.theme_advanced_default_foreground_color) + o.default_color = s.theme_advanced_default_foreground_color; + + o.title = 'advanced.forecolor_desc'; + o.cmd = 'ForeColor'; + o.scope = this; + + c = t.editor.controlManager.createColorSplitButton('forecolor', o); + + return c; + }, + + _createBackColorMenu : function() { + var c, t = this, s = t.settings, o = {}, v; + + if (s.theme_advanced_more_colors) { + o.more_colors_func = function() { + t._mceColorPicker(0, { + color : c.value, + func : function(co) { + c.setColor(co); + } + }); + }; + } + + if (v = s.theme_advanced_background_colors) + o.colors = v; + + if (s.theme_advanced_default_background_color) + o.default_color = s.theme_advanced_default_background_color; + + o.title = 'advanced.backcolor_desc'; + o.cmd = 'HiliteColor'; + o.scope = this; + + c = t.editor.controlManager.createColorSplitButton('backcolor', o); + + return c; + }, + + renderUI : function(o) { + var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl; + + n = p = DOM.create('span', {id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '')}); + + if (!DOM.boxModel) + n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'}); + + n = sc = DOM.add(n, 'table', {id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0}); + n = tb = DOM.add(n, 'tbody'); + + switch ((s.theme_advanced_layout_manager || '').toLowerCase()) { + case "rowlayout": + ic = t._rowLayout(s, tb, o); + break; + + case "customlayout": + ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p); + break; + + default: + ic = t._simpleLayout(s, tb, o, p); + } + + n = o.targetNode; + + // Add classes to first and last TRs + nl = DOM.stdMode ? sc.getElementsByTagName('tr') : sc.rows; // Quick fix for IE 8 + DOM.addClass(nl[0], 'mceFirst'); + DOM.addClass(nl[nl.length - 1], 'mceLast'); + + // Add classes to first and last TDs + each(DOM.select('tr', tb), function(n) { + DOM.addClass(n.firstChild, 'mceFirst'); + DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast'); + }); + + if (DOM.get(s.theme_advanced_toolbar_container)) + DOM.get(s.theme_advanced_toolbar_container).appendChild(p); + else + DOM.insertAfter(p, n); + + Event.add(ed.id + '_path_row', 'click', function(e) { + e = e.target; + + if (e.nodeName == 'A') { + t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1')); + + return Event.cancel(e); + } + }); +/* + if (DOM.get(ed.id + '_path_row')) { + Event.add(ed.id + '_tbl', 'mouseover', function(e) { + var re; + + e = e.target; + + if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) { + re = DOM.get(ed.id + '_path_row'); + t.lastPath = re.innerHTML; + DOM.setHTML(re, e.parentNode.title); + } + }); + + Event.add(ed.id + '_tbl', 'mouseout', function(e) { + if (t.lastPath) { + DOM.setHTML(ed.id + '_path_row', t.lastPath); + t.lastPath = 0; + } + }); + } +*/ + + if (!ed.getParam('accessibility_focus')) + Event.add(DOM.add(p, 'a', {href : '#'}, ''), 'focus', function() {tinyMCE.get(ed.id).focus();}); + + if (s.theme_advanced_toolbar_location == 'external') + o.deltaHeight = 0; + + t.deltaHeight = o.deltaHeight; + o.targetNode = null; + + return { + iframeContainer : ic, + editorContainer : ed.id + '_parent', + sizeContainer : sc, + deltaHeight : o.deltaHeight + }; + }, + + getInfo : function() { + return { + longname : 'Advanced theme', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + version : tinymce.majorVersion + "." + tinymce.minorVersion + } + }, + + resizeBy : function(dw, dh) { + var e = DOM.get(this.editor.id + '_tbl'); + + this.resizeTo(e.clientWidth + dw, e.clientHeight + dh); + }, + + resizeTo : function(w, h) { + var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr'); + + // Boundery fix box + w = Math.max(s.theme_advanced_resizing_min_width || 100, w); + h = Math.max(s.theme_advanced_resizing_min_height || 100, h); + w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w); + h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h); + + // Resize iframe and container + DOM.setStyle(e, 'height', ''); + DOM.setStyle(ifr, 'height', h); + + if (s.theme_advanced_resize_horizontal) { + DOM.setStyle(e, 'width', ''); + DOM.setStyle(ifr, 'width', w); + + // Make sure that the size is never smaller than the over all ui + if (w < e.clientWidth) + DOM.setStyle(ifr, 'width', e.clientWidth); + } + }, + + destroy : function() { + var id = this.editor.id; + + Event.clear(id + '_resize'); + Event.clear(id + '_path_row'); + Event.clear(id + '_external_close'); + }, + + // Internal functions + + _simpleLayout : function(s, tb, o, p) { + var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c; + + if (s.readonly) { + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); + return ic; + } + + // Create toolbar container at top + if (lo == 'top') + t._addToolbars(tb, o); + + // Create external toolbar + if (lo == 'external') { + n = c = DOM.create('div', {style : 'position:relative'}); + n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'}); + DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'}); + n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0}); + etb = DOM.add(n, 'tbody'); + + if (p.firstChild.className == 'mceOldBoxModel') + p.firstChild.appendChild(c); + else + p.insertBefore(c, p.firstChild); + + t._addToolbars(etb, o); + + ed.onMouseUp.add(function() { + var e = DOM.get(ed.id + '_external'); + DOM.show(e); + + DOM.hide(lastExtID); + + var f = Event.add(ed.id + '_external_close', 'click', function() { + DOM.hide(ed.id + '_external'); + Event.remove(ed.id + '_external_close', 'click', f); + }); + + DOM.show(e); + DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1); + + // Fixes IE rendering bug + DOM.hide(e); + DOM.show(e); + e.style.filter = ''; + + lastExtID = ed.id + '_external'; + + e = null; + }); + } + + if (sl == 'top') + t._addStatusBar(tb, o); + + // Create iframe container + if (!s.theme_advanced_toolbar_container) { + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); + } + + // Create toolbar container at bottom + if (lo == 'bottom') + t._addToolbars(tb, o); + + if (sl == 'bottom') + t._addStatusBar(tb, o); + + return ic; + }, + + _rowLayout : function(s, tb, o) { + var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a; + + dc = s.theme_advanced_containers_default_class || ''; + da = s.theme_advanced_containers_default_align || 'center'; + + each(explode(s.theme_advanced_containers || ''), function(c, i) { + var v = s['theme_advanced_container_' + c] || ''; + + switch (v.toLowerCase()) { + case 'mceeditor': + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); + break; + + case 'mceelementpath': + t._addStatusBar(tb, o); + break; + + default: + a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase(); + a = 'mce' + t._ufirst(a); + + n = DOM.add(DOM.add(tb, 'tr'), 'td', { + 'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da + }); + + to = cf.createToolbar("toolbar" + i); + t._addControls(v, to); + DOM.setHTML(n, to.renderHTML()); + o.deltaHeight -= s.theme_advanced_row_height; + } + }); + + return ic; + }, + + _addControls : function(v, tb) { + var t = this, s = t.settings, di, cf = t.editor.controlManager; + + if (s.theme_advanced_disable && !t._disabled) { + di = {}; + + each(explode(s.theme_advanced_disable), function(v) { + di[v] = 1; + }); + + t._disabled = di; + } else + di = t._disabled; + + each(explode(v), function(n) { + var c; + + if (di && di[n]) + return; + + // Compatiblity with 2.x + if (n == 'tablecontrols') { + each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) { + n = t.createControl(n, cf); + + if (n) + tb.add(n); + }); + + return; + } + + c = t.createControl(n, cf); + + if (c) + tb.add(c); + }); + }, + + _addToolbars : function(c, o) { + var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a; + + a = s.theme_advanced_toolbar_align.toLowerCase(); + a = 'mce' + t._ufirst(a); + + n = DOM.add(DOM.add(c, 'tr'), 'td', {'class' : 'mceToolbar ' + a}); + + if (!ed.getParam('accessibility_focus')) + h.push(DOM.createHTML('a', {href : '#', onfocus : 'tinyMCE.get(\'' + ed.id + '\').focus();'}, '')); + + h.push(DOM.createHTML('a', {href : '#', accesskey : 'q', title : ed.getLang("advanced.toolbar_focus")}, '')); + + // Create toolbar and add the controls + for (i=1; (v = s['theme_advanced_buttons' + i]); i++) { + tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i}); + + if (s['theme_advanced_buttons' + i + '_add']) + v += ',' + s['theme_advanced_buttons' + i + '_add']; + + if (s['theme_advanced_buttons' + i + '_add_before']) + v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v; + + t._addControls(v, tb); + + //n.appendChild(n = tb.render()); + h.push(tb.renderHTML()); + + o.deltaHeight -= s.theme_advanced_row_height; + } + + h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '')); + DOM.setHTML(n, h.join('')); + }, + + _addStatusBar : function(tb, o) { + var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td; + + n = DOM.add(tb, 'tr'); + n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'}); + n = DOM.add(n, 'div', {id : ed.id + '_path_row'}, s.theme_advanced_path ? ed.translate('advanced.path') + ': ' : ' '); + DOM.add(n, 'a', {href : '#', accesskey : 'x'}); + + if (s.theme_advanced_resizing) { + DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize'}); + + if (s.theme_advanced_resizing_use_cookie) { + ed.onPostRender.add(function() { + var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl'); + + if (!o) + return; + + t.resizeTo(o.cw, o.ch); + }); + } + + ed.onPostRender.add(function() { + Event.add(ed.id + '_resize', 'mousedown', function(e) { + var mouseMoveHandler1, mouseMoveHandler2, + mouseUpHandler1, mouseUpHandler2, + startX, startY, startWidth, startHeight, width, height, ifrElm; + + function resizeOnMove(e) { + width = startWidth + (e.screenX - startX); + height = startHeight + (e.screenY - startY); + + t.resizeTo(width, height); + }; + + function endResize(e) { + // Stop listening + Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1); + Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2); + Event.remove(DOM.doc, 'mouseup', mouseUpHandler1); + Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2); + + // Store away the size + if (s.theme_advanced_resizing_use_cookie) { + Cookie.setHash("TinyMCE_" + ed.id + "_size", { + cw : width, + ch : height + }); + } + }; + + e.preventDefault(); + + // Get the current rect size + startX = e.screenX; + startY = e.screenY; + ifrElm = DOM.get(t.editor.id + '_ifr'); + startWidth = width = ifrElm.clientWidth; + startHeight = height = ifrElm.clientHeight; + + // Register envent handlers + mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove); + mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove); + mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize); + mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize); + }); + }); + } + + o.deltaHeight -= 21; + n = tb = null; + }, + + _nodeChanged : function(ed, cm, n, co, ob) { + var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, formatNames, matches; + + tinymce.each(t.stateControls, function(c) { + cm.setActive(c, ed.queryCommandState(t.controls[c][1])); + }); + + function getParent(name) { + var i, parents = ob.parents, func = name; + + if (typeof(name) == 'string') { + func = function(node) { + return node.nodeName == name; + }; + } + + for (i = 0; i < parents.length; i++) { + if (func(parents[i])) + return parents[i]; + } + }; + + cm.setActive('visualaid', ed.hasVisual); + cm.setDisabled('undo', !ed.undoManager.hasUndo() && !ed.typing); + cm.setDisabled('redo', !ed.undoManager.hasRedo()); + cm.setDisabled('outdent', !ed.queryCommandState('Outdent')); + + p = getParent('A'); + if (c = cm.get('link')) { + if (!p || !p.name) { + c.setDisabled(!p && co); + c.setActive(!!p); + } + } + + if (c = cm.get('unlink')) { + c.setDisabled(!p && co); + c.setActive(!!p && !p.name); + } + + if (c = cm.get('anchor')) { + c.setActive(!!p && p.name); + } + + p = getParent('IMG'); + if (c = cm.get('image')) + c.setActive(!!p && n.className.indexOf('mceItem') == -1); + + if (c = cm.get('styleselect')) { + t._importClasses(); + + formatNames = []; + each(c.items, function(item) { + formatNames.push(item.value); + }); + + matches = ed.formatter.matchAll(formatNames); + c.select(matches[0]); + } + + if (c = cm.get('formatselect')) { + p = getParent(DOM.isBlock); + + if (p) + c.select(p.nodeName.toLowerCase()); + } + + // Find out current fontSize, fontFamily and fontClass + getParent(function(n) { + if (n.nodeName === 'SPAN') { + if (!cl && n.className) + cl = n.className; + + if (!fz && n.style.fontSize) + fz = n.style.fontSize; + + if (!fn && n.style.fontFamily) + fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase(); + } + + return false; + }); + + if (c = cm.get('fontselect')) { + c.select(function(v) { + return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn; + }); + } + + // Select font size + if (c = cm.get('fontsizeselect')) { + // Use computed style + if (s.theme_advanced_runtime_fontsize && !fz && !cl) + fz = ed.dom.getStyle(n, 'fontSize', true); + + c.select(function(v) { + if (v.fontSize && v.fontSize === fz) + return true; + + if (v['class'] && v['class'] === cl) + return true; + }); + } + + if (s.theme_advanced_path && s.theme_advanced_statusbar_location) { + p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'}); + DOM.setHTML(p, ''); + + getParent(function(n) { + var na = n.nodeName.toLowerCase(), u, pi, ti = ''; + + /*if (n.getAttribute('_mce_bogus')) + return; +*/ + // Ignore non element and hidden elements + if (n.nodeType != 1 || n.nodeName === 'BR' || (DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved'))) + return; + + // Fake name + if (v = DOM.getAttrib(n, 'mce_name')) + na = v; + + // Handle prefix + if (tinymce.isIE && n.scopeName !== 'HTML') + na = n.scopeName + ':' + na; + + // Remove internal prefix + na = na.replace(/mce\:/g, ''); + + // Handle node name + switch (na) { + case 'b': + na = 'strong'; + break; + + case 'i': + na = 'em'; + break; + + case 'img': + if (v = DOM.getAttrib(n, 'src')) + ti += 'src: ' + v + ' '; + + break; + + case 'a': + if (v = DOM.getAttrib(n, 'name')) { + ti += 'name: ' + v + ' '; + na += '#' + v; + } + + if (v = DOM.getAttrib(n, 'href')) + ti += 'href: ' + v + ' '; + + break; + + case 'font': + if (v = DOM.getAttrib(n, 'face')) + ti += 'font: ' + v + ' '; + + if (v = DOM.getAttrib(n, 'size')) + ti += 'size: ' + v + ' '; + + if (v = DOM.getAttrib(n, 'color')) + ti += 'color: ' + v + ' '; + + break; + + case 'span': + if (v = DOM.getAttrib(n, 'style')) + ti += 'style: ' + v + ' '; + + break; + } + + if (v = DOM.getAttrib(n, 'id')) + ti += 'id: ' + v + ' '; + + if (v = n.className) { + v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '') + + if (v) { + ti += 'class: ' + v + ' '; + + if (DOM.isBlock(n) || na == 'img' || na == 'span') + na += '.' + v; + } + } + + na = na.replace(/(html:)/g, ''); + na = {name : na, node : n, title : ti}; + t.onResolveName.dispatch(t, na); + ti = na.title; + na = na.name; + + //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');"; + pi = DOM.create('a', {'href' : "javascript:;", onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na); + + if (p.hasChildNodes()) { + p.insertBefore(DOM.doc.createTextNode(' \u00bb '), p.firstChild); + p.insertBefore(pi, p.firstChild); + } else + p.appendChild(pi); + }, ed.getBody()); + } + }, + + // Commands gets called by execCommand + + _sel : function(v) { + this.editor.execCommand('mceSelectNodeDepth', false, v); + }, + + _mceInsertAnchor : function(ui, v) { + var ed = this.editor; + + ed.windowManager.open({ + url : tinymce.baseURL + '/themes/advanced/anchor.htm', + width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)), + height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceCharMap : function() { + var ed = this.editor; + + ed.windowManager.open({ + url : tinymce.baseURL + '/themes/advanced/charmap.htm', + width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)), + height : 250 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceHelp : function() { + var ed = this.editor; + + ed.windowManager.open({ + url : tinymce.baseURL + '/themes/advanced/about.htm', + width : 480, + height : 380, + inline : true + }, { + theme_url : this.url + }); + }, + + _mceColorPicker : function(u, v) { + var ed = this.editor; + + v = v || {}; + + ed.windowManager.open({ + url : tinymce.baseURL + '/themes/advanced/color_picker.htm', + width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)), + height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)), + close_previous : false, + inline : true + }, { + input_color : v.color, + func : v.func, + theme_url : this.url + }); + }, + + _mceCodeEditor : function(ui, val) { + var ed = this.editor; + + ed.windowManager.open({ + url : tinymce.baseURL + '/themes/advanced/source_editor.htm', + width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)), + height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)), + inline : true, + resizable : true, + maximizable : true + }, { + theme_url : this.url + }); + }, + + _mceImage : function(ui, val) { + var ed = this.editor; + + // Internal image object like a flash placeholder + if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1) + return; + + ed.windowManager.open({ + url : tinymce.baseURL + '/themes/advanced/image.htm', + width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)), + height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceLink : function(ui, val) { + var ed = this.editor; + + ed.windowManager.open({ + url : tinymce.baseURL + '/themes/advanced/link.htm', + width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)), + height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceNewDocument : function() { + var ed = this.editor; + + ed.windowManager.confirm('advanced.newdocument', function(s) { + if (s) + ed.execCommand('mceSetContent', false, ''); + }); + }, + + _mceForeColor : function() { + var t = this; + + this._mceColorPicker(0, { + color: t.fgColor, + func : function(co) { + t.fgColor = co; + t.editor.execCommand('ForeColor', false, co); + } + }); + }, + + _mceBackColor : function() { + var t = this; + + this._mceColorPicker(0, { + color: t.bgColor, + func : function(co) { + t.bgColor = co; + t.editor.execCommand('HiliteColor', false, co); + } + }); + }, + + _ufirst : function(s) { + return s.substring(0, 1).toUpperCase() + s.substring(1); + } + }); + + tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme); +}(tinymce)); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/image.htm b/webapps/totsys/common/js/tiny_mce/themes/advanced/image.htm new file mode 100644 index 0000000..98fd2cd --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/image.htm @@ -0,0 +1,80 @@ + + + + {#advanced_dlg.image_title} + + + + + + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    + x +
    +
    +
    + +
    + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/img/colorpicker.jpg b/webapps/totsys/common/js/tiny_mce/themes/advanced/img/colorpicker.jpg new file mode 100644 index 0000000..b4c542d Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/themes/advanced/img/colorpicker.jpg differ diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/img/icons.gif b/webapps/totsys/common/js/tiny_mce/themes/advanced/img/icons.gif new file mode 100644 index 0000000..e46de53 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/themes/advanced/img/icons.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/js/about.js b/webapps/totsys/common/js/tiny_mce/themes/advanced/js/about.js new file mode 100644 index 0000000..7fc8ba2 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/js/about.js @@ -0,0 +1,72 @@ +tinyMCEPopup.requireLangPack(); + +function init() { + var ed, tcont; + + tinyMCEPopup.resizeToInnerSize(); + ed = tinyMCEPopup.editor; + + // Give FF some time + window.setTimeout(insertHelpIFrame, 10); + + tcont = document.getElementById('plugintablecontainer'); + document.getElementById('plugins_tab').style.display = 'none'; + + var html = ""; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + + tinymce.each(ed.plugins, function(p, n) { + var info; + + if (!p.getInfo) + return; + + html += ''; + + info = p.getInfo(); + + if (info.infourl != null && info.infourl != '') + html += ''; + else + html += ''; + + if (info.authorurl != null && info.authorurl != '') + html += ''; + else + html += ''; + + html += ''; + html += ''; + + document.getElementById('plugins_tab').style.display = ''; + + }); + + html += ''; + html += '
    ' + ed.getLang('advanced_dlg.about_plugin') + '' + ed.getLang('advanced_dlg.about_author') + '' + ed.getLang('advanced_dlg.about_version') + '
    ' + info.longname + '' + info.longname + '' + info.author + '' + info.author + '' + info.version + '
    '; + + tcont.innerHTML = html; + + tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion; + tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate; +} + +function insertHelpIFrame() { + var html; + + if (tinyMCEPopup.getParam('docs_url')) { + html = ''; + document.getElementById('iframecontainer').innerHTML = html; + document.getElementById('help_tab').style.display = 'block'; + } +} + +tinyMCEPopup.onInit.add(init); diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/js/anchor.js b/webapps/totsys/common/js/tiny_mce/themes/advanced/js/anchor.js new file mode 100644 index 0000000..d7a854e --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/js/anchor.js @@ -0,0 +1,37 @@ +tinyMCEPopup.requireLangPack(); + +var AnchorDialog = { + init : function(ed) { + var action, elm, f = document.forms[0]; + + this.editor = ed; + elm = ed.dom.getParent(ed.selection.getNode(), 'A'); + v = ed.dom.getAttrib(elm, 'name'); + + if (v) { + this.action = 'update'; + f.anchorName.value = v; + } + + f.insert.value = ed.getLang(elm ? 'update' : 'insert'); + }, + + update : function() { + var ed = this.editor, elm, name = document.forms[0].anchorName.value; + + tinyMCEPopup.restoreSelection(); + + if (this.action != 'update') + ed.selection.collapse(1); + + elm = ed.dom.getParent(ed.selection.getNode(), 'A'); + if (elm) + elm.name = name; + else + ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, '')); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog); diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/js/charmap.js b/webapps/totsys/common/js/tiny_mce/themes/advanced/js/charmap.js new file mode 100644 index 0000000..53a2683 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/js/charmap.js @@ -0,0 +1,335 @@ +/** + * charmap.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +tinyMCEPopup.requireLangPack(); + +var charmap = [ + [' ', ' ', true, 'no-break space'], + ['&', '&', true, 'ampersand'], + ['"', '"', true, 'quotation mark'], +// finance + ['¢', '¢', true, 'cent sign'], + ['€', '€', true, 'euro sign'], + ['£', '£', true, 'pound sign'], + ['¥', '¥', true, 'yen sign'], +// signs + ['©', '©', true, 'copyright sign'], + ['®', '®', true, 'registered sign'], + ['™', '™', true, 'trade mark sign'], + ['‰', '‰', true, 'per mille sign'], + ['µ', 'µ', true, 'micro sign'], + ['·', '·', true, 'middle dot'], + ['•', '•', true, 'bullet'], + ['…', '…', true, 'three dot leader'], + ['′', '′', true, 'minutes / feet'], + ['″', '″', true, 'seconds / inches'], + ['§', '§', true, 'section sign'], + ['¶', '¶', true, 'paragraph sign'], + ['ß', 'ß', true, 'sharp s / ess-zed'], +// quotations + ['‹', '‹', true, 'single left-pointing angle quotation mark'], + ['›', '›', true, 'single right-pointing angle quotation mark'], + ['«', '«', true, 'left pointing guillemet'], + ['»', '»', true, 'right pointing guillemet'], + ['‘', '‘', true, 'left single quotation mark'], + ['’', '’', true, 'right single quotation mark'], + ['“', '“', true, 'left double quotation mark'], + ['”', '”', true, 'right double quotation mark'], + ['‚', '‚', true, 'single low-9 quotation mark'], + ['„', '„', true, 'double low-9 quotation mark'], + ['<', '<', true, 'less-than sign'], + ['>', '>', true, 'greater-than sign'], + ['≤', '≤', true, 'less-than or equal to'], + ['≥', '≥', true, 'greater-than or equal to'], + ['–', '–', true, 'en dash'], + ['—', '—', true, 'em dash'], + ['¯', '¯', true, 'macron'], + ['‾', '‾', true, 'overline'], + ['¤', '¤', true, 'currency sign'], + ['¦', '¦', true, 'broken bar'], + ['¨', '¨', true, 'diaeresis'], + ['¡', '¡', true, 'inverted exclamation mark'], + ['¿', '¿', true, 'turned question mark'], + ['ˆ', 'ˆ', true, 'circumflex accent'], + ['˜', '˜', true, 'small tilde'], + ['°', '°', true, 'degree sign'], + ['−', '−', true, 'minus sign'], + ['±', '±', true, 'plus-minus sign'], + ['÷', '÷', true, 'division sign'], + ['⁄', '⁄', true, 'fraction slash'], + ['×', '×', true, 'multiplication sign'], + ['¹', '¹', true, 'superscript one'], + ['²', '²', true, 'superscript two'], + ['³', '³', true, 'superscript three'], + ['¼', '¼', true, 'fraction one quarter'], + ['½', '½', true, 'fraction one half'], + ['¾', '¾', true, 'fraction three quarters'], +// math / logical + ['ƒ', 'ƒ', true, 'function / florin'], + ['∫', '∫', true, 'integral'], + ['∑', '∑', true, 'n-ary sumation'], + ['∞', '∞', true, 'infinity'], + ['√', '√', true, 'square root'], + ['∼', '∼', false,'similar to'], + ['≅', '≅', false,'approximately equal to'], + ['≈', '≈', true, 'almost equal to'], + ['≠', '≠', true, 'not equal to'], + ['≡', '≡', true, 'identical to'], + ['∈', '∈', false,'element of'], + ['∉', '∉', false,'not an element of'], + ['∋', '∋', false,'contains as member'], + ['∏', '∏', true, 'n-ary product'], + ['∧', '∧', false,'logical and'], + ['∨', '∨', false,'logical or'], + ['¬', '¬', true, 'not sign'], + ['∩', '∩', true, 'intersection'], + ['∪', '∪', false,'union'], + ['∂', '∂', true, 'partial differential'], + ['∀', '∀', false,'for all'], + ['∃', '∃', false,'there exists'], + ['∅', '∅', false,'diameter'], + ['∇', '∇', false,'backward difference'], + ['∗', '∗', false,'asterisk operator'], + ['∝', '∝', false,'proportional to'], + ['∠', '∠', false,'angle'], +// undefined + ['´', '´', true, 'acute accent'], + ['¸', '¸', true, 'cedilla'], + ['ª', 'ª', true, 'feminine ordinal indicator'], + ['º', 'º', true, 'masculine ordinal indicator'], + ['†', '†', true, 'dagger'], + ['‡', '‡', true, 'double dagger'], +// alphabetical special chars + ['À', 'À', true, 'A - grave'], + ['Á', 'Á', true, 'A - acute'], + ['Â', 'Â', true, 'A - circumflex'], + ['Ã', 'Ã', true, 'A - tilde'], + ['Ä', 'Ä', true, 'A - diaeresis'], + ['Å', 'Å', true, 'A - ring above'], + ['Æ', 'Æ', true, 'ligature AE'], + ['Ç', 'Ç', true, 'C - cedilla'], + ['È', 'È', true, 'E - grave'], + ['É', 'É', true, 'E - acute'], + ['Ê', 'Ê', true, 'E - circumflex'], + ['Ë', 'Ë', true, 'E - diaeresis'], + ['Ì', 'Ì', true, 'I - grave'], + ['Í', 'Í', true, 'I - acute'], + ['Î', 'Î', true, 'I - circumflex'], + ['Ï', 'Ï', true, 'I - diaeresis'], + ['Ð', 'Ð', true, 'ETH'], + ['Ñ', 'Ñ', true, 'N - tilde'], + ['Ò', 'Ò', true, 'O - grave'], + ['Ó', 'Ó', true, 'O - acute'], + ['Ô', 'Ô', true, 'O - circumflex'], + ['Õ', 'Õ', true, 'O - tilde'], + ['Ö', 'Ö', true, 'O - diaeresis'], + ['Ø', 'Ø', true, 'O - slash'], + ['Œ', 'Œ', true, 'ligature OE'], + ['Š', 'Š', true, 'S - caron'], + ['Ù', 'Ù', true, 'U - grave'], + ['Ú', 'Ú', true, 'U - acute'], + ['Û', 'Û', true, 'U - circumflex'], + ['Ü', 'Ü', true, 'U - diaeresis'], + ['Ý', 'Ý', true, 'Y - acute'], + ['Ÿ', 'Ÿ', true, 'Y - diaeresis'], + ['Þ', 'Þ', true, 'THORN'], + ['à', 'à', true, 'a - grave'], + ['á', 'á', true, 'a - acute'], + ['â', 'â', true, 'a - circumflex'], + ['ã', 'ã', true, 'a - tilde'], + ['ä', 'ä', true, 'a - diaeresis'], + ['å', 'å', true, 'a - ring above'], + ['æ', 'æ', true, 'ligature ae'], + ['ç', 'ç', true, 'c - cedilla'], + ['è', 'è', true, 'e - grave'], + ['é', 'é', true, 'e - acute'], + ['ê', 'ê', true, 'e - circumflex'], + ['ë', 'ë', true, 'e - diaeresis'], + ['ì', 'ì', true, 'i - grave'], + ['í', 'í', true, 'i - acute'], + ['î', 'î', true, 'i - circumflex'], + ['ï', 'ï', true, 'i - diaeresis'], + ['ð', 'ð', true, 'eth'], + ['ñ', 'ñ', true, 'n - tilde'], + ['ò', 'ò', true, 'o - grave'], + ['ó', 'ó', true, 'o - acute'], + ['ô', 'ô', true, 'o - circumflex'], + ['õ', 'õ', true, 'o - tilde'], + ['ö', 'ö', true, 'o - diaeresis'], + ['ø', 'ø', true, 'o slash'], + ['œ', 'œ', true, 'ligature oe'], + ['š', 'š', true, 's - caron'], + ['ù', 'ù', true, 'u - grave'], + ['ú', 'ú', true, 'u - acute'], + ['û', 'û', true, 'u - circumflex'], + ['ü', 'ü', true, 'u - diaeresis'], + ['ý', 'ý', true, 'y - acute'], + ['þ', 'þ', true, 'thorn'], + ['ÿ', 'ÿ', true, 'y - diaeresis'], + ['Α', 'Α', true, 'Alpha'], + ['Β', 'Β', true, 'Beta'], + ['Γ', 'Γ', true, 'Gamma'], + ['Δ', 'Δ', true, 'Delta'], + ['Ε', 'Ε', true, 'Epsilon'], + ['Ζ', 'Ζ', true, 'Zeta'], + ['Η', 'Η', true, 'Eta'], + ['Θ', 'Θ', true, 'Theta'], + ['Ι', 'Ι', true, 'Iota'], + ['Κ', 'Κ', true, 'Kappa'], + ['Λ', 'Λ', true, 'Lambda'], + ['Μ', 'Μ', true, 'Mu'], + ['Ν', 'Ν', true, 'Nu'], + ['Ξ', 'Ξ', true, 'Xi'], + ['Ο', 'Ο', true, 'Omicron'], + ['Π', 'Π', true, 'Pi'], + ['Ρ', 'Ρ', true, 'Rho'], + ['Σ', 'Σ', true, 'Sigma'], + ['Τ', 'Τ', true, 'Tau'], + ['Υ', 'Υ', true, 'Upsilon'], + ['Φ', 'Φ', true, 'Phi'], + ['Χ', 'Χ', true, 'Chi'], + ['Ψ', 'Ψ', true, 'Psi'], + ['Ω', 'Ω', true, 'Omega'], + ['α', 'α', true, 'alpha'], + ['β', 'β', true, 'beta'], + ['γ', 'γ', true, 'gamma'], + ['δ', 'δ', true, 'delta'], + ['ε', 'ε', true, 'epsilon'], + ['ζ', 'ζ', true, 'zeta'], + ['η', 'η', true, 'eta'], + ['θ', 'θ', true, 'theta'], + ['ι', 'ι', true, 'iota'], + ['κ', 'κ', true, 'kappa'], + ['λ', 'λ', true, 'lambda'], + ['μ', 'μ', true, 'mu'], + ['ν', 'ν', true, 'nu'], + ['ξ', 'ξ', true, 'xi'], + ['ο', 'ο', true, 'omicron'], + ['π', 'π', true, 'pi'], + ['ρ', 'ρ', true, 'rho'], + ['ς', 'ς', true, 'final sigma'], + ['σ', 'σ', true, 'sigma'], + ['τ', 'τ', true, 'tau'], + ['υ', 'υ', true, 'upsilon'], + ['φ', 'φ', true, 'phi'], + ['χ', 'χ', true, 'chi'], + ['ψ', 'ψ', true, 'psi'], + ['ω', 'ω', true, 'omega'], +// symbols + ['ℵ', 'ℵ', false,'alef symbol'], + ['ϖ', 'ϖ', false,'pi symbol'], + ['ℜ', 'ℜ', false,'real part symbol'], + ['ϑ','ϑ', false,'theta symbol'], + ['ϒ', 'ϒ', false,'upsilon - hook symbol'], + ['℘', '℘', false,'Weierstrass p'], + ['ℑ', 'ℑ', false,'imaginary part'], +// arrows + ['←', '←', true, 'leftwards arrow'], + ['↑', '↑', true, 'upwards arrow'], + ['→', '→', true, 'rightwards arrow'], + ['↓', '↓', true, 'downwards arrow'], + ['↔', '↔', true, 'left right arrow'], + ['↵', '↵', false,'carriage return'], + ['⇐', '⇐', false,'leftwards double arrow'], + ['⇑', '⇑', false,'upwards double arrow'], + ['⇒', '⇒', false,'rightwards double arrow'], + ['⇓', '⇓', false,'downwards double arrow'], + ['⇔', '⇔', false,'left right double arrow'], + ['∴', '∴', false,'therefore'], + ['⊂', '⊂', false,'subset of'], + ['⊃', '⊃', false,'superset of'], + ['⊄', '⊄', false,'not a subset of'], + ['⊆', '⊆', false,'subset of or equal to'], + ['⊇', '⊇', false,'superset of or equal to'], + ['⊕', '⊕', false,'circled plus'], + ['⊗', '⊗', false,'circled times'], + ['⊥', '⊥', false,'perpendicular'], + ['⋅', '⋅', false,'dot operator'], + ['⌈', '⌈', false,'left ceiling'], + ['⌉', '⌉', false,'right ceiling'], + ['⌊', '⌊', false,'left floor'], + ['⌋', '⌋', false,'right floor'], + ['⟨', '〈', false,'left-pointing angle bracket'], + ['⟩', '〉', false,'right-pointing angle bracket'], + ['◊', '◊', true,'lozenge'], + ['♠', '♠', false,'black spade suit'], + ['♣', '♣', true, 'black club suit'], + ['♥', '♥', true, 'black heart suit'], + ['♦', '♦', true, 'black diamond suit'], + [' ', ' ', false,'en space'], + [' ', ' ', false,'em space'], + [' ', ' ', false,'thin space'], + ['‌', '‌', false,'zero width non-joiner'], + ['‍', '‍', false,'zero width joiner'], + ['‎', '‎', false,'left-to-right mark'], + ['‏', '‏', false,'right-to-left mark'], + ['­', '­', false,'soft hyphen'] +]; + +tinyMCEPopup.onInit.add(function() { + tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML()); +}); + +function renderCharMapHTML() { + var charsPerRow = 20, tdWidth=20, tdHeight=20, i; + var html = ''; + var cols=-1; + + for (i=0; i' + + '' + + charmap[i][1] + + ''; + if ((cols+1) % charsPerRow == 0) + html += ''; + } + } + + if (cols % charsPerRow > 0) { + var padd = charsPerRow - (cols % charsPerRow); + for (var i=0; i '; + } + + html += '
    '; + + return html; +} + +function insertChar(chr) { + tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';'); + + // Refocus in window + if (tinyMCEPopup.isWindow) + window.focus(); + + tinyMCEPopup.editor.focus(); + tinyMCEPopup.close(); +} + +function previewChar(codeA, codeB, codeN) { + var elmA = document.getElementById('codeA'); + var elmB = document.getElementById('codeB'); + var elmV = document.getElementById('codeV'); + var elmN = document.getElementById('codeN'); + + if (codeA=='#160;') { + elmV.innerHTML = '__'; + } else { + elmV.innerHTML = '&' + codeA; + } + + elmB.innerHTML = '&' + codeA; + elmA.innerHTML = '&' + codeB; + elmN.innerHTML = codeN; +} diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/js/color_picker.js b/webapps/totsys/common/js/tiny_mce/themes/advanced/js/color_picker.js new file mode 100644 index 0000000..c1a65db --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/js/color_picker.js @@ -0,0 +1,253 @@ +tinyMCEPopup.requireLangPack(); + +var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; + +var colors = [ + "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", + "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099", + "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff", + "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033", + "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399", + "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff", + "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333", + "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399", + "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff", + "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633", + "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699", + "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff", + "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633", + "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999", + "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff", + "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933", + "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999", + "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff", + "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33", + "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99", + "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff", + "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33", + "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99", + "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff", + "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33", + "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99", + "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff" +]; + +var named = { + '#F0F8FF':'AliceBlue','#FAEBD7':'AntiqueWhite','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige', + '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'BlanchedAlmond','#0000FF':'Blue','#8A2BE2':'BlueViolet','#A52A2A':'Brown', + '#DEB887':'BurlyWood','#5F9EA0':'CadetBlue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'CornflowerBlue', + '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'DarkBlue','#008B8B':'DarkCyan','#B8860B':'DarkGoldenRod', + '#A9A9A9':'DarkGray','#A9A9A9':'DarkGrey','#006400':'DarkGreen','#BDB76B':'DarkKhaki','#8B008B':'DarkMagenta','#556B2F':'DarkOliveGreen', + '#FF8C00':'Darkorange','#9932CC':'DarkOrchid','#8B0000':'DarkRed','#E9967A':'DarkSalmon','#8FBC8F':'DarkSeaGreen','#483D8B':'DarkSlateBlue', + '#2F4F4F':'DarkSlateGray','#2F4F4F':'DarkSlateGrey','#00CED1':'DarkTurquoise','#9400D3':'DarkViolet','#FF1493':'DeepPink','#00BFFF':'DeepSkyBlue', + '#696969':'DimGray','#696969':'DimGrey','#1E90FF':'DodgerBlue','#B22222':'FireBrick','#FFFAF0':'FloralWhite','#228B22':'ForestGreen', + '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'GhostWhite','#FFD700':'Gold','#DAA520':'GoldenRod','#808080':'Gray','#808080':'Grey', + '#008000':'Green','#ADFF2F':'GreenYellow','#F0FFF0':'HoneyDew','#FF69B4':'HotPink','#CD5C5C':'IndianRed','#4B0082':'Indigo','#FFFFF0':'Ivory', + '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'LavenderBlush','#7CFC00':'LawnGreen','#FFFACD':'LemonChiffon','#ADD8E6':'LightBlue', + '#F08080':'LightCoral','#E0FFFF':'LightCyan','#FAFAD2':'LightGoldenRodYellow','#D3D3D3':'LightGray','#D3D3D3':'LightGrey','#90EE90':'LightGreen', + '#FFB6C1':'LightPink','#FFA07A':'LightSalmon','#20B2AA':'LightSeaGreen','#87CEFA':'LightSkyBlue','#778899':'LightSlateGray','#778899':'LightSlateGrey', + '#B0C4DE':'LightSteelBlue','#FFFFE0':'LightYellow','#00FF00':'Lime','#32CD32':'LimeGreen','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon', + '#66CDAA':'MediumAquaMarine','#0000CD':'MediumBlue','#BA55D3':'MediumOrchid','#9370D8':'MediumPurple','#3CB371':'MediumSeaGreen','#7B68EE':'MediumSlateBlue', + '#00FA9A':'MediumSpringGreen','#48D1CC':'MediumTurquoise','#C71585':'MediumVioletRed','#191970':'MidnightBlue','#F5FFFA':'MintCream','#FFE4E1':'MistyRose','#FFE4B5':'Moccasin', + '#FFDEAD':'NavajoWhite','#000080':'Navy','#FDF5E6':'OldLace','#808000':'Olive','#6B8E23':'OliveDrab','#FFA500':'Orange','#FF4500':'OrangeRed','#DA70D6':'Orchid', + '#EEE8AA':'PaleGoldenRod','#98FB98':'PaleGreen','#AFEEEE':'PaleTurquoise','#D87093':'PaleVioletRed','#FFEFD5':'PapayaWhip','#FFDAB9':'PeachPuff', + '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'PowderBlue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'RosyBrown','#4169E1':'RoyalBlue', + '#8B4513':'SaddleBrown','#FA8072':'Salmon','#F4A460':'SandyBrown','#2E8B57':'SeaGreen','#FFF5EE':'SeaShell','#A0522D':'Sienna','#C0C0C0':'Silver', + '#87CEEB':'SkyBlue','#6A5ACD':'SlateBlue','#708090':'SlateGray','#708090':'SlateGrey','#FFFAFA':'Snow','#00FF7F':'SpringGreen', + '#4682B4':'SteelBlue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet', + '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'WhiteSmoke','#FFFF00':'Yellow','#9ACD32':'YellowGreen' +}; + +function init() { + var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')); + + tinyMCEPopup.resizeToInnerSize(); + + generatePicker(); + + if (inputColor) { + changeFinalColor(inputColor); + + col = convertHexToRGB(inputColor); + + if (col) + updateLight(col.r, col.g, col.b); + } +} + +function insertAction() { + var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func'); + + tinyMCEPopup.restoreSelection(); + + if (f) + f(color); + + tinyMCEPopup.close(); +} + +function showColor(color, name) { + if (name) + document.getElementById("colorname").innerHTML = name; + + document.getElementById("preview").style.backgroundColor = color; + document.getElementById("color").value = color.toLowerCase(); +} + +function convertRGBToHex(col) { + var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi"); + + if (!col) + return col; + + var rgb = col.replace(re, "$1,$2,$3").split(','); + if (rgb.length == 3) { + r = parseInt(rgb[0]).toString(16); + g = parseInt(rgb[1]).toString(16); + b = parseInt(rgb[2]).toString(16); + + r = r.length == 1 ? '0' + r : r; + g = g.length == 1 ? '0' + g : g; + b = b.length == 1 ? '0' + b : b; + + return "#" + r + g + b; + } + + return col; +} + +function convertHexToRGB(col) { + if (col.indexOf('#') != -1) { + col = col.replace(new RegExp('[^0-9A-F]', 'gi'), ''); + + r = parseInt(col.substring(0, 2), 16); + g = parseInt(col.substring(2, 4), 16); + b = parseInt(col.substring(4, 6), 16); + + return {r : r, g : g, b : b}; + } + + return null; +} + +function generatePicker() { + var el = document.getElementById('light'), h = '', i; + + for (i = 0; i < detail; i++){ + h += '
    '; + } + + el.innerHTML = h; +} + +function generateWebColors() { + var el = document.getElementById('webcolors'), h = '', i; + + if (el.className == 'generated') + return; + + h += '' + + ''; + + for (i=0; i' + + '' + + ''; + if ((i+1) % 18 == 0) + h += ''; + } + + h += '
    '; + + el.innerHTML = h; + el.className = 'generated'; +} + +function generateNamedColors() { + var el = document.getElementById('namedcolors'), h = '', n, v, i = 0; + + if (el.className == 'generated') + return; + + for (n in named) { + v = named[n]; + h += '' + } + + el.innerHTML = h; + el.className = 'generated'; +} + +function dechex(n) { + return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16); +} + +function computeColor(e) { + var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB; + + x = e.offsetX ? e.offsetX : (e.target ? e.clientX - e.target.x : 0); + y = e.offsetY ? e.offsetY : (e.target ? e.clientY - e.target.y : 0); + + partWidth = document.getElementById('colors').width / 6; + partDetail = detail / 2; + imHeight = document.getElementById('colors').height; + + r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255; + g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth); + b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth); + + coef = (imHeight - y) / imHeight; + r = 128 + (r - 128) * coef; + g = 128 + (g - 128) * coef; + b = 128 + (b - 128) * coef; + + changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b)); + updateLight(r, g, b); +} + +function updateLight(r, g, b) { + var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color; + + for (i=0; i=0) && (i'); + }, + + init : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor; + + // Setup browse button + document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); + if (isVisible('srcbrowser')) + document.getElementById('src').style.width = '180px'; + + e = ed.selection.getNode(); + + this.fillFileList('image_list', 'tinyMCEImageList'); + + if (e.nodeName == 'IMG') { + f.src.value = ed.dom.getAttrib(e, 'src'); + f.alt.value = ed.dom.getAttrib(e, 'alt'); + f.border.value = this.getAttrib(e, 'border'); + f.vspace.value = this.getAttrib(e, 'vspace'); + f.hspace.value = this.getAttrib(e, 'hspace'); + f.width.value = ed.dom.getAttrib(e, 'width'); + f.height.value = ed.dom.getAttrib(e, 'height'); + f.insert.value = ed.getLang('update'); + this.styleVal = ed.dom.getAttrib(e, 'style'); + selectByValue(f, 'image_list', f.src.value); + selectByValue(f, 'align', this.getAttrib(e, 'align')); + this.updateStyle(); + } + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = window[l]; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + update : function() { + var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el; + + tinyMCEPopup.restoreSelection(); + + if (f.src.value === '') { + if (ed.selection.getNode().nodeName == 'IMG') { + ed.dom.remove(ed.selection.getNode()); + ed.execCommand('mceRepaint'); + } + + tinyMCEPopup.close(); + return; + } + + if (!ed.settings.inline_styles) { + args = tinymce.extend(args, { + vspace : nl.vspace.value, + hspace : nl.hspace.value, + border : nl.border.value, + align : getSelectValue(f, 'align') + }); + } else + args.style = this.styleVal; + + tinymce.extend(args, { + src : f.src.value, + alt : f.alt.value, + width : f.width.value, + height : f.height.value + }); + + el = ed.selection.getNode(); + + if (el && el.nodeName == 'IMG') { + ed.dom.setAttribs(el, args); + } else { + ed.execCommand('mceInsertContent', false, '', {skip_undo : 1}); + ed.dom.setAttribs('__mce_tmp', args); + ed.dom.setAttrib('__mce_tmp', 'id', ''); + ed.undoManager.add(); + } + + tinyMCEPopup.close(); + }, + + updateStyle : function() { + var dom = tinyMCEPopup.dom, st, v, f = document.forms[0]; + + if (tinyMCEPopup.editor.settings.inline_styles) { + st = tinyMCEPopup.dom.parseStyle(this.styleVal); + + // Handle align + v = getSelectValue(f, 'align'); + if (v) { + if (v == 'left' || v == 'right') { + st['float'] = v; + delete st['vertical-align']; + } else { + st['vertical-align'] = v; + delete st['float']; + } + } else { + delete st['float']; + delete st['vertical-align']; + } + + // Handle border + v = f.border.value; + if (v || v == '0') { + if (v == '0') + st['border'] = '0'; + else + st['border'] = v + 'px solid black'; + } else + delete st['border']; + + // Handle hspace + v = f.hspace.value; + if (v) { + delete st['margin']; + st['margin-left'] = v + 'px'; + st['margin-right'] = v + 'px'; + } else { + delete st['margin-left']; + delete st['margin-right']; + } + + // Handle vspace + v = f.vspace.value; + if (v) { + delete st['margin']; + st['margin-top'] = v + 'px'; + st['margin-bottom'] = v + 'px'; + } else { + delete st['margin-top']; + delete st['margin-bottom']; + } + + // Merge + st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img'); + this.styleVal = dom.serializeStyle(st, 'img'); + } + }, + + getAttrib : function(e, at) { + var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; + + if (ed.settings.inline_styles) { + switch (at) { + case 'align': + if (v = dom.getStyle(e, 'float')) + return v; + + if (v = dom.getStyle(e, 'vertical-align')) + return v; + + break; + + case 'hspace': + v = dom.getStyle(e, 'margin-left') + v2 = dom.getStyle(e, 'margin-right'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'vspace': + v = dom.getStyle(e, 'margin-top') + v2 = dom.getStyle(e, 'margin-bottom'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'border': + v = 0; + + tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { + sv = dom.getStyle(e, 'border-' + sv + '-width'); + + // False or not the same as prev + if (!sv || (sv != v && v !== 0)) { + v = 0; + return false; + } + + if (sv) + v = sv; + }); + + if (v) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + } + } + + if (v = dom.getAttrib(e, at)) + return v; + + return ''; + }, + + resetImageData : function() { + var f = document.forms[0]; + + f.width.value = f.height.value = ""; + }, + + updateImageData : function() { + var f = document.forms[0], t = ImageDialog; + + if (f.width.value == "") + f.width.value = t.preloadImg.width; + + if (f.height.value == "") + f.height.value = t.preloadImg.height; + }, + + getImageData : function() { + var f = document.forms[0]; + + this.preloadImg = new Image(); + this.preloadImg.onload = this.updateImageData; + this.preloadImg.onerror = this.resetImageData; + this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value); + } +}; + +ImageDialog.preInit(); +tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/js/link.js b/webapps/totsys/common/js/tiny_mce/themes/advanced/js/link.js new file mode 100644 index 0000000..73b9f59 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/js/link.js @@ -0,0 +1,156 @@ +tinyMCEPopup.requireLangPack(); + +var LinkDialog = { + preInit : function() { + var url; + + if (url = tinyMCEPopup.getParam("external_link_list_url")) + document.write(''); + }, + + init : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor; + + // Setup browse button + document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link'); + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '180px'; + + this.fillClassList('class_list'); + this.fillFileList('link_list', 'tinyMCELinkList'); + this.fillTargetList('target_list'); + + if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) { + f.href.value = ed.dom.getAttrib(e, 'href'); + f.linktitle.value = ed.dom.getAttrib(e, 'title'); + f.insert.value = ed.getLang('update'); + selectByValue(f, 'link_list', f.href.value); + selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target')); + selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class')); + } + }, + + update : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor, e, b; + + tinyMCEPopup.restoreSelection(); + e = ed.dom.getParent(ed.selection.getNode(), 'A'); + + // Remove element if there is no href + if (!f.href.value) { + if (e) { + tinyMCEPopup.execCommand("mceBeginUndoLevel"); + b = ed.selection.getBookmark(); + ed.dom.remove(e, 1); + ed.selection.moveToBookmark(b); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + return; + } + } + + tinyMCEPopup.execCommand("mceBeginUndoLevel"); + + // Create new anchor elements + if (e == null) { + ed.getDoc().execCommand("unlink", false, null); + tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); + + tinymce.each(ed.dom.select("a"), function(n) { + if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { + e = n; + + ed.dom.setAttribs(e, { + href : f.href.value, + title : f.linktitle.value, + target : f.target_list ? getSelectValue(f, "target_list") : null, + 'class' : f.class_list ? getSelectValue(f, "class_list") : null + }); + } + }); + } else { + ed.dom.setAttribs(e, { + href : f.href.value, + title : f.linktitle.value, + target : f.target_list ? getSelectValue(f, "target_list") : null, + 'class' : f.class_list ? getSelectValue(f, "class_list") : null + }); + } + + // Don't move caret if selection was image + if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') { + ed.focus(); + ed.selection.select(e); + ed.selection.collapse(0); + tinyMCEPopup.storeSelection(); + } + + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + }, + + checkPrefix : function(n) { + if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email'))) + n.value = 'mailto:' + n.value; + + if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external'))) + n.value = 'http://' + n.value; + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = window[l]; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillClassList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { + cl = []; + + tinymce.each(v.split(';'), function(v) { + var p = v.split('='); + + cl.push({'title' : p[0], 'class' : p[1]}); + }); + } else + cl = tinyMCEPopup.editor.dom.getClasses(); + + if (cl.length > 0) { + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + + tinymce.each(cl, function(o) { + lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillTargetList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v; + + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self'); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank'); + + if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) { + tinymce.each(v.split(','), function(v) { + v = v.split('='); + lst.options[lst.options.length] = new Option(v[0], v[1]); + }); + } + } +}; + +LinkDialog.preInit(); +tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog); diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/js/source_editor.js b/webapps/totsys/common/js/tiny_mce/themes/advanced/js/source_editor.js new file mode 100644 index 0000000..81063ec --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/js/source_editor.js @@ -0,0 +1,62 @@ +tinyMCEPopup.requireLangPack(); +tinyMCEPopup.onInit.add(onLoadInit); + +function saveContent() { + tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true}); + tinyMCEPopup.close(); +} + +function onLoadInit() { + tinyMCEPopup.resizeToInnerSize(); + + // Remove Gecko spellchecking + if (tinymce.isGecko) + document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck"); + + document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true}); + + if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) { + setWrap('soft'); + document.getElementById('wraped').checked = true; + } + + resizeInputs(); +} + +function setWrap(val) { + var v, n, s = document.getElementById('htmlSource'); + + s.wrap = val; + + if (!tinymce.isIE) { + v = s.value; + n = s.cloneNode(false); + n.setAttribute("wrap", val); + s.parentNode.replaceChild(n, s); + n.value = v; + } +} + +function toggleWordWrap(elm) { + if (elm.checked) + setWrap('soft'); + else + setWrap('off'); +} + +var wHeight=0, wWidth=0, owHeight=0, owWidth=0; + +function resizeInputs() { + var el = document.getElementById('htmlSource'); + + if (!tinymce.isIE) { + wHeight = self.innerHeight - 65; + wWidth = self.innerWidth - 16; + } else { + wHeight = document.body.clientHeight - 70; + wWidth = document.body.clientWidth - 16; + } + + el.style.height = Math.abs(wHeight) + 'px'; + el.style.width = Math.abs(wWidth) + 'px'; +} diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/langs/en.js b/webapps/totsys/common/js/tiny_mce/themes/advanced/langs/en.js new file mode 100644 index 0000000..52989e3 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/langs/en.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('en.advanced',{ +style_select:"Styles", +font_size:"Font size", +fontdefault:"Font family", +block:"Format", +paragraph:"Paragraph", +div:"Div", +address:"Address", +pre:"Preformatted", +h1:"Heading 1", +h2:"Heading 2", +h3:"Heading 3", +h4:"Heading 4", +h5:"Heading 5", +h6:"Heading 6", +blockquote:"Blockquote", +code:"Code", +samp:"Code sample", +dt:"Definition term ", +dd:"Definition description", +bold_desc:"Bold (Ctrl+B)", +italic_desc:"Italic (Ctrl+I)", +underline_desc:"Underline (Ctrl+U)", +striketrough_desc:"Strikethrough", +justifyleft_desc:"Align left", +justifycenter_desc:"Align center", +justifyright_desc:"Align right", +justifyfull_desc:"Align full", +bullist_desc:"Unordered list", +numlist_desc:"Ordered list", +outdent_desc:"Outdent", +indent_desc:"Indent", +undo_desc:"Undo (Ctrl+Z)", +redo_desc:"Redo (Ctrl+Y)", +link_desc:"Insert/edit link", +unlink_desc:"Unlink", +image_desc:"Insert/edit image", +cleanup_desc:"Cleanup messy code", +code_desc:"Edit HTML Source", +sub_desc:"Subscript", +sup_desc:"Superscript", +hr_desc:"Insert horizontal ruler", +removeformat_desc:"Remove formatting", +custom1_desc:"Your custom description here", +forecolor_desc:"Select text color", +backcolor_desc:"Select background color", +charmap_desc:"Insert custom character", +visualaid_desc:"Toggle guidelines/invisible elements", +anchor_desc:"Insert/edit anchor", +cut_desc:"Cut", +copy_desc:"Copy", +paste_desc:"Paste", +image_props_desc:"Image properties", +newdocument_desc:"New document", +help_desc:"Help", +blockquote_desc:"Blockquote", +clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\r\nDo you want more information about this issue?", +path:"Path", +newdocument:"Are you sure you want clear all contents?", +toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X", +more_colors:"More colors" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/langs/en_dlg.js b/webapps/totsys/common/js/tiny_mce/themes/advanced/langs/en_dlg.js new file mode 100644 index 0000000..80e4941 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/langs/en_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('en.advanced_dlg',{ +about_title:"About TinyMCE", +about_general:"About", +about_help:"Help", +about_license:"License", +about_plugins:"Plugins", +about_plugin:"Plugin", +about_author:"Author", +about_version:"Version", +about_loaded:"Loaded plugins", +anchor_title:"Insert/edit anchor", +anchor_name:"Anchor name", +code_title:"HTML Source Editor", +code_wordwrap:"Word wrap", +colorpicker_title:"Select a color", +colorpicker_picker_tab:"Picker", +colorpicker_picker_title:"Color picker", +colorpicker_palette_tab:"Palette", +colorpicker_palette_title:"Palette colors", +colorpicker_named_tab:"Named", +colorpicker_named_title:"Named colors", +colorpicker_color:"Color:", +colorpicker_name:"Name:", +charmap_title:"Select custom character", +image_title:"Insert/edit image", +image_src:"Image URL", +image_alt:"Image description", +image_list:"Image list", +image_border:"Border", +image_dimensions:"Dimensions", +image_vspace:"Vertical space", +image_hspace:"Horizontal space", +image_align:"Alignment", +image_align_baseline:"Baseline", +image_align_top:"Top", +image_align_middle:"Middle", +image_align_bottom:"Bottom", +image_align_texttop:"Text top", +image_align_textbottom:"Text bottom", +image_align_left:"Left", +image_align_right:"Right", +link_title:"Insert/edit link", +link_url:"Link URL", +link_target:"Target", +link_target_same:"Open link in the same window", +link_target_blank:"Open link in a new window", +link_titlefield:"Title", +link_is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", +link_is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", +link_list:"Link list" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/langs/ko.js b/webapps/totsys/common/js/tiny_mce/themes/advanced/langs/ko.js new file mode 100644 index 0000000..d0394b8 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/langs/ko.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('ko.advanced',{ +style_select:"\uC2A4\uD0C0\uC77C", +font_size:"\uAE00\uAF34 \uD06C\uAE30", +fontdefault:"\uAE00\uAF34", +block:"\uD3EC\uB9F7", +paragraph:"\uB2E8\uB77D", +div:"Div", +address:"\uC8FC\uC18C", +pre:"pre", +h1:"\uD45C\uC81C1", +h2:"\uD45C\uC81C2", +h3:"\uD45C\uC81C3", +h4:"\uD45C\uC81C4", +h5:"\uD45C\uC81C5", +h6:"\uD45C\uC81C6", +blockquote:"\uC778\uC6A9\uBB38", +code:"\uCF54\uB4DC", +samp:"\uC0D8\uD50C\uCF54\uB4DC", +dt:"\uC5B4\uAD6C \uC815\uC758", +dd:"\uC815\uC758 \uC124\uBA85", +bold_desc:"\uAD75\uC740 \uAE00\uC528(Ctrl+B)", +italic_desc:"\uC774\uD0E4\uB9AD(Ctrl+I)", +underline_desc:"\uBC11\uC904(Ctrl+U)", +striketrough_desc:"\uCDE8\uC18C\uC120", +justifyleft_desc:"\uC67C\uCABD \uC815\uB82C", +justifycenter_desc:"\uAC00\uC6B4\uB370 \uC815\uB82C", +justifyright_desc:"\uC624\uB978\uCABD \uC815\uB82C", +justifyfull_desc:"\uBC30\uBD84 \uC815\uB82C", +bullist_desc:"\uBE44\uC21C\uCC28\uBAA9\uB85D", +numlist_desc:"\uC21C\uCC28\uBAA9\uB85D", +outdent_desc:"\uB0B4\uC5B4\uC4F0\uAE30", +indent_desc:"\uB4E4\uC5EC\uC4F0\uAE30", +undo_desc:"\uC2E4\uD589\uCDE8\uC18C(Ctrl+Z)", +redo_desc:"\uB2E4\uC2DC\uC2E4\uD589(Ctrl+Y)", +link_desc:"\uB9C1\uD06C\uC758 \uC0BD\uC785/\uD3B8\uC9D1", +unlink_desc:"\uB9C1\uD06C \uC0AD\uC81C", +image_desc:"\uC774\uBBF8\uC9C0 \uC0BD\uC785/\uD3B8\uC9D1", +cleanup_desc:"\uC9C0\uC800\uBD84\uD55C \uCF54\uB4DC \uC0AD\uC81C", +code_desc:"HTML \uD3B8\uC9D1", +sub_desc:"\uC544\uB798\uCCA8\uC790", +sup_desc:"\uC704\uCCA8\uC790", +hr_desc:"\uAD6C\uBD84\uC120", +removeformat_desc:"\uC11C\uC2DD \uD574\uC81C", +custom1_desc:"\uCEE4\uC2A4\uD140 \uC124\uBA85", +forecolor_desc:"\uAE00\uC790\uC0C9", +backcolor_desc:"\uBC30\uACBD\uC0C9", +charmap_desc:"\uD2B9\uC218 \uBB38\uC790", +visualaid_desc:"\uAC00\uC774\uB4DC\uB77C\uC778 \uD45C\uC2DC/\uBE44\uD45C\uC2DC", +anchor_desc:"\uC5E5\uCEE4 \uC0BD\uC785/\uD3B8\uC9D1", +cut_desc:"\uC798\uB77C\uB0B4\uAE30", +copy_desc:"\uBCF5\uC0AC", +paste_desc:"\uBD99\uC774\uAE30", +image_props_desc:"\uC774\uBBF8\uC9C0\uC18D\uC131", +newdocument_desc:"\uC2E0\uADDC\uAE00 \uC791\uC131", +help_desc:"\uB3C4\uC6C0\uB9D0", +blockquote_desc:"\uC778\uC6A9\uBB38", +clipboard_msg:"\uBCF5\uC0AC/\uC798\uB77C\uB0B4\uAE30/\uBD99\uC774\uAE30\uB294 Mozilla \uBC0FFirefox \uC5D0\uC11C \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n\uC0C1\uC138\uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uAE4C?", +path:"Path", +newdocument:"\uD3B8\uC9D1\uC911\uC758 \uB370\uC774\uD130\uB97C \uBAA8\uB450 \uC783\uC5B4\uB3C4 \uAD1C\uCC2E\uC2B5\uB2C8\uAE4C?", +toolbar_focus:"\uBC84\uD2BC\uC73C\uB85C \uC810\uD504 - Alt+Q, \uC5D0\uB514\uD130\uB85C \uC810\uD504 - Alt-Z, Jump to element path - Alt-X", +more_colors:"\uADF8 \uC678\uC758 \uC0C9" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/langs/ko_dlg.js b/webapps/totsys/common/js/tiny_mce/themes/advanced/langs/ko_dlg.js new file mode 100644 index 0000000..00f57fc --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/langs/ko_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('ko.advanced_dlg',{ +about_title:"TinyMCE\uC5D0 \uB300\uD558\uC5EC", +about_general:"About", +about_help:"\uB3C4\uC6C0\uB9D0", +about_license:"\uB77C\uC774\uC13C\uC2A4", +about_plugins:"\uD50C\uB7EC\uADF8\uC778", +about_plugin:"\uD50C\uB7EC\uADF8\uC778", +about_author:"\uC81C\uC791\uC790", +about_version:"\uBC84\uC83C", +about_loaded:"\uC2E4\uD589\uB41C \uD50C\uB7EC\uADF8\uC778", +anchor_title:"\uC5E5\uCEE4 \uC0BD\uC785/\uD3B8\uC9D1", +anchor_name:"\uC5E5\uCEE4\uBA85", +code_title:"\uC18C\uC2A4 \uD3B8\uC9D1", +code_wordwrap:"\uC6CC\uB4DC\uB7A9", +colorpicker_title:"\uC0C9\uC744 \uC120\uD0DD", +colorpicker_picker_tab:"\uD53D\uCEE4", +colorpicker_picker_title:"\uCEEC\uB7EC \uD53D\uCEE4", +colorpicker_palette_tab:"\uD314\uB808\uD2B8", +colorpicker_palette_title:"\uD314\uB808\uD2B8 \uC0C9", +colorpicker_named_tab:"\uC0C9 \uC774\uB984", +colorpicker_named_title:"\uC0C9", +colorpicker_color:"Color:", +colorpicker_name:"\uC0C9 \uC774\uB984:", +charmap_title:"\uD2B9\uC218 \uBB38\uC790", +image_title:"\uC774\uBBF8\uC9C0\uC758 \uC0BD\uC785/\uD3B8\uC9D1", +image_src:"\uC774\uBBF8\uC9C0 URL", +image_alt:"\uC774\uBBF8\uC9C0 \uC124\uBA85", +image_list:"\uC774\uBBF8\uC9C0 \uBAA9\uB85D", +image_border:"\uD14C\uB450\uB9AC\uC120", +image_dimensions:"\uD06C\uAE30", +image_vspace:"\uC0C1\uD558 \uC5EC\uBC31", +image_hspace:"\uC88C\uC6B0 \uC5EC\uBC31", +image_align:"\uC815\uB82C", +image_align_baseline:"\uAE30\uC900\uC120", +image_align_top:"Top", +image_align_middle:"Middle", +image_align_bottom:"Bottom", +image_align_texttop:"Text top", +image_align_textbottom:"Text bottom", +image_align_left:"Left", +image_align_right:"Right", +link_title:"\uB9C1\uD06C\uC758 \uC0BD\uC785/\uD3B8\uC9D1", +link_url:"\uB9C1\uD06C URL", +link_target:"Target", +link_target_same:"\uAC19\uC740\uCC3D", +link_target_blank:"\uC0C8\uCC3D", +link_titlefield:"\uC81C\uBAA9", +link_is_email:"\uBA54\uC77C\uC8FC\uC18C\uAC00 \uC785\uB825\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n\uBA54\uC77C\uC8FC\uC18C\uC758 \uC55E\uC5D0 mailto:\uB97C \uBD99\uC785\uB2C8\uAE4C?", +link_is_external:"\uC678\uBD80URL\uC774 \uC785\uB825\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\nURL\uC758 \uC55E\uC5D0 http://\uB97C \uBD99\uC785\uB2C8\uAE4C?", +link_list:"\uB9C1\uD06C \uBAA9\uB85D" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/link.htm b/webapps/totsys/common/js/tiny_mce/themes/advanced/link.htm new file mode 100644 index 0000000..22627cc --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/link.htm @@ -0,0 +1,58 @@ + + + + {#advanced_dlg.link_title} + + + + + + + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    +
    +
    + +
    + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/content.css b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/content.css new file mode 100644 index 0000000..6426d3e --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/content.css @@ -0,0 +1,35 @@ +body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:8px;} +body {background:#FFF;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat 0 0;} +td.mceSelected, th.mceSelected {background-color:#3399ff !important} +img {border:0;} +table {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr {border-bottom:1px dashed #CCC; cursor:help} + +/* IE */ +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} + +img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} +font[face=mceinline] {font-family:inherit !important} diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/dialog.css b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/dialog.css new file mode 100644 index 0000000..1f5598c --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/dialog.css @@ -0,0 +1,117 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDDDDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +background:#F0F0EE; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#F0F0EE;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;} +a:hover {color:#2B6FB6;} +.nowrap {white-space: nowrap} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;} +input.invalid {border:1px solid #EE0000;} +input {background:#FFF; border:1px solid #CCC;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #808080;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, input.button, .updateButton { +border:0; margin:0; padding:0; +font-weight:bold; +width:94px; height:26px; +background:url(img/buttons.png) 0 -26px; +cursor:pointer; +padding-bottom:2px; +float:left; +} + +#insert {background:url(img/buttons.png) 0 -52px} +#cancel {background:url(img/buttons.png) 0 0; float:right} + +/* Browse */ +a.pickcolor, a.browse {text-decoration:none} +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor:hover span.disabled {} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} +.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} +.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} +.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} +#colorpicker #picker_panel fieldset {margin:auto;width:325px;} diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/buttons.png b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/buttons.png new file mode 100644 index 0000000..7dd5841 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/buttons.png differ diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/items.gif b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/items.gif new file mode 100644 index 0000000..2eafd79 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/items.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif new file mode 100644 index 0000000..85e31df Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/menu_check.gif b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/menu_check.gif new file mode 100644 index 0000000..adfdddc Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/menu_check.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/progress.gif b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/progress.gif new file mode 100644 index 0000000..5bb90fd Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/progress.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/tabs.gif b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/tabs.gif new file mode 100644 index 0000000..ce4be63 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/img/tabs.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/ui.css b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/ui.css new file mode 100644 index 0000000..7f6cf5f --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/default/ui.css @@ -0,0 +1,213 @@ +/* Reset */ +.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left} +.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000} +.defaultSkin table td {vertical-align:middle} + +/* Containers */ +.defaultSkin table {direction:ltr; background:#F0F0EE} +.defaultSkin iframe {display:block; background:#FFF} +.defaultSkin .mceToolbar {height:26px} +.defaultSkin .mceLeft {text-align:left} +.defaultSkin .mceRight {text-align:right} + +/* External */ +.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;} +.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} + +/* Layout */ +.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC} +.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC} +.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC} +.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;} +.defaultSkin td.mceToolbar {padding-top:1px; vertical-align:top} +.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC} +.defaultSkin .mceStatusbar {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px} +.defaultSkin .mceStatusbar div {float:left; margin:2px} +.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0} +.defaultSkin .mceStatusbar a:hover {text-decoration:underline} +.defaultSkin table.mceToolbar {margin-left:3px} +.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px} +.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} +.defaultSkin td.mceCenter {text-align:center;} +.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;} +.defaultSkin td.mceRight table {margin:0 0 0 auto;} + +/* Button */ +.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px} +.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0} +.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.defaultSkin .mceButtonLabeled {width:auto} +.defaultSkin .mceButtonLabeled span.mceIcon {float:left} +.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica} +.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888} + +/* Separator */ +.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px} + +/* ListBox */ +.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block} +.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} +.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;} +.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF} +.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0} +.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;} +.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden} +.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px} +.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;} +.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;} + +/* SplitButton */ +.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr} +.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block} +.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;} +.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);} +.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;} +.defaultSkin .mceSplitButton span.mceOpen {display:none} +.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0} +.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;} +.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;} + +/* ColorSplitButton */ +.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray} +.defaultSkin .mceColorSplitMenu td {padding:2px} +.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080} +.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} +.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2} +.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A} +.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a} +.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px} + +/* Menu */ +.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8} +.defaultSkin .mceNoIcons span.mceIcon {width:0;} +.defaultSkin .mceNoIcons a .mceText {padding-left:10px} +.defaultSkin .mceMenu table {background:#FFF} +.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block} +.defaultSkin .mceMenu td {height:20px} +.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0} +.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block} +.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px} +.defaultSkin .mceMenu pre.mceText {font-family:Monospace} +.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} +.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3} +.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px} +.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD} +.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px} +.defaultSkin .mceMenuItemDisabled .mceText {color:#888} +.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)} +.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center} +.defaultSkin .mceMenu span.mceMenuLine {display:none} +.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;} + +/* Progress,Resize */ +.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF} +.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} + +/* Formats */ +.defaultSkin .mce_formatPreview a {font-size:10px} +.defaultSkin .mce_p span.mceText {} +.defaultSkin .mce_address span.mceText {font-style:italic} +.defaultSkin .mce_pre span.mceText {font-family:monospace} +.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} +.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} +.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} +.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} +.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} +.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} + +/* Theme */ +.defaultSkin span.mce_bold {background-position:0 0} +.defaultSkin span.mce_italic {background-position:-60px 0} +.defaultSkin span.mce_underline {background-position:-140px 0} +.defaultSkin span.mce_strikethrough {background-position:-120px 0} +.defaultSkin span.mce_undo {background-position:-160px 0} +.defaultSkin span.mce_redo {background-position:-100px 0} +.defaultSkin span.mce_cleanup {background-position:-40px 0} +.defaultSkin span.mce_bullist {background-position:-20px 0} +.defaultSkin span.mce_numlist {background-position:-80px 0} +.defaultSkin span.mce_justifyleft {background-position:-460px 0} +.defaultSkin span.mce_justifyright {background-position:-480px 0} +.defaultSkin span.mce_justifycenter {background-position:-420px 0} +.defaultSkin span.mce_justifyfull {background-position:-440px 0} +.defaultSkin span.mce_anchor {background-position:-200px 0} +.defaultSkin span.mce_indent {background-position:-400px 0} +.defaultSkin span.mce_outdent {background-position:-540px 0} +.defaultSkin span.mce_link {background-position:-500px 0} +.defaultSkin span.mce_unlink {background-position:-640px 0} +.defaultSkin span.mce_sub {background-position:-600px 0} +.defaultSkin span.mce_sup {background-position:-620px 0} +.defaultSkin span.mce_removeformat {background-position:-580px 0} +.defaultSkin span.mce_newdocument {background-position:-520px 0} +.defaultSkin span.mce_image {background-position:-380px 0} +.defaultSkin span.mce_help {background-position:-340px 0} +.defaultSkin span.mce_code {background-position:-260px 0} +.defaultSkin span.mce_hr {background-position:-360px 0} +.defaultSkin span.mce_visualaid {background-position:-660px 0} +.defaultSkin span.mce_charmap {background-position:-240px 0} +.defaultSkin span.mce_paste {background-position:-560px 0} +.defaultSkin span.mce_copy {background-position:-700px 0} +.defaultSkin span.mce_cut {background-position:-680px 0} +.defaultSkin span.mce_blockquote {background-position:-220px 0} +.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0} +.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0} +.defaultSkin span.mce_forecolorpicker {background-position:-720px 0} +.defaultSkin span.mce_backcolorpicker {background-position:-760px 0} + +/* Plugins */ +.defaultSkin span.mce_advhr {background-position:-0px -20px} +.defaultSkin span.mce_ltr {background-position:-20px -20px} +.defaultSkin span.mce_rtl {background-position:-40px -20px} +.defaultSkin span.mce_emotions {background-position:-60px -20px} +.defaultSkin span.mce_fullpage {background-position:-80px -20px} +.defaultSkin span.mce_fullscreen {background-position:-100px -20px} +.defaultSkin span.mce_iespell {background-position:-120px -20px} +.defaultSkin span.mce_insertdate {background-position:-140px -20px} +.defaultSkin span.mce_inserttime {background-position:-160px -20px} +.defaultSkin span.mce_absolute {background-position:-180px -20px} +.defaultSkin span.mce_backward {background-position:-200px -20px} +.defaultSkin span.mce_forward {background-position:-220px -20px} +.defaultSkin span.mce_insert_layer {background-position:-240px -20px} +.defaultSkin span.mce_insertlayer {background-position:-260px -20px} +.defaultSkin span.mce_movebackward {background-position:-280px -20px} +.defaultSkin span.mce_moveforward {background-position:-300px -20px} +.defaultSkin span.mce_media {background-position:-320px -20px} +.defaultSkin span.mce_nonbreaking {background-position:-340px -20px} +.defaultSkin span.mce_pastetext {background-position:-360px -20px} +.defaultSkin span.mce_pasteword {background-position:-380px -20px} +.defaultSkin span.mce_selectall {background-position:-400px -20px} +.defaultSkin span.mce_preview {background-position:-420px -20px} +.defaultSkin span.mce_print {background-position:-440px -20px} +.defaultSkin span.mce_cancel {background-position:-460px -20px} +.defaultSkin span.mce_save {background-position:-480px -20px} +.defaultSkin span.mce_replace {background-position:-500px -20px} +.defaultSkin span.mce_search {background-position:-520px -20px} +.defaultSkin span.mce_styleprops {background-position:-560px -20px} +.defaultSkin span.mce_table {background-position:-580px -20px} +.defaultSkin span.mce_cell_props {background-position:-600px -20px} +.defaultSkin span.mce_delete_table {background-position:-620px -20px} +.defaultSkin span.mce_delete_col {background-position:-640px -20px} +.defaultSkin span.mce_delete_row {background-position:-660px -20px} +.defaultSkin span.mce_col_after {background-position:-680px -20px} +.defaultSkin span.mce_col_before {background-position:-700px -20px} +.defaultSkin span.mce_row_after {background-position:-720px -20px} +.defaultSkin span.mce_row_before {background-position:-740px -20px} +.defaultSkin span.mce_merge_cells {background-position:-760px -20px} +.defaultSkin span.mce_table_props {background-position:-980px -20px} +.defaultSkin span.mce_row_props {background-position:-780px -20px} +.defaultSkin span.mce_split_cells {background-position:-800px -20px} +.defaultSkin span.mce_template {background-position:-820px -20px} +.defaultSkin span.mce_visualchars {background-position:-840px -20px} +.defaultSkin span.mce_abbr {background-position:-860px -20px} +.defaultSkin span.mce_acronym {background-position:-880px -20px} +.defaultSkin span.mce_attribs {background-position:-900px -20px} +.defaultSkin span.mce_cite {background-position:-920px -20px} +.defaultSkin span.mce_del {background-position:-940px -20px} +.defaultSkin span.mce_ins {background-position:-960px -20px} +.defaultSkin span.mce_pagebreak {background-position:0 -40px} +.defaultSkin span.mce_restoredraft {background-position:-20px -40px} +.defaultSkin span.mce_spellchecker {background-position:-540px -20px} diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/content.css b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/content.css new file mode 100644 index 0000000..73a238d --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/content.css @@ -0,0 +1,35 @@ +body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:8px;} +body {background:#FFF;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;} +td.mceSelected, th.mceSelected {background-color:#3399ff !important} +img {border:0;} +table {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr {border-bottom:1px dashed #CCC; cursor:help} + +/* IE */ +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} + +img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} +font[face=mceinline] {font-family:inherit !important} diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/dialog.css b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/dialog.css new file mode 100644 index 0000000..3b0760a --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/dialog.css @@ -0,0 +1,116 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDDDDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +background:#F0F0EE; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#F0F0EE;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;} +a:hover {color:#2B6FB6;} +.nowrap {white-space: nowrap} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;} +input.invalid {border:1px solid #EE0000;} +input {background:#FFF; border:1px solid #CCC;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #808080;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, input.button, .updateButton { +border:0; margin:0; padding:0; +font-weight:bold; +width:94px; height:26px; +background:url(../default/img/buttons.png) 0 -26px; +cursor:pointer; +padding-bottom:2px; +float:left; +} + +#insert {background:url(../default/img/buttons.png) 0 -52px} +#cancel {background:url(../default/img/buttons.png) 0 0; float:right} + +/* Browse */ +a.pickcolor, a.browse {text-decoration:none} +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor:hover span.disabled {} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal; background:url(../default/img/tabs.gif) repeat-x 0 -72px;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; background:url(../default/img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} +.tabs li.current {background:url(../default/img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} +.tabs span {float:left; display:block; background:url(../default/img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} +.tabs .current span {background:url(../default/img/tabs.gif) no-repeat right -54px;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png new file mode 100644 index 0000000..12cfb41 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png differ diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png new file mode 100644 index 0000000..8996c74 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png differ diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png new file mode 100644 index 0000000..bd5d255 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png differ diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/ui.css b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/ui.css new file mode 100644 index 0000000..52f5760 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/ui.css @@ -0,0 +1,215 @@ +/* Reset */ +.o2k7Skin table, .o2k7Skin tbody, .o2k7Skin a, .o2k7Skin img, .o2k7Skin tr, .o2k7Skin div, .o2k7Skin td, .o2k7Skin iframe, .o2k7Skin span, .o2k7Skin *, .o2k7Skin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left} +.o2k7Skin a:hover, .o2k7Skin a:link, .o2k7Skin a:visited, .o2k7Skin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000} +.o2k7Skin table td {vertical-align:middle} + +/* Containers */ +.o2k7Skin table {background:#E5EFFD} +.o2k7Skin iframe {display:block; background:#FFF} +.o2k7Skin .mceToolbar {height:26px} + +/* External */ +.o2k7Skin .mceExternalToolbar {position:absolute; border:1px solid #ABC6DD; border-bottom:0; display:none} +.o2k7Skin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.o2k7Skin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} + +/* Layout */ +.o2k7Skin table.mceLayout {border:0; border-left:1px solid #ABC6DD; border-right:1px solid #ABC6DD} +.o2k7Skin table.mceLayout tr.mceFirst td {border-top:1px solid #ABC6DD} +.o2k7Skin table.mceLayout tr.mceLast td {border-bottom:1px solid #ABC6DD} +.o2k7Skin table.mceToolbar, .o2k7Skin tr.mceFirst .mceToolbar tr td, .o2k7Skin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0} +.o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD} +.o2k7Skin .mceStatusbar {display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px} +.o2k7Skin .mceStatusbar div {float:left; padding:2px} +.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0} +.o2k7Skin .mceStatusbar a:hover {text-decoration:underline} +.o2k7Skin table.mceToolbar {margin-left:3px} +.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;} +.o2k7Skin .mceToolbar td.mceFirst span {margin:0} +.o2k7Skin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px} +.o2k7Skin .mceToolbar .mceToolbarEndListBox span, .o2k7Skin .mceToolbar .mceToolbarStartListBox span {display:none} +.o2k7Skin span.mceIcon, .o2k7Skin img.mceIcon {display:block; width:20px; height:20px} +.o2k7Skin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} +.o2k7Skin td.mceCenter {text-align:center;} +.o2k7Skin td.mceCenter table {margin:0 auto; text-align:left;} +.o2k7Skin td.mceRight table {margin:0 0 0 auto;} + +/* Button */ +.o2k7Skin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px} +.o2k7Skin a.mceButton span, .o2k7Skin a.mceButton img {margin-left:1px} +.o2k7Skin .mceOldBoxModel a.mceButton span, .o2k7Skin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px} +.o2k7Skin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px} +.o2k7Skin a.mceButtonActive, .o2k7Skin a.mceButtonSelected {background-position:0 -44px} +.o2k7Skin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.o2k7Skin .mceButtonLabeled {width:auto} +.o2k7Skin .mceButtonLabeled span.mceIcon {float:left} +.o2k7Skin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica} +.o2k7Skin .mceButtonDisabled .mceButtonLabel {color:#888} + +/* Separator */ +.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px} + +/* ListBox */ +.o2k7Skin .mceListBox {margin-left:3px} +.o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block} +.o2k7Skin .mceListBox .mceText {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} +.o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0} +.o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF} +.o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px} +.o2k7Skin .mceListBoxDisabled .mceText {color:gray} +.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden} +.o2k7Skin .mceOldBoxModel .mceListBox .mceText {height:22px} +.o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;} + +/* SplitButton */ +.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px} +.o2k7Skin .mceSplitButton {background:url(img/button_bg.png)} +.o2k7Skin .mceSplitButton a.mceAction {width:22px} +.o2k7Skin .mceSplitButton span.mceAction {width:22px; background-image:url(../../img/icons.gif)} +.o2k7Skin .mceSplitButton a.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0} +.o2k7Skin .mceSplitButton span.mceOpen {display:none} +.o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px} +.o2k7Skin table.mceSplitButtonEnabled:hover a.mceOpen, .o2k7Skin .mceSplitButtonHover a.mceOpen, .o2k7Skin .mceSplitButtonSelected a.mceOpen {background-position:-44px -44px} +.o2k7Skin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.o2k7Skin .mceSplitButtonActive {background-position:0 -44px} + +/* ColorSplitButton */ +.o2k7Skin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray} +.o2k7Skin .mceColorSplitMenu td {padding:2px} +.o2k7Skin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080} +.o2k7Skin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.o2k7Skin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} +.o2k7Skin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2} +.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A} +.o2k7Skin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a;overflow:hidden} +.o2k7Skin .mce_forecolor span.mceAction, .o2k7Skin .mce_backcolor span.mceAction {height:15px;overflow:hidden} + +/* Menu */ +.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD} +.o2k7Skin .mceNoIcons span.mceIcon {width:0;} +.o2k7Skin .mceNoIcons a .mceText {padding-left:10px} +.o2k7Skin .mceMenu table {background:#FFF} +.o2k7Skin .mceMenu a, .o2k7Skin .mceMenu span, .o2k7Skin .mceMenu {display:block} +.o2k7Skin .mceMenu td {height:20px} +.o2k7Skin .mceMenu a {position:relative;padding:3px 0 4px 0} +.o2k7Skin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block} +.o2k7Skin .mceMenu span.mceText, .o2k7Skin .mceMenu .mcePreview {font-size:11px} +.o2k7Skin .mceMenu pre.mceText {font-family:Monospace} +.o2k7Skin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} +.o2k7Skin .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#dbecf3} +.o2k7Skin td.mceMenuItemSeparator {background:#DDD; height:1px} +.o2k7Skin .mceMenuItemTitle a {border:0; background:#E5EFFD; border-bottom:1px solid #ABC6DD} +.o2k7Skin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px} +.o2k7Skin .mceMenuItemDisabled .mceText {color:#888} +.o2k7Skin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)} +.o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center} +.o2k7Skin .mceMenu span.mceMenuLine {display:none} +.o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;} + +/* Progress,Resize */ +.o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF} +.o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} + +/* Formats */ +.o2k7Skin .mce_formatPreview a {font-size:10px} +.o2k7Skin .mce_p span.mceText {} +.o2k7Skin .mce_address span.mceText {font-style:italic} +.o2k7Skin .mce_pre span.mceText {font-family:monospace} +.o2k7Skin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} +.o2k7Skin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} +.o2k7Skin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} +.o2k7Skin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} +.o2k7Skin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} +.o2k7Skin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} + +/* Theme */ +.o2k7Skin span.mce_bold {background-position:0 0} +.o2k7Skin span.mce_italic {background-position:-60px 0} +.o2k7Skin span.mce_underline {background-position:-140px 0} +.o2k7Skin span.mce_strikethrough {background-position:-120px 0} +.o2k7Skin span.mce_undo {background-position:-160px 0} +.o2k7Skin span.mce_redo {background-position:-100px 0} +.o2k7Skin span.mce_cleanup {background-position:-40px 0} +.o2k7Skin span.mce_bullist {background-position:-20px 0} +.o2k7Skin span.mce_numlist {background-position:-80px 0} +.o2k7Skin span.mce_justifyleft {background-position:-460px 0} +.o2k7Skin span.mce_justifyright {background-position:-480px 0} +.o2k7Skin span.mce_justifycenter {background-position:-420px 0} +.o2k7Skin span.mce_justifyfull {background-position:-440px 0} +.o2k7Skin span.mce_anchor {background-position:-200px 0} +.o2k7Skin span.mce_indent {background-position:-400px 0} +.o2k7Skin span.mce_outdent {background-position:-540px 0} +.o2k7Skin span.mce_link {background-position:-500px 0} +.o2k7Skin span.mce_unlink {background-position:-640px 0} +.o2k7Skin span.mce_sub {background-position:-600px 0} +.o2k7Skin span.mce_sup {background-position:-620px 0} +.o2k7Skin span.mce_removeformat {background-position:-580px 0} +.o2k7Skin span.mce_newdocument {background-position:-520px 0} +.o2k7Skin span.mce_image {background-position:-380px 0} +.o2k7Skin span.mce_help {background-position:-340px 0} +.o2k7Skin span.mce_code {background-position:-260px 0} +.o2k7Skin span.mce_hr {background-position:-360px 0} +.o2k7Skin span.mce_visualaid {background-position:-660px 0} +.o2k7Skin span.mce_charmap {background-position:-240px 0} +.o2k7Skin span.mce_paste {background-position:-560px 0} +.o2k7Skin span.mce_copy {background-position:-700px 0} +.o2k7Skin span.mce_cut {background-position:-680px 0} +.o2k7Skin span.mce_blockquote {background-position:-220px 0} +.o2k7Skin .mce_forecolor span.mceAction {background-position:-720px 0} +.o2k7Skin .mce_backcolor span.mceAction {background-position:-760px 0} +.o2k7Skin span.mce_forecolorpicker {background-position:-720px 0} +.o2k7Skin span.mce_backcolorpicker {background-position:-760px 0} + +/* Plugins */ +.o2k7Skin span.mce_advhr {background-position:-0px -20px} +.o2k7Skin span.mce_ltr {background-position:-20px -20px} +.o2k7Skin span.mce_rtl {background-position:-40px -20px} +.o2k7Skin span.mce_emotions {background-position:-60px -20px} +.o2k7Skin span.mce_fullpage {background-position:-80px -20px} +.o2k7Skin span.mce_fullscreen {background-position:-100px -20px} +.o2k7Skin span.mce_iespell {background-position:-120px -20px} +.o2k7Skin span.mce_insertdate {background-position:-140px -20px} +.o2k7Skin span.mce_inserttime {background-position:-160px -20px} +.o2k7Skin span.mce_absolute {background-position:-180px -20px} +.o2k7Skin span.mce_backward {background-position:-200px -20px} +.o2k7Skin span.mce_forward {background-position:-220px -20px} +.o2k7Skin span.mce_insert_layer {background-position:-240px -20px} +.o2k7Skin span.mce_insertlayer {background-position:-260px -20px} +.o2k7Skin span.mce_movebackward {background-position:-280px -20px} +.o2k7Skin span.mce_moveforward {background-position:-300px -20px} +.o2k7Skin span.mce_media {background-position:-320px -20px} +.o2k7Skin span.mce_nonbreaking {background-position:-340px -20px} +.o2k7Skin span.mce_pastetext {background-position:-360px -20px} +.o2k7Skin span.mce_pasteword {background-position:-380px -20px} +.o2k7Skin span.mce_selectall {background-position:-400px -20px} +.o2k7Skin span.mce_preview {background-position:-420px -20px} +.o2k7Skin span.mce_print {background-position:-440px -20px} +.o2k7Skin span.mce_cancel {background-position:-460px -20px} +.o2k7Skin span.mce_save {background-position:-480px -20px} +.o2k7Skin span.mce_replace {background-position:-500px -20px} +.o2k7Skin span.mce_search {background-position:-520px -20px} +.o2k7Skin span.mce_styleprops {background-position:-560px -20px} +.o2k7Skin span.mce_table {background-position:-580px -20px} +.o2k7Skin span.mce_cell_props {background-position:-600px -20px} +.o2k7Skin span.mce_delete_table {background-position:-620px -20px} +.o2k7Skin span.mce_delete_col {background-position:-640px -20px} +.o2k7Skin span.mce_delete_row {background-position:-660px -20px} +.o2k7Skin span.mce_col_after {background-position:-680px -20px} +.o2k7Skin span.mce_col_before {background-position:-700px -20px} +.o2k7Skin span.mce_row_after {background-position:-720px -20px} +.o2k7Skin span.mce_row_before {background-position:-740px -20px} +.o2k7Skin span.mce_merge_cells {background-position:-760px -20px} +.o2k7Skin span.mce_table_props {background-position:-980px -20px} +.o2k7Skin span.mce_row_props {background-position:-780px -20px} +.o2k7Skin span.mce_split_cells {background-position:-800px -20px} +.o2k7Skin span.mce_template {background-position:-820px -20px} +.o2k7Skin span.mce_visualchars {background-position:-840px -20px} +.o2k7Skin span.mce_abbr {background-position:-860px -20px} +.o2k7Skin span.mce_acronym {background-position:-880px -20px} +.o2k7Skin span.mce_attribs {background-position:-900px -20px} +.o2k7Skin span.mce_cite {background-position:-920px -20px} +.o2k7Skin span.mce_del {background-position:-940px -20px} +.o2k7Skin span.mce_ins {background-position:-960px -20px} +.o2k7Skin span.mce_pagebreak {background-position:0 -40px} +.o2k7Skin span.mce_restoredraft {background-position:-20px -40px} +.o2k7Skin span.mce_spellchecker {background-position:-540px -20px} diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/ui_black.css b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/ui_black.css new file mode 100644 index 0000000..81dbfe4 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/ui_black.css @@ -0,0 +1,8 @@ +/* Black */ +.o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton a.mceOpen, .o2k7SkinBlack .mceListBox a.mceOpen {background-image:url(img/button_bg_black.png)} +.o2k7SkinBlack table, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF} +.o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0} +.o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7SkinBlack .mceListBoxHover .mceText, .o2k7SkinBlack .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0} +.o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;} +.o2k7SkinBlack table.mceSplitButtonEnabled:hover a.mceAction, .o2k7SkinBlack .mceSplitButtonHover a.mceAction, .o2k7SkinBlack .mceSplitButtonSelected {background-image:url(img/button_bg_black.png)} +.o2k7SkinBlack .mceMenu .mceMenuItemEnabled a:hover, .o2k7SkinBlack .mceMenu .mceMenuItemActive {background-color:#FFE7A1} \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css new file mode 100644 index 0000000..e8ae844 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css @@ -0,0 +1,5 @@ +/* Silver */ +.o2k7SkinSilver .mceToolbar .mceToolbarStart span, .o2k7SkinSilver .mceButton, .o2k7SkinSilver .mceSplitButton, .o2k7SkinSilver .mceSeparator, .o2k7SkinSilver .mceSplitButton a.mceOpen, .o2k7SkinSilver .mceListBox a.mceOpen {background-image:url(img/button_bg_silver.png)} +.o2k7SkinSilver table, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee} +.o2k7SkinSilver .mceListBox .mceText {background:#FFF} +.o2k7SkinSilver .mceExternalToolbar, .o2k7SkinSilver .mceListBox .mceText, .o2k7SkinSilver div.mceMenu, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceFirst td, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceLast td, .o2k7SkinSilver .mceIframeContainer {border-color: #bbb} diff --git a/webapps/totsys/common/js/tiny_mce/themes/advanced/source_editor.htm b/webapps/totsys/common/js/tiny_mce/themes/advanced/source_editor.htm new file mode 100644 index 0000000..78033fd --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/advanced/source_editor.htm @@ -0,0 +1,25 @@ + + + {#advanced_dlg.code_title} + + + + +
    +
    {#advanced_dlg.code_title}
    + +
    + +
    + +
    + + + +
    + + +
    +
    + + diff --git a/webapps/totsys/common/js/tiny_mce/themes/simple/editor_template.js b/webapps/totsys/common/js/tiny_mce/themes/simple/editor_template.js new file mode 100644 index 0000000..ed89abc --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/simple/editor_template.js @@ -0,0 +1 @@ +(function(){var a=tinymce.DOM;tinymce.ThemeManager.requireLangPack("simple");tinymce.create("tinymce.themes.SimpleTheme",{init:function(c,d){var e=this,b=["Bold","Italic","Underline","Strikethrough","InsertUnorderedList","InsertOrderedList"],f=c.settings;e.editor=c;c.onInit.add(function(){c.onNodeChange.add(function(h,g){tinymce.each(b,function(i){g.get(i.toLowerCase()).setActive(h.queryCommandState(i))})});c.dom.loadCSS(d+"/skins/"+f.skin+"/content.css")});a.loadCSS((f.editor_css?c.documentBaseURI.toAbsolute(f.editor_css):"")||d+"/skins/"+f.skin+"/ui.css")},renderUI:function(h){var e=this,i=h.targetNode,b,c,d=e.editor,f=d.controlManager,g;i=a.insertAfter(a.create("span",{id:d.id+"_container","class":"mceEditor "+d.settings.skin+"SimpleSkin"}),i);i=g=a.add(i,"table",{cellPadding:0,cellSpacing:0,"class":"mceLayout"});i=c=a.add(i,"tbody");i=a.add(c,"tr");i=b=a.add(a.add(i,"td"),"div",{"class":"mceIframeContainer"});i=a.add(a.add(c,"tr",{"class":"last"}),"td",{"class":"mceToolbar mceLast",align:"center"});c=e.toolbar=f.createToolbar("tools1");c.add(f.createButton("bold",{title:"simple.bold_desc",cmd:"Bold"}));c.add(f.createButton("italic",{title:"simple.italic_desc",cmd:"Italic"}));c.add(f.createButton("underline",{title:"simple.underline_desc",cmd:"Underline"}));c.add(f.createButton("strikethrough",{title:"simple.striketrough_desc",cmd:"Strikethrough"}));c.add(f.createSeparator());c.add(f.createButton("undo",{title:"simple.undo_desc",cmd:"Undo"}));c.add(f.createButton("redo",{title:"simple.redo_desc",cmd:"Redo"}));c.add(f.createSeparator());c.add(f.createButton("cleanup",{title:"simple.cleanup_desc",cmd:"mceCleanup"}));c.add(f.createSeparator());c.add(f.createButton("insertunorderedlist",{title:"simple.bullist_desc",cmd:"InsertUnorderedList"}));c.add(f.createButton("insertorderedlist",{title:"simple.numlist_desc",cmd:"InsertOrderedList"}));c.renderTo(i);return{iframeContainer:b,editorContainer:d.id+"_container",sizeContainer:g,deltaHeight:-20}},getInfo:function(){return{longname:"Simple theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.ThemeManager.add("simple",tinymce.themes.SimpleTheme)})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/themes/simple/editor_template_src.js b/webapps/totsys/common/js/tiny_mce/themes/simple/editor_template_src.js new file mode 100644 index 0000000..ec9e963 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/simple/editor_template_src.js @@ -0,0 +1,85 @@ +/** + * editor_template_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var DOM = tinymce.DOM; + + // Tell it to load theme specific language pack(s) + tinymce.ThemeManager.requireLangPack('simple'); + + tinymce.create('tinymce.themes.SimpleTheme', { + init : function(ed, url) { + var t = this, states = ['Bold', 'Italic', 'Underline', 'Strikethrough', 'InsertUnorderedList', 'InsertOrderedList'], s = ed.settings; + + t.editor = ed; + + ed.onInit.add(function() { + ed.onNodeChange.add(function(ed, cm) { + tinymce.each(states, function(c) { + cm.get(c.toLowerCase()).setActive(ed.queryCommandState(c)); + }); + }); + + ed.dom.loadCSS(url + "/skins/" + s.skin + "/content.css"); + }); + + DOM.loadCSS((s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : '') || url + "/skins/" + s.skin + "/ui.css"); + }, + + renderUI : function(o) { + var t = this, n = o.targetNode, ic, tb, ed = t.editor, cf = ed.controlManager, sc; + + n = DOM.insertAfter(DOM.create('span', {id : ed.id + '_container', 'class' : 'mceEditor ' + ed.settings.skin + 'SimpleSkin'}), n); + n = sc = DOM.add(n, 'table', {cellPadding : 0, cellSpacing : 0, 'class' : 'mceLayout'}); + n = tb = DOM.add(n, 'tbody'); + + // Create iframe container + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(DOM.add(n, 'td'), 'div', {'class' : 'mceIframeContainer'}); + + // Create toolbar container + n = DOM.add(DOM.add(tb, 'tr', {'class' : 'last'}), 'td', {'class' : 'mceToolbar mceLast', align : 'center'}); + + // Create toolbar + tb = t.toolbar = cf.createToolbar("tools1"); + tb.add(cf.createButton('bold', {title : 'simple.bold_desc', cmd : 'Bold'})); + tb.add(cf.createButton('italic', {title : 'simple.italic_desc', cmd : 'Italic'})); + tb.add(cf.createButton('underline', {title : 'simple.underline_desc', cmd : 'Underline'})); + tb.add(cf.createButton('strikethrough', {title : 'simple.striketrough_desc', cmd : 'Strikethrough'})); + tb.add(cf.createSeparator()); + tb.add(cf.createButton('undo', {title : 'simple.undo_desc', cmd : 'Undo'})); + tb.add(cf.createButton('redo', {title : 'simple.redo_desc', cmd : 'Redo'})); + tb.add(cf.createSeparator()); + tb.add(cf.createButton('cleanup', {title : 'simple.cleanup_desc', cmd : 'mceCleanup'})); + tb.add(cf.createSeparator()); + tb.add(cf.createButton('insertunorderedlist', {title : 'simple.bullist_desc', cmd : 'InsertUnorderedList'})); + tb.add(cf.createButton('insertorderedlist', {title : 'simple.numlist_desc', cmd : 'InsertOrderedList'})); + tb.renderTo(n); + + return { + iframeContainer : ic, + editorContainer : ed.id + '_container', + sizeContainer : sc, + deltaHeight : -20 + }; + }, + + getInfo : function() { + return { + longname : 'Simple theme', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + version : tinymce.majorVersion + "." + tinymce.minorVersion + } + } + }); + + tinymce.ThemeManager.add('simple', tinymce.themes.SimpleTheme); +})(); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/themes/simple/img/icons.gif b/webapps/totsys/common/js/tiny_mce/themes/simple/img/icons.gif new file mode 100644 index 0000000..16af141 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/themes/simple/img/icons.gif differ diff --git a/webapps/totsys/common/js/tiny_mce/themes/simple/langs/en.js b/webapps/totsys/common/js/tiny_mce/themes/simple/langs/en.js new file mode 100644 index 0000000..6f09531 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/simple/langs/en.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('en.simple',{ +bold_desc:"Bold (Ctrl+B)", +italic_desc:"Italic (Ctrl+I)", +underline_desc:"Underline (Ctrl+U)", +striketrough_desc:"Strikethrough", +bullist_desc:"Unordered list", +numlist_desc:"Ordered list", +undo_desc:"Undo (Ctrl+Z)", +redo_desc:"Redo (Ctrl+Y)", +cleanup_desc:"Cleanup messy code" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/themes/simple/langs/ko.js b/webapps/totsys/common/js/tiny_mce/themes/simple/langs/ko.js new file mode 100644 index 0000000..fa5186c --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/simple/langs/ko.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('ko.simple',{ +bold_desc:"\uAD75\uC740 \uAE00\uC528(Ctrl+B)", +italic_desc:"\uC774\uD0E4\uB9AD(Ctrl+I)", +underline_desc:"\uBC11\uC904(Ctrl+U)", +striketrough_desc:"\uCDE8\uC18C\uC120", +bullist_desc:"\uBE44\uC21C\uCC28\uBAA9\uB85D", +numlist_desc:"\uC21C\uCC28\uBAA9\uB85D", +undo_desc:"\uC2E4\uD589\uCDE8\uC18C(Ctrl+Z)", +redo_desc:"\uB2E4\uC2DC\uC2E4\uD589(Ctrl+Y)", +cleanup_desc:"\uC9C0\uC800\uBD84\uD55C \uCF54\uB4DC \uC0AD\uC81C" +}); \ No newline at end of file diff --git a/webapps/totsys/common/js/tiny_mce/themes/simple/skins/default/content.css b/webapps/totsys/common/js/tiny_mce/themes/simple/skins/default/content.css new file mode 100644 index 0000000..610c2f5 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/simple/skins/default/content.css @@ -0,0 +1,25 @@ +body, td, pre { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 12px; +} + +body { + background-color: #FFFFFF; +} + +.mceVisualAid { + border: 1px dashed #BBBBBB; +} + +/* MSIE specific */ + +* html body { + scrollbar-3dlight-color: #F0F0EE; + scrollbar-arrow-color: #676662; + scrollbar-base-color: #F0F0EE; + scrollbar-darkshadow-color: #DDDDDD; + scrollbar-face-color: #E0E0DD; + scrollbar-highlight-color: #F0F0EE; + scrollbar-shadow-color: #F0F0EE; + scrollbar-track-color: #F5F5F5; +} diff --git a/webapps/totsys/common/js/tiny_mce/themes/simple/skins/default/ui.css b/webapps/totsys/common/js/tiny_mce/themes/simple/skins/default/ui.css new file mode 100644 index 0000000..32feae6 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/simple/skins/default/ui.css @@ -0,0 +1,32 @@ +/* Reset */ +.defaultSimpleSkin table, .defaultSimpleSkin tbody, .defaultSimpleSkin a, .defaultSimpleSkin img, .defaultSimpleSkin tr, .defaultSimpleSkin div, .defaultSimpleSkin td, .defaultSimpleSkin iframe, .defaultSimpleSkin span, .defaultSimpleSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000} + +/* Containers */ +.defaultSimpleSkin {position:relative} +.defaultSimpleSkin table.mceLayout {background:#F0F0EE; border:1px solid #CCC;} +.defaultSimpleSkin iframe {display:block; background:#FFF; border-bottom:1px solid #CCC;} +.defaultSimpleSkin .mceToolbar {height:24px;} + +/* Layout */ +.defaultSimpleSkin span.mceIcon, .defaultSimpleSkin img.mceIcon {display:block; width:20px; height:20px} +.defaultSimpleSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} + +/* Button */ +.defaultSimpleSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px} +.defaultSimpleSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0} +.defaultSimpleSkin a.mceButtonActive {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSimpleSkin .mceButtonDisabled span {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} + +/* Separator */ +.defaultSimpleSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:0 2px 0 4px} + +/* Theme */ +.defaultSimpleSkin span.mce_bold {background-position:0 0} +.defaultSimpleSkin span.mce_italic {background-position:-60px 0} +.defaultSimpleSkin span.mce_underline {background-position:-140px 0} +.defaultSimpleSkin span.mce_strikethrough {background-position:-120px 0} +.defaultSimpleSkin span.mce_undo {background-position:-160px 0} +.defaultSimpleSkin span.mce_redo {background-position:-100px 0} +.defaultSimpleSkin span.mce_cleanup {background-position:-40px 0} +.defaultSimpleSkin span.mce_insertunorderedlist {background-position:-20px 0} +.defaultSimpleSkin span.mce_insertorderedlist {background-position:-80px 0} diff --git a/webapps/totsys/common/js/tiny_mce/themes/simple/skins/o2k7/content.css b/webapps/totsys/common/js/tiny_mce/themes/simple/skins/o2k7/content.css new file mode 100644 index 0000000..a4fd773 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/simple/skins/o2k7/content.css @@ -0,0 +1,17 @@ +body, td, pre {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px;} + +body {background: #FFF;} +.mceVisualAid {border: 1px dashed #BBB;} + +/* IE */ + +* html body { +scrollbar-3dlight-color: #F0F0EE; +scrollbar-arrow-color: #676662; +scrollbar-base-color: #F0F0EE; +scrollbar-darkshadow-color: #DDDDDD; +scrollbar-face-color: #E0E0DD; +scrollbar-highlight-color: #F0F0EE; +scrollbar-shadow-color: #F0F0EE; +scrollbar-track-color: #F5F5F5; +} diff --git a/webapps/totsys/common/js/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png b/webapps/totsys/common/js/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png new file mode 100644 index 0000000..527e349 Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png differ diff --git a/webapps/totsys/common/js/tiny_mce/themes/simple/skins/o2k7/ui.css b/webapps/totsys/common/js/tiny_mce/themes/simple/skins/o2k7/ui.css new file mode 100644 index 0000000..021d650 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/themes/simple/skins/o2k7/ui.css @@ -0,0 +1,35 @@ +/* Reset */ +.o2k7SimpleSkin table, .o2k7SimpleSkin tbody, .o2k7SimpleSkin a, .o2k7SimpleSkin img, .o2k7SimpleSkin tr, .o2k7SimpleSkin div, .o2k7SimpleSkin td, .o2k7SimpleSkin iframe, .o2k7SimpleSkin span, .o2k7SimpleSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000} + +/* Containers */ +.o2k7SimpleSkin {position:relative} +.o2k7SimpleSkin table.mceLayout {background:#E5EFFD; border:1px solid #ABC6DD;} +.o2k7SimpleSkin iframe {display:block; background:#FFF; border-bottom:1px solid #ABC6DD;} +.o2k7SimpleSkin .mceToolbar {height:26px;} + +/* Layout */ +.o2k7SimpleSkin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; } +.o2k7SimpleSkin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px} +.o2k7SimpleSkin span.mceIcon, .o2k7SimpleSkin img.mceIcon {display:block; width:20px; height:20px} +.o2k7SimpleSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} + +/* Button */ +.o2k7SimpleSkin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px} +.o2k7SimpleSkin a.mceButton span, .o2k7SimpleSkin a.mceButton img {margin:1px 0 0 1px} +.o2k7SimpleSkin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px} +.o2k7SimpleSkin a.mceButtonActive {background-position:0 -44px} +.o2k7SimpleSkin .mceButtonDisabled span {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} + +/* Separator */ +.o2k7SimpleSkin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px} + +/* Theme */ +.o2k7SimpleSkin span.mce_bold {background-position:0 0} +.o2k7SimpleSkin span.mce_italic {background-position:-60px 0} +.o2k7SimpleSkin span.mce_underline {background-position:-140px 0} +.o2k7SimpleSkin span.mce_strikethrough {background-position:-120px 0} +.o2k7SimpleSkin span.mce_undo {background-position:-160px 0} +.o2k7SimpleSkin span.mce_redo {background-position:-100px 0} +.o2k7SimpleSkin span.mce_cleanup {background-position:-40px 0} +.o2k7SimpleSkin span.mce_insertunorderedlist {background-position:-20px 0} +.o2k7SimpleSkin span.mce_insertorderedlist {background-position:-80px 0} diff --git a/webapps/totsys/common/js/tiny_mce/tiny_mce.js b/webapps/totsys/common/js/tiny_mce/tiny_mce.js new file mode 100644 index 0000000..99dfbcb --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/tiny_mce.js @@ -0,0 +1 @@ +(function(c){var a=/^\s*|\s*$/g,d;var b={majorVersion:"3",minorVersion:"3.5.1",releaseDate:"2010-05-07",_init:function(){var r=this,o=document,m=navigator,f=m.userAgent,l,e,k,j,h,q;r.isOpera=c.opera&&opera.buildNumber;r.isWebKit=/WebKit/.test(f);r.isIE=!r.isWebKit&&!r.isOpera&&(/MSIE/gi).test(f)&&(/Explorer/gi).test(m.appName);r.isIE6=r.isIE&&/MSIE [56]/.test(f);r.isGecko=!r.isWebKit&&/Gecko/.test(f);r.isMac=f.indexOf("Mac")!=-1;r.isAir=/adobeair/i.test(f);r.isIDevice=/(iPad|iPhone)/.test(f);if(c.tinyMCEPreInit){r.suffix=tinyMCEPreInit.suffix;r.baseURL=tinyMCEPreInit.base;r.query=tinyMCEPreInit.query;return}r.suffix="";e=o.getElementsByTagName("base");for(l=0;l=c.length){for(e=0,b=g.length;e=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length=g.length||g[e]!=c[e]){f=e+1;break}}}if(f==1){return h}for(e=0,b=g.length-(f-1);e=0;c--){if(f[c].length==0||f[c]=="."){continue}if(f[c]==".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!=0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(e,b){var c=new Date();c.setTime(c.getTime()-1000);this.set(e,"",c,b,c)}})})();tinymce.create("static tinymce.util.JSON",{serialize:function(e){var c,a,d=tinymce.util.JSON.serialize,b;if(e==null){return"null"}b=typeof e;if(b=="string"){a="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+e.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(g,f){c=a.indexOf(f);if(c+1){return"\\"+a.charAt(c+1)}g=f.charCodeAt().toString(16);return"\\u"+"0000".substring(g.length)+g})+'"'}if(b=="object"){if(e.hasOwnProperty&&e instanceof Array){for(c=0,a="[";c0?",":"")+d(e[c])}return a+"]"}a="{";for(c in e){a+=typeof e[c]!="function"?(a.length>1?',"':'"')+c+'":'+d(e[c]):""}return a+"}"}return""+e},parse:function(s){try{return eval("("+s+")")}catch(ex){}}});tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){e.call(f.error_scope||f.scope,h,g)};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(m){var k=m.each,j=m.is,i=m.isWebKit,d=m.isIE,a=/^(H[1-6R]|P|DIV|ADDRESS|PRE|FORM|T(ABLE|BODY|HEAD|FOOT|H|R|D)|LI|OL|UL|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|MENU|ISINDEX|SAMP)$/,e=g("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),f=g("src,href,style,coords,shape"),c={"&":"&",'"':""","<":"<",">":">"},n=/[<>&\"]/g,b=/^([a-z0-9],?)+$/i,h=/<(\w+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)(\s*\/?)>/g,l=/(\w+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;function g(q){var p={},o;q=q.split(",");for(o=q.length;o>=0;o--){p[q[o]]=1}return p}m.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(u,q){var p=this,o;p.doc=u;p.win=window;p.files={};p.cssFlicker=false;p.counter=0;p.boxModel=!m.isIE||u.compatMode=="CSS1Compat";p.stdMode=u.documentMode===8;p.settings=q=m.extend({keep_values:false,hex_colors:1,process_html:1},q);if(m.isIE6){try{u.execCommand("BackgroundImageCache",false,true)}catch(r){p.cssFlicker=true}}if(q.valid_styles){p._styles={};k(q.valid_styles,function(t,s){p._styles[s]=m.explode(t)})}m.addUnload(p.destroy,p)},getRoot:function(){var o=this,p=o.settings;return(p&&o.get(p.root_element))||o.doc.body},getViewPort:function(p){var q,o;p=!p?this.win:p;q=p.document;o=this.boxModel?q.documentElement:q.body;return{x:p.pageXOffset||o.scrollLeft,y:p.pageYOffset||o.scrollTop,w:p.innerWidth||o.clientWidth,h:p.innerHeight||o.clientHeight}},getRect:function(s){var r,o=this,q;s=o.get(s);r=o.getPos(s);q=o.getSize(s);return{x:r.x,y:r.y,w:q.w,h:q.h}},getSize:function(r){var p=this,o,q;r=p.get(r);o=p.getStyle(r,"width");q=p.getStyle(r,"height");if(o.indexOf("px")===-1){o=0}if(q.indexOf("px")===-1){q=0}return{w:parseInt(o)||r.offsetWidth||r.clientWidth,h:parseInt(q)||r.offsetHeight||r.clientHeight}},getParent:function(q,p,o){return this.getParents(q,p,o,false)},getParents:function(z,v,s,y){var q=this,p,u=q.settings,x=[];z=q.get(z);y=y===undefined;if(u.strict_root){s=s||q.getRoot()}if(j(v,"string")){p=v;if(v==="*"){v=function(o){return o.nodeType==1}}else{v=function(o){return q.is(o,p)}}}while(z){if(z==s||!z.nodeType||z.nodeType===9){break}if(!v||v(z)){if(y){x.push(z)}else{return z}}z=z.parentNode}return y?x:null},get:function(o){var p;if(o&&this.doc&&typeof(o)=="string"){p=o;o=this.doc.getElementById(o);if(o&&o.id!==p){return this.doc.getElementsByName(p)[1]}}return o},getNext:function(p,o){return this._findSib(p,o,"nextSibling")},getPrev:function(p,o){return this._findSib(p,o,"previousSibling")},select:function(q,p){var o=this;return m.dom.Sizzle(q,o.get(p)||o.get(o.settings.root_element)||o.doc,[])},is:function(q,o){var p;if(q.length===undefined){if(o==="*"){return q.nodeType==1}if(b.test(o)){o=o.toLowerCase().split(/,/);q=q.nodeName.toLowerCase();for(p=o.length-1;p>=0;p--){if(o[p]==q){return true}}return false}}return m.dom.Sizzle.matches(o,q.nodeType?[q]:q).length>0},add:function(s,v,o,r,u){var q=this;return this.run(s,function(y){var x,t;x=j(v,"string")?q.doc.createElement(v):v;q.setAttribs(x,o);if(r){if(r.nodeType){x.appendChild(r)}else{q.setHTML(x,r)}}return !u?y.appendChild(x):x})},create:function(q,o,p){return this.add(this.doc.createElement(q),q,o,p,1)},createHTML:function(v,p,s){var u="",r=this,q;u+="<"+v;for(q in p){if(p.hasOwnProperty(q)){u+=" "+q+'="'+r.encode(p[q])+'"'}}if(m.is(s)){return u+">"+s+""}return u+" />"},remove:function(o,p){return this.run(o,function(r){var q,s;q=r.parentNode;if(!q){return null}if(p){while(s=r.firstChild){if(!m.isIE||s.nodeType!==3||s.nodeValue){q.insertBefore(s,r)}else{r.removeChild(s)}}}return q.removeChild(r)})},setStyle:function(r,o,p){var q=this;return q.run(r,function(v){var u,t;u=v.style;o=o.replace(/-(\D)/g,function(x,s){return s.toUpperCase()});if(q.pixelStyles.test(o)&&(m.is(p,"number")||/^[\-0-9\.]+$/.test(p))){p+="px"}switch(o){case"opacity":if(d){u.filter=p===""?"":"alpha(opacity="+(p*100)+")";if(!r.currentStyle||!r.currentStyle.hasLayout){u.display="inline-block"}}u[o]=u["-moz-opacity"]=u["-khtml-opacity"]=p||"";break;case"float":d?u.styleFloat=p:u.cssFloat=p;break;default:u[o]=p||""}if(q.settings.update_styles){q.setAttrib(v,"_mce_style")}})},getStyle:function(r,o,q){r=this.get(r);if(!r){return false}if(this.doc.defaultView&&q){o=o.replace(/[A-Z]/g,function(s){return"-"+s});try{return this.doc.defaultView.getComputedStyle(r,null).getPropertyValue(o)}catch(p){return null}}o=o.replace(/-(\D)/g,function(t,s){return s.toUpperCase()});if(o=="float"){o=d?"styleFloat":"cssFloat"}if(r.currentStyle&&q){return r.currentStyle[o]}return r.style[o]},setStyles:function(u,v){var q=this,r=q.settings,p;p=r.update_styles;r.update_styles=0;k(v,function(o,s){q.setStyle(u,s,o)});r.update_styles=p;if(r.update_styles){q.setAttrib(u,r.cssText)}},setAttrib:function(q,r,o){var p=this;if(!q||!r){return}if(p.settings.strict){r=r.toLowerCase()}return this.run(q,function(u){var t=p.settings;switch(r){case"style":if(!j(o,"string")){k(o,function(s,x){p.setStyle(u,x,s)});return}if(t.keep_values){if(o&&!p._isRes(o)){u.setAttribute("_mce_style",o,2)}else{u.removeAttribute("_mce_style",2)}}u.style.cssText=o;break;case"class":u.className=o||"";break;case"src":case"href":if(t.keep_values){if(t.url_converter){o=t.url_converter.call(t.url_converter_scope||p,o,r,u)}p.setAttrib(u,"_mce_"+r,o,2)}break;case"shape":u.setAttribute("_mce_style",o);break}if(j(o)&&o!==null&&o.length!==0){u.setAttribute(r,""+o,2)}else{u.removeAttribute(r,2)}})},setAttribs:function(q,r){var p=this;return this.run(q,function(o){k(r,function(s,t){p.setAttrib(o,t,s)})})},getAttrib:function(r,s,q){var o,p=this;r=p.get(r);if(!r||r.nodeType!==1){return false}if(!j(q)){q=""}if(/^(src|href|style|coords|shape)$/.test(s)){o=r.getAttribute("_mce_"+s);if(o){return o}}if(d&&p.props[s]){o=r[p.props[s]];o=o&&o.nodeValue?o.nodeValue:o}if(!o){o=r.getAttribute(s,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(s)){if(r[p.props[s]]===true&&o===""){return s}return o?s:""}if(r.nodeName==="FORM"&&r.getAttributeNode(s)){return r.getAttributeNode(s).nodeValue}if(s==="style"){o=o||r.style.cssText;if(o){o=p.serializeStyle(p.parseStyle(o),r.nodeName);if(p.settings.keep_values&&!p._isRes(o)){r.setAttribute("_mce_style",o)}}}if(i&&s==="class"&&o){o=o.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(d){switch(s){case"rowspan":case"colspan":if(o===1){o=""}break;case"size":if(o==="+0"||o===20||o===0){o=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(o===0){o=""}break;case"hspace":if(o===-1){o=""}break;case"maxlength":case"tabindex":if(o===32768||o===2147483647||o==="32768"){o=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(o===65535){return s}return q;case"shape":o=o.toLowerCase();break;default:if(s.indexOf("on")===0&&o){o=(""+o).replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1")}}}return(o!==undefined&&o!==null&&o!=="")?""+o:q},getPos:function(A,s){var p=this,o=0,z=0,u,v=p.doc,q;A=p.get(A);s=s||v.body;if(A){if(d&&!p.stdMode){A=A.getBoundingClientRect();u=p.boxModel?v.documentElement:v.body;o=p.getStyle(p.select("html")[0],"borderWidth");o=(o=="medium"||p.boxModel&&!p.isIE6)&&2||o;A.top+=p.win.self!=p.win.top?2:0;return{x:A.left+u.scrollLeft-o,y:A.top+u.scrollTop-o}}q=A;while(q&&q!=s&&q.nodeType){o+=q.offsetLeft||0;z+=q.offsetTop||0;q=q.offsetParent}q=A.parentNode;while(q&&q!=s&&q.nodeType){o-=q.scrollLeft||0;z-=q.scrollTop||0;q=q.parentNode}}return{x:o,y:z}},parseStyle:function(r){var u=this,v=u.settings,x={};if(!r){return x}function p(D,A,C){var z,B,o,y;z=x[D+"-top"+A];if(!z){return}B=x[D+"-right"+A];if(z!=B){return}o=x[D+"-bottom"+A];if(B!=o){return}y=x[D+"-left"+A];if(o!=y){return}x[C]=y;delete x[D+"-top"+A];delete x[D+"-right"+A];delete x[D+"-bottom"+A];delete x[D+"-left"+A]}function q(y,s,o,A){var z;z=x[s];if(!z){return}z=x[o];if(!z){return}z=x[A];if(!z){return}x[y]=x[s]+" "+x[o]+" "+x[A];delete x[s];delete x[o];delete x[A]}r=r.replace(/&(#?[a-z0-9]+);/g,"&$1_MCE_SEMI_");k(r.split(";"),function(s){var o,t=[];if(s){s=s.replace(/_MCE_SEMI_/g,";");s=s.replace(/url\([^\)]+\)/g,function(y){t.push(y);return"url("+t.length+")"});s=s.split(":");o=m.trim(s[1]);o=o.replace(/url\(([^\)]+)\)/g,function(z,y){return t[parseInt(y)-1]});o=o.replace(/rgb\([^\)]+\)/g,function(y){return u.toHex(y)});if(v.url_converter){o=o.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(y,z){return"url("+v.url_converter.call(v.url_converter_scope||u,u.decode(z),"style",null)+")"})}x[m.trim(s[0]).toLowerCase()]=o}});p("border","","border");p("border","-width","border-width");p("border","-color","border-color");p("border","-style","border-style");p("padding","","padding");p("margin","","margin");q("border","border-width","border-style","border-color");if(d){if(x.border=="medium none"){x.border=""}}return x},serializeStyle:function(v,p){var q=this,r="";function u(s,o){if(o&&s){if(o.indexOf("-")===0){return}switch(o){case"font-weight":if(s==700){s="bold"}break;case"color":case"background-color":s=s.toLowerCase();break}r+=(r?" ":"")+o+": "+s+";"}}if(p&&q._styles){k(q._styles["*"],function(o){u(v[o],o)});k(q._styles[p.toLowerCase()],function(o){u(v[o],o)})}else{k(v,u)}return r},loadCSS:function(o){var q=this,r=q.doc,p;if(!o){o=""}p=q.select("head")[0];k(o.split(","),function(s){var t;if(q.files[s]){return}q.files[s]=true;t=q.create("link",{rel:"stylesheet",href:m._addVer(s)});if(d&&r.documentMode){t.onload=function(){r.recalc();t.onload=null}}p.appendChild(t)})},addClass:function(o,p){return this.run(o,function(q){var r;if(!p){return 0}if(this.hasClass(q,p)){return q.className}r=this.removeClass(q,p);return q.className=(r!=""?(r+" "):"")+p})},removeClass:function(q,r){var o=this,p;return o.run(q,function(t){var s;if(o.hasClass(t,r)){if(!p){p=new RegExp("(^|\\s+)"+r+"(\\s+|$)","g")}s=t.className.replace(p," ");s=m.trim(s!=" "?s:"");t.className=s;if(!s){t.removeAttribute("class");t.removeAttribute("className")}return s}return t.className})},hasClass:function(p,o){p=this.get(p);if(!p||!o){return false}return(" "+p.className+" ").indexOf(" "+o+" ")!==-1},show:function(o){return this.setStyle(o,"display","block")},hide:function(o){return this.setStyle(o,"display","none")},isHidden:function(o){o=this.get(o);return !o||o.style.display=="none"||this.getStyle(o,"display")=="none"},uniqueId:function(o){return(!o?"mce_":o)+(this.counter++)},setHTML:function(q,p){var o=this;return this.run(q,function(v){var r,t,s,z,u,r;p=o.processHTML(p);if(d){function y(){while(v.firstChild){v.firstChild.removeNode()}try{v.innerHTML="
    "+p;v.removeChild(v.firstChild)}catch(x){r=o.create("div");r.innerHTML="
    "+p;k(r.childNodes,function(B,A){if(A){v.appendChild(B)}})}}if(o.settings.fix_ie_paragraphs){p=p.replace(/

    <\/p>|]+)><\/p>|/gi,' 

    ')}y();if(o.settings.fix_ie_paragraphs){s=v.getElementsByTagName("p");for(t=s.length-1,r=0;t>=0;t--){z=s[t];if(!z.hasChildNodes()){if(!z._mce_keep){r=1;break}z.removeAttribute("_mce_keep")}}}if(r){p=p.replace(/

    ]+)>|

    /ig,'

    ');p=p.replace(/<\/p>/gi,"
    ");y();if(o.settings.fix_ie_paragraphs){s=v.getElementsByTagName("DIV");for(t=s.length-1;t>=0;t--){z=s[t];if(z._mce_tmp){u=o.doc.createElement("p");z.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(A,x){var B;if(x!=="_mce_tmp"){B=z.getAttribute(x);if(!B&&x==="class"){B=z.className}u.setAttribute(x,B)}});for(r=0;r]+)\/>|/gi,"");if(q.keep_values){if(/)/g,"\n");t=t.replace(/^[\r\n]*|[\r\n]*$/g,"");t=t.replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g,"");return t}r=r.replace(/]+|)>([\s\S]*?)<\/script>/gi,function(s,x,t){if(!x){x=' type="text/javascript"'}x=x.replace(/src=\"([^\"]+)\"?/i,function(y,z){if(q.url_converter){z=p.encode(q.url_converter.call(q.url_converter_scope||p,p.decode(z),"src","script"))}return'_mce_src="'+z+'"'});if(m.trim(t)){v.push(o(t));t=""}return""+t+""});r=r.replace(/]+|)>([\s\S]*?)<\/style>/gi,function(s,x,t){if(t){v.push(o(t));t=""}return""+t+""});r=r.replace(/]+|)>([\s\S]*?)<\/noscript>/g,function(s,x,t){return""})}r=r.replace(//g,"");function u(s){return s.replace(h,function(y,z,x,t){return"<"+z+x.replace(l,function(B,A,E,D,C){var F;A=A.toLowerCase();E=E||D||C||"";if(e[A]){if(E==="false"||E==="0"){return}return A+'="'+A+'"'}if(f[A]&&x.indexOf("_mce_"+A)==-1){F=p.decode(E);if(q.url_converter&&(A=="src"||A=="href")){F=q.url_converter.call(q.url_converter_scope||p,F,A,z)}if(A=="style"){F=p.serializeStyle(p.parseStyle(F),A)}return A+'="'+E+'" _mce_'+A+'="'+p.encode(F)+'"'}return B})+t+">"})}r=u(r);r=r.replace(/MCE_SCRIPT:([0-9]+)/g,function(t,s){return v[s]})}return r},getOuterHTML:function(o){var p;o=this.get(o);if(!o){return null}if(o.outerHTML!==undefined){return o.outerHTML}p=(o.ownerDocument||this.doc).createElement("body");p.appendChild(o.cloneNode(true));return p.innerHTML},setOuterHTML:function(r,p,s){var o=this;function q(u,t,x){var y,v;v=x.createElement("body");v.innerHTML=t;y=v.lastChild;while(y){o.insertAfter(y.cloneNode(true),u);y=y.previousSibling}o.remove(u)}return this.run(r,function(u){u=o.get(u);if(u.nodeType==1){s=s||u.ownerDocument||o.doc;if(d){try{if(d&&u.nodeType==1){u.outerHTML=p}else{q(u,p,s)}}catch(t){q(u,p,s)}}else{q(u,p,s)}}})},decode:function(p){var q,r,o;if(/&[\w#]+;/.test(p)){q=this.doc.createElement("div");q.innerHTML=p;r=q.firstChild;o="";if(r){do{o+=r.nodeValue}while(r=r.nextSibling)}return o||p}return p},encode:function(o){return(""+o).replace(n,function(p){return c[p]})},insertAfter:function(o,p){p=this.get(p);return this.run(o,function(r){var q,s;q=p.parentNode;s=p.nextSibling;if(s){q.insertBefore(r,s)}else{q.appendChild(r)}return r})},isBlock:function(o){if(o.nodeType&&o.nodeType!==1){return false}o=o.nodeName||o;return a.test(o)},replace:function(s,r,p){var q=this;if(j(r,"array")){s=s.cloneNode(true)}return q.run(r,function(t){if(p){k(m.grep(t.childNodes),function(o){s.appendChild(o)})}return t.parentNode.replaceChild(s,t)})},rename:function(r,o){var q=this,p;if(r.nodeName!=o.toUpperCase()){p=q.create(o);k(q.getAttribs(r),function(s){q.setAttrib(p,s.nodeName,q.getAttrib(r,s.nodeName))});q.replace(p,r,1)}return p||r},findCommonAncestor:function(q,o){var r=q,p;while(r){p=o;while(p&&r!=p){p=p.parentNode}if(r==p){break}r=r.parentNode}if(!r&&q.ownerDocument){return q.ownerDocument.documentElement}return r},toHex:function(o){var q=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(o);function p(r){r=parseInt(r).toString(16);return r.length>1?r:"0"+r}if(q){o="#"+p(q[1])+p(q[2])+p(q[3]);return o}return o},getClasses:function(){var s=this,o=[],r,u={},v=s.settings.class_filter,q;if(s.classes){return s.classes}function x(t){k(t.imports,function(y){x(y)});k(t.cssRules||t.rules,function(y){switch(y.type||1){case 1:if(y.selectorText){k(y.selectorText.split(","),function(z){z=z.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(z)||!/\.[\w\-]+$/.test(z)){return}q=z;z=z.replace(/.*\.([a-z0-9_\-]+).*/i,"$1");if(v&&!(z=v(z,q))){return}if(!u[z]){o.push({"class":z});u[z]=1}})}break;case 3:x(y.styleSheet);break}})}try{k(s.doc.styleSheets,x)}catch(p){}if(o.length>0){s.classes=o}return o},run:function(u,r,q){var p=this,v;if(p.doc&&typeof(u)==="string"){u=p.get(u)}if(!u){return false}q=q||this;if(!u.nodeType&&(u.length||u.length===0)){v=[];k(u,function(s,o){if(s){if(typeof(s)=="string"){s=p.doc.getElementById(s)}v.push(r.call(q,s,o))}});return v}return r.call(q,u)},getAttribs:function(q){var p;q=this.get(q);if(!q){return[]}if(d){p=[];if(q.nodeName=="OBJECT"){return q.attributes}if(q.nodeName==="OPTION"&&this.getAttrib(q,"selected")){p.push({specified:1,nodeName:"selected"})}q.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(o){p.push({specified:1,nodeName:o})});return p}return q.attributes},destroy:function(p){var o=this;if(o.events){o.events.destroy()}o.win=o.doc=o.root=o.events=null;if(!p){m.removeUnload(o.destroy)}},createRng:function(){var o=this.doc;return o.createRange?o.createRange():new m.dom.Range(this)},nodeIndex:function(s,t){var o=0,q,r,p;if(s){for(q=s.nodeType,s=s.previousSibling,r=s;s;s=s.previousSibling){p=s.nodeType;if(t&&p==3){if(p==q||!s.nodeValue.length){continue}}o++;q=p}}return o},split:function(u,s,y){var z=this,o=z.createRng(),v,q,x;function p(A){var t,r=A.childNodes;if(A.nodeType==1&&A.getAttribute("_mce_type")=="bookmark"){return}for(t=r.length-1;t>=0;t--){p(r[t])}if(A.nodeType!=9){if(A.nodeType==3&&A.nodeValue.length>0){return}if(A.nodeType==1){r=A.childNodes;if(r.length==1&&r[0]&&r[0].nodeType==1&&r[0].getAttribute("_mce_type")=="bookmark"){A.parentNode.insertBefore(r[0],A)}if(r.length||/^(br|hr|input|img)$/i.test(A.nodeName)){return}}z.remove(A)}return A}if(u&&s){o.setStart(u.parentNode,z.nodeIndex(u));o.setEnd(s.parentNode,z.nodeIndex(s));v=o.extractContents();o=z.createRng();o.setStart(s.parentNode,z.nodeIndex(s)+1);o.setEnd(u.parentNode,z.nodeIndex(u)+1);q=o.extractContents();x=u.parentNode;x.insertBefore(p(v),u);if(y){x.replaceChild(y,s)}else{x.insertBefore(s,u)}x.insertBefore(p(q),u);z.remove(u);return y||s}},bind:function(s,o,r,q){var p=this;if(!p.events){p.events=new m.dom.EventUtils()}return p.events.add(s,o,r,q||this)},unbind:function(r,o,q){var p=this;if(!p.events){p.events=new m.dom.EventUtils()}return p.events.remove(r,o,q)},_findSib:function(r,o,p){var q=this,s=o;if(r){if(j(s,"string")){s=function(t){return q.is(t,o)}}for(r=r[p];r;r=r[p]){if(s(r)){return r}}}return null},_isRes:function(o){return/^(top|left|bottom|right|width|height)/i.test(o)||/;\s*(top|left|bottom|right|width|height)/i.test(o)}});m.DOM=new m.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var N=this,e=c.doc,S=0,E=1,j=2,D=true,R=false,U="startOffset",h="startContainer",P="endContainer",z="endOffset",k=tinymce.extend,n=c.nodeIndex;k(N,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:D,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:I,setEndBefore:J,setEndAfter:u,collapse:A,selectNode:x,selectNodeContents:F,compareBoundaryPoints:v,deleteContents:p,extractContents:H,cloneContents:d,insertNode:C,surroundContents:M,cloneRange:K});function q(V,t){B(D,V,t)}function s(V,t){B(R,V,t)}function g(t){q(t.parentNode,n(t))}function I(t){q(t.parentNode,n(t)+1)}function J(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function A(t){if(t){N[P]=N[h];N[z]=N[U]}else{N[h]=N[P];N[U]=N[z]}N.collapsed=D}function x(t){g(t);u(t)}function F(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(W,X){var Z=N[h],Y=N[U],V=N[P],t=N[z];if(W===0){return G(Z,Y,Z,Y)}if(W===1){return G(Z,Y,V,t)}if(W===2){return G(V,t,V,t)}if(W===3){return G(V,t,Z,Y)}}function p(){m(j)}function H(){return m(S)}function d(){return m(E)}function C(Y){var V=this[h],t=this[U],X,W;if((V.nodeType===3||V.nodeType===4)&&V.nodeValue){if(!t){V.parentNode.insertBefore(Y,V)}else{if(t>=V.nodeValue.length){c.insertAfter(Y,V)}else{X=V.splitText(t);V.parentNode.insertBefore(Y,X)}}}else{if(V.childNodes.length>0){W=V.childNodes[t]}if(W){V.insertBefore(Y,W)}else{V.appendChild(Y)}}}function M(V){var t=N.extractContents();N.insertNode(V);V.appendChild(t);N.selectNode(V)}function K(){return k(new b(c),{startContainer:N[h],startOffset:N[U],endContainer:N[P],endOffset:N[z],collapsed:N.collapsed,commonAncestorContainer:N.commonAncestorContainer})}function O(t,V){var W;if(t.nodeType==3){return t}if(V<0){return t}W=t.firstChild;while(W&&V>0){--V;W=W.nextSibling}if(W){return W}return t}function l(){return(N[h]==N[P]&&N[U]==N[z])}function G(X,Z,V,Y){var aa,W,t,ab,ad,ac;if(X==V){if(Z==Y){return 0}if(Z0){N.collapse(V)}}else{N.collapse(V)}N.collapsed=l();N.commonAncestorContainer=c.findCommonAncestor(N[h],N[P])}function m(ab){var aa,X=0,ad=0,V,Z,W,Y,t,ac;if(N[h]==N[P]){return f(ab)}for(aa=N[P],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[h]){return r(aa,ab)}++X}for(aa=N[h],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[P]){return T(aa,ab)}++ad}Z=ad-X;W=N[h];while(Z>0){W=W.parentNode;Z--}Y=N[P];while(Z<0){Y=Y.parentNode;Z++}for(t=W.parentNode,ac=Y.parentNode;t!=ac;t=t.parentNode,ac=ac.parentNode){W=t;Y=ac}return o(W,Y,ab)}function f(Z){var ab,Y,X,aa,t,W,V;if(Z!=j){ab=e.createDocumentFragment()}if(N[U]==N[z]){return ab}if(N[h].nodeType==3){Y=N[h].nodeValue;X=Y.substring(N[U],N[z]);if(Z!=E){N[h].deleteData(N[U],N[z]-N[U]);N.collapse(D)}if(Z==j){return}ab.appendChild(e.createTextNode(X));return ab}aa=O(N[h],N[U]);t=N[z]-N[U];while(t>0){W=aa.nextSibling;V=y(aa,Z);if(ab){ab.appendChild(V)}--t;aa=W}if(Z!=E){N.collapse(D)}return ab}function r(ab,Y){var aa,Z,V,t,X,W;if(Y!=j){aa=e.createDocumentFragment()}Z=i(ab,Y);if(aa){aa.appendChild(Z)}V=n(ab);t=V-N[U];if(t<=0){if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}Z=ab.previousSibling;while(t>0){X=Z.previousSibling;W=y(Z,Y);if(aa){aa.insertBefore(W,aa.firstChild)}--t;Z=X}if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}function T(Z,Y){var ab,V,aa,t,X,W;if(Y!=j){ab=e.createDocumentFragment()}aa=Q(Z,Y);if(ab){ab.appendChild(aa)}V=n(Z);++V;t=N[z]-V;aa=Z.nextSibling;while(t>0){X=aa.nextSibling;W=y(aa,Y);if(ab){ab.appendChild(W)}--t;aa=X}if(Y!=E){N.setStartAfter(Z);N.collapse(D)}return ab}function o(Z,t,ac){var W,ae,Y,aa,ab,V,ad,X;if(ac!=j){ae=e.createDocumentFragment()}W=Q(Z,ac);if(ae){ae.appendChild(W)}Y=Z.parentNode;aa=n(Z);ab=n(t);++aa;V=ab-aa;ad=Z.nextSibling;while(V>0){X=ad.nextSibling;W=y(ad,ac);if(ae){ae.appendChild(W)}ad=X;--V}W=i(t,ac);if(ae){ae.appendChild(W)}if(ac!=E){N.setStartAfter(Z);N.collapse(D)}return ae}function i(aa,ab){var W=O(N[P],N[z]-1),ac,Z,Y,t,V,X=W!=N[P];if(W==aa){return L(W,X,R,ab)}ac=W.parentNode;Z=L(ac,R,R,ab);while(ac){while(W){Y=W.previousSibling;t=L(W,X,R,ab);if(ab!=j){Z.insertBefore(t,Z.firstChild)}X=D;W=Y}if(ac==aa){return Z}W=ac.previousSibling;ac=ac.parentNode;V=L(ac,R,R,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function Q(aa,ab){var X=O(N[h],N[U]),Y=X!=N[h],ac,Z,W,t,V;if(X==aa){return L(X,Y,D,ab)}ac=X.parentNode;Z=L(ac,R,D,ab);while(ac){while(X){W=X.nextSibling;t=L(X,Y,D,ab);if(ab!=j){Z.appendChild(t)}Y=D;X=W}if(ac==aa){return Z}X=ac.nextSibling;ac=ac.parentNode;V=L(ac,R,D,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function L(t,Y,ab,ac){var X,W,Z,V,aa;if(Y){return y(t,ac)}if(t.nodeType==3){X=t.nodeValue;if(ab){V=N[U];W=X.substring(V);Z=X.substring(0,V)}else{V=N[z];W=X.substring(0,V);Z=X.substring(V)}if(ac!=E){t.nodeValue=Z}if(ac==j){return}aa=t.cloneNode(R);aa.nodeValue=W;return aa}if(ac==j){return}return t.cloneNode(R)}function y(V,t){if(t!=j){return t==E?V.cloneNode(D):V}V.parentNode.removeChild(V)}}a.Range=b})(tinymce.dom);(function(){function a(g){var i=this,j="\uFEFF",e,h,d=g.dom,c=true,f=false;function b(){var n=g.getRng(),k=d.createRng(),m,o;m=n.item?n.item(0):n.parentElement();if(m.ownerDocument!=d.doc){return k}if(n.item||!m.hasChildNodes()){k.setStart(m.parentNode,d.nodeIndex(m));k.setEnd(k.startContainer,k.startOffset+1);return k}o=g.isCollapsed();function l(s){var u,q,t,p,A=0,x,y,z,r,v;r=n.duplicate();r.collapse(s);u=d.create("a");z=r.parentElement();z.appendChild(u);p=tinymce.grep(z.childNodes);x=p.length-1;while(A<=x){y=Math.floor((A+x)/2);z.insertBefore(u,p[y]);r.moveToElementText(u);v=n.compareEndPoints(s?"StartToStart":"EndToEnd",r);if(v>0){A=y+1}else{if(v<0){x=y-1}else{break}}}q=v>0||y==0?u.nextSibling:u.previousSibling;if(q.nodeType==1){d.remove(u);t=d.nodeIndex(q);q=q.parentNode;if(!s||y>0){t++}}else{if(v>0||y==0){r.setEndPoint(s?"StartToStart":"EndToEnd",n);t=r.text.length}else{r.setEndPoint(s?"StartToStart":"EndToEnd",n);t=q.nodeValue.length-r.text.length}d.remove(u)}k[s?"setStart":"setEnd"](q,t)}l(true);if(!o){l()}return k}this.addRange=function(l){var t,z,y=g.dom.doc,r=y.body,u,n,x,o,s,k,p,q,v,m;this.destroy();x=l.startContainer;o=l.startOffset;s=l.endContainer;k=l.endOffset;t=r.createTextRange();if(x==y||s==y){t=r.createTextRange();t.collapse();t.select();return}if(x.nodeType==1&&x.hasChildNodes()){q=x.childNodes.length-1;if(o>q){v=1;x=x.childNodes[q]}else{x=x.childNodes[o]}if(x.nodeType==3){o=0}}if(s.nodeType==1&&s.hasChildNodes()){q=s.childNodes.length-1;if(k==0){m=1;s=s.childNodes[0]}else{s=s.childNodes[Math.min(q,k-1)];if(s.nodeType==3){k=s.nodeValue.length}}}if(x==s&&x.nodeType==1){if(/^(IMG|TABLE)$/.test(x.nodeName)&&o!=k){t=r.createControlRange();t.addElement(x)}else{t=r.createTextRange();if(!x.hasChildNodes()&&x.canHaveHTML){x.innerHTML=j}t.moveToElementText(x);if(x.innerHTML==j){t.collapse(c);x.removeChild(x.firstChild)}}if(o==k){t.collapse(k<=l.endContainer.childNodes.length-1)}t.select();t.scrollIntoView();return}t=r.createTextRange();p=y.createElement("span");p.innerHTML=" ";if(x.nodeType==3){if(v){d.insertAfter(p,x)}else{x.parentNode.insertBefore(p,x)}t.moveToElementText(p);p.parentNode.removeChild(p);t.move("character",o)}else{t.moveToElementText(x);if(v){t.collapse(f)}}if(x==s&&x.nodeType==3){t.moveEnd("character",k-o);t.select();t.scrollIntoView();return}z=r.createTextRange();if(s.nodeType==3){s.parentNode.insertBefore(p,s);z.moveToElementText(p);p.parentNode.removeChild(p);z.move("character",k);t.setEndPoint("EndToStart",z)}else{z.moveToElementText(s);z.collapse(!!m);t.setEndPoint("EndToEnd",z)}t.select();t.scrollIntoView()};this.getRangeAt=function(){if(!e||!tinymce.dom.RangeUtils.compareRanges(h,g.getRng())){e=b();h=g.getRng()}try{e.startContainer.nextSibling}catch(k){e=b();h=null}return e};this.destroy=function(){h=e=null};if(g.dom.boxModel){(function(){var q=d.doc,l=q.body,n,o;q.documentElement.unselectable=c;function p(r,u){var s=l.createTextRange();try{s.moveToPoint(r,u)}catch(t){s=null}return s}function m(s){var r;if(s.button){r=p(s.x,s.y);if(r){if(r.compareEndPoints("StartToStart",o)>0){r.setEndPoint("StartToStart",o)}else{r.setEndPoint("EndToEnd",o)}r.select()}}else{k()}}function k(){d.unbind(q,"mouseup",k);d.unbind(q,"mousemove",m);n=0}d.bind(q,"mousedown",function(r){if(r.target.nodeName==="HTML"){if(n){k()}n=1;o=p(r.x,r.y);if(o){d.bind(q,"mouseup",k);d.bind(q,"mousemove",m);o.select()}}})})()}}tinymce.dom.TridentSelection=a})();(function(){var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,i=0,d=Object.prototype.toString,n=false;var b=function(E,t,B,v){B=B||[];var e=t=t||document;if(t.nodeType!==1&&t.nodeType!==9){return[]}if(!E||typeof E!=="string"){return B}var C=[],D,z,H,G,A,s,r=true,x=o(t);p.lastIndex=0;while((D=p.exec(E))!==null){C.push(D[1]);if(D[2]){s=RegExp.rightContext;break}}if(C.length>1&&j.exec(E)){if(C.length===2&&f.relative[C[0]]){z=g(C[0]+C[1],t)}else{z=f.relative[C[0]]?[t]:b(C.shift(),t);while(C.length){E=C.shift();if(f.relative[E]){E+=C.shift()}z=g(E,z)}}}else{if(!v&&C.length>1&&t.nodeType===9&&!x&&f.match.ID.test(C[0])&&!f.match.ID.test(C[C.length-1])){var I=b.find(C.shift(),t,x);t=I.expr?b.filter(I.expr,I.set)[0]:I.set[0]}if(t){var I=v?{expr:C.pop(),set:a(v)}:b.find(C.pop(),C.length===1&&(C[0]==="~"||C[0]==="+")&&t.parentNode?t.parentNode:t,x);z=I.expr?b.filter(I.expr,I.set):I.set;if(C.length>0){H=a(z)}else{r=false}while(C.length){var u=C.pop(),y=u;if(!f.relative[u]){u=""}else{y=C.pop()}if(y==null){y=t}f.relative[u](H,y,x)}}else{H=C=[]}}if(!H){H=z}if(!H){throw"Syntax error, unrecognized expression: "+(u||E)}if(d.call(H)==="[object Array]"){if(!r){B.push.apply(B,H)}else{if(t&&t.nodeType===1){for(var F=0;H[F]!=null;F++){if(H[F]&&(H[F]===true||H[F].nodeType===1&&h(t,H[F]))){B.push(z[F])}}}else{for(var F=0;H[F]!=null;F++){if(H[F]&&H[F].nodeType===1){B.push(z[F])}}}}}else{a(H,B)}if(s){b(s,e,B,v);b.uniqueSort(B)}return B};b.uniqueSort=function(r){if(c){n=false;r.sort(c);if(n){for(var e=1;e":function(x,r,y){var u=typeof r==="string";if(u&&!/\W/.test(r)){r=y?r:r.toUpperCase();for(var s=0,e=x.length;s=0)){if(!s){e.push(v)}}else{if(s){r[u]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(r,e){for(var s=0;e[s]===false;s++){}return e[s]&&o(e[s])?r[1]:r[1].toUpperCase()},CHILD:function(e){if(e[1]=="nth"){var r=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]=="even"&&"2n"||e[2]=="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(r[1]+(r[2]||1))-0;e[3]=r[3]-0}e[0]=i++;return e},ATTR:function(u,r,s,e,v,x){var t=u[1].replace(/\\/g,"");if(!x&&f.attrMap[t]){u[1]=f.attrMap[t]}if(u[2]==="~="){u[4]=" "+u[4]+" "}return u},PSEUDO:function(u,r,s,e,v){if(u[1]==="not"){if(u[3].match(p).length>1||/^\w/.test(u[3])){u[3]=b(u[3],null,null,r)}else{var t=b.filter(u[3],r,s,true^v);if(!s){e.push.apply(e,t)}return false}}else{if(f.match.POS.test(u[0])||f.match.CHILD.test(u[0])){return true}}return u},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(s,r,e){return !!b(e[3],s).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toUpperCase()==="BUTTON"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)}},setFilters:{first:function(r,e){return e===0},last:function(s,r,e,t){return r===t.length-1},even:function(r,e){return e%2===0},odd:function(r,e){return e%2===1},lt:function(s,r,e){return re[3]-0},nth:function(s,r,e){return e[3]-0==r},eq:function(s,r,e){return e[3]-0==r}},filter:{PSEUDO:function(x,s,t,y){var r=s[1],u=f.filters[r];if(u){return u(x,t,s,y)}else{if(r==="contains"){return(x.textContent||x.innerText||"").indexOf(s[3])>=0}else{if(r==="not"){var v=s[3];for(var t=0,e=v.length;t=0)}}},ID:function(r,e){return r.nodeType===1&&r.getAttribute("id")===e},TAG:function(r,e){return(e==="*"&&r.nodeType===1)||r.nodeName===e},CLASS:function(r,e){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(v,t){var s=t[1],e=f.attrHandle[s]?f.attrHandle[s](v):v[s]!=null?v[s]:v.getAttribute(s),x=e+"",u=t[2],r=t[4];return e==null?u==="!=":u==="="?x===r:u==="*="?x.indexOf(r)>=0:u==="~="?(" "+x+" ").indexOf(r)>=0:!r?x&&e!==false:u==="!="?x!=r:u==="^="?x.indexOf(r)===0:u==="$="?x.substr(x.length-r.length)===r:u==="|="?x===r||x.substr(0,r.length+1)===r+"-":false},POS:function(u,r,s,v){var e=r[2],t=f.setFilters[e];if(t){return t(u,s,r,v)}}}};var j=f.match.POS;for(var l in f.match){f.match[l]=new RegExp(f.match[l].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var a=function(r,e){r=Array.prototype.slice.call(r);if(e){e.push.apply(e,r);return e}return r};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(k){a=function(u,t){var r=t||[];if(d.call(u)==="[object Array]"){Array.prototype.push.apply(r,u)}else{if(typeof u.length==="number"){for(var s=0,e=u.length;s";var e=document.documentElement;e.insertBefore(r,e.firstChild);if(!!document.getElementById(s)){f.find.ID=function(u,v,x){if(typeof v.getElementById!=="undefined"&&!x){var t=v.getElementById(u[1]);return t?t.id===u[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===u[1]?[t]:undefined:[]}};f.filter.ID=function(v,t){var u=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");return v.nodeType===1&&u&&u.nodeValue===t}}e.removeChild(r)})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){f.find.TAG=function(r,v){var u=v.getElementsByTagName(r[1]);if(r[1]==="*"){var t=[];for(var s=0;u[s];s++){if(u[s].nodeType===1){t.push(u[s])}}u=t}return u}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){f.attrHandle.href=function(r){return r.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var e=b,s=document.createElement("div");s.innerHTML="

    ";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}b=function(x,v,t,u){v=v||document;if(!u&&v.nodeType===9&&!o(v)){try{return a(v.querySelectorAll(x),t)}catch(y){}}return e(x,v,t,u)};for(var r in e){b[r]=e[r]}})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var e=document.createElement("div");e.innerHTML="
    ";if(e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}f.order.splice(1,0,"CLASS");f.find.CLASS=function(r,s,t){if(typeof s.getElementsByClassName!=="undefined"&&!t){return s.getElementsByClassName(r[1])}}})()}function m(r,x,v,B,y,A){var z=r=="previousSibling"&&!A;for(var t=0,s=B.length;t0){u=e;break}}}e=e[r]}B[t]=u}}}var h=document.compareDocumentPosition?function(r,e){return r.compareDocumentPosition(e)&16}:function(r,e){return r!==e&&(r.contains?r.contains(e):true)};var o=function(e){return e.nodeType===9&&e.documentElement.nodeName!=="HTML"||!!e.ownerDocument&&e.ownerDocument.documentElement.nodeName!=="HTML"};var g=function(e,y){var t=[],u="",v,s=y.nodeType?[y]:y;while((v=f.match.PSEUDO.exec(e))){u+=v[0];e=e.replace(f.match.PSEUDO,"")}e=f.relative[e]?e+"*":e;for(var x=0,r=s.length;x=0;h--){k=g[h];if(k.obj===l){j._remove(k.obj,k.name,k.cfunc);k.obj=k.cfunc=null;g.splice(h,1)}}}},cancel:function(g){if(!g){return false}this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}return false},prevent:function(g){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}return false},destroy:function(){var g=this;f(g.events,function(j,h){g._remove(j.obj,j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(h,i,g){if(h.attachEvent){h.attachEvent("on"+i,g)}else{if(h.addEventListener){h.addEventListener(i,g,false)}else{h["on"+i]=g}}},_remove:function(i,j,h){if(i){try{if(i.detachEvent){i.detachEvent("on"+j,h)}else{if(i.removeEventListener){i.removeEventListener(j,h,false)}else{i["on"+j]=null}}}catch(g){}}},_pageInit:function(h){var g=this;if(g.domLoaded){return}g.domLoaded=true;f(g.inits,function(i){i()});g.inits=[]},_wait:function(i){var g=this,h=i.document;if(i.tinyMCE_GZ&&tinyMCE_GZ.loaded){g.domLoaded=1;return}if(h.attachEvent){h.attachEvent("onreadystatechange",function(){if(h.readyState==="complete"){h.detachEvent("onreadystatechange",arguments.callee);g._pageInit(i)}});if(h.documentElement.doScroll&&i==i.top){(function(){if(g.domLoaded){return}try{h.documentElement.doScroll("left")}catch(j){setTimeout(arguments.callee,0);return}g._pageInit(i)})()}}else{if(h.addEventListener){g._add(i,"DOMContentLoaded",function(){g._pageInit(i)})}}g._add(i,"load",function(){g._pageInit(i)})},_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});a=d.dom.Event=new d.dom.EventUtils();a._wait(window);d.addUnload(function(){a.destroy()})})(tinymce);(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j_';if(j.startContainer==k&&j.endContainer==k){k.body.innerHTML=i}else{j.deleteContents();j.insertNode(j.createContextualFragment(i))}l=f.dom.get("__caret");j=k.createRange();j.setStartBefore(l);j.setEndBefore(l);f.setRng(j);f.dom.remove("__caret")}else{if(j.item){k.execCommand("Delete",false,null);j=f.getRng()}j.pasteHTML(i)}f.onSetContent.dispatch(f,g)},getStart:function(){var f=this,g=f.getRng(),h;if(g.duplicate||g.item){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(1);h=g.parentElement();if(h&&h.nodeName=="BODY"){return h.firstChild||h}return h}else{h=g.startContainer;if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[Math.min(h.childNodes.length-1,g.startOffset)]}if(h&&h.nodeType==3){return h.parentNode}return h}},getEnd:function(){var g=this,h=g.getRng(),i,f;if(h.duplicate||h.item){if(h.item){return h.item(0)}h=h.duplicate();h.collapse(0);i=h.parentElement();if(i&&i.nodeName=="BODY"){return i.lastChild||i}return i}else{i=h.endContainer;f=h.endOffset;if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[f>0?f-1:f]}if(i&&i.nodeType==3){return i.parentNode}return i}},getBookmark:function(q,r){var u=this,m=u.dom,g,j,i,n,h,o,p,l="\uFEFF",s;function f(v,x){var t=0;d(m.select(v),function(z,y){if(z==x){t=y}});return t}if(q==2){function k(){var v=u.getRng(true),t=m.getRoot(),x={};function y(B,G){var A=B[G?"startContainer":"endContainer"],F=B[G?"startOffset":"endOffset"],z=[],C,E,D=0;if(A.nodeType==3){if(r){for(C=A.previousSibling;C&&C.nodeType==3;C=C.previousSibling){F+=C.nodeValue.length}}z.push(F)}else{E=A.childNodes;if(F>=E.length&&E.length){D=1;F=Math.max(0,E.length-1)}z.push(u.dom.nodeIndex(E[F],r)+D)}for(;A&&A!=t;A=A.parentNode){z.push(u.dom.nodeIndex(A,r))}return z}x.start=y(v,true);if(!u.isCollapsed()){x.end=y(v)}return x}return k()}if(q){return{rng:u.getRng()}}g=u.getRng();i=m.uniqueId();n=tinyMCE.activeEditor.selection.isCollapsed();s="overflow:hidden;line-height:0px";if(g.duplicate||g.item){if(!g.item){j=g.duplicate();g.collapse();g.pasteHTML(''+l+"");if(!n){j.collapse(false);j.pasteHTML(''+l+"")}}else{o=g.item(0);h=o.nodeName;return{name:h,index:f(h,o)}}}else{o=u.getNode();h=o.nodeName;if(h=="IMG"){return{name:h,index:f(h,o)}}j=g.cloneRange();if(!n){j.collapse(false);j.insertNode(m.create("span",{_mce_type:"bookmark",id:i+"_end",style:s},l))}g.collapse(true);g.insertNode(m.create("span",{_mce_type:"bookmark",id:i+"_start",style:s},l))}u.moveToBookmark({id:i,keep:1});return{id:i}},moveToBookmark:function(m){var q=this,l=q.dom,i,h,f,p,j,r,n,o;if(q.tridentSel){q.tridentSel.destroy()}if(m){if(m.start){f=l.createRng();p=l.getRoot();function g(x){var s=m[x?"start":"end"],t,u,v;if(s){for(u=p,t=s.length-1;t>=1;t--){u=u.childNodes[s[t]]}if(x){f.setStart(u,s[0])}else{f.setEnd(u,s[0])}}}g(true);g();q.setRng(f)}else{if(m.id){function k(z){var t=l.get(m.id+"_"+z),y,s,v,x,u=m.keep;if(t){y=t.parentNode;if(z=="start"){if(!u){s=l.nodeIndex(t)}else{y=t;s=1}j=r=y;n=o=s}else{if(!u){s=l.nodeIndex(t)}else{y=t;s=1}r=y;o=s}if(!u){x=t.previousSibling;v=t.nextSibling;d(c.grep(t.childNodes),function(A){if(A.nodeType==3){A.nodeValue=A.nodeValue.replace(/\uFEFF/g,"")}});while(t=l.get(m.id+"_"+z)){l.remove(t,1)}if(x&&v&&x.nodeType==v.nodeType&&x.nodeType==3){s=x.nodeValue.length;x.appendData(v.nodeValue);l.remove(v);if(z=="start"){j=r=x;n=o=s}else{r=x;o=s}}}}}k("start");k("end");f=l.createRng();f.setStart(j,n);f.setEnd(r,o);q.setRng(f)}else{if(m.name){q.select(l.select(m.name)[m.index])}else{if(m.rng){q.setRng(m.rng)}}}}}},select:function(k,j){var i=this,l=i.dom,g=l.createRng(),f;f=l.nodeIndex(k);g.setStart(k.parentNode,f);g.setEnd(k.parentNode,f+1);if(j){function h(m,o){var n=new c.dom.TreeWalker(m,m);do{if(m.nodeType==3&&c.trim(m.nodeValue).length!=0){if(o){g.setStart(m,0)}else{g.setEnd(m,m.nodeValue.length)}return}if(m.nodeName=="BR"){if(o){g.setStartBefore(m)}else{g.setEndBefore(m)}return}}while(m=(o?n.next():n.prev()))}h(k,1);h(k)}i.setRng(g);return k},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();if(!h||h.item){return false}if(h.compareEndPoints){return h.compareEndPoints("StartToEnd",h)===0}return !g||h.collapsed},collapse:function(f){var g=this,h=g.getRng(),i;if(h.item){i=h.item(0);h=this.win.document.body.createTextRange();h.moveToElementText(i)}h.collapse(!!f);g.setRng(h)},getSel:function(){var g=this,f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(j){var g=this,h,i;if(j&&g.tridentSel){return g.tridentSel.getRangeAt(0)}try{if(h=g.getSel()){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():g.win.document.createRange())}}catch(f){}if(!i){i=g.win.document.createRange?g.win.document.createRange():g.win.document.body.createTextRange()}return i},setRng:function(i){var h,g=this;if(!g.tridentSel){h=g.getSel();if(h){h.removeAllRanges();h.addRange(i)}}else{if(i.cloneRange){g.tridentSel.addRange(i);return}try{i.select()}catch(f){}}},setNode:function(g){var f=this;f.setContent(f.dom.getOuterHTML(g));return g},getNode:function(){var g=this,f=g.getRng(),h=g.getSel(),i;if(f.setStart){if(!f){return g.dom.getRoot()}i=f.commonAncestorContainer;if(!f.collapsed){if(f.startContainer==f.endContainer){if(f.startOffset-f.endOffset<2){if(f.startContainer.hasChildNodes()){i=f.startContainer.childNodes[f.startOffset]}}}if(c.isWebKit&&h.anchorNode&&h.anchorNode.nodeType==1){return h.anchorNode.childNodes[h.anchorOffset]}}if(i&&i.nodeType==3){return i.parentNode}return i}return f.item?f.item(0):f.parentElement()},getSelectedBlocks:function(g,f){var i=this,j=i.dom,m,h,l,k=[];m=j.getParent(g||i.getStart(),j.isBlock);h=j.getParent(f||i.getEnd(),j.isBlock);if(m){k.push(m)}if(m&&h&&m!=h){l=m;while((l=l.nextSibling)&&l!=h){if(j.isBlock(l)){k.push(l)}}}if(h&&m!=h){k.push(h)}return k},destroy:function(g){var f=this;f.win=null;if(f.tridentSel){f.tridentSel.destroy()}if(!g){c.removeUnload(f.destroy)}}})})(tinymce);(function(a){a.create("tinymce.dom.XMLWriter",{node:null,XMLWriter:function(c){function b(){var e=document.implementation;if(!e||!e.createDocument){try{return new ActiveXObject("MSXML2.DOMDocument")}catch(d){}try{return new ActiveXObject("Microsoft.XmlDom")}catch(d){}}else{return e.createDocument("","",null)}}this.doc=b();this.valid=a.isOpera||a.isWebKit;this.reset()},reset:function(){var b=this,c=b.doc;if(c.firstChild){c.removeChild(c.firstChild)}b.node=c.appendChild(c.createElement("html"))},writeStartElement:function(c){var b=this;b.node=b.node.appendChild(b.doc.createElement(c))},writeAttribute:function(c,b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.setAttribute(c,b)},writeEndElement:function(){this.node=this.node.parentNode},writeFullEndElement:function(){var b=this,c=b.node;c.appendChild(b.doc.createTextNode(""));b.node=c.parentNode},writeText:function(b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.appendChild(this.doc.createTextNode(b))},writeCDATA:function(b){this.node.appendChild(this.doc.createCDATASection(b))},writeComment:function(b){if(a.isIE){b=b.replace(/^\-|\-$/g," ")}this.node.appendChild(this.doc.createComment(b.replace(/\-\-/g," ")))},getContent:function(){var b;b=this.doc.xml||new XMLSerializer().serializeToString(this.doc);b=b.replace(/<\?[^?]+\?>||<\/html>||]+>/g,"");b=b.replace(/ ?\/>/g," />");if(this.valid){b=b.replace(/\%MCGT%/g,">")}return b}})})(tinymce);(function(a){a.create("tinymce.dom.StringWriter",{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(b){this.settings=a.extend({indent_char:" ",indentation:0},b);this.reset()},reset:function(){this.indent="";this.str="";this.tags=[];this.count=0},writeStartElement:function(b){this._writeAttributesEnd();this.writeRaw("<"+b);this.tags.push(b);this.inAttr=true;this.count++;this.elementCount=this.count},writeAttribute:function(d,b){var c=this;c.writeRaw(" "+c.encode(d)+'="'+c.encode(b)+'"')},writeEndElement:function(){var b;if(this.tags.length>0){b=this.tags.pop();if(this._writeAttributesEnd(1)){this.writeRaw("")}if(this.settings.indentation>0){this.writeRaw("\n")}}},writeFullEndElement:function(){if(this.tags.length>0){this._writeAttributesEnd();this.writeRaw("");if(this.settings.indentation>0){this.writeRaw("\n")}}},writeText:function(b){this._writeAttributesEnd();this.writeRaw(this.encode(b));this.count++},writeCDATA:function(b){this._writeAttributesEnd();this.writeRaw("");this.count++},writeComment:function(b){this._writeAttributesEnd();this.writeRaw("");this.count++},writeRaw:function(b){this.str+=b},encode:function(b){return b.replace(/[<>&"]/g,function(c){switch(c){case"<":return"<";case">":return">";case"&":return"&";case'"':return"""}return c})},getContent:function(){return this.str},_writeAttributesEnd:function(b){if(!this.inAttr){return}this.inAttr=false;if(b&&this.elementCount==this.count){this.writeRaw(" />");return false}this.writeRaw(">");return true}})})(tinymce);(function(e){var g=e.extend,f=e.each,b=e.util.Dispatcher,d=e.isIE,a=e.isGecko;function c(h){return h.replace(/([?+*])/g,".$1")}e.create("tinymce.dom.Serializer",{Serializer:function(j){var i=this;i.key=0;i.onPreProcess=new b(i);i.onPostProcess=new b(i);try{i.writer=new e.dom.XMLWriter()}catch(h){i.writer=new e.dom.StringWriter()}i.settings=j=g({dom:e.DOM,valid_nodes:0,node_filter:0,attr_filter:0,invalid_attrs:/^(_mce_|_moz_|sizset|sizcache)/,closed:/^(br|hr|input|meta|img|link|param|area)$/,entity_encoding:"named",entities:"160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro",valid_elements:"*[*]",extended_valid_elements:0,invalid_elements:0,fix_table_elements:1,fix_list_elements:true,fix_content_duplication:true,convert_fonts_to_spans:false,font_size_classes:0,apply_source_formatting:0,indent_mode:"simple",indent_char:"\t",indent_levels:1,remove_linebreaks:1,remove_redundant_brs:1,element_format:"xhtml"},j);i.dom=j.dom;i.schema=j.schema;if(j.entity_encoding=="named"&&!j.entities){j.entity_encoding="raw"}if(j.remove_redundant_brs){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/(
    \s*)+<\/(p|h[1-6]|div|li)>/gi,function(n,m,o){if(/^
    \s*<\//.test(n)){return""}return n})})}if(j.element_format=="html"){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/<([^>]+) \/>/g,"<$1>")})}if(j.fix_list_elements){i.onPreProcess.add(function(v,s){var l,z,y=["ol","ul"],u,t,q,k=/^(OL|UL)$/,A;function m(r,x){var o=x.split(","),p;while((r=r.previousSibling)!=null){for(p=0;p=1767){f(i.dom.select("p table",l.node).reverse(),function(p){var o=i.dom.getParent(p.parentNode,"table,p");if(o.nodeName!="TABLE"){try{i.dom.split(o,p)}catch(m){}}})}})}},setEntities:function(o){var n=this,j,m,h={},k;if(n.entityLookup){return}j=o.split(",");for(m=0;m1){f(q[1].split("|"),function(u){var p={},t;k=k||[];u=u.replace(/::/g,"~");u=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(u);u[2]=u[2].replace(/~/g,":");if(u[1]=="!"){r=r||[];r.push(u[2])}if(u[1]=="-"){for(t=0;t=1767)){p=j.createHTMLDocument("");f(r.nodeName=="BODY"?r.childNodes:[r],function(h){p.body.appendChild(p.importNode(h,true))});if(r.nodeName!="BODY"){r=p.body.firstChild}else{r=p.body}i=k.dom.doc;k.dom.doc=p}k.key=""+(parseInt(k.key)+1);if(!q.no_events){q.node=r;k.onPreProcess.dispatch(k,q)}k.writer.reset();k._info=q;k._serializeNode(r,q.getInner);q.content=k.writer.getContent();if(i){k.dom.doc=i}if(!q.no_events){k.onPostProcess.dispatch(k,q)}k._postProcess(q);q.node=null;return e.trim(q.content)},_postProcess:function(n){var i=this,k=i.settings,j=n.content,m=[],l;if(n.format=="html"){l=i._protect({content:j,patterns:[{pattern:/(]*>)(.*?)(<\/script>)/g},{pattern:/(]*>)(.*?)(<\/noscript>)/g},{pattern:/(]*>)(.*?)(<\/style>)/g},{pattern:/(]*>)(.*?)(<\/pre>)/g,encode:1},{pattern:/()/g}]});j=l.content;if(k.entity_encoding!=="raw"){j=i._encode(j)}if(!n.set){j=j.replace(/

    \s+<\/p>|]+)>\s+<\/p>/g,k.entity_encoding=="numeric"?" 

    ":" 

    ");if(k.remove_linebreaks){j=j.replace(/\r?\n|\r/g," ");j=j.replace(/(<[^>]+>)\s+/g,"$1 ");j=j.replace(/\s+(<\/[^>]+>)/g," $1");j=j.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object) ([^>]+)>\s+/g,"<$1 $2>");j=j.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>\s+/g,"<$1>");j=j.replace(/\s+<\/(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>/g,"")}if(k.apply_source_formatting&&k.indent_mode=="simple"){j=j.replace(/<(\/?)(ul|hr|table|meta|link|tbody|tr|object|body|head|html|map)(|[^>]+)>\s*/g,"\n<$1$2$3>\n");j=j.replace(/\s*<(p|h[1-6]|blockquote|div|title|style|pre|script|td|li|area)(|[^>]+)>/g,"\n<$1$2>");j=j.replace(/<\/(p|h[1-6]|blockquote|div|title|style|pre|script|td|li)>\s*/g,"\n");j=j.replace(/\n\n/g,"\n")}}j=i._unprotect(j,l);j=j.replace(//g,"");if(k.entity_encoding=="raw"){j=j.replace(/

     <\/p>|]+)> <\/p>/g,"\u00a0

    ")}j=j.replace(/]+|)>([\s\S]*?)<\/noscript>/g,function(h,p,o){return""+i.dom.decode(o.replace(//g,""))+""})}n.content=j},_serializeNode:function(D,I){var z=this,A=z.settings,x=z.writer,q,j,u,F,E,H,B,h,y,k,r,C,p,m,G,o;if(!A.node_filter||A.node_filter(D)){switch(D.nodeType){case 1:if(D.hasAttribute?D.hasAttribute("_mce_bogus"):D.getAttribute("_mce_bogus")){return}p=G=false;q=D.hasChildNodes();k=D.getAttribute("_mce_name")||D.nodeName.toLowerCase();o=D.getAttribute("_mce_type");if(o){if(!z._info.cleanup){p=true;return}else{G=1}}if(d){if(D.scopeName!=="HTML"&&D.scopeName!=="html"){k=D.scopeName+":"+k}}if(k.indexOf("mce:")===0){k=k.substring(4)}if(!G){if(!z.validElementsRE||!z.validElementsRE.test(k)||(z.invalidElementsRE&&z.invalidElementsRE.test(k))||I){p=true;break}}if(d){if(A.fix_content_duplication){if(D._mce_serialized==z.key){return}D._mce_serialized=z.key}if(k.charAt(0)=="/"){k=k.substring(1)}}else{if(a){if(D.nodeName==="BR"&&D.getAttribute("type")=="_moz"){return}}}if(A.validate_children){if(z.elementName&&!z.schema.isValid(z.elementName,k)){p=true;break}z.elementName=k}r=z.findRule(k);if(!r){p=true;break}k=r.name||k;m=A.closed.test(k);if((!q&&r.noEmpty)||(d&&!k)){p=true;break}if(r.requiredAttribs){H=r.requiredAttribs;for(F=H.length-1;F>=0;F--){if(this.dom.getAttrib(D,H[F])!==""){break}}if(F==-1){p=true;break}}x.writeStartElement(k);if(r.attribs){for(F=0,B=r.attribs,E=B.length;F-1;F--){h=B[F];if(h.specified){H=h.nodeName.toLowerCase();if(A.invalid_attrs.test(H)||!r.validAttribsRE.test(H)){continue}C=z.findAttribRule(r,H);y=z._getAttrib(D,C,H);if(y!==null){x.writeAttribute(H,y)}}}}if(o&&G){x.writeAttribute("_mce_type",o)}if(k==="script"&&e.trim(D.innerHTML)){x.writeText("// ");x.writeCDATA(D.innerHTML.replace(/|<\[CDATA\[|\]\]>/g,""));q=false;break}if(r.padd){if(q&&(u=D.firstChild)&&u.nodeType===1&&D.childNodes.length===1){if(u.hasAttribute?u.hasAttribute("_mce_bogus"):u.getAttribute("_mce_bogus")){x.writeText("\u00a0")}}else{if(!q){x.writeText("\u00a0")}}}break;case 3:if(A.validate_children&&z.elementName&&!z.schema.isValid(z.elementName,"#text")){return}return x.writeText(D.nodeValue);case 4:return x.writeCDATA(D.nodeValue);case 8:return x.writeComment(D.nodeValue)}}else{if(D.nodeType==1){q=D.hasChildNodes()}}if(q&&!m){u=D.firstChild;while(u){z._serializeNode(u);z.elementName=k;u=u.nextSibling}}if(!p){if(!m){x.writeFullEndElement()}else{x.writeEndElement()}}},_protect:function(j){var i=this;j.items=j.items||[];function h(l){return l.replace(/[\r\n\\]/g,function(m){if(m==="\n"){return"\\n"}else{if(m==="\\"){return"\\\\"}}return"\\r"})}function k(l){return l.replace(/\\[\\rn]/g,function(m){if(m==="\\n"){return"\n"}else{if(m==="\\\\"){return"\\"}}return"\r"})}f(j.patterns,function(l){j.content=k(h(j.content).replace(l.pattern,function(n,o,m,p){m=k(m);if(l.encode){m=i._encode(m)}j.items.push(m);return o+""+p}))});return j},_unprotect:function(i,j){i=i.replace(/\"))}if(a&&j.ListBox){if(a.Button||a.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarEnd"},b.createHTML("span",null,""))}}if(b.stdMode){e+=''+j.renderHTML()+""}else{e+=""+j.renderHTML()+""}if(f&&j.ListBox){if(f.Button||f.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarStart"},b.createHTML("span",null,""))}}}g="mceToolbarEnd";if(j.Button){g+=" mceToolbarEndButton"}else{if(j.SplitButton){g+=" mceToolbarEndSplitButton"}else{if(j.ListBox){g+=" mceToolbarEndListBox"}}}e+=b.createHTML("td",{"class":g},b.createHTML("span",null,""));return b.createHTML("table",{id:l.id,"class":"mceToolbar"+(m["class"]?" "+m["class"]:""),cellpadding:"0",cellspacing:"0",align:l.settings.align||""},""+e+"")}});(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{items:[],urls:{},lookup:{},onAdd:new a(this),get:function(d){return this.lookup[d]},requireLangPack:function(e){var d=b.settings;if(d&&d.language){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(e,d){this.items.push(d);this.lookup[e]=d;this.onAdd.dispatch(this,e,d);return d},load:function(h,e,d,g){var f=this;if(f.urls[h]){return}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}f.urls[h]=e.substring(0,e.lastIndexOf("/"));b.ScriptLoader.add(e,d,g)}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(q){var n=this,p,l=j.ScriptLoader,u,o=[],m;function r(x,y,t){var v=x[y];if(!v){return}if(j.is(v,"string")){t=v.replace(/\.\w+$/,"");t=t?j.resolve(t):0;v=j.resolve(v)}return v.apply(t||this,Array.prototype.slice.call(arguments,2))}q=d({theme:"simple",language:"en"},q);n.settings=q;i.add(document,"init",function(){var s,v;r(q,"onpageload");switch(q.mode){case"exact":s=q.elements||"";if(s.length>0){g(e(s),function(x){if(k.get(x)){m=new j.Editor(x,q);o.push(m);m.render(1)}else{g(document.forms,function(y){g(y.elements,function(z){if(z.name===x){x="mce_editor_"+c++;k.setAttrib(z,"id",x);m=new j.Editor(x,q);o.push(m);m.render(1)}})})}})}break;case"textareas":case"specific_textareas":function t(y,x){return x.constructor===RegExp?x.test(y.className):k.hasClass(y,x)}g(k.select("textarea"),function(x){if(q.editor_deselector&&t(x,q.editor_deselector)){return}if(!q.editor_selector||t(x,q.editor_selector)){u=k.get(x.name);if(!x.id&&!u){x.id=x.name}if(!x.id||n.get(x.id)){x.id=k.uniqueId()}m=new j.Editor(x.id,q);o.push(m);m.render(1)}});break}if(q.oninit){s=v=0;g(o,function(x){v++;if(!x.initialized){x.onInit.add(function(){s++;if(s==v){r(q,"oninit")}})}else{s++}if(s==v){r(q,"oninit")}})}})},get:function(l){if(l===a){return this.editors}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l':"",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",valid_elements:"@[id|class|style|title|dir';if(F.document_base_url!=m.documentBaseURL){E.iframeHTML+=''}E.iframeHTML+='';if(m.relaxedDomain){E.iframeHTML+=''; + + bi = s.body_id || 'tinymce'; + if (bi.indexOf('=') != -1) { + bi = t.getParam('body_id', '', 'hash'); + bi = bi[t.id] || bi; + } + + bc = s.body_class || ''; + if (bc.indexOf('=') != -1) { + bc = t.getParam('body_class', '', 'hash'); + bc = bc[t.id] || ''; + } + + t.iframeHTML += ''; + + // Domain relaxing enabled, then set document domain + if (tinymce.relaxedDomain) { + // We need to write the contents here in IE since multiple writes messes up refresh button and back button + if (isIE || (tinymce.isOpera && parseFloat(opera.version()) >= 9.5)) + u = 'javascript:(function(){document.open();document.domain="' + document.domain + '";var ed = window.parent.tinyMCE.get("' + t.id + '");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'; + else if (tinymce.isOpera) + u = 'javascript:(function(){document.open();document.domain="' + document.domain + '";document.close();ed.setupIframe();})()'; + } + + // Create iframe + n = DOM.add(o.iframeContainer, 'iframe', { + id : t.id + "_ifr", + src : u || 'javascript:""', // Workaround for HTTPS warning in IE6/7 + frameBorder : '0', + style : { + width : '100%', + height : h + } + }); + + t.contentAreaContainer = o.iframeContainer; + DOM.get(o.editorContainer).style.display = t.orgDisplay; + DOM.get(t.id).style.display = 'none'; + + if (!isIE || !tinymce.relaxedDomain) + t.setupIframe(); + + e = n = o = null; // Cleanup + }, + + setupIframe : function() { + var t = this, s = t.settings, e = DOM.get(t.id), d = t.getDoc(), h, b; + + // Setup iframe body + if (!isIE || !tinymce.relaxedDomain) { + d.open(); + d.write(t.iframeHTML); + d.close(); + } + + // Design mode needs to be added here Ctrl+A will fail otherwise + if (!isIE) { + try { + if (!s.readonly) + d.designMode = 'On'; + } catch (ex) { + // Will fail on Gecko if the editor is placed in an hidden container element + // The design mode will be set ones the editor is focused + } + } + + // IE needs to use contentEditable or it will display non secure items for HTTPS + if (isIE) { + // It will not steal focus if we hide it while setting contentEditable + b = t.getBody(); + DOM.hide(b); + + if (!s.readonly) + b.contentEditable = true; + + DOM.show(b); + } + + t.dom = new tinymce.dom.DOMUtils(t.getDoc(), { + keep_values : true, + url_converter : t.convertURL, + url_converter_scope : t, + hex_colors : s.force_hex_style_colors, + class_filter : s.class_filter, + update_styles : 1, + fix_ie_paragraphs : 1, + valid_styles : s.valid_styles + }); + + t.schema = new tinymce.dom.Schema(); + + t.serializer = new tinymce.dom.Serializer(extend(s, { + valid_elements : s.verify_html === false ? '*[*]' : s.valid_elements, + dom : t.dom, + schema : t.schema + })); + + t.selection = new tinymce.dom.Selection(t.dom, t.getWin(), t.serializer); + + t.formatter = new tinymce.Formatter(this); + + // Register default formats + t.formatter.register({ + alignleft : [ + {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'left'}}, + {selector : 'img,table', styles : {'float' : 'left'}} + ], + + aligncenter : [ + {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'center'}}, + {selector : 'img', styles : {display : 'block', marginLeft : 'auto', marginRight : 'auto'}}, + {selector : 'table', styles : {marginLeft : 'auto', marginRight : 'auto'}} + ], + + alignright : [ + {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'right'}}, + {selector : 'img,table', styles : {'float' : 'right'}} + ], + + alignfull : [ + {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'justify'}} + ], + + bold : [ + {inline : 'strong'}, + {inline : 'span', styles : {fontWeight : 'bold'}}, + {inline : 'b'} + ], + + italic : [ + {inline : 'em'}, + {inline : 'span', styles : {fontStyle : 'italic'}}, + {inline : 'i'} + ], + + underline : [ + {inline : 'span', styles : {textDecoration : 'underline'}, exact : true}, + {inline : 'u'} + ], + + strikethrough : [ + {inline : 'span', styles : {textDecoration : 'line-through'}, exact : true}, + {inline : 'u'} + ], + + forecolor : {inline : 'span', styles : {color : '%value'}}, + hilitecolor : {inline : 'span', styles : {backgroundColor : '%value'}}, + fontname : {inline : 'span', styles : {fontFamily : '%value'}}, + fontsize : {inline : 'span', styles : {fontSize : '%value'}}, + fontsize_class : {inline : 'span', attributes : {'class' : '%value'}}, + blockquote : {block : 'blockquote', wrapper : 1, remove : 'all'}, + + removeformat : [ + {selector : 'b,strong,em,i,font,u,strike', remove : 'all', split : true, expand : false, block_expand : true, deep : true}, + {selector : 'span', attributes : ['style', 'class'], remove : 'empty', split : true, expand : false, deep : true}, + {selector : '*', attributes : ['style', 'class'], split : false, expand : false, deep : true} + ] + }); + + // Register default block formats + each('p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp'.split(/\s/), function(name) { + t.formatter.register(name, {block : name, remove : 'all'}); + }); + + // Register user defined formats + t.formatter.register(t.settings.formats); + + t.undoManager = new tinymce.UndoManager(t); + + // Pass through + t.undoManager.onAdd.add(function(um, l) { + if (!l.initial) + return t.onChange.dispatch(t, l, um); + }); + + t.undoManager.onUndo.add(function(um, l) { + return t.onUndo.dispatch(t, l, um); + }); + + t.undoManager.onRedo.add(function(um, l) { + return t.onRedo.dispatch(t, l, um); + }); + + t.forceBlocks = new tinymce.ForceBlocks(t, { + forced_root_block : s.forced_root_block + }); + + t.editorCommands = new tinymce.EditorCommands(t); + + // Pass through + t.serializer.onPreProcess.add(function(se, o) { + return t.onPreProcess.dispatch(t, o, se); + }); + + t.serializer.onPostProcess.add(function(se, o) { + return t.onPostProcess.dispatch(t, o, se); + }); + + t.onPreInit.dispatch(t); + + if (!s.gecko_spellcheck) + t.getBody().spellcheck = 0; + + if (!s.readonly) + t._addEvents(); + + t.controlManager.onPostRender.dispatch(t, t.controlManager); + t.onPostRender.dispatch(t); + + if (s.directionality) + t.getBody().dir = s.directionality; + + if (s.nowrap) + t.getBody().style.whiteSpace = "nowrap"; + + if (s.custom_elements) { + function handleCustom(ed, o) { + each(explode(s.custom_elements), function(v) { + var n; + + if (v.indexOf('~') === 0) { + v = v.substring(1); + n = 'span'; + } else + n = 'div'; + + o.content = o.content.replace(new RegExp('<(' + v + ')([^>]*)>', 'g'), '<' + n + ' _mce_name="$1"$2>'); + o.content = o.content.replace(new RegExp('', 'g'), ''); + }); + }; + + t.onBeforeSetContent.add(handleCustom); + t.onPostProcess.add(function(ed, o) { + if (o.set) + handleCustom(ed, o); + }); + } + + if (s.handle_node_change_callback) { + t.onNodeChange.add(function(ed, cm, n) { + t.execCallback('handle_node_change_callback', t.id, n, -1, -1, true, t.selection.isCollapsed()); + }); + } + + if (s.save_callback) { + t.onSaveContent.add(function(ed, o) { + var h = t.execCallback('save_callback', t.id, o.content, t.getBody()); + + if (h) + o.content = h; + }); + } + + if (s.onchange_callback) { + t.onChange.add(function(ed, l) { + t.execCallback('onchange_callback', t, l); + }); + } + + if (s.convert_newlines_to_brs) { + t.onBeforeSetContent.add(function(ed, o) { + if (o.initial) + o.content = o.content.replace(/\r?\n/g, '
    '); + }); + } + + if (s.fix_nesting && isIE) { + t.onBeforeSetContent.add(function(ed, o) { + o.content = t._fixNesting(o.content); + }); + } + + if (s.preformatted) { + t.onPostProcess.add(function(ed, o) { + o.content = o.content.replace(/^\s*/, ''); + o.content = o.content.replace(/<\/pre>\s*$/, ''); + + if (o.set) + o.content = '
    ' + o.content + '
    '; + }); + } + + if (s.verify_css_classes) { + t.serializer.attribValueFilter = function(n, v) { + var s, cl; + + if (n == 'class') { + // Build regexp for classes + if (!t.classesRE) { + cl = t.dom.getClasses(); + + if (cl.length > 0) { + s = ''; + + each (cl, function(o) { + s += (s ? '|' : '') + o['class']; + }); + + t.classesRE = new RegExp('(' + s + ')', 'gi'); + } + } + + return !t.classesRE || /(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(v) || t.classesRE.test(v) ? v : ''; + } + + return v; + }; + } + + if (s.cleanup_callback) { + t.onBeforeSetContent.add(function(ed, o) { + o.content = t.execCallback('cleanup_callback', 'insert_to_editor', o.content, o); + }); + + t.onPreProcess.add(function(ed, o) { + if (o.set) + t.execCallback('cleanup_callback', 'insert_to_editor_dom', o.node, o); + + if (o.get) + t.execCallback('cleanup_callback', 'get_from_editor_dom', o.node, o); + }); + + t.onPostProcess.add(function(ed, o) { + if (o.set) + o.content = t.execCallback('cleanup_callback', 'insert_to_editor', o.content, o); + + if (o.get) + o.content = t.execCallback('cleanup_callback', 'get_from_editor', o.content, o); + }); + } + + if (s.save_callback) { + t.onGetContent.add(function(ed, o) { + if (o.save) + o.content = t.execCallback('save_callback', t.id, o.content, t.getBody()); + }); + } + + if (s.handle_event_callback) { + t.onEvent.add(function(ed, e, o) { + if (t.execCallback('handle_event_callback', e, ed, o) === false) + Event.cancel(e); + }); + } + + // Add visual aids when new contents is added + t.onSetContent.add(function() { + t.addVisual(t.getBody()); + }); + + // Remove empty contents + if (s.padd_empty_editor) { + t.onPostProcess.add(function(ed, o) { + o.content = o.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
    [\r\n]*)$/, ''); + }); + } + + if (isGecko) { + // Fix gecko link bug, when a link is placed at the end of block elements there is + // no way to move the caret behind the link. This fix adds a bogus br element after the link + function fixLinks(ed, o) { + each(ed.dom.select('a'), function(n) { + var pn = n.parentNode; + + if (ed.dom.isBlock(pn) && pn.lastChild === n) + ed.dom.add(pn, 'br', {'_mce_bogus' : 1}); + }); + }; + + t.onExecCommand.add(function(ed, cmd) { + if (cmd === 'CreateLink') + fixLinks(ed); + }); + + t.onSetContent.add(t.selection.onSetContent.add(fixLinks)); + + if (!s.readonly) { + try { + // Design mode must be set here once again to fix a bug where + // Ctrl+A/Delete/Backspace didn't work if the editor was added using mceAddControl then removed then added again + d.designMode = 'Off'; + d.designMode = 'On'; + } catch (ex) { + // Will fail on Gecko if the editor is placed in an hidden container element + // The design mode will be set ones the editor is focused + } + } + } + + // A small timeout was needed since firefox will remove. Bug: #1838304 + setTimeout(function () { + if (t.removed) + return; + + t.load({initial : true, format : (s.cleanup_on_startup ? 'html' : 'raw')}); + t.startContent = t.getContent({format : 'raw'}); + t.initialized = true; + + t.onInit.dispatch(t); + t.execCallback('setupcontent_callback', t.id, t.getBody(), t.getDoc()); + t.execCallback('init_instance_callback', t); + t.focus(true); + t.nodeChanged({initial : 1}); + + // Load specified content CSS last + if (s.content_css) { + tinymce.each(explode(s.content_css), function(u) { + t.dom.loadCSS(t.documentBaseURI.toAbsolute(u)); + }); + } + + // Handle auto focus + if (s.auto_focus) { + setTimeout(function () { + var ed = tinymce.get(s.auto_focus); + + ed.selection.select(ed.getBody(), 1); + ed.selection.collapse(1); + ed.getWin().focus(); + }, 100); + } + }, 1); + + e = null; + }, + + + focus : function(sf) { + var oed, t = this, ce = t.settings.content_editable, ieRng, controlElm; + + if (!sf) { + // Get selected control element + ieRng = t.selection.getRng(); + if (ieRng.item) { + controlElm = ieRng.item(0); + } + + // Is not content editable + if (!ce) + t.getWin().focus(); + + // Restore selected control element + // This is needed when for example an image is selected within a + // layer a call to focus will then remove the control selection + if (controlElm) { + ieRng = t.getDoc().body.createControlRange(); + ieRng.addElement(controlElm); + ieRng.select(); + } + + } + + if (tinymce.activeEditor != t) { + if ((oed = tinymce.activeEditor) != null) + oed.onDeactivate.dispatch(oed, t); + + t.onActivate.dispatch(t, oed); + } + + tinymce._setActive(t); + }, + + execCallback : function(n) { + var t = this, f = t.settings[n], s; + + if (!f) + return; + + // Look through lookup + if (t.callbackLookup && (s = t.callbackLookup[n])) { + f = s.func; + s = s.scope; + } + + if (is(f, 'string')) { + s = f.replace(/\.\w+$/, ''); + s = s ? tinymce.resolve(s) : 0; + f = tinymce.resolve(f); + t.callbackLookup = t.callbackLookup || {}; + t.callbackLookup[n] = {func : f, scope : s}; + } + + return f.apply(s || t, Array.prototype.slice.call(arguments, 1)); + }, + + translate : function(s) { + var c = this.settings.language || 'en', i18n = tinymce.i18n; + + if (!s) + return ''; + + return i18n[c + '.' + s] || s.replace(/{\#([^}]+)\}/g, function(a, b) { + return i18n[c + '.' + b] || '{#' + b + '}'; + }); + }, + + getLang : function(n, dv) { + return tinymce.i18n[(this.settings.language || 'en') + '.' + n] || (is(dv) ? dv : '{#' + n + '}'); + }, + + getParam : function(n, dv, ty) { + var tr = tinymce.trim, v = is(this.settings[n]) ? this.settings[n] : dv, o; + + if (ty === 'hash') { + o = {}; + + if (is(v, 'string')) { + each(v.indexOf('=') > 0 ? v.split(/[;,](?![^=;,]*(?:[;,]|$))/) : v.split(','), function(v) { + v = v.split('='); + + if (v.length > 1) + o[tr(v[0])] = tr(v[1]); + else + o[tr(v[0])] = tr(v); + }); + } else + o = v; + + return o; + } + + return v; + }, + + nodeChanged : function(o) { + var t = this, s = t.selection, n = (isIE ? s.getNode() : s.getStart()) || t.getBody(); + + // Fix for bug #1896577 it seems that this can not be fired while the editor is loading + if (t.initialized) { + o = o || {}; + n = isIE && n.ownerDocument != t.getDoc() ? t.getBody() : n; // Fix for IE initial state + + // Get parents and add them to object + o.parents = []; + t.dom.getParent(n, function(node) { + if (node.nodeName == 'BODY') + return true; + + o.parents.push(node); + }); + + t.onNodeChange.dispatch( + t, + o ? o.controlManager || t.controlManager : t.controlManager, + n, + s.isCollapsed(), + o + ); + } + }, + + addButton : function(n, s) { + var t = this; + + t.buttons = t.buttons || {}; + t.buttons[n] = s; + }, + + addCommand : function(n, f, s) { + this.execCommands[n] = {func : f, scope : s || this}; + }, + + addQueryStateHandler : function(n, f, s) { + this.queryStateCommands[n] = {func : f, scope : s || this}; + }, + + addQueryValueHandler : function(n, f, s) { + this.queryValueCommands[n] = {func : f, scope : s || this}; + }, + + addShortcut : function(pa, desc, cmd_func, sc) { + var t = this, c; + + if (!t.settings.custom_shortcuts) + return false; + + t.shortcuts = t.shortcuts || {}; + + if (is(cmd_func, 'string')) { + c = cmd_func; + + cmd_func = function() { + t.execCommand(c, false, null); + }; + } + + if (is(cmd_func, 'object')) { + c = cmd_func; + + cmd_func = function() { + t.execCommand(c[0], c[1], c[2]); + }; + } + + each(explode(pa), function(pa) { + var o = { + func : cmd_func, + scope : sc || this, + desc : desc, + alt : false, + ctrl : false, + shift : false + }; + + each(explode(pa, '+'), function(v) { + switch (v) { + case 'alt': + case 'ctrl': + case 'shift': + o[v] = true; + break; + + default: + o.charCode = v.charCodeAt(0); + o.keyCode = v.toUpperCase().charCodeAt(0); + } + }); + + t.shortcuts[(o.ctrl ? 'ctrl' : '') + ',' + (o.alt ? 'alt' : '') + ',' + (o.shift ? 'shift' : '') + ',' + o.keyCode] = o; + }); + + return true; + }, + + execCommand : function(cmd, ui, val, a) { + var t = this, s = 0, o, st; + + if (!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd) && (!a || !a.skip_focus)) + t.focus(); + + o = {}; + t.onBeforeExecCommand.dispatch(t, cmd, ui, val, o); + if (o.terminate) + return false; + + // Command callback + if (t.execCallback('execcommand_callback', t.id, t.selection.getNode(), cmd, ui, val)) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + return true; + } + + // Registred commands + if (o = t.execCommands[cmd]) { + st = o.func.call(o.scope, ui, val); + + // Fall through on true + if (st !== true) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + return st; + } + } + + // Plugin commands + each(t.plugins, function(p) { + if (p.execCommand && p.execCommand(cmd, ui, val)) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + s = 1; + return false; + } + }); + + if (s) + return true; + + // Theme commands + if (t.theme && t.theme.execCommand && t.theme.execCommand(cmd, ui, val)) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + return true; + } + + // Execute global commands + if (tinymce.GlobalCommands.execCommand(t, cmd, ui, val)) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + return true; + } + + // Editor commands + if (t.editorCommands.execCommand(cmd, ui, val)) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + return true; + } + + // Browser commands + t.getDoc().execCommand(cmd, ui, val); + t.onExecCommand.dispatch(t, cmd, ui, val, a); + }, + + queryCommandState : function(cmd) { + var t = this, o, s; + + // Is hidden then return undefined + if (t._isHidden()) + return; + + // Registred commands + if (o = t.queryStateCommands[cmd]) { + s = o.func.call(o.scope); + + // Fall though on true + if (s !== true) + return s; + } + + // Registred commands + o = t.editorCommands.queryCommandState(cmd); + if (o !== -1) + return o; + + // Browser commands + try { + return this.getDoc().queryCommandState(cmd); + } catch (ex) { + // Fails sometimes see bug: 1896577 + } + }, + + queryCommandValue : function(c) { + var t = this, o, s; + + // Is hidden then return undefined + if (t._isHidden()) + return; + + // Registred commands + if (o = t.queryValueCommands[c]) { + s = o.func.call(o.scope); + + // Fall though on true + if (s !== true) + return s; + } + + // Registred commands + o = t.editorCommands.queryCommandValue(c); + if (is(o)) + return o; + + // Browser commands + try { + return this.getDoc().queryCommandValue(c); + } catch (ex) { + // Fails sometimes see bug: 1896577 + } + }, + + show : function() { + var t = this; + + DOM.show(t.getContainer()); + DOM.hide(t.id); + t.load(); + }, + + hide : function() { + var t = this, d = t.getDoc(); + + // Fixed bug where IE has a blinking cursor left from the editor + if (isIE && d) + d.execCommand('SelectAll'); + + // We must save before we hide so Safari doesn't crash + t.save(); + DOM.hide(t.getContainer()); + DOM.setStyle(t.id, 'display', t.orgDisplay); + }, + + isHidden : function() { + return !DOM.isHidden(this.id); + }, + + setProgressState : function(b, ti, o) { + this.onSetProgressState.dispatch(this, b, ti, o); + + return b; + }, + + load : function(o) { + var t = this, e = t.getElement(), h; + + if (e) { + o = o || {}; + o.load = true; + + // Double encode existing entities in the value + h = t.setContent(is(e.value) ? e.value : e.innerHTML, o); + o.element = e; + + if (!o.no_events) + t.onLoadContent.dispatch(t, o); + + o.element = e = null; + + return h; + } + }, + + save : function(o) { + var t = this, e = t.getElement(), h, f; + + if (!e || !t.initialized) + return; + + o = o || {}; + o.save = true; + + // Add undo level will trigger onchange event + if (!o.no_events) { + t.undoManager.typing = 0; + t.undoManager.add(); + } + + o.element = e; + h = o.content = t.getContent(o); + + if (!o.no_events) + t.onSaveContent.dispatch(t, o); + + h = o.content; + + if (!/TEXTAREA|INPUT/i.test(e.nodeName)) { + e.innerHTML = h; + + // Update hidden form element + if (f = DOM.getParent(t.id, 'form')) { + each(f.elements, function(e) { + if (e.name == t.id) { + e.value = h; + return false; + } + }); + } + } else + e.value = h; + + o.element = e = null; + + return h; + }, + + setContent : function(h, o) { + var t = this; + + o = o || {}; + o.format = o.format || 'html'; + o.set = true; + o.content = h; + + if (!o.no_events) + t.onBeforeSetContent.dispatch(t, o); + + // Padd empty content in Gecko and Safari. Commands will otherwise fail on the content + // It will also be impossible to place the caret in the editor unless there is a BR element present + if (!tinymce.isIE && (h.length === 0 || /^\s+$/.test(h))) { + o.content = t.dom.setHTML(t.getBody(), '
    '); + o.format = 'raw'; + } + + o.content = t.dom.setHTML(t.getBody(), tinymce.trim(o.content)); + + if (o.format != 'raw' && t.settings.cleanup) { + o.getInner = true; + o.content = t.dom.setHTML(t.getBody(), t.serializer.serialize(t.getBody(), o)); + } + + if (!o.no_events) + t.onSetContent.dispatch(t, o); + + return o.content; + }, + + getContent : function(o) { + var t = this, h; + + o = o || {}; + o.format = o.format || 'html'; + o.get = true; + + if (!o.no_events) + t.onBeforeGetContent.dispatch(t, o); + + if (o.format != 'raw' && t.settings.cleanup) { + o.getInner = true; + h = t.serializer.serialize(t.getBody(), o); + } else + h = t.getBody().innerHTML; + + h = h.replace(/^\s*|\s*$/g, ''); + o.content = h; + + if (!o.no_events) + t.onGetContent.dispatch(t, o); + + return o.content; + }, + + isDirty : function() { + var t = this; + + return tinymce.trim(t.startContent) != tinymce.trim(t.getContent({format : 'raw', no_events : 1})) && !t.isNotDirty; + }, + + getContainer : function() { + var t = this; + + if (!t.container) + t.container = DOM.get(t.editorContainer || t.id + '_parent'); + + return t.container; + }, + + getContentAreaContainer : function() { + return this.contentAreaContainer; + }, + + getElement : function() { + return DOM.get(this.settings.content_element || this.id); + }, + + getWin : function() { + var t = this, e; + + if (!t.contentWindow) { + e = DOM.get(t.id + "_ifr"); + + if (e) + t.contentWindow = e.contentWindow; + } + + return t.contentWindow; + }, + + getDoc : function() { + var t = this, w; + + if (!t.contentDocument) { + w = t.getWin(); + + if (w) + t.contentDocument = w.document; + } + + return t.contentDocument; + }, + + getBody : function() { + return this.bodyElement || this.getDoc().body; + }, + + convertURL : function(u, n, e) { + var t = this, s = t.settings; + + // Use callback instead + if (s.urlconverter_callback) + return t.execCallback('urlconverter_callback', u, e, true, n); + + // Don't convert link href since thats the CSS files that gets loaded into the editor also skip local file URLs + if (!s.convert_urls || (e && e.nodeName == 'LINK') || u.indexOf('file:') === 0) + return u; + + // Convert to relative + if (s.relative_urls) + return t.documentBaseURI.toRelative(u); + + // Convert to absolute + u = t.documentBaseURI.toAbsolute(u, s.remove_script_host); + + return u; + }, + + addVisual : function(e) { + var t = this, s = t.settings; + + e = e || t.getBody(); + + if (!is(t.hasVisual)) + t.hasVisual = s.visual; + + each(t.dom.select('table,a', e), function(e) { + var v; + + switch (e.nodeName) { + case 'TABLE': + v = t.dom.getAttrib(e, 'border'); + + if (!v || v == '0') { + if (t.hasVisual) + t.dom.addClass(e, s.visual_table_class); + else + t.dom.removeClass(e, s.visual_table_class); + } + + return; + + case 'A': + v = t.dom.getAttrib(e, 'name'); + + if (v) { + if (t.hasVisual) + t.dom.addClass(e, 'mceItemAnchor'); + else + t.dom.removeClass(e, 'mceItemAnchor'); + } + + return; + } + }); + + t.onVisualAid.dispatch(t, e, t.hasVisual); + }, + + remove : function() { + var t = this, e = t.getContainer(); + + t.removed = 1; // Cancels post remove event execution + t.hide(); + + t.execCallback('remove_instance_callback', t); + t.onRemove.dispatch(t); + + // Clear all execCommand listeners this is required to avoid errors if the editor was removed inside another command + t.onExecCommand.listeners = []; + + tinymce.remove(t); + DOM.remove(e); + }, + + destroy : function(s) { + var t = this; + + // One time is enough + if (t.destroyed) + return; + + if (!s) { + tinymce.removeUnload(t.destroy); + tinyMCE.onBeforeUnload.remove(t._beforeUnload); + + // Manual destroy + if (t.theme && t.theme.destroy) + t.theme.destroy(); + + // Destroy controls, selection and dom + t.controlManager.destroy(); + t.selection.destroy(); + t.dom.destroy(); + + // Remove all events + + // Don't clear the window or document if content editable + // is enabled since other instances might still be present + if (!t.settings.content_editable) { + Event.clear(t.getWin()); + Event.clear(t.getDoc()); + } + + Event.clear(t.getBody()); + Event.clear(t.formElement); + } + + if (t.formElement) { + t.formElement.submit = t.formElement._mceOldSubmit; + t.formElement._mceOldSubmit = null; + } + + t.contentAreaContainer = t.formElement = t.container = t.settings.content_element = t.bodyElement = t.contentDocument = t.contentWindow = null; + + if (t.selection) + t.selection = t.selection.win = t.selection.dom = t.selection.dom.doc = null; + + t.destroyed = 1; + }, + + // Internal functions + + _addEvents : function() { + // 'focus', 'blur', 'dblclick', 'beforedeactivate', submit, reset + var t = this, i, s = t.settings, lo = { + mouseup : 'onMouseUp', + mousedown : 'onMouseDown', + click : 'onClick', + keyup : 'onKeyUp', + keydown : 'onKeyDown', + keypress : 'onKeyPress', + submit : 'onSubmit', + reset : 'onReset', + contextmenu : 'onContextMenu', + dblclick : 'onDblClick', + paste : 'onPaste' // Doesn't work in all browsers yet + }; + + function eventHandler(e, o) { + var ty = e.type; + + // Don't fire events when it's removed + if (t.removed) + return; + + // Generic event handler + if (t.onEvent.dispatch(t, e, o) !== false) { + // Specific event handler + t[lo[e.fakeType || e.type]].dispatch(t, e, o); + } + }; + + // Add DOM events + each(lo, function(v, k) { + switch (k) { + case 'contextmenu': + if (tinymce.isOpera) { + // Fake contextmenu on Opera + t.dom.bind(t.getBody(), 'mousedown', function(e) { + if (e.ctrlKey) { + e.fakeType = 'contextmenu'; + eventHandler(e); + } + }); + } else + t.dom.bind(t.getBody(), k, eventHandler); + break; + + case 'paste': + t.dom.bind(t.getBody(), k, function(e) { + eventHandler(e); + }); + break; + + case 'submit': + case 'reset': + t.dom.bind(t.getElement().form || DOM.getParent(t.id, 'form'), k, eventHandler); + break; + + default: + t.dom.bind(s.content_editable ? t.getBody() : t.getDoc(), k, eventHandler); + } + }); + + t.dom.bind(s.content_editable ? t.getBody() : (isGecko ? t.getDoc() : t.getWin()), 'focus', function(e) { + t.focus(true); + }); + + + // Fixes bug where a specified document_base_uri could result in broken images + // This will also fix drag drop of images in Gecko + if (tinymce.isGecko) { + // Convert all images to absolute URLs +/* t.onSetContent.add(function(ed, o) { + each(ed.dom.select('img'), function(e) { + var v; + + if (v = e.getAttribute('_mce_src')) + e.src = t.documentBaseURI.toAbsolute(v); + }) + });*/ + + t.dom.bind(t.getDoc(), 'DOMNodeInserted', function(e) { + var v; + + e = e.target; + + if (e.nodeType === 1 && e.nodeName === 'IMG' && (v = e.getAttribute('_mce_src'))) + e.src = t.documentBaseURI.toAbsolute(v); + }); + } + + // Set various midas options in Gecko + if (isGecko) { + function setOpts() { + var t = this, d = t.getDoc(), s = t.settings; + + if (isGecko && !s.readonly) { + if (t._isHidden()) { + try { + if (!s.content_editable) + d.designMode = 'On'; + } catch (ex) { + // Fails if it's hidden + } + } + + try { + // Try new Gecko method + d.execCommand("styleWithCSS", 0, false); + } catch (ex) { + // Use old method + if (!t._isHidden()) + try {d.execCommand("useCSS", 0, true);} catch (ex) {} + } + + if (!s.table_inline_editing) + try {d.execCommand('enableInlineTableEditing', false, false);} catch (ex) {} + + if (!s.object_resizing) + try {d.execCommand('enableObjectResizing', false, false);} catch (ex) {} + } + }; + + t.onBeforeExecCommand.add(setOpts); + t.onMouseDown.add(setOpts); + } + + // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250 + // WebKit can't even do simple things like selecting an image + // This also fixes so it's possible to select mceItemAnchors + if (tinymce.isWebKit) { + t.onClick.add(function(ed, e) { + e = e.target; + + // Needs tobe the setBaseAndExtend or it will fail to select floated images + if (e.nodeName == 'IMG' || (e.nodeName == 'A' && t.dom.hasClass(e, 'mceItemAnchor'))) + t.selection.getSel().setBaseAndExtent(e, 0, e, 1); + }); + } + + // Add node change handlers + t.onMouseUp.add(t.nodeChanged); + t.onClick.add(t.nodeChanged); + t.onKeyUp.add(function(ed, e) { + var c = e.keyCode; + + if ((c >= 33 && c <= 36) || (c >= 37 && c <= 40) || c == 13 || c == 45 || c == 46 || c == 8 || (tinymce.isMac && (c == 91 || c == 93)) || e.ctrlKey) + t.nodeChanged(); + }); + + // Add reset handler + t.onReset.add(function() { + t.setContent(t.startContent, {format : 'raw'}); + }); + + // Add shortcuts + if (s.custom_shortcuts) { + if (s.custom_undo_redo_keyboard_shortcuts) { + t.addShortcut('ctrl+z', t.getLang('undo_desc'), 'Undo'); + t.addShortcut('ctrl+y', t.getLang('redo_desc'), 'Redo'); + } + + // Add default shortcuts for gecko + t.addShortcut('ctrl+b', t.getLang('bold_desc'), 'Bold'); + t.addShortcut('ctrl+i', t.getLang('italic_desc'), 'Italic'); + t.addShortcut('ctrl+u', t.getLang('underline_desc'), 'Underline'); + + // BlockFormat shortcuts keys + for (i=1; i<=6; i++) + t.addShortcut('ctrl+' + i, '', ['FormatBlock', false, 'h' + i]); + + t.addShortcut('ctrl+7', '', ['FormatBlock', false, '

    ']); + t.addShortcut('ctrl+8', '', ['FormatBlock', false, '

    ']); + t.addShortcut('ctrl+9', '', ['FormatBlock', false, '
    ']); + + function find(e) { + var v = null; + + if (!e.altKey && !e.ctrlKey && !e.metaKey) + return v; + + each(t.shortcuts, function(o) { + if (tinymce.isMac && o.ctrl != e.metaKey) + return; + else if (!tinymce.isMac && o.ctrl != e.ctrlKey) + return; + + if (o.alt != e.altKey) + return; + + if (o.shift != e.shiftKey) + return; + + if (e.keyCode == o.keyCode || (e.charCode && e.charCode == o.charCode)) { + v = o; + return false; + } + }); + + return v; + }; + + t.onKeyUp.add(function(ed, e) { + var o = find(e); + + if (o) + return Event.cancel(e); + }); + + t.onKeyPress.add(function(ed, e) { + var o = find(e); + + if (o) + return Event.cancel(e); + }); + + t.onKeyDown.add(function(ed, e) { + var o = find(e); + + if (o) { + o.func.call(o.scope); + return Event.cancel(e); + } + }); + } + + if (tinymce.isIE) { + // Fix so resize will only update the width and height attributes not the styles of an image + // It will also block mceItemNoResize items + t.dom.bind(t.getDoc(), 'controlselect', function(e) { + var re = t.resizeInfo, cb; + + e = e.target; + + // Don't do this action for non image elements + if (e.nodeName !== 'IMG') + return; + + if (re) + t.dom.unbind(re.node, re.ev, re.cb); + + if (!t.dom.hasClass(e, 'mceItemNoResize')) { + ev = 'resizeend'; + cb = t.dom.bind(e, ev, function(e) { + var v; + + e = e.target; + + if (v = t.dom.getStyle(e, 'width')) { + t.dom.setAttrib(e, 'width', v.replace(/[^0-9%]+/g, '')); + t.dom.setStyle(e, 'width', ''); + } + + if (v = t.dom.getStyle(e, 'height')) { + t.dom.setAttrib(e, 'height', v.replace(/[^0-9%]+/g, '')); + t.dom.setStyle(e, 'height', ''); + } + }); + } else { + ev = 'resizestart'; + cb = t.dom.bind(e, 'resizestart', Event.cancel, Event); + } + + re = t.resizeInfo = { + node : e, + ev : ev, + cb : cb + }; + }); + + t.onKeyDown.add(function(ed, e) { + switch (e.keyCode) { + case 8: + // Fix IE control + backspace browser bug + if (t.selection.getRng().item) { + ed.dom.remove(t.selection.getRng().item(0)); + return Event.cancel(e); + } + } + }); + + /*if (t.dom.boxModel) { + t.getBody().style.height = '100%'; + + Event.add(t.getWin(), 'resize', function(e) { + var docElm = t.getDoc().documentElement; + + docElm.style.height = (docElm.offsetHeight - 10) + 'px'; + }); + }*/ + } + + if (tinymce.isOpera) { + t.onClick.add(function(ed, e) { + Event.prevent(e); + }); + } + + // Add custom undo/redo handlers + if (s.custom_undo_redo) { + function addUndo() { + t.undoManager.typing = 0; + t.undoManager.add(); + }; + + t.dom.bind(t.getDoc(), 'focusout', function(e) { + if (!t.removed && t.undoManager.typing) + addUndo(); + }); + + t.onKeyUp.add(function(ed, e) { + if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45 || e.ctrlKey) + addUndo(); + }); + + t.onKeyDown.add(function(ed, e) { + // Is caracter positon keys + if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45) { + if (t.undoManager.typing) + addUndo(); + + return; + } + + if (!t.undoManager.typing) { + t.undoManager.add(); + t.undoManager.typing = 1; + } + }); + + t.onMouseDown.add(function() { + if (t.undoManager.typing) + addUndo(); + }); + } + }, + + _isHidden : function() { + var s; + + if (!isGecko) + return 0; + + // Weird, wheres that cursor selection? + s = this.selection.getSel(); + return (!s || !s.rangeCount || s.rangeCount == 0); + }, + + // Fix for bug #1867292 + _fixNesting : function(s) { + var d = [], i; + + s = s.replace(/<(\/)?([^\s>]+)[^>]*?>/g, function(a, b, c) { + var e; + + // Handle end element + if (b === '/') { + if (!d.length) + return ''; + + if (c !== d[d.length - 1].tag) { + for (i=d.length - 1; i>=0; i--) { + if (d[i].tag === c) { + d[i].close = 1; + break; + } + } + + return ''; + } else { + d.pop(); + + if (d.length && d[d.length - 1].close) { + a = a + ''; + d.pop(); + } + } + } else { + // Ignore these + if (/^(br|hr|input|meta|img|link|param)$/i.test(c)) + return a; + + // Ignore closed ones + if (/\/>$/.test(a)) + return a; + + d.push({tag : c}); // Push start element + } + + return a; + }); + + // End all open tags + for (i=d.length - 1; i>=0; i--) + s += ''; + + return s; + } + }); +})(tinymce); + +(function(tinymce) { + // Added for compression purposes + var each = tinymce.each, undefined, TRUE = true, FALSE = false; + + tinymce.EditorCommands = function(editor) { + var dom = editor.dom, + selection = editor.selection, + commands = {state: {}, exec : {}, value : {}}, + settings = editor.settings, + bookmark; + + function execCommand(command, ui, value) { + var func; + + command = command.toLowerCase(); + if (func = commands.exec[command]) { + func(command, ui, value); + return TRUE; + } + + return FALSE; + }; + + function queryCommandState(command) { + var func; + + command = command.toLowerCase(); + if (func = commands.state[command]) + return func(command); + + return -1; + }; + + function queryCommandValue(command) { + var func; + + command = command.toLowerCase(); + if (func = commands.value[command]) + return func(command); + + return FALSE; + }; + + function addCommands(command_list, type) { + type = type || 'exec'; + + each(command_list, function(callback, command) { + each(command.toLowerCase().split(','), function(command) { + commands[type][command] = callback; + }); + }); + }; + + // Expose public methods + tinymce.extend(this, { + execCommand : execCommand, + queryCommandState : queryCommandState, + queryCommandValue : queryCommandValue, + addCommands : addCommands + }); + + // Private methods + + function execNativeCommand(command, ui, value) { + if (ui === undefined) + ui = FALSE; + + if (value === undefined) + value = null; + + return editor.getDoc().execCommand(command, ui, value); + }; + + function isFormatMatch(name) { + return editor.formatter.match(name); + }; + + function toggleFormat(name, value) { + editor.formatter.toggle(name, value ? {value : value} : undefined); + }; + + function storeSelection(type) { + bookmark = selection.getBookmark(type); + }; + + function restoreSelection() { + selection.moveToBookmark(bookmark); + }; + + // Add execCommand overrides + addCommands({ + // Ignore these, added for compatibility + 'mceResetDesignMode,mceBeginUndoLevel' : function() {}, + + // Add undo manager logic + 'mceEndUndoLevel,mceAddUndoLevel' : function() { + editor.undoManager.add(); + }, + + 'Cut,Copy,Paste' : function(command) { + var doc = editor.getDoc(), failed; + + // Try executing the native command + try { + execNativeCommand(command); + } catch (ex) { + // Command failed + failed = TRUE; + } + + // Present alert message about clipboard access not being available + if (failed || !doc.queryCommandSupported(command)) { + if (tinymce.isGecko) { + editor.windowManager.confirm(editor.getLang('clipboard_msg'), function(state) { + if (state) + open('http://www.mozilla.org/editor/midasdemo/securityprefs.html', '_blank'); + }); + } else + editor.windowManager.alert(editor.getLang('clipboard_no_support')); + } + }, + + // Override unlink command + unlink : function(command) { + if (selection.isCollapsed()) + selection.select(selection.getNode()); + + execNativeCommand(command); + selection.collapse(FALSE); + }, + + // Override justify commands to use the text formatter engine + 'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull' : function(command) { + var align = command.substring(7); + + // Remove all other alignments first + each('left,center,right,full'.split(','), function(name) { + if (align != name) + editor.formatter.remove('align' + name); + }); + + toggleFormat('align' + align); + }, + + // Override list commands to fix WebKit bug + 'InsertUnorderedList,InsertOrderedList' : function(command) { + var listElm, listParent; + + execNativeCommand(command); + + // WebKit produces lists within block elements so we need to split them + // we will replace the native list creation logic to custom logic later on + // TODO: Remove this when the list creation logic is removed + listElm = dom.getParent(selection.getNode(), 'ol,ul'); + if (listElm) { + listParent = listElm.parentNode; + + // If list is within a text block then split that block + if (/^(H[1-6]|P|ADDRESS|PRE)$/.test(listParent.nodeName)) { + storeSelection(); + dom.split(listParent, listElm); + restoreSelection(); + } + } + }, + + // Override commands to use the text formatter engine + 'Bold,Italic,Underline,Strikethrough' : function(command) { + toggleFormat(command); + }, + + // Override commands to use the text formatter engine + 'ForeColor,HiliteColor,FontName' : function(command, ui, value) { + toggleFormat(command, value); + }, + + FontSize : function(command, ui, value) { + var fontClasses, fontSizes; + + // Convert font size 1-7 to styles + if (value >= 1 && value <= 7) { + fontSizes = tinymce.explode(settings.font_size_style_values); + fontClasses = tinymce.explode(settings.font_size_classes); + + if (fontClasses) + value = fontClasses[value - 1] || value; + else + value = fontSizes[value - 1] || value; + } + + toggleFormat(command, value); + }, + + RemoveFormat : function(command) { + editor.formatter.remove(command); + }, + + mceBlockQuote : function(command) { + toggleFormat('blockquote'); + }, + + FormatBlock : function(command, ui, value) { + return toggleFormat(value); + }, + + mceCleanup : function() { + storeSelection(); + editor.setContent(editor.getContent({cleanup : TRUE}), {cleanup : TRUE}); + restoreSelection(); + }, + + mceRemoveNode : function(command, ui, value) { + var node = value || selection.getNode(); + + // Make sure that the body node isn't removed + if (node != editor.getBody()) { + storeSelection(); + editor.dom.remove(node, TRUE); + restoreSelection(); + } + }, + + mceSelectNodeDepth : function(command, ui, value) { + var counter = 0; + + dom.getParent(selection.getNode(), function(node) { + if (node.nodeType == 1 && counter++ == value) { + selection.select(node); + return FALSE; + } + }, editor.getBody()); + }, + + mceSelectNode : function(command, ui, value) { + selection.select(value); + }, + + mceInsertContent : function(command, ui, value) { + selection.setContent(value); + }, + + mceInsertRawHTML : function(command, ui, value) { + selection.setContent('tiny_mce_marker'); + editor.setContent(editor.getContent().replace(/tiny_mce_marker/g, value)); + }, + + mceSetContent : function(command, ui, value) { + editor.setContent(value); + }, + + 'Indent,Outdent' : function(command) { + var intentValue, indentUnit, value; + + // Setup indent level + intentValue = settings.indentation; + indentUnit = /[a-z%]+$/i.exec(intentValue); + intentValue = parseInt(intentValue); + + if (!queryCommandState('InsertUnorderedList') && !queryCommandState('InsertOrderedList')) { + each(selection.getSelectedBlocks(), function(element) { + if (command == 'outdent') { + value = Math.max(0, parseInt(element.style.paddingLeft || 0) - intentValue); + dom.setStyle(element, 'paddingLeft', value ? value + indentUnit : ''); + } else + dom.setStyle(element, 'paddingLeft', (parseInt(element.style.paddingLeft || 0) + intentValue) + indentUnit); + }); + } else + execNativeCommand(command); + }, + + mceRepaint : function() { + var bookmark; + + if (tinymce.isGecko) { + try { + storeSelection(TRUE); + + if (selection.getSel()) + selection.getSel().selectAllChildren(editor.getBody()); + + selection.collapse(TRUE); + restoreSelection(); + } catch (ex) { + // Ignore + } + } + }, + + mceToggleFormat : function(command, ui, value) { + editor.formatter.toggle(value); + }, + + InsertHorizontalRule : function() { + selection.setContent('
    '); + }, + + mceToggleVisualAid : function() { + editor.hasVisual = !editor.hasVisual; + editor.addVisual(); + }, + + mceReplaceContent : function(command, ui, value) { + selection.setContent(value.replace(/\{\$selection\}/g, selection.getContent({format : 'text'}))); + }, + + mceInsertLink : function(command, ui, value) { + var link = dom.getParent(selection.getNode(), 'a'); + + if (tinymce.is(value, 'string')) + value = {href : value}; + + if (!link) { + execNativeCommand('CreateLink', FALSE, 'javascript:mctmp(0);'); + each(dom.select('a[href=javascript:mctmp(0);]'), function(link) { + dom.setAttribs(link, value); + }); + } else { + if (value.href) + dom.setAttribs(link, value); + else + editor.dom.remove(link, TRUE); + } + } + }); + + // Add queryCommandState overrides + addCommands({ + // Override justify commands + 'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull' : function(command) { + return isFormatMatch('align' + command.substring(7)); + }, + + 'Bold,Italic,Underline,Strikethrough' : function(command) { + return isFormatMatch(command); + }, + + mceBlockQuote : function() { + return isFormatMatch('blockquote'); + }, + + Outdent : function() { + var node; + + if (settings.inline_styles) { + if ((node = dom.getParent(selection.getStart(), dom.isBlock)) && parseInt(node.style.paddingLeft) > 0) + return TRUE; + + if ((node = dom.getParent(selection.getEnd(), dom.isBlock)) && parseInt(node.style.paddingLeft) > 0) + return TRUE; + } + + return queryCommandState('InsertUnorderedList') || queryCommandState('InsertOrderedList') || (!settings.inline_styles && !!dom.getParent(selection.getNode(), 'BLOCKQUOTE')); + }, + + 'InsertUnorderedList,InsertOrderedList' : function(command) { + return dom.getParent(selection.getNode(), command == 'insertunorderedlist' ? 'UL' : 'OL'); + } + }, 'state'); + + // Add queryCommandValue overrides + addCommands({ + 'FontSize,FontName' : function(command) { + var value = 0, parent; + + if (parent = dom.getParent(selection.getNode(), 'span')) { + if (command == 'fontsize') + value = parent.style.fontSize; + else + value = parent.style.fontFamily.replace(/, /g, ',').replace(/[\'\"]/g, '').toLowerCase(); + } + + return value; + } + }, 'value'); + + // Add undo manager logic + if (settings.custom_undo_redo) { + addCommands({ + Undo : function() { + editor.undoManager.undo(); + }, + + Redo : function() { + editor.undoManager.redo(); + } + }); + } + }; +})(tinymce); +(function(tinymce) { + var Dispatcher = tinymce.util.Dispatcher; + + tinymce.UndoManager = function(editor) { + var self, index = 0, data = []; + + function getContent() { + return tinymce.trim(editor.getContent({format : 'raw', no_events : 1})); + }; + + return self = { + typing : 0, + + onAdd : new Dispatcher(self), + onUndo : new Dispatcher(self), + onRedo : new Dispatcher(self), + + add : function(level) { + var i, settings = editor.settings, lastLevel; + + level = level || {}; + level.content = getContent(); + + // Add undo level if needed + lastLevel = data[index]; + if (lastLevel && lastLevel.content == level.content) { + if (index > 0 || data.length == 1) + return null; + } + + // Time to compress + if (settings.custom_undo_redo_levels) { + if (data.length > settings.custom_undo_redo_levels) { + for (i = 0; i < data.length - 1; i++) + data[i] = data[i + 1]; + + data.length--; + index = data.length; + } + } + + // Get a non intrusive normalized bookmark + level.bookmark = editor.selection.getBookmark(2, true); + + // Crop array if needed + if (index < data.length - 1) { + // Treat first level as initial + if (index == 0) + data = []; + else + data.length = index + 1; + } + + data.push(level); + index = data.length - 1; + + self.onAdd.dispatch(self, level); + editor.isNotDirty = 0; + + return level; + }, + + undo : function() { + var level, i; + + if (self.typing) { + self.add(); + self.typing = 0; + } + + if (index > 0) { + level = data[--index]; + + editor.setContent(level.content, {format : 'raw'}); + editor.selection.moveToBookmark(level.bookmark); + + self.onUndo.dispatch(self, level); + } + + return level; + }, + + redo : function() { + var level; + + if (index < data.length - 1) { + level = data[++index]; + + editor.setContent(level.content, {format : 'raw'}); + editor.selection.moveToBookmark(level.bookmark); + + self.onRedo.dispatch(self, level); + } + + return level; + }, + + clear : function() { + data = []; + index = self.typing = 0; + }, + + hasUndo : function() { + return index > 0 || self.typing; + }, + + hasRedo : function() { + return index < data.length - 1; + } + }; + }; +})(tinymce); + +(function(tinymce) { + // Shorten names + var Event = tinymce.dom.Event, + isIE = tinymce.isIE, + isGecko = tinymce.isGecko, + isOpera = tinymce.isOpera, + each = tinymce.each, + extend = tinymce.extend, + TRUE = true, + FALSE = false; + + // Checks if the selection/caret is at the end of the specified block element + function isAtEnd(rng, par) { + var rng2 = par.ownerDocument.createRange(); + + rng2.setStart(rng.endContainer, rng.endOffset); + rng2.setEndAfter(par); + + // Get number of characters to the right of the cursor if it's zero then we are at the end and need to merge the next block element + return rng2.cloneContents().textContent.length == 0; + }; + + function isEmpty(n) { + n = n.innerHTML; + + n = n.replace(/<(img|hr|table|input|select|textarea)[ \>]/gi, '-'); // Keep these convert them to - chars + n = n.replace(/<[^>]+>/g, ''); // Remove all tags + + return n.replace(/[ \u00a0\t\r\n]+/g, '') == ''; + }; + + function splitList(selection, dom, li) { + var listBlock, block; + + if (isEmpty(li)) { + listBlock = dom.getParent(li, 'ul,ol'); + + if (!dom.getParent(listBlock.parentNode, 'ul,ol')) { + dom.split(listBlock, li); + block = dom.create('p', 0, '
    '); + dom.replace(block, li); + selection.select(block, 1); + } + + return FALSE; + } + + return TRUE; + }; + + tinymce.create('tinymce.ForceBlocks', { + ForceBlocks : function(ed) { + var t = this, s = ed.settings, elm; + + t.editor = ed; + t.dom = ed.dom; + elm = (s.forced_root_block || 'p').toLowerCase(); + s.element = elm.toUpperCase(); + + ed.onPreInit.add(t.setup, t); + + t.reOpera = new RegExp('(\\u00a0| | )<\/' + elm + '>', 'gi'); + t.rePadd = new RegExp(']+)><\\\/p>|]+)\\\/>|]+)>\\s+<\\\/p>|

    <\\\/p>||

    \\s+<\\\/p>'.replace(/p/g, elm), 'gi'); + t.reNbsp2BR1 = new RegExp(']+)>[\\s\\u00a0]+<\\\/p>|

    [\\s\\u00a0]+<\\\/p>'.replace(/p/g, elm), 'gi'); + t.reNbsp2BR2 = new RegExp('<%p()([^>]+)>( | )<\\\/%p>|<%p>( | )<\\\/%p>'.replace(/%p/g, elm), 'gi'); + t.reBR2Nbsp = new RegExp(']+)>\\s*
    \\s*<\\\/p>|

    \\s*
    \\s*<\\\/p>'.replace(/p/g, elm), 'gi'); + + function padd(ed, o) { + if (isOpera) + o.content = o.content.replace(t.reOpera, ''); + + o.content = o.content.replace(t.rePadd, '<' + elm + '$1$2$3$4$5$6>\u00a0'); + + if (!isIE && !isOpera && o.set) { + // Use   instead of BR in padded paragraphs + o.content = o.content.replace(t.reNbsp2BR1, '<' + elm + '$1$2>
    '); + o.content = o.content.replace(t.reNbsp2BR2, '<' + elm + '$1$2>
    '); + } else + o.content = o.content.replace(t.reBR2Nbsp, '<' + elm + '$1$2>\u00a0'); + }; + + ed.onBeforeSetContent.add(padd); + ed.onPostProcess.add(padd); + + if (s.forced_root_block) { + ed.onInit.add(t.forceRoots, t); + ed.onSetContent.add(t.forceRoots, t); + ed.onBeforeGetContent.add(t.forceRoots, t); + } + }, + + setup : function() { + var t = this, ed = t.editor, s = ed.settings, dom = ed.dom, selection = ed.selection; + + // Force root blocks when typing and when getting output + if (s.forced_root_block) { + ed.onBeforeExecCommand.add(t.forceRoots, t); + ed.onKeyUp.add(t.forceRoots, t); + ed.onPreProcess.add(t.forceRoots, t); + } + + if (s.force_br_newlines) { + // Force IE to produce BRs on enter + if (isIE) { + ed.onKeyPress.add(function(ed, e) { + var n; + + if (e.keyCode == 13 && selection.getNode().nodeName != 'LI') { + selection.setContent('
    ', {format : 'raw'}); + n = dom.get('__'); + n.removeAttribute('id'); + selection.select(n); + selection.collapse(); + return Event.cancel(e); + } + }); + } + } + + if (!isIE && s.force_p_newlines) { + ed.onKeyPress.add(function(ed, e) { + if (e.keyCode == 13 && !e.shiftKey && !t.insertPara(e)) + Event.cancel(e); + }); + + if (isGecko) { + ed.onKeyDown.add(function(ed, e) { + if ((e.keyCode == 8 || e.keyCode == 46) && !e.shiftKey) + t.backspaceDelete(e, e.keyCode == 8); + }); + } + } + + // Workaround for missing shift+enter support, http://bugs.webkit.org/show_bug.cgi?id=16973 + if (tinymce.isWebKit) { + function insertBr(ed) { + var rng = selection.getRng(), br, div = dom.create('div', null, ' '), divYPos, vpHeight = dom.getViewPort(ed.getWin()).h; + + // Insert BR element + rng.insertNode(br = dom.create('br')); + + // Place caret after BR + rng.setStartAfter(br); + rng.setEndAfter(br); + selection.setRng(rng); + + // Could not place caret after BR then insert an nbsp entity and move the caret + if (selection.getSel().focusNode == br.previousSibling) { + selection.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'), br)); + selection.collapse(TRUE); + } + + // Create a temporary DIV after the BR and get the position as it + // seems like getPos() returns 0 for text nodes and BR elements. + dom.insertAfter(div, br); + divYPos = dom.getPos(div).y; + dom.remove(div); + + // Scroll to new position, scrollIntoView can't be used due to bug: http://bugs.webkit.org/show_bug.cgi?id=16117 + if (divYPos > vpHeight) // It is not necessary to scroll if the DIV is inside the view port. + ed.getWin().scrollTo(0, divYPos); + }; + + ed.onKeyPress.add(function(ed, e) { + if (e.keyCode == 13 && (e.shiftKey || (s.force_br_newlines && !dom.getParent(selection.getNode(), 'ol,ul')))) { + insertBr(ed); + Event.cancel(e); + } + }); + } + + // Padd empty inline elements within block elements + // For example:

    becomes

     

    + ed.onPreProcess.add(function(ed, o) { + each(dom.select('p,h1,h2,h3,h4,h5,h6,div', o.node), function(p) { + if (isEmpty(p)) { + each(dom.select('span,em,strong,b,i', o.node), function(n) { + if (!n.hasChildNodes()) { + n.appendChild(ed.getDoc().createTextNode('\u00a0')); + return FALSE; // Break the loop one padding is enough + } + }); + } + }); + }); + + // IE specific fixes + if (isIE) { + // Replaces IE:s auto generated paragraphs with the specified element name + if (s.element != 'P') { + ed.onKeyPress.add(function(ed, e) { + t.lastElm = selection.getNode().nodeName; + }); + + ed.onKeyUp.add(function(ed, e) { + var bl, n = selection.getNode(), b = ed.getBody(); + + if (b.childNodes.length === 1 && n.nodeName == 'P') { + n = dom.rename(n, s.element); + selection.select(n); + selection.collapse(); + ed.nodeChanged(); + } else if (e.keyCode == 13 && !e.shiftKey && t.lastElm != 'P') { + bl = dom.getParent(n, 'p'); + + if (bl) { + dom.rename(bl, s.element); + ed.nodeChanged(); + } + } + }); + } + } + }, + + find : function(n, t, s) { + var ed = this.editor, w = ed.getDoc().createTreeWalker(n, 4, null, FALSE), c = -1; + + while (n = w.nextNode()) { + c++; + + // Index by node + if (t == 0 && n == s) + return c; + + // Node by index + if (t == 1 && c == s) + return n; + } + + return -1; + }, + + forceRoots : function(ed, e) { + var t = this, ed = t.editor, b = ed.getBody(), d = ed.getDoc(), se = ed.selection, s = se.getSel(), r = se.getRng(), si = -2, ei, so, eo, tr, c = -0xFFFFFF; + var nx, bl, bp, sp, le, nl = b.childNodes, i, n, eid; + + // Fix for bug #1863847 + //if (e && e.keyCode == 13) + // return TRUE; + + // Wrap non blocks into blocks + for (i = nl.length - 1; i >= 0; i--) { + nx = nl[i]; + + // Ignore internal elements + if (nx.nodeType === 1 && nx.getAttribute('_mce_type')) { + bl = null; + continue; + } + + // Is text or non block element + if (nx.nodeType === 3 || (!t.dom.isBlock(nx) && nx.nodeType !== 8 && !/^(script|mce:script|style|mce:style)$/i.test(nx.nodeName))) { + if (!bl) { + // Create new block but ignore whitespace + if (nx.nodeType != 3 || /[^\s]/g.test(nx.nodeValue)) { + // Store selection + if (si == -2 && r) { + if (!isIE) { + // If selection is element then mark it + if (r.startContainer.nodeType == 1 && (n = r.startContainer.childNodes[r.startOffset]) && n.nodeType == 1) { + // Save the id of the selected element + eid = n.getAttribute("id"); + n.setAttribute("id", "__mce"); + } else { + // If element is inside body, might not be the case in contentEdiable mode + if (ed.dom.getParent(r.startContainer, function(e) {return e === b;})) { + so = r.startOffset; + eo = r.endOffset; + si = t.find(b, 0, r.startContainer); + ei = t.find(b, 0, r.endContainer); + } + } + } else { + // Force control range into text range + if (r.item) { + tr = d.body.createTextRange(); + tr.moveToElementText(r.item(0)); + r = tr; + } + + tr = d.body.createTextRange(); + tr.moveToElementText(b); + tr.collapse(1); + bp = tr.move('character', c) * -1; + + tr = r.duplicate(); + tr.collapse(1); + sp = tr.move('character', c) * -1; + + tr = r.duplicate(); + tr.collapse(0); + le = (tr.move('character', c) * -1) - sp; + + si = sp - bp; + ei = le; + } + } + + // Uses replaceChild instead of cloneNode since it removes selected attribute from option elements on IE + // See: http://support.microsoft.com/kb/829907 + bl = ed.dom.create(ed.settings.forced_root_block); + nx.parentNode.replaceChild(bl, nx); + bl.appendChild(nx); + } + } else { + if (bl.hasChildNodes()) + bl.insertBefore(nx, bl.firstChild); + else + bl.appendChild(nx); + } + } else + bl = null; // Time to create new block + } + + // Restore selection + if (si != -2) { + if (!isIE) { + bl = b.getElementsByTagName(ed.settings.element)[0]; + r = d.createRange(); + + // Select last location or generated block + if (si != -1) + r.setStart(t.find(b, 1, si), so); + else + r.setStart(bl, 0); + + // Select last location or generated block + if (ei != -1) + r.setEnd(t.find(b, 1, ei), eo); + else + r.setEnd(bl, 0); + + if (s) { + s.removeAllRanges(); + s.addRange(r); + } + } else { + try { + r = s.createRange(); + r.moveToElementText(b); + r.collapse(1); + r.moveStart('character', si); + r.moveEnd('character', ei); + r.select(); + } catch (ex) { + // Ignore + } + } + } else if (!isIE && (n = ed.dom.get('__mce'))) { + // Restore the id of the selected element + if (eid) + n.setAttribute('id', eid); + else + n.removeAttribute('id'); + + // Move caret before selected element + r = d.createRange(); + r.setStartBefore(n); + r.setEndBefore(n); + se.setRng(r); + } + }, + + getParentBlock : function(n) { + var d = this.dom; + + return d.getParent(n, d.isBlock); + }, + + insertPara : function(e) { + var t = this, ed = t.editor, dom = ed.dom, d = ed.getDoc(), se = ed.settings, s = ed.selection.getSel(), r = s.getRangeAt(0), b = d.body; + var rb, ra, dir, sn, so, en, eo, sb, eb, bn, bef, aft, sc, ec, n, vp = dom.getViewPort(ed.getWin()), y, ch, car; + + // If root blocks are forced then use Operas default behavior since it's really good +// Removed due to bug: #1853816 +// if (se.forced_root_block && isOpera) +// return TRUE; + + // Setup before range + rb = d.createRange(); + + // If is before the first block element and in body, then move it into first block element + rb.setStart(s.anchorNode, s.anchorOffset); + rb.collapse(TRUE); + + // Setup after range + ra = d.createRange(); + + // If is before the first block element and in body, then move it into first block element + ra.setStart(s.focusNode, s.focusOffset); + ra.collapse(TRUE); + + // Setup start/end points + dir = rb.compareBoundaryPoints(rb.START_TO_END, ra) < 0; + sn = dir ? s.anchorNode : s.focusNode; + so = dir ? s.anchorOffset : s.focusOffset; + en = dir ? s.focusNode : s.anchorNode; + eo = dir ? s.focusOffset : s.anchorOffset; + + // If selection is in empty table cell + if (sn === en && /^(TD|TH)$/.test(sn.nodeName)) { + if (sn.firstChild.nodeName == 'BR') + dom.remove(sn.firstChild); // Remove BR + + // Create two new block elements + if (sn.childNodes.length == 0) { + ed.dom.add(sn, se.element, null, '
    '); + aft = ed.dom.add(sn, se.element, null, '
    '); + } else { + n = sn.innerHTML; + sn.innerHTML = ''; + ed.dom.add(sn, se.element, null, n); + aft = ed.dom.add(sn, se.element, null, '
    '); + } + + // Move caret into the last one + r = d.createRange(); + r.selectNodeContents(aft); + r.collapse(1); + ed.selection.setRng(r); + + return FALSE; + } + + // If the caret is in an invalid location in FF we need to move it into the first block + if (sn == b && en == b && b.firstChild && ed.dom.isBlock(b.firstChild)) { + sn = en = sn.firstChild; + so = eo = 0; + rb = d.createRange(); + rb.setStart(sn, 0); + ra = d.createRange(); + ra.setStart(en, 0); + } + + // Never use body as start or end node + sn = sn.nodeName == "HTML" ? d.body : sn; // Fix for Opera bug: https://bugs.opera.com/show_bug.cgi?id=273224&comments=yes + sn = sn.nodeName == "BODY" ? sn.firstChild : sn; + en = en.nodeName == "HTML" ? d.body : en; // Fix for Opera bug: https://bugs.opera.com/show_bug.cgi?id=273224&comments=yes + en = en.nodeName == "BODY" ? en.firstChild : en; + + // Get start and end blocks + sb = t.getParentBlock(sn); + eb = t.getParentBlock(en); + bn = sb ? sb.nodeName : se.element; // Get block name to create + + // Return inside list use default browser behavior + if (n = t.dom.getParent(sb, 'li,pre')) { + if (n.nodeName == 'LI') + return splitList(ed.selection, t.dom, n); + + return TRUE; + } + + // If caption or absolute layers then always generate new blocks within + if (sb && (sb.nodeName == 'CAPTION' || /absolute|relative|fixed/gi.test(dom.getStyle(sb, 'position', 1)))) { + bn = se.element; + sb = null; + } + + // If caption or absolute layers then always generate new blocks within + if (eb && (eb.nodeName == 'CAPTION' || /absolute|relative|fixed/gi.test(dom.getStyle(sb, 'position', 1)))) { + bn = se.element; + eb = null; + } + + // Use P instead + if (/(TD|TABLE|TH|CAPTION)/.test(bn) || (sb && bn == "DIV" && /left|right/gi.test(dom.getStyle(sb, 'float', 1)))) { + bn = se.element; + sb = eb = null; + } + + // Setup new before and after blocks + bef = (sb && sb.nodeName == bn) ? sb.cloneNode(0) : ed.dom.create(bn); + aft = (eb && eb.nodeName == bn) ? eb.cloneNode(0) : ed.dom.create(bn); + + // Remove id from after clone + aft.removeAttribute('id'); + + // Is header and cursor is at the end, then force paragraph under + if (/^(H[1-6])$/.test(bn) && isAtEnd(r, sb)) + aft = ed.dom.create(se.element); + + // Find start chop node + n = sc = sn; + do { + if (n == b || n.nodeType == 9 || t.dom.isBlock(n) || /(TD|TABLE|TH|CAPTION)/.test(n.nodeName)) + break; + + sc = n; + } while ((n = n.previousSibling ? n.previousSibling : n.parentNode)); + + // Find end chop node + n = ec = en; + do { + if (n == b || n.nodeType == 9 || t.dom.isBlock(n) || /(TD|TABLE|TH|CAPTION)/.test(n.nodeName)) + break; + + ec = n; + } while ((n = n.nextSibling ? n.nextSibling : n.parentNode)); + + // Place first chop part into before block element + if (sc.nodeName == bn) + rb.setStart(sc, 0); + else + rb.setStartBefore(sc); + + rb.setEnd(sn, so); + bef.appendChild(rb.cloneContents() || d.createTextNode('')); // Empty text node needed for Safari + + // Place secnd chop part within new block element + try { + ra.setEndAfter(ec); + } catch(ex) { + //console.debug(s.focusNode, s.focusOffset); + } + + ra.setStart(en, eo); + aft.appendChild(ra.cloneContents() || d.createTextNode('')); // Empty text node needed for Safari + + // Create range around everything + r = d.createRange(); + if (!sc.previousSibling && sc.parentNode.nodeName == bn) { + r.setStartBefore(sc.parentNode); + } else { + if (rb.startContainer.nodeName == bn && rb.startOffset == 0) + r.setStartBefore(rb.startContainer); + else + r.setStart(rb.startContainer, rb.startOffset); + } + + if (!ec.nextSibling && ec.parentNode.nodeName == bn) + r.setEndAfter(ec.parentNode); + else + r.setEnd(ra.endContainer, ra.endOffset); + + // Delete and replace it with new block elements + r.deleteContents(); + + if (isOpera) + ed.getWin().scrollTo(0, vp.y); + + // Never wrap blocks in blocks + if (bef.firstChild && bef.firstChild.nodeName == bn) + bef.innerHTML = bef.firstChild.innerHTML; + + if (aft.firstChild && aft.firstChild.nodeName == bn) + aft.innerHTML = aft.firstChild.innerHTML; + + // Padd empty blocks + if (isEmpty(bef)) + bef.innerHTML = '
    '; + + function appendStyles(e, en) { + var nl = [], nn, n, i; + + e.innerHTML = ''; + + // Make clones of style elements + if (se.keep_styles) { + n = en; + do { + // We only want style specific elements + if (/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(n.nodeName)) { + nn = n.cloneNode(FALSE); + dom.setAttrib(nn, 'id', ''); // Remove ID since it needs to be unique + nl.push(nn); + } + } while (n = n.parentNode); + } + + // Append style elements to aft + if (nl.length > 0) { + for (i = nl.length - 1, nn = e; i >= 0; i--) + nn = nn.appendChild(nl[i]); + + // Padd most inner style element + nl[0].innerHTML = isOpera ? ' ' : '
    '; // Extra space for Opera so that the caret can move there + return nl[0]; // Move caret to most inner element + } else + e.innerHTML = isOpera ? ' ' : '
    '; // Extra space for Opera so that the caret can move there + }; + + // Fill empty afterblook with current style + if (isEmpty(aft)) + car = appendStyles(aft, en); + + // Opera needs this one backwards for older versions + if (isOpera && parseFloat(opera.version()) < 9.5) { + r.insertNode(bef); + r.insertNode(aft); + } else { + r.insertNode(aft); + r.insertNode(bef); + } + + // Normalize + aft.normalize(); + bef.normalize(); + + function first(n) { + return d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, FALSE).nextNode() || n; + }; + + // Move cursor and scroll into view + r = d.createRange(); + r.selectNodeContents(isGecko ? first(car || aft) : car || aft); + r.collapse(1); + s.removeAllRanges(); + s.addRange(r); + + // scrollIntoView seems to scroll the parent window in most browsers now including FF 3.0b4 so it's time to stop using it and do it our selfs + y = ed.dom.getPos(aft).y; + ch = aft.clientHeight; + + // Is element within viewport + if (y < vp.y || y + ch > vp.y + vp.h) { + ed.getWin().scrollTo(0, y < vp.y ? y : y - vp.h + 25); // Needs to be hardcoded to roughly one line of text if a huge text block is broken into two blocks + //console.debug('SCROLL!', 'vp.y: ' + vp.y, 'y' + y, 'vp.h' + vp.h, 'clientHeight' + aft.clientHeight, 'yyy: ' + (y < vp.y ? y : y - vp.h + aft.clientHeight)); + } + + return FALSE; + }, + + backspaceDelete : function(e, bs) { + var t = this, ed = t.editor, b = ed.getBody(), dom = ed.dom, n, se = ed.selection, r = se.getRng(), sc = r.startContainer, n, w, tn; + + // The caret sometimes gets stuck in Gecko if you delete empty paragraphs + // This workaround removes the element by hand and moves the caret to the previous element + if (sc && ed.dom.isBlock(sc) && !/^(TD|TH)$/.test(sc.nodeName) && bs) { + if (sc.childNodes.length == 0 || (sc.childNodes.length == 1 && sc.firstChild.nodeName == 'BR')) { + // Find previous block element + n = sc; + while ((n = n.previousSibling) && !ed.dom.isBlock(n)) ; + + if (n) { + if (sc != b.firstChild) { + // Find last text node + w = ed.dom.doc.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, FALSE); + while (tn = w.nextNode()) + n = tn; + + // Place caret at the end of last text node + r = ed.getDoc().createRange(); + r.setStart(n, n.nodeValue ? n.nodeValue.length : 0); + r.setEnd(n, n.nodeValue ? n.nodeValue.length : 0); + se.setRng(r); + + // Remove the target container + ed.dom.remove(sc); + } + + return Event.cancel(e); + } + } + } + + // Gecko generates BR elements here and there, we don't like those so lets remove them + function handler(e) { + var pr; + + e = e.target; + + // A new BR was created in a block element, remove it + if (e && e.parentNode && e.nodeName == 'BR' && (n = t.getParentBlock(e))) { + pr = e.previousSibling; + + Event.remove(b, 'DOMNodeInserted', handler); + + // Is there whitespace at the end of the node before then we might need the pesky BR + // to place the caret at a correct location see bug: #2013943 + if (pr && pr.nodeType == 3 && /\s+$/.test(pr.nodeValue)) + return; + + // Only remove BR elements that got inserted in the middle of the text + if (e.previousSibling || e.nextSibling) + ed.dom.remove(e); + } + }; + + // Listen for new nodes + Event._add(b, 'DOMNodeInserted', handler); + + // Remove listener + window.setTimeout(function() { + Event._remove(b, 'DOMNodeInserted', handler); + }, 1); + } + }); +})(tinymce); + +(function(tinymce) { + // Shorten names + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, extend = tinymce.extend; + + tinymce.create('tinymce.ControlManager', { + ControlManager : function(ed, s) { + var t = this, i; + + s = s || {}; + t.editor = ed; + t.controls = {}; + t.onAdd = new tinymce.util.Dispatcher(t); + t.onPostRender = new tinymce.util.Dispatcher(t); + t.prefix = s.prefix || ed.id + '_'; + t._cls = {}; + + t.onPostRender.add(function() { + each(t.controls, function(c) { + c.postRender(); + }); + }); + }, + + get : function(id) { + return this.controls[this.prefix + id] || this.controls[id]; + }, + + setActive : function(id, s) { + var c = null; + + if (c = this.get(id)) + c.setActive(s); + + return c; + }, + + setDisabled : function(id, s) { + var c = null; + + if (c = this.get(id)) + c.setDisabled(s); + + return c; + }, + + add : function(c) { + var t = this; + + if (c) { + t.controls[c.id] = c; + t.onAdd.dispatch(c, t); + } + + return c; + }, + + createControl : function(n) { + var c, t = this, ed = t.editor; + + each(ed.plugins, function(p) { + if (p.createControl) { + c = p.createControl(n, t); + + if (c) + return false; + } + }); + + switch (n) { + case "|": + case "separator": + return t.createSeparator(); + } + + if (!c && ed.buttons && (c = ed.buttons[n])) + return t.createButton(n, c); + + return t.add(c); + }, + + createDropMenu : function(id, s, cc) { + var t = this, ed = t.editor, c, bm, v, cls; + + s = extend({ + 'class' : 'mceDropDown', + constrain : ed.settings.constrain_menus + }, s); + + s['class'] = s['class'] + ' ' + ed.getParam('skin') + 'Skin'; + if (v = ed.getParam('skin_variant')) + s['class'] += ' ' + ed.getParam('skin') + 'Skin' + v.substring(0, 1).toUpperCase() + v.substring(1); + + id = t.prefix + id; + cls = cc || t._cls.dropmenu || tinymce.ui.DropMenu; + c = t.controls[id] = new cls(id, s); + c.onAddItem.add(function(c, o) { + var s = o.settings; + + s.title = ed.getLang(s.title, s.title); + + if (!s.onclick) { + s.onclick = function(v) { + if (s.cmd) + ed.execCommand(s.cmd, s.ui || false, s.value); + }; + } + }); + + ed.onRemove.add(function() { + c.destroy(); + }); + + // Fix for bug #1897785, #1898007 + if (tinymce.isIE) { + c.onShowMenu.add(function() { + // IE 8 needs focus in order to store away a range with the current collapsed caret location + ed.focus(); + + bm = ed.selection.getBookmark(1); + }); + + c.onHideMenu.add(function() { + if (bm) { + ed.selection.moveToBookmark(bm); + bm = 0; + } + }); + } + + return t.add(c); + }, + + createListBox : function(id, s, cc) { + var t = this, ed = t.editor, cmd, c, cls; + + if (t.get(id)) + return null; + + s.title = ed.translate(s.title); + s.scope = s.scope || ed; + + if (!s.onselect) { + s.onselect = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } + + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + scope : s.scope, + control_manager : t + }, s); + + id = t.prefix + id; + + if (ed.settings.use_native_selects) + c = new tinymce.ui.NativeListBox(id, s); + else { + cls = cc || t._cls.listbox || tinymce.ui.ListBox; + c = new cls(id, s); + } + + t.controls[id] = c; + + // Fix focus problem in Safari + if (tinymce.isWebKit) { + c.onPostRender.add(function(c, n) { + // Store bookmark on mousedown + Event.add(n, 'mousedown', function() { + ed.bookmark = ed.selection.getBookmark(1); + }); + + // Restore on focus, since it might be lost + Event.add(n, 'focus', function() { + ed.selection.moveToBookmark(ed.bookmark); + ed.bookmark = null; + }); + }); + } + + if (c.hideMenu) + ed.onMouseDown.add(c.hideMenu, c); + + return t.add(c); + }, + + createButton : function(id, s, cc) { + var t = this, ed = t.editor, o, c, cls; + + if (t.get(id)) + return null; + + s.title = ed.translate(s.title); + s.label = ed.translate(s.label); + s.scope = s.scope || ed; + + if (!s.onclick && !s.menu_button) { + s.onclick = function() { + ed.execCommand(s.cmd, s.ui || false, s.value); + }; + } + + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + unavailable_prefix : ed.getLang('unavailable', ''), + scope : s.scope, + control_manager : t + }, s); + + id = t.prefix + id; + + if (s.menu_button) { + cls = cc || t._cls.menubutton || tinymce.ui.MenuButton; + c = new cls(id, s); + ed.onMouseDown.add(c.hideMenu, c); + } else { + cls = t._cls.button || tinymce.ui.Button; + c = new cls(id, s); + } + + return t.add(c); + }, + + createMenuButton : function(id, s, cc) { + s = s || {}; + s.menu_button = 1; + + return this.createButton(id, s, cc); + }, + + createSplitButton : function(id, s, cc) { + var t = this, ed = t.editor, cmd, c, cls; + + if (t.get(id)) + return null; + + s.title = ed.translate(s.title); + s.scope = s.scope || ed; + + if (!s.onclick) { + s.onclick = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } + + if (!s.onselect) { + s.onselect = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } + + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + scope : s.scope, + control_manager : t + }, s); + + id = t.prefix + id; + cls = cc || t._cls.splitbutton || tinymce.ui.SplitButton; + c = t.add(new cls(id, s)); + ed.onMouseDown.add(c.hideMenu, c); + + return c; + }, + + createColorSplitButton : function(id, s, cc) { + var t = this, ed = t.editor, cmd, c, cls, bm; + + if (t.get(id)) + return null; + + s.title = ed.translate(s.title); + s.scope = s.scope || ed; + + if (!s.onclick) { + s.onclick = function(v) { + if (tinymce.isIE) + bm = ed.selection.getBookmark(1); + + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } + + if (!s.onselect) { + s.onselect = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } + + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + 'menu_class' : ed.getParam('skin') + 'Skin', + scope : s.scope, + more_colors_title : ed.getLang('more_colors') + }, s); + + id = t.prefix + id; + cls = cc || t._cls.colorsplitbutton || tinymce.ui.ColorSplitButton; + c = new cls(id, s); + ed.onMouseDown.add(c.hideMenu, c); + + // Remove the menu element when the editor is removed + ed.onRemove.add(function() { + c.destroy(); + }); + + // Fix for bug #1897785, #1898007 + if (tinymce.isIE) { + c.onShowMenu.add(function() { + // IE 8 needs focus in order to store away a range with the current collapsed caret location + ed.focus(); + bm = ed.selection.getBookmark(1); + }); + + c.onHideMenu.add(function() { + if (bm) { + ed.selection.moveToBookmark(bm); + bm = 0; + } + }); + } + + return t.add(c); + }, + + createToolbar : function(id, s, cc) { + var c, t = this, cls; + + id = t.prefix + id; + cls = cc || t._cls.toolbar || tinymce.ui.Toolbar; + c = new cls(id, s); + + if (t.get(id)) + return null; + + return t.add(c); + }, + + createSeparator : function(cc) { + var cls = cc || this._cls.separator || tinymce.ui.Separator; + + return new cls(); + }, + + setControlType : function(n, c) { + return this._cls[n.toLowerCase()] = c; + }, + + destroy : function() { + each(this.controls, function(c) { + c.destroy(); + }); + + this.controls = null; + } + }); +})(tinymce); + +(function(tinymce) { + var Dispatcher = tinymce.util.Dispatcher, each = tinymce.each, isIE = tinymce.isIE, isOpera = tinymce.isOpera; + + tinymce.create('tinymce.WindowManager', { + WindowManager : function(ed) { + var t = this; + + t.editor = ed; + t.onOpen = new Dispatcher(t); + t.onClose = new Dispatcher(t); + t.params = {}; + t.features = {}; + }, + + open : function(s, p) { + var t = this, f = '', x, y, mo = t.editor.settings.dialog_type == 'modal', w, sw, sh, vp = tinymce.DOM.getViewPort(), u; + + // Default some options + s = s || {}; + p = p || {}; + sw = isOpera ? vp.w : screen.width; // Opera uses windows inside the Opera window + sh = isOpera ? vp.h : screen.height; + s.name = s.name || 'mc_' + new Date().getTime(); + s.width = parseInt(s.width || 320); + s.height = parseInt(s.height || 240); + s.resizable = true; + s.left = s.left || parseInt(sw / 2.0) - (s.width / 2.0); + s.top = s.top || parseInt(sh / 2.0) - (s.height / 2.0); + p.inline = false; + p.mce_width = s.width; + p.mce_height = s.height; + p.mce_auto_focus = s.auto_focus; + + if (mo) { + if (isIE) { + s.center = true; + s.help = false; + s.dialogWidth = s.width + 'px'; + s.dialogHeight = s.height + 'px'; + s.scroll = s.scrollbars || false; + } + } + + // Build features string + each(s, function(v, k) { + if (tinymce.is(v, 'boolean')) + v = v ? 'yes' : 'no'; + + if (!/^(name|url)$/.test(k)) { + if (isIE && mo) + f += (f ? ';' : '') + k + ':' + v; + else + f += (f ? ',' : '') + k + '=' + v; + } + }); + + t.features = s; + t.params = p; + t.onOpen.dispatch(t, s, p); + + u = s.url || s.file; + u = tinymce._addVer(u); + + try { + if (isIE && mo) { + w = 1; + window.showModalDialog(u, window, f); + } else + w = window.open(u, s.name, f); + } catch (ex) { + // Ignore + } + + if (!w) + alert(t.editor.getLang('popup_blocked')); + }, + + close : function(w) { + w.close(); + this.onClose.dispatch(this); + }, + + createInstance : function(cl, a, b, c, d, e) { + var f = tinymce.resolve(cl); + + return new f(a, b, c, d, e); + }, + + confirm : function(t, cb, s, w) { + w = w || window; + + cb.call(s || this, w.confirm(this._decode(this.editor.getLang(t, t)))); + }, + + alert : function(tx, cb, s, w) { + var t = this; + + w = w || window; + w.alert(t._decode(t.editor.getLang(tx, tx))); + + if (cb) + cb.call(s || t); + }, + + resizeBy : function(dw, dh, win) { + win.resizeBy(dw, dh); + }, + + // Internal functions + + _decode : function(s) { + return tinymce.DOM.decode(s).replace(/\\n/g, '\n'); + } + }); +}(tinymce)); +(function(tinymce) { + function CommandManager() { + var execCommands = {}, queryStateCommands = {}, queryValueCommands = {}; + + function add(collection, cmd, func, scope) { + if (typeof(cmd) == 'string') + cmd = [cmd]; + + tinymce.each(cmd, function(cmd) { + collection[cmd.toLowerCase()] = {func : func, scope : scope}; + }); + }; + + tinymce.extend(this, { + add : function(cmd, func, scope) { + add(execCommands, cmd, func, scope); + }, + + addQueryStateHandler : function(cmd, func, scope) { + add(queryStateCommands, cmd, func, scope); + }, + + addQueryValueHandler : function(cmd, func, scope) { + add(queryValueCommands, cmd, func, scope); + }, + + execCommand : function(scope, cmd, ui, value, args) { + if (cmd = execCommands[cmd.toLowerCase()]) { + if (cmd.func.call(scope || cmd.scope, ui, value, args) !== false) + return true; + } + }, + + queryCommandValue : function() { + if (cmd = queryValueCommands[cmd.toLowerCase()]) + return cmd.func.call(scope || cmd.scope, ui, value, args); + }, + + queryCommandState : function() { + if (cmd = queryStateCommands[cmd.toLowerCase()]) + return cmd.func.call(scope || cmd.scope, ui, value, args); + } + }); + }; + + tinymce.GlobalCommands = new CommandManager(); +})(tinymce); +(function(tinymce) { + tinymce.Formatter = function(ed) { + var formats = {}, + each = tinymce.each, + dom = ed.dom, + selection = ed.selection, + TreeWalker = tinymce.dom.TreeWalker, + rangeUtils = new tinymce.dom.RangeUtils(dom), + isValid = ed.schema.isValid, + isBlock = dom.isBlock, + forcedRootBlock = ed.settings.forced_root_block, + nodeIndex = dom.nodeIndex, + INVISIBLE_CHAR = '\uFEFF', + MCE_ATTR_RE = /^(src|href|style)$/, + FALSE = false, + TRUE = true, + undefined, + pendingFormats = {apply : [], remove : []}; + + function isArray(obj) { + return obj instanceof Array; + }; + + function getParents(node, selector) { + return dom.getParents(node, selector, dom.getRoot()); + }; + + function isCaretNode(node) { + return node.nodeType === 1 && (node.face === 'mceinline' || node.style.fontFamily === 'mceinline'); + }; + + // Public functions + + function get(name) { + return name ? formats[name] : formats; + }; + + function register(name, format) { + if (name) { + if (typeof(name) !== 'string') { + each(name, function(format, name) { + register(name, format); + }); + } else { + // Force format into array and add it to internal collection + format = format.length ? format : [format]; + + each(format, function(format) { + // Set deep to false by default on selector formats this to avoid removing + // alignment on images inside paragraphs when alignment is changed on paragraphs + if (format.deep === undefined) + format.deep = !format.selector; + + // Default to true + if (format.split === undefined) + format.split = !format.selector || format.inline; + + // Default to true + if (format.remove === undefined && format.selector && !format.inline) + format.remove = 'none'; + + // Mark format as a mixed format inline + block level + if (format.selector && format.inline) { + format.mixed = true; + format.block_expand = true; + } + + // Split classes if needed + if (typeof(format.classes) === 'string') + format.classes = format.classes.split(/\s+/); + }); + + formats[name] = format; + } + } + }; + + function apply(name, vars, node) { + var formatList = get(name), format = formatList[0], bookmark, rng, i; + + function moveStart(rng) { + var container = rng.startContainer, + offset = rng.startOffset, + walker, node; + + // Move startContainer/startOffset in to a suitable node + if (container.nodeType == 1 || container.nodeValue === "") { + container = container.nodeType == 1 ? container.childNodes[offset] : container; + walker = new TreeWalker(container, container.parentNode); + for (node = walker.current(); node; node = walker.next()) { + if (node.nodeType == 3 && !isBlock(node.parentNode) && !isWhiteSpaceNode(node)) { + rng.setStart(node, 0); + break; + } + } + } + + return rng; + }; + + function setElementFormat(elm, fmt) { + fmt = fmt || format; + + if (elm) { + each(fmt.styles, function(value, name) { + dom.setStyle(elm, name, replaceVars(value, vars)); + }); + + each(fmt.attributes, function(value, name) { + dom.setAttrib(elm, name, replaceVars(value, vars)); + }); + + each(fmt.classes, function(value) { + value = replaceVars(value, vars); + + if (!dom.hasClass(elm, value)) + dom.addClass(elm, value); + }); + } + }; + + function applyRngStyle(rng) { + var newWrappers = [], wrapName, wrapElm; + + // Setup wrapper element + wrapName = format.inline || format.block; + wrapElm = dom.create(wrapName); + setElementFormat(wrapElm); + + rangeUtils.walk(rng, function(nodes) { + var currentWrapElm; + + function process(node) { + var nodeName = node.nodeName.toLowerCase(), parentName = node.parentNode.nodeName.toLowerCase(), found; + + // Stop wrapping on br elements + if (isEq(nodeName, 'br')) { + currentWrapElm = 0; + + // Remove any br elements when we wrap things + if (format.block) + dom.remove(node); + + return; + } + + // If node is wrapper type + if (format.wrapper && matchNode(node, name, vars)) { + currentWrapElm = 0; + return; + } + + // Can we rename the block + if (format.block && !format.wrapper && isTextBlock(nodeName)) { + node = dom.rename(node, wrapName); + setElementFormat(node); + newWrappers.push(node); + currentWrapElm = 0; + return; + } + + // Handle selector patterns + if (format.selector) { + // Look for matching formats + each(formatList, function(format) { + if (dom.is(node, format.selector) && !isCaretNode(node)) { + setElementFormat(node, format); + found = true; + } + }); + + // Continue processing if a selector match wasn't found and a inline element is defined + if (!format.inline || found) { + currentWrapElm = 0; + return; + } + } + + // Is it valid to wrap this item + if (isValid(wrapName, nodeName) && isValid(parentName, wrapName)) { + // Start wrapping + if (!currentWrapElm) { + // Wrap the node + currentWrapElm = wrapElm.cloneNode(FALSE); + node.parentNode.insertBefore(currentWrapElm, node); + newWrappers.push(currentWrapElm); + } + + currentWrapElm.appendChild(node); + } else { + // Start a new wrapper for possible children + currentWrapElm = 0; + + each(tinymce.grep(node.childNodes), process); + + // End the last wrapper + currentWrapElm = 0; + } + }; + + // Process siblings from range + each(nodes, process); + }); + + // Cleanup + each(newWrappers, function(node) { + var childCount; + + function getChildCount(node) { + var count = 0; + + each(node.childNodes, function(node) { + if (!isWhiteSpaceNode(node) && !isBookmarkNode(node)) + count++; + }); + + return count; + }; + + function mergeStyles(node) { + var child, clone; + + each(node.childNodes, function(node) { + if (node.nodeType == 1 && !isBookmarkNode(node) && !isCaretNode(node)) { + child = node; + return FALSE; // break loop + } + }); + + // If child was found and of the same type as the current node + if (child && matchName(child, format)) { + clone = child.cloneNode(FALSE); + setElementFormat(clone); + + dom.replace(clone, node, TRUE); + dom.remove(child, 1); + } + + return clone || node; + }; + + childCount = getChildCount(node); + + // Remove empty nodes + if (childCount === 0) { + dom.remove(node, 1); + return; + } + + if (format.inline || format.wrapper) { + // Merges the current node with it's children of similar type to reduce the number of elements + if (!format.exact && childCount === 1) + node = mergeStyles(node); + + // Remove/merge children + each(formatList, function(format) { + // Merge all children of similar type will move styles from child to parent + // this: text + // will become: text + each(dom.select(format.inline, node), function(child) { + removeFormat(format, vars, child, format.exact ? child : null); + }); + }); + + // Remove child if direct parent is of same type + if (matchNode(node.parentNode, name, vars)) { + dom.remove(node, 1); + node = 0; + return TRUE; + } + + // Look for parent with similar style format + if (format.merge_with_parents) { + dom.getParent(node.parentNode, function(parent) { + if (matchNode(parent, name, vars)) { + dom.remove(node, 1); + node = 0; + return TRUE; + } + }); + } + + // Merge next and previous siblings if they are similar texttext becomes texttext + if (node) { + node = mergeSiblings(getNonWhiteSpaceSibling(node), node); + node = mergeSiblings(node, getNonWhiteSpaceSibling(node, TRUE)); + } + } + }); + }; + + if (format) { + if (node) { + rng = dom.createRng(); + + rng.setStartBefore(node); + rng.setEndAfter(node); + + applyRngStyle(rng); + } else { + if (!selection.isCollapsed() || !format.inline) { + // Apply formatting to selection + bookmark = selection.getBookmark(); + applyRngStyle(expandRng(selection.getRng(TRUE), formatList)); + + selection.moveToBookmark(bookmark); + selection.setRng(moveStart(selection.getRng(TRUE))); + ed.nodeChanged(); + } else + performCaretAction('apply', name, vars); + } + } + }; + + function remove(name, vars, node) { + var formatList = get(name), format = formatList[0], bookmark, i, rng; + + // Merges the styles for each node + function process(node) { + var children, i, l; + + // Grab the children first since the nodelist might be changed + children = tinymce.grep(node.childNodes); + + // Process current node + for (i = 0, l = formatList.length; i < l; i++) { + if (removeFormat(formatList[i], vars, node, node)) + break; + } + + // Process the children + if (format.deep) { + for (i = 0, l = children.length; i < l; i++) + process(children[i]); + } + }; + + function findFormatRoot(container) { + var formatRoot; + + // Find format root + each(getParents(container.parentNode).reverse(), function(parent) { + var format; + + // Find format root element + if (!formatRoot && parent.id != '_start' && parent.id != '_end') { + // Is the node matching the format we are looking for + format = matchNode(parent, name, vars); + if (format && format.split !== false) + formatRoot = parent; + } + }); + + return formatRoot; + }; + + function wrapAndSplit(format_root, container, target, split) { + var parent, clone, lastClone, firstClone, i, formatRootParent; + + // Format root found then clone formats and split it + if (format_root) { + formatRootParent = format_root.parentNode; + + for (parent = container.parentNode; parent && parent != formatRootParent; parent = parent.parentNode) { + clone = parent.cloneNode(FALSE); + + for (i = 0; i < formatList.length; i++) { + if (removeFormat(formatList[i], vars, clone, clone)) { + clone = 0; + break; + } + } + + // Build wrapper node + if (clone) { + if (lastClone) + clone.appendChild(lastClone); + + if (!firstClone) + firstClone = clone; + + lastClone = clone; + } + } + + // Never split block elements if the format is mixed + if (split && (!format.mixed || !isBlock(format_root))) + container = dom.split(format_root, container); + + // Wrap container in cloned formats + if (lastClone) { + target.parentNode.insertBefore(lastClone, target); + firstClone.appendChild(target); + } + } + + return container; + }; + + function splitToFormatRoot(container) { + return wrapAndSplit(findFormatRoot(container), container, container, true); + }; + + function unwrap(start) { + var node = dom.get(start ? '_start' : '_end'), + out = node[start ? 'firstChild' : 'lastChild']; + + dom.remove(node, true); + + return out; + }; + + function removeRngStyle(rng) { + var startContainer, endContainer; + + rng = expandRng(rng, formatList, TRUE); + + if (format.split) { + startContainer = getContainer(rng, TRUE); + endContainer = getContainer(rng); + + if (startContainer != endContainer) { + // Wrap start/end nodes in span element since these might be cloned/moved + startContainer = wrap(startContainer, 'span', {id : '_start', _mce_type : 'bookmark'}); + endContainer = wrap(endContainer, 'span', {id : '_end', _mce_type : 'bookmark'}); + + // Split start/end + splitToFormatRoot(startContainer); + splitToFormatRoot(endContainer); + + // Unwrap start/end to get real elements again + startContainer = unwrap(TRUE); + endContainer = unwrap(); + } else + startContainer = endContainer = splitToFormatRoot(startContainer); + + // Update range positions since they might have changed after the split operations + rng.startContainer = startContainer.parentNode; + rng.startOffset = nodeIndex(startContainer); + rng.endContainer = endContainer.parentNode; + rng.endOffset = nodeIndex(endContainer) + 1; + } + + // Remove items between start/end + rangeUtils.walk(rng, function(nodes) { + each(nodes, function(node) { + process(node); + }); + }); + }; + + // Handle node + if (node) { + rng = dom.createRng(); + rng.setStartBefore(node); + rng.setEndAfter(node); + removeRngStyle(rng); + return; + } + + if (!selection.isCollapsed() || !format.inline) { + bookmark = selection.getBookmark(); + removeRngStyle(selection.getRng(TRUE)); + selection.moveToBookmark(bookmark); + ed.nodeChanged(); + } else + performCaretAction('remove', name, vars); + }; + + function toggle(name, vars, node) { + if (match(name, vars, node)) + remove(name, vars, node); + else + apply(name, vars, node); + }; + + function matchNode(node, name, vars, similar) { + var formatList = get(name), format, i, classes; + + function matchItems(node, format, item_name) { + var key, value, items = format[item_name], i; + + // Check all items + if (items) { + // Non indexed object + if (items.length === undefined) { + for (key in items) { + if (items.hasOwnProperty(key)) { + if (item_name === 'attributes') + value = dom.getAttrib(node, key); + else + value = getStyle(node, key); + + if (similar && !value && !format.exact) + return; + + if ((!similar || format.exact) && !isEq(value, replaceVars(items[key], vars))) + return; + } + } + } else { + // Only one match needed for indexed arrays + for (i = 0; i < items.length; i++) { + if (item_name === 'attributes' ? dom.getAttrib(node, items[i]) : getStyle(node, items[i])) + return format; + } + } + } + + return format; + }; + + if (formatList && node) { + // Check each format in list + for (i = 0; i < formatList.length; i++) { + format = formatList[i]; + + // Name name, attributes, styles and classes + if (matchName(node, format) && matchItems(node, format, 'attributes') && matchItems(node, format, 'styles')) { + // Match classes + if (classes = format.classes) { + for (i = 0; i < classes.length; i++) { + if (!dom.hasClass(node, classes[i])) + return; + } + } + + return format; + } + } + } + }; + + function match(name, vars, node) { + var startNode, i; + + function matchParents(node) { + // Find first node with similar format settings + node = dom.getParent(node, function(node) { + return !!matchNode(node, name, vars, true); + }); + + // Do an exact check on the similar format element + return matchNode(node, name, vars); + }; + + // Check specified node + if (node) + return matchParents(node); + + // Check pending formats + if (selection.isCollapsed()) { + for (i = pendingFormats.apply.length - 1; i >= 0; i--) { + if (pendingFormats.apply[i].name == name) + return true; + } + + for (i = pendingFormats.remove.length - 1; i >= 0; i--) { + if (pendingFormats.remove[i].name == name) + return false; + } + + return matchParents(selection.getNode()); + } + + // Check selected node + node = selection.getNode(); + if (matchParents(node)) + return TRUE; + + // Check start node if it's different + startNode = selection.getStart(); + if (startNode != node) { + if (matchParents(startNode)) + return TRUE; + } + + return FALSE; + }; + + function matchAll(names, vars) { + var startElement, matchedFormatNames = [], checkedMap = {}, i, ni, name; + + // If the selection is collapsed then check pending formats + if (selection.isCollapsed()) { + for (ni = 0; ni < names.length; ni++) { + // If the name is to be removed, then stop it from being added + for (i = pendingFormats.remove.length - 1; i >= 0; i--) { + name = names[ni]; + + if (pendingFormats.remove[i].name == name) { + checkedMap[name] = true; + break; + } + } + } + + // If the format is to be applied + for (i = pendingFormats.apply.length - 1; i >= 0; i--) { + for (ni = 0; ni < names.length; ni++) { + name = names[ni]; + + if (!checkedMap[name] && pendingFormats.apply[i].name == name) { + checkedMap[name] = true; + matchedFormatNames.push(name); + } + } + } + } + + // Check start of selection for formats + startElement = selection.getStart(); + dom.getParent(startElement, function(node) { + var i, name; + + for (i = 0; i < names.length; i++) { + name = names[i]; + + if (!checkedMap[name] && matchNode(node, name, vars)) { + checkedMap[name] = true; + matchedFormatNames.push(name); + } + } + }); + + return matchedFormatNames; + }; + + function canApply(name) { + var formatList = get(name), startNode, parents, i, x, selector; + + if (formatList) { + startNode = selection.getStart(); + parents = getParents(startNode); + + for (x = formatList.length - 1; x >= 0; x--) { + selector = formatList[x].selector; + + // Format is not selector based, then always return TRUE + if (!selector) + return TRUE; + + for (i = parents.length - 1; i >= 0; i--) { + if (dom.is(parents[i], selector)) + return TRUE; + } + } + } + + return FALSE; + }; + + // Expose to public + tinymce.extend(this, { + get : get, + register : register, + apply : apply, + remove : remove, + toggle : toggle, + match : match, + matchAll : matchAll, + matchNode : matchNode, + canApply : canApply + }); + + // Private functions + + function matchName(node, format) { + // Check for inline match + if (isEq(node, format.inline)) + return TRUE; + + // Check for block match + if (isEq(node, format.block)) + return TRUE; + + // Check for selector match + if (format.selector) + return dom.is(node, format.selector); + }; + + function isEq(str1, str2) { + str1 = str1 || ''; + str2 = str2 || ''; + + str1 = '' + (str1.nodeName || str1); + str2 = '' + (str2.nodeName || str2); + + return str1.toLowerCase() == str2.toLowerCase(); + }; + + function getStyle(node, name) { + var styleVal = dom.getStyle(node, name); + + // Force the format to hex + if (name == 'color' || name == 'backgroundColor') + styleVal = dom.toHex(styleVal); + + // Opera will return bold as 700 + if (name == 'fontWeight' && styleVal == 700) + styleVal = 'bold'; + + return '' + styleVal; + }; + + function replaceVars(value, vars) { + if (typeof(value) != "string") + value = value(vars); + else if (vars) { + value = value.replace(/%(\w+)/g, function(str, name) { + return vars[name] || str; + }); + } + + return value; + }; + + function isWhiteSpaceNode(node) { + return node && node.nodeType === 3 && /^\s*$/.test(node.nodeValue); + }; + + function wrap(node, name, attrs) { + var wrapper = dom.create(name, attrs); + + node.parentNode.insertBefore(wrapper, node); + wrapper.appendChild(node); + + return wrapper; + }; + + function expandRng(rng, format, remove) { + var startContainer = rng.startContainer, + startOffset = rng.startOffset, + endContainer = rng.endContainer, + endOffset = rng.endOffset, sibling, lastIdx; + + // This function walks up the tree if there is no siblings before/after the node + function findParentContainer(container, child_name, sibling_name, root) { + var parent, child; + + root = root || dom.getRoot(); + + for (;;) { + // Check if we can move up are we at root level or body level + parent = container.parentNode; + + // Stop expanding on block elements or root depending on format + if (parent == root || (!format[0].block_expand && isBlock(parent))) + return container; + + for (sibling = parent[child_name]; sibling && sibling != container; sibling = sibling[sibling_name]) { + if (sibling.nodeType == 1 && !isBookmarkNode(sibling)) + return container; + + if (sibling.nodeType == 3 && !isWhiteSpaceNode(sibling)) + return container; + } + + container = container.parentNode; + } + + return container; + }; + + // If index based start position then resolve it + if (startContainer.nodeType == 1 && startContainer.hasChildNodes()) { + lastIdx = startContainer.childNodes.length - 1; + startContainer = startContainer.childNodes[startOffset > lastIdx ? lastIdx : startOffset]; + + if (startContainer.nodeType == 3) + startOffset = 0; + } + + // If index based end position then resolve it + if (endContainer.nodeType == 1 && endContainer.hasChildNodes()) { + lastIdx = endContainer.childNodes.length - 1; + endContainer = endContainer.childNodes[endOffset > lastIdx ? lastIdx : endOffset - 1]; + + if (endContainer.nodeType == 3) + endOffset = endContainer.nodeValue.length; + } + + // Exclude bookmark nodes if possible + if (isBookmarkNode(startContainer.parentNode)) + startContainer = startContainer.parentNode; + + if (isBookmarkNode(startContainer)) + startContainer = startContainer.nextSibling || startContainer; + + if (isBookmarkNode(endContainer.parentNode)) + endContainer = endContainer.parentNode; + + if (isBookmarkNode(endContainer)) + endContainer = endContainer.previousSibling || endContainer; + + // Move start/end point up the tree if the leaves are sharp and if we are in different containers + // Example * becomes !: !

    *texttext*

    ! + // This will reduce the number of wrapper elements that needs to be created + // Move start point up the tree + if (format[0].inline || format[0].block_expand) { + startContainer = findParentContainer(startContainer, 'firstChild', 'nextSibling'); + endContainer = findParentContainer(endContainer, 'lastChild', 'previousSibling'); + } + + // Expand start/end container to matching selector + if (format[0].selector && format[0].expand !== FALSE && !format[0].inline) { + function findSelectorEndPoint(container, sibling_name) { + var parents, i, y; + + if (container.nodeType == 3 && container.nodeValue.length == 0 && container[sibling_name]) + container = container[sibling_name]; + + parents = getParents(container); + for (i = 0; i < parents.length; i++) { + for (y = 0; y < format.length; y++) { + if (dom.is(parents[i], format[y].selector)) + return parents[i]; + } + } + + return container; + }; + + // Find new startContainer/endContainer if there is better one + startContainer = findSelectorEndPoint(startContainer, 'previousSibling'); + endContainer = findSelectorEndPoint(endContainer, 'nextSibling'); + } + + // Expand start/end container to matching block element or text node + if (format[0].block || format[0].selector) { + function findBlockEndPoint(container, sibling_name, sibling_name2) { + var node; + + // Expand to block of similar type + if (!format[0].wrapper) + node = dom.getParent(container, format[0].block); + + // Expand to first wrappable block element or any block element + if (!node) + node = dom.getParent(container.nodeType == 3 ? container.parentNode : container, isBlock); + + // Exclude inner lists from wrapping + if (node && format[0].wrapper) + node = getParents(node, 'ul,ol').reverse()[0] || node; + + // Didn't find a block element look for first/last wrappable element + if (!node) { + node = container; + + while (node[sibling_name] && !isBlock(node[sibling_name])) { + node = node[sibling_name]; + + // Break on BR but include it will be removed later on + // we can't remove it now since we need to check if it can be wrapped + if (isEq(node, 'br')) + break; + } + } + + return node || container; + }; + + // Find new startContainer/endContainer if there is better one + startContainer = findBlockEndPoint(startContainer, 'previousSibling'); + endContainer = findBlockEndPoint(endContainer, 'nextSibling'); + + // Non block element then try to expand up the leaf + if (format[0].block) { + if (!isBlock(startContainer)) + startContainer = findParentContainer(startContainer, 'firstChild', 'nextSibling'); + + if (!isBlock(endContainer)) + endContainer = findParentContainer(endContainer, 'lastChild', 'previousSibling'); + } + } + + // Setup index for startContainer + if (startContainer.nodeType == 1) { + startOffset = nodeIndex(startContainer); + startContainer = startContainer.parentNode; + } + + // Setup index for endContainer + if (endContainer.nodeType == 1) { + endOffset = nodeIndex(endContainer) + 1; + endContainer = endContainer.parentNode; + } + + // Return new range like object + return { + startContainer : startContainer, + startOffset : startOffset, + endContainer : endContainer, + endOffset : endOffset + }; + } + + function removeFormat(format, vars, node, compare_node) { + var i, attrs, stylesModified; + + // Check if node matches format + if (!matchName(node, format)) + return FALSE; + + // Should we compare with format attribs and styles + if (format.remove != 'all') { + // Remove styles + each(format.styles, function(value, name) { + value = replaceVars(value, vars); + + // Indexed array + if (typeof(name) === 'number') { + name = value; + compare_node = 0; + } + + if (!compare_node || isEq(getStyle(compare_node, name), value)) + dom.setStyle(node, name, ''); + + stylesModified = 1; + }); + + // Remove style attribute if it's empty + if (stylesModified && dom.getAttrib(node, 'style') == '') { + node.removeAttribute('style'); + node.removeAttribute('_mce_style'); + } + + // Remove attributes + each(format.attributes, function(value, name) { + var valueOut; + + value = replaceVars(value, vars); + + // Indexed array + if (typeof(name) === 'number') { + name = value; + compare_node = 0; + } + + if (!compare_node || isEq(dom.getAttrib(compare_node, name), value)) { + // Keep internal classes + if (name == 'class') { + value = dom.getAttrib(node, name); + if (value) { + // Build new class value where everything is removed except the internal prefixed classes + valueOut = ''; + each(value.split(/\s+/), function(cls) { + if (/mce\w+/.test(cls)) + valueOut += (valueOut ? ' ' : '') + cls; + }); + + // We got some internal classes left + if (valueOut) { + dom.setAttrib(node, name, valueOut); + return; + } + } + } + + // IE6 has a bug where the attribute doesn't get removed correctly + if (name == "class") + node.removeAttribute('className'); + + // Remove mce prefixed attributes + if (MCE_ATTR_RE.test(name)) + node.removeAttribute('_mce_' + name); + + node.removeAttribute(name); + } + }); + + // Remove classes + each(format.classes, function(value) { + value = replaceVars(value, vars); + + if (!compare_node || dom.hasClass(compare_node, value)) + dom.removeClass(node, value); + }); + + // Check for non internal attributes + attrs = dom.getAttribs(node); + for (i = 0; i < attrs.length; i++) { + if (attrs[i].nodeName.indexOf('_') !== 0) + return FALSE; + } + } + + // Remove the inline child if it's empty for example or + if (format.remove != 'none') { + removeNode(node, format); + return TRUE; + } + }; + + function removeNode(node, format) { + var parentNode = node.parentNode, rootBlockElm; + + if (format.block) { + if (!forcedRootBlock) { + function find(node, next, inc) { + node = getNonWhiteSpaceSibling(node, next, inc); + + return !node || (node.nodeName == 'BR' || isBlock(node)); + }; + + // Append BR elements if needed before we remove the block + if (isBlock(node) && !isBlock(parentNode)) { + if (!find(node, FALSE) && !find(node.firstChild, TRUE, 1)) + node.insertBefore(dom.create('br'), node.firstChild); + + if (!find(node, TRUE) && !find(node.lastChild, FALSE, 1)) + node.appendChild(dom.create('br')); + } + } else { + // Wrap the block in a forcedRootBlock if we are at the root of document + if (parentNode == dom.getRoot()) { + if (!format.list_block || !isEq(node, format.list_block)) { + each(tinymce.grep(node.childNodes), function(node) { + if (isValid(forcedRootBlock, node.nodeName.toLowerCase())) { + if (!rootBlockElm) + rootBlockElm = wrap(node, forcedRootBlock); + else + rootBlockElm.appendChild(node); + } else + rootBlockElm = 0; + }); + } + } + } + } + + // Never remove nodes that isn't the specified inline element if a selector is specified too + if (format.selector && format.inline && !isEq(format.inline, node)) + return; + + dom.remove(node, 1); + }; + + function getNonWhiteSpaceSibling(node, next, inc) { + if (node) { + next = next ? 'nextSibling' : 'previousSibling'; + + for (node = inc ? node : node[next]; node; node = node[next]) { + if (node.nodeType == 1 || !isWhiteSpaceNode(node)) + return node; + } + } + }; + + function isBookmarkNode(node) { + return node && node.nodeType == 1 && node.getAttribute('_mce_type') == 'bookmark'; + }; + + function mergeSiblings(prev, next) { + var marker, sibling, tmpSibling; + + function compareElements(node1, node2) { + // Not the same name + if (node1.nodeName != node2.nodeName) + return FALSE; + + function getAttribs(node) { + var attribs = {}; + + each(dom.getAttribs(node), function(attr) { + var name = attr.nodeName.toLowerCase(); + + // Don't compare internal attributes or style + if (name.indexOf('_') !== 0 && name !== 'style') + attribs[name] = dom.getAttrib(node, name); + }); + + return attribs; + }; + + function compareObjects(obj1, obj2) { + var value, name; + + for (name in obj1) { + // Obj1 has item obj2 doesn't have + if (obj1.hasOwnProperty(name)) { + value = obj2[name]; + + // Obj2 doesn't have obj1 item + if (value === undefined) + return FALSE; + + // Obj2 item has a different value + if (obj1[name] != value) + return FALSE; + + // Delete similar value + delete obj2[name]; + } + } + + // Check if obj 2 has something obj 1 doesn't have + for (name in obj2) { + // Obj2 has item obj1 doesn't have + if (obj2.hasOwnProperty(name)) + return FALSE; + } + + return TRUE; + }; + + // Attribs are not the same + if (!compareObjects(getAttribs(node1), getAttribs(node2))) + return FALSE; + + // Styles are not the same + if (!compareObjects(dom.parseStyle(dom.getAttrib(node1, 'style')), dom.parseStyle(dom.getAttrib(node2, 'style')))) + return FALSE; + + return TRUE; + }; + + // Check if next/prev exists and that they are elements + if (prev && next) { + function findElementSibling(node, sibling_name) { + for (sibling = node; sibling; sibling = sibling[sibling_name]) { + if (sibling.nodeType == 3 && !isWhiteSpaceNode(sibling)) + return node; + + if (sibling.nodeType == 1 && !isBookmarkNode(sibling)) + return sibling; + } + + return node; + }; + + // If previous sibling is empty then jump over it + prev = findElementSibling(prev, 'previousSibling'); + next = findElementSibling(next, 'nextSibling'); + + // Compare next and previous nodes + if (compareElements(prev, next)) { + // Append nodes between + for (sibling = prev.nextSibling; sibling && sibling != next;) { + tmpSibling = sibling; + sibling = sibling.nextSibling; + prev.appendChild(tmpSibling); + } + + // Remove next node + dom.remove(next); + + // Move children into prev node + each(tinymce.grep(next.childNodes), function(node) { + prev.appendChild(node); + }); + + return prev; + } + } + + return next; + }; + + function isTextBlock(name) { + return /^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(name); + }; + + function getContainer(rng, start) { + var container, offset, lastIdx; + + container = rng[start ? 'startContainer' : 'endContainer']; + offset = rng[start ? 'startOffset' : 'endOffset']; + + if (container.nodeType == 1) { + lastIdx = container.childNodes.length - 1; + + if (!start && offset) + offset--; + + container = container.childNodes[offset > lastIdx ? lastIdx : offset]; + } + + return container; + }; + + function performCaretAction(type, name, vars) { + var i, currentPendingFormats = pendingFormats[type], + otherPendingFormats = pendingFormats[type == 'apply' ? 'remove' : 'apply']; + + function hasPending() { + return pendingFormats.apply.length || pendingFormats.remove.length; + }; + + function resetPending() { + pendingFormats.apply = []; + pendingFormats.remove = []; + }; + + function perform(caret_node) { + // Apply pending formats + each(pendingFormats.apply.reverse(), function(item) { + apply(item.name, item.vars, caret_node); + }); + + // Remove pending formats + each(pendingFormats.remove.reverse(), function(item) { + remove(item.name, item.vars, caret_node); + }); + + dom.remove(caret_node, 1); + resetPending(); + }; + + // Check if it already exists then ignore it + for (i = currentPendingFormats.length - 1; i >= 0; i--) { + if (currentPendingFormats[i].name == name) + return; + } + + currentPendingFormats.push({name : name, vars : vars}); + + // Check if it's in the other type, then remove it + for (i = otherPendingFormats.length - 1; i >= 0; i--) { + if (otherPendingFormats[i].name == name) + otherPendingFormats.splice(i, 1); + } + + // Pending apply or remove formats + if (hasPending()) { + ed.getDoc().execCommand('FontName', false, 'mceinline'); + pendingFormats.lastRng = selection.getRng(); + + // IE will convert the current word + each(dom.select('font,span'), function(node) { + var bookmark; + + if (isCaretNode(node)) { + bookmark = selection.getBookmark(); + perform(node); + selection.moveToBookmark(bookmark); + ed.nodeChanged(); + } + }); + + // Only register listeners once if we need to + if (!pendingFormats.isListening && hasPending()) { + pendingFormats.isListening = true; + + each('onKeyDown,onKeyUp,onKeyPress,onMouseUp'.split(','), function(event) { + ed[event].addToTop(function(ed, e) { + // Do we have pending formats and is the selection moved has moved + if (hasPending() && !tinymce.dom.RangeUtils.compareRanges(pendingFormats.lastRng, selection.getRng())) { + each(dom.select('font,span'), function(node) { + var bookmark, textNode, rng; + + // Look for marker + if (isCaretNode(node)) { + textNode = node.firstChild; + + perform(node); + + rng = dom.createRng(); + rng.setStart(textNode, textNode.nodeValue.length); + rng.setEnd(textNode, textNode.nodeValue.length); + selection.setRng(rng); + ed.nodeChanged(); + } + }); + + // Always unbind and clear pending styles on keyup + if (e.type == 'keyup' || e.type == 'mouseup') + resetPending(); + } + }); + }); + } + } + }; + }; +})(tinymce); + +tinymce.onAddEditor.add(function(tinymce, ed) { + var filters, fontSizes, dom, settings = ed.settings; + + if (settings.inline_styles) { + fontSizes = tinymce.explode(settings.font_size_style_values); + + function replaceWithSpan(node, styles) { + dom.replace(dom.create('span', { + style : styles + }), node, 1); + }; + + filters = { + font : function(dom, node) { + replaceWithSpan(node, { + backgroundColor : node.style.backgroundColor, + color : node.color, + fontFamily : node.face, + fontSize : fontSizes[parseInt(node.size) - 1] + }); + }, + + u : function(dom, node) { + replaceWithSpan(node, { + textDecoration : 'underline' + }); + }, + + strike : function(dom, node) { + replaceWithSpan(node, { + textDecoration : 'line-through' + }); + } + }; + + function convert(editor, params) { + dom = editor.dom; + + if (settings.convert_fonts_to_spans) { + tinymce.each(dom.select('font,u,strike', params.node), function(node) { + filters[node.nodeName.toLowerCase()](ed.dom, node); + }); + } + }; + + ed.onPreProcess.add(convert); + + ed.onInit.add(function() { + ed.selection.onSetContent.add(convert); + }); + } +}); + diff --git a/webapps/totsys/common/js/tiny_mce/tinymce_lang_pack.zip b/webapps/totsys/common/js/tiny_mce/tinymce_lang_pack.zip new file mode 100644 index 0000000..56790bf Binary files /dev/null and b/webapps/totsys/common/js/tiny_mce/tinymce_lang_pack.zip differ diff --git a/webapps/totsys/common/js/tiny_mce/utils/editable_selects.js b/webapps/totsys/common/js/tiny_mce/utils/editable_selects.js new file mode 100644 index 0000000..6cf1b16 --- /dev/null +++ b/webapps/totsys/common/js/tiny_mce/utils/editable_selects.js @@ -0,0 +1,70 @@ +/** + * editable_selects.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +var TinyMCE_EditableSelects = { + editSelectElm : null, + + init : function() { + var nl = document.getElementsByTagName("select"), i, d = document, o; + + for (i=0; i'; + h += ' '; + + return h; +} + +function updateColor(img_id, form_element_id) { + document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value; +} + +function setBrowserDisabled(id, state) { + var img = document.getElementById(id); + var lnk = document.getElementById(id + "_link"); + + if (lnk) { + if (state) { + lnk.setAttribute("realhref", lnk.getAttribute("href")); + lnk.removeAttribute("href"); + tinyMCEPopup.dom.addClass(img, 'disabled'); + } else { + if (lnk.getAttribute("realhref")) + lnk.setAttribute("href", lnk.getAttribute("realhref")); + + tinyMCEPopup.dom.removeClass(img, 'disabled'); + } + } +} + +function getBrowserHTML(id, target_form_element, type, prefix) { + var option = prefix + "_" + type + "_browser_callback", cb, html; + + cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback")); + + if (!cb) + return ""; + + html = ""; + html += ''; + html += ' '; + + return html; +} + +function openBrowser(img_id, target_form_element, type, option) { + var img = document.getElementById(img_id); + + if (img.className != "mceButtonDisabled") + tinyMCEPopup.openBrowser(target_form_element, type, option); +} + +function selectByValue(form_obj, field_name, value, add_custom, ignore_case) { + if (!form_obj || !form_obj.elements[field_name]) + return; + + var sel = form_obj.elements[field_name]; + + var found = false; + for (var i=0; i parseInt(v)) + st = this.mark(f, n); + } + } + + return st; + }, + + hasClass : function(n, c, d) { + return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className); + }, + + getNum : function(n, c) { + c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0]; + c = c.replace(/[^0-9]/g, ''); + + return c; + }, + + addClass : function(n, c, b) { + var o = this.removeClass(n, c); + n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c; + }, + + removeClass : function(n, c) { + c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' '); + return n.className = c != ' ' ? c : ''; + }, + + tags : function(f, s) { + return f.getElementsByTagName(s); + }, + + mark : function(f, n) { + var s = this.settings; + + this.addClass(n, s.invalid_cls); + this.markLabels(f, n, s.invalid_cls); + + return false; + }, + + markLabels : function(f, n, ic) { + var nl, i; + + nl = this.tags(f, "label"); + for (i=0; i-1|| + str.value.indexOf('#!')>-1|| + str.value.indexOf('!@')>-1|| + str.value.indexOf('@!')>-1|| + str.value.indexOf('!`')>-1|| + str.value.indexOf('`!')>-1 + ){ + alert('!#,#!,!@,@!,!`,`! 기호는 사용할 수 없습니다. 다시 입력해 주세요'); + if(valueType.search("2") != -1) { + str.value=0; + }else{ + str.value=''; + } + str.focus(); + } + if(valueType.search("2") != -1) { + if(isNaN(str.value) || str.value == '' || str.value == ' ' || !(validNum.test(str.value))){ + alert(str.value+" 는 문자 또는 공백입니다. \n숫자를 입력하세요."); + str.value=0; + str.focus(); + } + }else if(valueType.search("1") != -1){ + if(validCharZero.test(str.value)){ + alert(str.value + " 문자의 끝에 숫자 0을 지원하지 않습니다. \n0 이외의 다른 숫자나 기호를 입력하세요"); + str.value = str.value+"."; + str.focus(); +// }else if(validCharZeroSt.test(str.value)){ +// alert(str.value + " 숫자형식의 첫글자에 0을 지원하지 않습니다. \n0 이외의 다른 숫자나 기호를 입력하세요"); +// str.value = "`"+str.value; +// str.focus(); + } + } + if( typeof(fn_checkValue) == "function" ) fn_checkValue(str, valueType); +} + + +function checkMaxNum(num, minNum, maxNum){ + if(num.value < minNum || num.value > maxNum){ + alert(minNum+" ~ "+ maxNum +" 사이의 값을입력하여 주세요."); + num.value=minNum; + num.focus(); + } +} + + +//인자값이 10보다 작을때 앞에 0을 붙여줌 +function changeNumber(num){ + return (num > 9) ? num : "0" + num; +} + +//공백제거 +function spaceAll(str){ + var index, len; + + while(true){ + index = str.indexOf(" "); + // 공백이 없으면 종료합니다. + if (index == -1) break; + // 문자열 길이를 구합니다. + len = str.length; + // 공백을 잘라냅니다. + str = str.substring(0, index) + str.substring((index+1),len); + } + + return str; +} + +/** + * 문자열의 byte 길이를 계산한다. + * UTF-8 환경에서 한글은 3 byte 이다. 영문, 특수기호는 1 byte. + * 2014.12.01 by YOUNGJUN,CHO + * @param {type} str + * @returns {Number} + */ +function getByteSize(str) { + if (str === null || str.length === 0) { + return 0; + } + + var size = 0; + + for (var i = 0 ; i < str.length ; i++) { + + var charCode = str.charAt(i).charCodeAt(0); + + if (charCode <= 0x00007F) { + size += 1; + } else if (charCode <= 0x0007FF) { + size += 2; + } else if (charCode <= 0x00FFFF) { + size += 3; + } else { + size += 4; + } + } + + return size; +} diff --git a/webapps/totsys/common/js/wz_tooltip/tip_centerwindow.js b/webapps/totsys/common/js/wz_tooltip/tip_centerwindow.js new file mode 100644 index 0000000..9c998d8 --- /dev/null +++ b/webapps/totsys/common/js/wz_tooltip/tip_centerwindow.js @@ -0,0 +1,104 @@ +/* +tip_centerwindow.js v. 1.21 + +The latest version is available at +http://www.walterzorn.com +or http://www.devira.com +or http://www.walterzorn.de + +Initial author: Walter Zorn +Last modified: 3.6.2008 + +Extension for the tooltip library wz_tooltip.js. +Centers a sticky tooltip in the window's visible clientarea, +optionally even if the window is being scrolled or resized. +*/ + +// Make sure that the core file wz_tooltip.js is included first +if(typeof config == "undefined") + alert("Error:\nThe core tooltip script file 'wz_tooltip.js' must be included first, before the plugin files!"); + +// Here we define new global configuration variable(s) (as members of the +// predefined "config." class). +// From each of these config variables, wz_tooltip.js will automatically derive +// a command which can be passed to Tip() or TagToTip() in order to customize +// tooltips individually. These command names are just the config variable +// name(s) translated to uppercase, +// e.g. from config. CenterWindow a command CENTERWINDOW will automatically be +// created. + +//=================== GLOBAL TOOLTIP CONFIGURATION =========================// +config. CenterWindow = false // true or false - set to true if you want this to be the default behaviour +config. CenterAlways = false // true or false - recenter if window is resized or scrolled +//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============// + + +// Create a new tt_Extension object (make sure that the name of that object, +// here ctrwnd, is unique amongst the extensions available for +// wz_tooltips.js): +var ctrwnd = new tt_Extension(); + +// Implement extension eventhandlers on which our extension should react +ctrwnd.OnLoadConfig = function() +{ + if(tt_aV[CENTERWINDOW]) + { + // Permit CENTERWINDOW only if the tooltip is sticky + if(tt_aV[STICKY]) + { + if(tt_aV[CENTERALWAYS]) + { + // IE doesn't support style.position "fixed" + if(tt_ie) + tt_AddEvtFnc(window, "scroll", Ctrwnd_DoCenter); + else + tt_aElt[0].style.position = "fixed"; + tt_AddEvtFnc(window, "resize", Ctrwnd_DoCenter); + } + return true; + } + tt_aV[CENTERWINDOW] = false; + } + return false; +}; +// We react on the first OnMouseMove event to center the tip on that occasion +ctrwnd.OnMoveBefore = Ctrwnd_DoCenter; +ctrwnd.OnKill = function() +{ + if(tt_aV[CENTERWINDOW] && tt_aV[CENTERALWAYS]) + { + tt_RemEvtFnc(window, "resize", Ctrwnd_DoCenter); + if(tt_ie) + tt_RemEvtFnc(window, "scroll", Ctrwnd_DoCenter); + else + tt_aElt[0].style.position = "absolute"; + } + return false; +}; +// Helper function +function Ctrwnd_DoCenter() +{ + if(tt_aV[CENTERWINDOW]) + { + var x, y, dx, dy; + + // Here we use some functions and variables (tt_w, tt_h) which the + // extension API of wz_tooltip.js provides for us + if(tt_ie || !tt_aV[CENTERALWAYS]) + { + dx = tt_GetScrollX(); + dy = tt_GetScrollY(); + } + else + { + dx = 0; + dy = 0; + } + // Position the tip, offset from the center by OFFSETX and OFFSETY + x = (tt_GetClientW() - tt_w) / 2 + dx + tt_aV[OFFSETX]; + y = (tt_GetClientH() - tt_h) / 2 + dy + tt_aV[OFFSETY]; + tt_SetTipPos(x, y); + return true; + } + return false; +} diff --git a/webapps/totsys/common/js/wz_tooltip/tip_followscroll.js b/webapps/totsys/common/js/wz_tooltip/tip_followscroll.js new file mode 100644 index 0000000..060d48b --- /dev/null +++ b/webapps/totsys/common/js/wz_tooltip/tip_followscroll.js @@ -0,0 +1,88 @@ +/* +tip_followscroll.js v. 1.11 + +The latest version is available at +http://www.walterzorn.com +or http://www.devira.com +or http://www.walterzorn.de + +Initial author: Walter Zorn +Last modified: 3.6.2008 + +Extension for the tooltip library wz_tooltip.js. +Lets a "sticky" tooltip keep its position inside the clientarea if the window +is scrolled. +*/ + +// Make sure that the core file wz_tooltip.js is included first +if(typeof config == "undefined") + alert("Error:\nThe core tooltip script file 'wz_tooltip.js' must be included first, before the plugin files!"); + +// Here we define new global configuration variable(s) (as members of the +// predefined "config." class). +// From each of these config variables, wz_tooltip.js will automatically derive +// a command which can be passed to Tip() or TagToTip() in order to customize +// tooltips individually. These command names are just the config variable +// name(s) translated to uppercase, +// e.g. from config. FollowScroll a command FOLLOWSCROLL will automatically be +// created. + +//=================== GLOBAL TOOLTIP CONFIGURATION ======================// +config. FollowScroll = false // true or false - set to true if you want this to be the default behaviour +//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============// + + +// Create a new tt_Extension object (make sure that the name of that object, +// here fscrl, is unique amongst the extensions available for +// wz_tooltips.js): +var fscrl = new tt_Extension(); + +// Implement extension eventhandlers on which our extension should react +fscrl.OnShow = function() +{ + if(tt_aV[FOLLOWSCROLL]) + { + // Permit FOLLOWSCROLL only if the tooltip is sticky + if(tt_aV[STICKY]) + { + var x = tt_x - tt_GetScrollX(), y = tt_y - tt_GetScrollY(); + + if(tt_ie) + { + fscrl.MoveOnScrl.offX = x; + fscrl.MoveOnScrl.offY = y; + fscrl.AddRemEvtFncs(tt_AddEvtFnc); + } + else + { + tt_SetTipPos(x, y); + tt_aElt[0].style.position = "fixed"; + } + return true; + } + tt_aV[FOLLOWSCROLL] = false; + } + return false; +}; +fscrl.OnHide = function() +{ + if(tt_aV[FOLLOWSCROLL]) + { + if(tt_ie) + fscrl.AddRemEvtFncs(tt_RemEvtFnc); + else + tt_aElt[0].style.position = "absolute"; + } +}; +// Helper functions (encapsulate in the class to avoid conflicts with other +// extensions) +fscrl.MoveOnScrl = function() +{ + tt_SetTipPos(fscrl.MoveOnScrl.offX + tt_GetScrollX(), fscrl.MoveOnScrl.offY + tt_GetScrollY()); +}; +fscrl.AddRemEvtFncs = function(PAddRem) +{ + PAddRem(window, "resize", fscrl.MoveOnScrl); + PAddRem(window, "scroll", fscrl.MoveOnScrl); +}; + diff --git a/webapps/totsys/common/js/wz_tooltip/wz_tooltip.js b/webapps/totsys/common/js/wz_tooltip/wz_tooltip.js new file mode 100644 index 0000000..01f55f2 --- /dev/null +++ b/webapps/totsys/common/js/wz_tooltip/wz_tooltip.js @@ -0,0 +1,1301 @@ +/* This notice must be untouched at all times. +Copyright (c) 2002-2008 Walter Zorn. All rights reserved. + +wz_tooltip.js v. 5.31 + +The latest version is available at +http://www.walterzorn.com +or http://www.devira.com +or http://www.walterzorn.de + +Created 1.12.2002 by Walter Zorn (Web: http://www.walterzorn.com ) +Last modified: 7.11.2008 + +Easy-to-use cross-browser tooltips. +Just include the script at the beginning of the section, and invoke +Tip('Tooltip text') to show and UnTip() to hide the tooltip, from the desired +HTML eventhandlers. Example: +My home page +No container DIV required. +By default, width and height of tooltips are automatically adapted to content. +Is even capable of dynamically converting arbitrary HTML elements to tooltips +by calling TagToTip('ID_of_HTML_element_to_be_converted') instead of Tip(), +which means you can put important, search-engine-relevant stuff into tooltips. +Appearance & behaviour of tooltips can be individually configured +via commands passed to Tip() or TagToTip(). + +Tab Width: 4 +LICENSE: LGPL + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License (LGPL) as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +For more details on the GNU Lesser General Public License, +see http://www.gnu.org/copyleft/lesser.html +*/ + +var config = new Object(); + + +//=================== GLOBAL TOOLTIP CONFIGURATION =========================// +var tt_Debug = true // false or true - recommended: false once you release your page to the public +var tt_Enabled = true // Allows to (temporarily) suppress tooltips, e.g. by providing the user with a button that sets this global variable to false +var TagsToTip = true // false or true - if true, HTML elements to be converted to tooltips via TagToTip() are automatically hidden; + // if false, you should hide those HTML elements yourself + +// For each of the following config variables there exists a command, which is +// just the variablename in uppercase, to be passed to Tip() or TagToTip() to +// configure tooltips individually. Individual commands override global +// configuration. Order of commands is arbitrary. +// Example: onmouseover="Tip('Tooltip text', LEFT, true, BGCOLOR, '#FF9900', FADEIN, 400)" + +config. Above = false // false or true - tooltip above mousepointer +config. BgColor = '#E2E7FF' // Background colour (HTML colour value, in quotes) +config. BgImg = '' // Path to background image, none if empty string '' +config. BorderColor = '#003099' +config. BorderStyle = 'solid' // Any permitted CSS value, but I recommend 'solid', 'dotted' or 'dashed' +config. BorderWidth = 1 +config. CenterMouse = false // false or true - center the tip horizontally below (or above) the mousepointer +config. ClickClose = false // false or true - close tooltip if the user clicks somewhere +config. ClickSticky = false // false or true - make tooltip sticky if user left-clicks on the hovered element while the tooltip is active +config. CloseBtn = false // false or true - closebutton in titlebar +config. CloseBtnColors = ['#990000', '#FFFFFF', '#DD3333', '#FFFFFF'] // [Background, text, hovered background, hovered text] - use empty strings '' to inherit title colours +config. CloseBtnText = ' X ' // Close button text (may also be an image tag) +config. CopyContent = true // When converting a HTML element to a tooltip, copy only the element's content, rather than converting the element by its own +config. Delay = 400 // Time span in ms until tooltip shows up +config. Duration = 0 // Time span in ms after which the tooltip disappears; 0 for infinite duration, < 0 for delay in ms _after_ the onmouseout until the tooltip disappears +config. Exclusive = false // false or true - no other tooltip can appear until the current one has actively been closed +config. FadeIn = 100 // Fade-in duration in ms, e.g. 400; 0 for no animation +config. FadeOut = 100 +config. FadeInterval = 30 // Duration of each fade step in ms (recommended: 30) - shorter is smoother but causes more CPU-load +config. Fix = null // Fixated position, two modes. Mode 1: x- an y-coordinates in brackets, e.g. [210, 480]. Mode 2: Show tooltip at a position related to an HTML element: [ID of HTML element, x-offset, y-offset from HTML element], e.g. ['SomeID', 10, 30]. Value null (default) for no fixated positioning. +config. FollowMouse = true // false or true - tooltip follows the mouse +config. FontColor = '#000044' +config. FontFace = 'Verdana,Geneva,sans-serif' +config. FontSize = '8pt' // E.g. '9pt' or '12px' - unit is mandatory +config. FontWeight = 'normal' // 'normal' or 'bold'; +config. Height = 0 // Tooltip height; 0 for automatic adaption to tooltip content, < 0 (e.g. -100) for a maximum for automatic adaption +config. JumpHorz = false // false or true - jump horizontally to other side of mouse if tooltip would extend past clientarea boundary +config. JumpVert = true // false or true - jump vertically " +config. Left = false // false or true - tooltip on the left of the mouse +config. OffsetX = 14 // Horizontal offset of left-top corner from mousepointer +config. OffsetY = 8 // Vertical offset +config. Opacity = 100 // Integer between 0 and 100 - opacity of tooltip in percent +config. Padding = 3 // Spacing between border and content +config. Shadow = false // false or true +config. ShadowColor = '#C0C0C0' +config. ShadowWidth = 5 +config. Sticky = false // false or true - fixate tip, ie. don't follow the mouse and don't hide on mouseout +config. TextAlign = 'left' // 'left', 'right' or 'justify' +config. Title = '' // Default title text applied to all tips (no default title: empty string '') +config. TitleAlign = 'left' // 'left' or 'right' - text alignment inside the title bar +config. TitleBgColor = '' // If empty string '', BorderColor will be used +config. TitleFontColor = '#FFFFFF' // Color of title text - if '', BgColor (of tooltip body) will be used +config. TitleFontFace = '' // If '' use FontFace (boldified) +config. TitleFontSize = '' // If '' use FontSize +config. TitlePadding = 2 +config. Width = 0 // Tooltip width; 0 for automatic adaption to tooltip content; < -1 (e.g. -240) for a maximum width for that automatic adaption; + // -1: tooltip width confined to the width required for the titlebar +//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============// + + + + +//===================== PUBLIC =============================================// +function Tip() +{ + tt_Tip(arguments, null); +} +function TagToTip() +{ + var t2t = tt_GetElt(arguments[0]); + if(t2t) + tt_Tip(arguments, t2t); +} +function UnTip() +{ + tt_OpReHref(); + if(tt_aV[DURATION] < 0 && (tt_iState & 0x2)) + tt_tDurt.Timer("tt_HideInit()", -tt_aV[DURATION], true); + else if(!(tt_aV[STICKY] && (tt_iState & 0x2))) + tt_HideInit(); +} + +//================== PUBLIC PLUGIN API =====================================// +// Extension eventhandlers currently supported: +// OnLoadConfig, OnCreateContentString, OnSubDivsCreated, OnShow, OnMoveBefore, +// OnMoveAfter, OnHideInit, OnHide, OnKill + +var tt_aElt = new Array(10), // Container DIV, outer title & body DIVs, inner title & body TDs, closebutton SPAN, shadow DIVs, and IFRAME to cover windowed elements in IE +tt_aV = new Array(), // Caches and enumerates config data for currently active tooltip +tt_sContent, // Inner tooltip text or HTML +tt_t2t, tt_t2tDad, // Tag converted to tip, and its DOM parent element +tt_musX, tt_musY, +tt_over, +tt_x, tt_y, tt_w, tt_h; // Position, width and height of currently displayed tooltip + +function tt_Extension() +{ + tt_ExtCmdEnum(); + tt_aExt[tt_aExt.length] = this; + return this; +} +function tt_SetTipPos(x, y) +{ + var css = tt_aElt[0].style; + + tt_x = x; + tt_y = y; + css.left = x + "px"; + css.top = y + "px"; + if(tt_ie56) + { + var ifrm = tt_aElt[tt_aElt.length - 1]; + if(ifrm) + { + ifrm.style.left = css.left; + ifrm.style.top = css.top; + } + } +} +function tt_HideInit() +{ + if(tt_iState) + { + tt_ExtCallFncs(0, "HideInit"); + tt_iState &= ~(0x4 | 0x8); + if(tt_flagOpa && tt_aV[FADEOUT]) + { + tt_tFade.EndTimer(); + if(tt_opa) + { + var n = Math.round(tt_aV[FADEOUT] / (tt_aV[FADEINTERVAL] * (tt_aV[OPACITY] / tt_opa))); + tt_Fade(tt_opa, tt_opa, 0, n); + return; + } + } + tt_tHide.Timer("tt_Hide();", 1, false); + } +} +function tt_Hide() +{ + if(tt_db && tt_iState) + { + tt_OpReHref(); + if(tt_iState & 0x2) + { + tt_aElt[0].style.visibility = "hidden"; + tt_ExtCallFncs(0, "Hide"); + } + tt_tShow.EndTimer(); + tt_tHide.EndTimer(); + tt_tDurt.EndTimer(); + tt_tFade.EndTimer(); + if(!tt_op && !tt_ie) + { + tt_tWaitMov.EndTimer(); + tt_bWait = false; + } + if(tt_aV[CLICKCLOSE] || tt_aV[CLICKSTICKY]) + tt_RemEvtFnc(document, "mouseup", tt_OnLClick); + tt_ExtCallFncs(0, "Kill"); + // In case of a TagToTip tip, hide converted DOM node and + // re-insert it into DOM + if(tt_t2t && !tt_aV[COPYCONTENT]) + tt_UnEl2Tip(); + tt_iState = 0; + tt_over = null; + tt_ResetMainDiv(); + if(tt_aElt[tt_aElt.length - 1]) + tt_aElt[tt_aElt.length - 1].style.display = "none"; + } +} +function tt_GetElt(id) +{ + return(document.getElementById ? document.getElementById(id) + : document.all ? document.all[id] + : null); +} +function tt_GetDivW(el) +{ + return(el ? (el.offsetWidth || el.style.pixelWidth || 0) : 0); +} +function tt_GetDivH(el) +{ + return(el ? (el.offsetHeight || el.style.pixelHeight || 0) : 0); +} +function tt_GetScrollX() +{ + return(window.pageXOffset || (tt_db ? (tt_db.scrollLeft || 0) : 0)); +} +function tt_GetScrollY() +{ + return(window.pageYOffset || (tt_db ? (tt_db.scrollTop || 0) : 0)); +} +function tt_GetClientW() +{ + return tt_GetWndCliSiz("Width"); +} +function tt_GetClientH() +{ + return tt_GetWndCliSiz("Height"); +} +function tt_GetEvtX(e) +{ + return (e ? ((typeof(e.pageX) != tt_u) ? e.pageX : (e.clientX + tt_GetScrollX())) : 0); +} +function tt_GetEvtY(e) +{ + return (e ? ((typeof(e.pageY) != tt_u) ? e.pageY : (e.clientY + tt_GetScrollY())) : 0); +} +function tt_AddEvtFnc(el, sEvt, PFnc) +{ + if(el) + { + if(el.addEventListener) + el.addEventListener(sEvt, PFnc, false); + else + el.attachEvent("on" + sEvt, PFnc); + } +} +function tt_RemEvtFnc(el, sEvt, PFnc) +{ + if(el) + { + if(el.removeEventListener) + el.removeEventListener(sEvt, PFnc, false); + else + el.detachEvent("on" + sEvt, PFnc); + } +} +function tt_GetDad(el) +{ + return(el.parentNode || el.parentElement || el.offsetParent); +} +function tt_MovDomNode(el, dadFrom, dadTo) +{ + if(dadFrom) + dadFrom.removeChild(el); + if(dadTo) + dadTo.appendChild(el); +} + +//====================== PRIVATE ===========================================// +var tt_aExt = new Array(), // Array of extension objects + +tt_db, tt_op, tt_ie, tt_ie56, tt_bBoxOld, // Browser flags +tt_body, +tt_ovr_, // HTML element the mouse is currently over +tt_flagOpa, // Opacity support: 1=IE, 2=Khtml, 3=KHTML, 4=Moz, 5=W3C +tt_maxPosX, tt_maxPosY, +tt_iState = 0, // Tooltip active |= 1, shown |= 2, move with mouse |= 4, exclusive |= 8 +tt_opa, // Currently applied opacity +tt_bJmpVert, tt_bJmpHorz,// Tip temporarily on other side of mouse +tt_elDeHref, // The tag from which we've removed the href attribute +// Timer +tt_tShow = new Number(0), tt_tHide = new Number(0), tt_tDurt = new Number(0), +tt_tFade = new Number(0), tt_tWaitMov = new Number(0), +tt_bWait = false, +tt_u = "undefined"; + + +function tt_Init() +{ + tt_MkCmdEnum(); + // Send old browsers instantly to hell + if(!tt_Browser() || !tt_MkMainDiv()) + return; + tt_IsW3cBox(); + tt_OpaSupport(); + tt_AddEvtFnc(document, "mousemove", tt_Move); + // In Debug mode we search for TagToTip() calls in order to notify + // the user if they've forgotten to set the TagsToTip config flag + if(TagsToTip || tt_Debug) + tt_SetOnloadFnc(); + // Ensure the tip be hidden when the page unloads + tt_AddEvtFnc(window, "unload", tt_Hide); +} +// Creates command names by translating config variable names to upper case +function tt_MkCmdEnum() +{ + var n = 0; + for(var i in config) + eval("window." + i.toString().toUpperCase() + " = " + n++); + tt_aV.length = n; +} +function tt_Browser() +{ + var n, nv, n6, w3c; + + n = navigator.userAgent.toLowerCase(), + nv = navigator.appVersion; + tt_op = (document.defaultView && typeof(eval("w" + "indow" + "." + "o" + "p" + "er" + "a")) != tt_u); + tt_ie = n.indexOf("msie") != -1 && document.all && !tt_op; + if(tt_ie) + { + var ieOld = (!document.compatMode || document.compatMode == "BackCompat"); + tt_db = !ieOld ? document.documentElement : (document.body || null); + if(tt_db) + tt_ie56 = parseFloat(nv.substring(nv.indexOf("MSIE") + 5)) >= 5.5 + && typeof document.body.style.maxHeight == tt_u; + } + else + { + tt_db = document.documentElement || document.body || + (document.getElementsByTagName ? document.getElementsByTagName("body")[0] + : null); + if(!tt_op) + { + n6 = document.defaultView && typeof document.defaultView.getComputedStyle != tt_u; + w3c = !n6 && document.getElementById; + } + } + tt_body = (document.getElementsByTagName ? document.getElementsByTagName("body")[0] + : (document.body || null)); + if(tt_ie || n6 || tt_op || w3c) + { + if(tt_body && tt_db) + { + if(document.attachEvent || document.addEventListener) + return true; + } + else + tt_Err("wz_tooltip.js must be included INSIDE the body section," + + " immediately after the opening tag.", false); + } + tt_db = null; + return false; +} +function tt_MkMainDiv() +{ + // Create the tooltip DIV + if(tt_body.insertAdjacentHTML) + tt_body.insertAdjacentHTML("afterBegin", tt_MkMainDivHtm()); + else if(typeof tt_body.innerHTML != tt_u && document.createElement && tt_body.appendChild) + tt_body.appendChild(tt_MkMainDivDom()); + if(window.tt_GetMainDivRefs /* FireFox Alzheimer */ && tt_GetMainDivRefs()) + return true; + tt_db = null; + return false; +} +function tt_MkMainDivHtm() +{ + return( + '
    ' + + (tt_ie56 ? ('') + : '') + ); +} +function tt_MkMainDivDom() +{ + var el = document.createElement("div"); + if(el) + el.id = "WzTtDiV"; + return el; +} +function tt_GetMainDivRefs() +{ + tt_aElt[0] = tt_GetElt("WzTtDiV"); + if(tt_ie56 && tt_aElt[0]) + { + tt_aElt[tt_aElt.length - 1] = tt_GetElt("WzTtIfRm"); + if(!tt_aElt[tt_aElt.length - 1]) + tt_aElt[0] = null; + } + if(tt_aElt[0]) + { + var css = tt_aElt[0].style; + + css.visibility = "hidden"; + css.position = "absolute"; + css.overflow = "hidden"; + return true; + } + return false; +} +function tt_ResetMainDiv() +{ + tt_SetTipPos(0, 0); + tt_aElt[0].innerHTML = ""; + tt_aElt[0].style.width = "0px"; + tt_h = 0; +} +function tt_IsW3cBox() +{ + var css = tt_aElt[0].style; + + css.padding = "10px"; + css.width = "40px"; + tt_bBoxOld = (tt_GetDivW(tt_aElt[0]) == 40); + css.padding = "0px"; + tt_ResetMainDiv(); +} +function tt_OpaSupport() +{ + var css = tt_body.style; + + tt_flagOpa = (typeof(css.KhtmlOpacity) != tt_u) ? 2 + : (typeof(css.KHTMLOpacity) != tt_u) ? 3 + : (typeof(css.MozOpacity) != tt_u) ? 4 + : (typeof(css.opacity) != tt_u) ? 5 + : (typeof(css.filter) != tt_u) ? 1 + : 0; +} +// Ported from http://dean.edwards.name/weblog/2006/06/again/ +// (Dean Edwards et al.) +function tt_SetOnloadFnc() +{ + tt_AddEvtFnc(document, "DOMContentLoaded", tt_HideSrcTags); + tt_AddEvtFnc(window, "load", tt_HideSrcTags); + if(tt_body.attachEvent) + tt_body.attachEvent("onreadystatechange", + function() { + if(tt_body.readyState == "complete") + tt_HideSrcTags(); + } ); + if(/WebKit|KHTML/i.test(navigator.userAgent)) + { + var t = setInterval(function() { + if(/loaded|complete/.test(document.readyState)) + { + clearInterval(t); + tt_HideSrcTags(); + } + }, 10); + } +} +function tt_HideSrcTags() +{ + if(!window.tt_HideSrcTags || window.tt_HideSrcTags.done) + return; + window.tt_HideSrcTags.done = true; + if(!tt_HideSrcTagsRecurs(tt_body)) + tt_Err("There are HTML elements to be converted to tooltips.\nIf you" + + " want these HTML elements to be automatically hidden, you" + + " must edit wz_tooltip.js, and set TagsToTip in the global" + + " tooltip configuration to true.", true); +} +function tt_HideSrcTagsRecurs(dad) +{ + var ovr, asT2t; + // Walk the DOM tree for tags that have an onmouseover or onclick attribute + // containing a TagToTip('...') call. + // (.childNodes first since .children is bugous in Safari) + var a = dad.childNodes || dad.children || null; + + for(var i = a ? a.length : 0; i;) + {--i; + if(!tt_HideSrcTagsRecurs(a[i])) + return false; + ovr = a[i].getAttribute ? (a[i].getAttribute("onmouseover") || a[i].getAttribute("onclick")) + : (typeof a[i].onmouseover == "function") ? (a[i].onmouseover || a[i].onclick) + : null; + if(ovr) + { + asT2t = ovr.toString().match(/TagToTip\s*\(\s*'[^'.]+'\s*[\),]/); + if(asT2t && asT2t.length) + { + if(!tt_HideSrcTag(asT2t[0])) + return false; + } + } + } + return true; +} +function tt_HideSrcTag(sT2t) +{ + var id, el; + + // The ID passed to the found TagToTip() call identifies an HTML element + // to be converted to a tooltip, so hide that element + id = sT2t.replace(/.+'([^'.]+)'.+/, "$1"); + el = tt_GetElt(id); + if(el) + { + if(tt_Debug && !TagsToTip) + return false; + else + el.style.display = "none"; + } + else + tt_Err("Invalid ID\n'" + id + "'\npassed to TagToTip()." + + " There exists no HTML element with that ID.", true); + return true; +} +function tt_Tip(arg, t2t) +{ + if(!tt_db || (tt_iState & 0x8)) + return; + if(tt_iState) + tt_Hide(); + if(!tt_Enabled) + return; + tt_t2t = t2t; + if(!tt_ReadCmds(arg)) + return; + tt_iState = 0x1 | 0x4; + tt_AdaptConfig1(); + tt_MkTipContent(arg); + tt_MkTipSubDivs(); + tt_FormatTip(); + tt_bJmpVert = false; + tt_bJmpHorz = false; + tt_maxPosX = tt_GetClientW() + tt_GetScrollX() - tt_w - 1; + tt_maxPosY = tt_GetClientH() + tt_GetScrollY() - tt_h - 1; + tt_AdaptConfig2(); + // Ensure the tip be shown and positioned before the first onmousemove + tt_OverInit(); + tt_ShowInit(); + tt_Move(); +} +function tt_ReadCmds(a) +{ + var i; + + // First load the global config values, to initialize also values + // for which no command is passed + i = 0; + for(var j in config) + tt_aV[i++] = config[j]; + // Then replace each cached config value for which a command is + // passed (ensure the # of command args plus value args be even) + if(a.length & 1) + { + for(i = a.length - 1; i > 0; i -= 2) + tt_aV[a[i - 1]] = a[i]; + return true; + } + tt_Err("Incorrect call of Tip() or TagToTip().\n" + + "Each command must be followed by a value.", true); + return false; +} +function tt_AdaptConfig1() +{ + tt_ExtCallFncs(0, "LoadConfig"); + // Inherit unspecified title formattings from body + if(!tt_aV[TITLEBGCOLOR].length) + tt_aV[TITLEBGCOLOR] = tt_aV[BORDERCOLOR]; + if(!tt_aV[TITLEFONTCOLOR].length) + tt_aV[TITLEFONTCOLOR] = tt_aV[BGCOLOR]; + if(!tt_aV[TITLEFONTFACE].length) + tt_aV[TITLEFONTFACE] = tt_aV[FONTFACE]; + if(!tt_aV[TITLEFONTSIZE].length) + tt_aV[TITLEFONTSIZE] = tt_aV[FONTSIZE]; + if(tt_aV[CLOSEBTN]) + { + // Use title colours for non-specified closebutton colours + if(!tt_aV[CLOSEBTNCOLORS]) + tt_aV[CLOSEBTNCOLORS] = new Array("", "", "", ""); + for(var i = 4; i;) + {--i; + if(!tt_aV[CLOSEBTNCOLORS][i].length) + tt_aV[CLOSEBTNCOLORS][i] = (i & 1) ? tt_aV[TITLEFONTCOLOR] : tt_aV[TITLEBGCOLOR]; + } + // Enforce titlebar be shown + if(!tt_aV[TITLE].length) + tt_aV[TITLE] = " "; + } + // Circumvents broken display of images and fade-in flicker in Geckos < 1.8 + if(tt_aV[OPACITY] == 100 && typeof tt_aElt[0].style.MozOpacity != tt_u && !Array.every) + tt_aV[OPACITY] = 99; + // Smartly shorten the delay for fade-in tooltips + if(tt_aV[FADEIN] && tt_flagOpa && tt_aV[DELAY] > 100) + tt_aV[DELAY] = Math.max(tt_aV[DELAY] - tt_aV[FADEIN], 100); +} +function tt_AdaptConfig2() +{ + if(tt_aV[CENTERMOUSE]) + { + tt_aV[OFFSETX] -= ((tt_w - (tt_aV[SHADOW] ? tt_aV[SHADOWWIDTH] : 0)) >> 1); + tt_aV[JUMPHORZ] = false; + } +} +// Expose content globally so extensions can modify it +function tt_MkTipContent(a) +{ + if(tt_t2t) + { + if(tt_aV[COPYCONTENT]) + tt_sContent = tt_t2t.innerHTML; + else + tt_sContent = ""; + } + else + tt_sContent = a[0]; + tt_ExtCallFncs(0, "CreateContentString"); +} +function tt_MkTipSubDivs() +{ + var sCss = 'position:relative;margin:0px;padding:0px;border-width:0px;left:0px;top:0px;line-height:normal;width:auto;', + sTbTrTd = ' cellspacing="0" cellpadding="0" border="0" style="' + sCss + '">' + + '' + + tt_aV[TITLE] + + '' + + (tt_aV[CLOSEBTN] ? + ('') + : '') + + '
    ' + + '' + + tt_aV[CLOSEBTNTEXT] + + '
    ') + : '') + + '
    ' + + '' + + tt_sContent + + '
    ' + + (tt_aV[SHADOW] + ? ('
    ' + + '
    ') + : '') + ); + tt_GetSubDivRefs(); + // Convert DOM node to tip + if(tt_t2t && !tt_aV[COPYCONTENT]) + tt_El2Tip(); + tt_ExtCallFncs(0, "SubDivsCreated"); +} +function tt_GetSubDivRefs() +{ + var aId = new Array("WzTiTl", "WzTiTlTb", "WzTiTlI", "WzClOsE", "WzBoDy", "WzBoDyI", "WzTtShDwB", "WzTtShDwR"); + + for(var i = aId.length; i; --i) + tt_aElt[i] = tt_GetElt(aId[i - 1]); +} +function tt_FormatTip() +{ + var css, w, h, pad = tt_aV[PADDING], padT, wBrd = tt_aV[BORDERWIDTH], + iOffY, iOffSh, iAdd = (pad + wBrd) << 1; + + //--------- Title DIV ---------- + if(tt_aV[TITLE].length) + { + padT = tt_aV[TITLEPADDING]; + css = tt_aElt[1].style; + css.background = tt_aV[TITLEBGCOLOR]; + css.paddingTop = css.paddingBottom = padT + "px"; + css.paddingLeft = css.paddingRight = (padT + 2) + "px"; + css = tt_aElt[3].style; + css.color = tt_aV[TITLEFONTCOLOR]; + if(tt_aV[WIDTH] == -1) + css.whiteSpace = "nowrap"; + css.fontFamily = tt_aV[TITLEFONTFACE]; + css.fontSize = tt_aV[TITLEFONTSIZE]; + css.fontWeight = "bold"; + css.textAlign = tt_aV[TITLEALIGN]; + // Close button DIV + if(tt_aElt[4]) + { + css = tt_aElt[4].style; + css.background = tt_aV[CLOSEBTNCOLORS][0]; + css.color = tt_aV[CLOSEBTNCOLORS][1]; + css.fontFamily = tt_aV[TITLEFONTFACE]; + css.fontSize = tt_aV[TITLEFONTSIZE]; + css.fontWeight = "bold"; + } + if(tt_aV[WIDTH] > 0) + tt_w = tt_aV[WIDTH]; + else + { + tt_w = tt_GetDivW(tt_aElt[3]) + tt_GetDivW(tt_aElt[4]); + // Some spacing between title DIV and closebutton + if(tt_aElt[4]) + tt_w += pad; + // Restrict auto width to max width + if(tt_aV[WIDTH] < -1 && tt_w > -tt_aV[WIDTH]) + tt_w = -tt_aV[WIDTH]; + } + // Ensure the top border of the body DIV be covered by the title DIV + iOffY = -wBrd; + } + else + { + tt_w = 0; + iOffY = 0; + } + + //-------- Body DIV ------------ + css = tt_aElt[5].style; + css.top = iOffY + "px"; + if(wBrd) + { + css.borderColor = tt_aV[BORDERCOLOR]; + css.borderStyle = tt_aV[BORDERSTYLE]; + css.borderWidth = wBrd + "px"; + } + if(tt_aV[BGCOLOR].length) + css.background = tt_aV[BGCOLOR]; + if(tt_aV[BGIMG].length) + css.backgroundImage = "url(" + tt_aV[BGIMG] + ")"; + css.padding = pad + "px"; + css.textAlign = tt_aV[TEXTALIGN]; + if(tt_aV[HEIGHT]) + { + css.overflow = "auto"; + if(tt_aV[HEIGHT] > 0) + css.height = (tt_aV[HEIGHT] + iAdd) + "px"; + else + tt_h = iAdd - tt_aV[HEIGHT]; + } + // TD inside body DIV + css = tt_aElt[6].style; + css.color = tt_aV[FONTCOLOR]; + css.fontFamily = tt_aV[FONTFACE]; + css.fontSize = tt_aV[FONTSIZE]; + css.fontWeight = tt_aV[FONTWEIGHT]; + css.textAlign = tt_aV[TEXTALIGN]; + if(tt_aV[WIDTH] > 0) + w = tt_aV[WIDTH]; + // Width like title (if existent) + else if(tt_aV[WIDTH] == -1 && tt_w) + w = tt_w; + else + { + // Measure width of the body's inner TD, as some browsers would expand + // the container and outer body DIV to 100% + w = tt_GetDivW(tt_aElt[6]); + // Restrict auto width to max width + if(tt_aV[WIDTH] < -1 && w > -tt_aV[WIDTH]) + w = -tt_aV[WIDTH]; + } + if(w > tt_w) + tt_w = w; + tt_w += iAdd; + + //--------- Shadow DIVs ------------ + if(tt_aV[SHADOW]) + { + tt_w += tt_aV[SHADOWWIDTH]; + iOffSh = Math.floor((tt_aV[SHADOWWIDTH] * 4) / 3); + // Bottom shadow + css = tt_aElt[7].style; + css.top = iOffY + "px"; + css.left = iOffSh + "px"; + css.width = (tt_w - iOffSh - tt_aV[SHADOWWIDTH]) + "px"; + css.height = tt_aV[SHADOWWIDTH] + "px"; + css.background = tt_aV[SHADOWCOLOR]; + // Right shadow + css = tt_aElt[8].style; + css.top = iOffSh + "px"; + css.left = (tt_w - tt_aV[SHADOWWIDTH]) + "px"; + css.width = tt_aV[SHADOWWIDTH] + "px"; + css.background = tt_aV[SHADOWCOLOR]; + } + else + iOffSh = 0; + + //-------- Container DIV ------- + tt_SetTipOpa(tt_aV[FADEIN] ? 0 : tt_aV[OPACITY]); + tt_FixSize(iOffY, iOffSh); +} +// Fixate the size so it can't dynamically change while the tooltip is moving. +function tt_FixSize(iOffY, iOffSh) +{ + var wIn, wOut, h, add, pad = tt_aV[PADDING], wBrd = tt_aV[BORDERWIDTH], i; + + tt_aElt[0].style.width = tt_w + "px"; + tt_aElt[0].style.pixelWidth = tt_w; + wOut = tt_w - ((tt_aV[SHADOW]) ? tt_aV[SHADOWWIDTH] : 0); + // Body + wIn = wOut; + if(!tt_bBoxOld) + wIn -= (pad + wBrd) << 1; + tt_aElt[5].style.width = wIn + "px"; + // Title + if(tt_aElt[1]) + { + wIn = wOut - ((tt_aV[TITLEPADDING] + 2) << 1); + if(!tt_bBoxOld) + wOut = wIn; + tt_aElt[1].style.width = wOut + "px"; + tt_aElt[2].style.width = wIn + "px"; + } + // Max height specified + if(tt_h) + { + h = tt_GetDivH(tt_aElt[5]); + if(h > tt_h) + { + if(!tt_bBoxOld) + tt_h -= (pad + wBrd) << 1; + tt_aElt[5].style.height = tt_h + "px"; + } + } + tt_h = tt_GetDivH(tt_aElt[0]) + iOffY; + // Right shadow + if(tt_aElt[8]) + tt_aElt[8].style.height = (tt_h - iOffSh) + "px"; + i = tt_aElt.length - 1; + if(tt_aElt[i]) + { + tt_aElt[i].style.width = tt_w + "px"; + tt_aElt[i].style.height = tt_h + "px"; + } +} +function tt_DeAlt(el) +{ + var aKid; + + if(el) + { + if(el.alt) + el.alt = ""; + if(el.title) + el.title = ""; + aKid = el.childNodes || el.children || null; + if(aKid) + { + for(var i = aKid.length; i;) + tt_DeAlt(aKid[--i]); + } + } +} +// This hack removes the native tooltips over links in Opera +function tt_OpDeHref(el) +{ + if(!tt_op) + return; + if(tt_elDeHref) + tt_OpReHref(); + while(el) + { + if(el.hasAttribute && el.hasAttribute("href")) + { + el.t_href = el.getAttribute("href"); + el.t_stats = window.status; + el.removeAttribute("href"); + el.style.cursor = "hand"; + tt_AddEvtFnc(el, "mousedown", tt_OpReHref); + window.status = el.t_href; + tt_elDeHref = el; + break; + } + el = tt_GetDad(el); + } +} +function tt_OpReHref() +{ + if(tt_elDeHref) + { + tt_elDeHref.setAttribute("href", tt_elDeHref.t_href); + tt_RemEvtFnc(tt_elDeHref, "mousedown", tt_OpReHref); + window.status = tt_elDeHref.t_stats; + tt_elDeHref = null; + } +} +function tt_El2Tip() +{ + var css = tt_t2t.style; + + // Store previous positioning + tt_t2t.t_cp = css.position; + tt_t2t.t_cl = css.left; + tt_t2t.t_ct = css.top; + tt_t2t.t_cd = css.display; + // Store the tag's parent element so we can restore that DOM branch + // when the tooltip is being hidden + tt_t2tDad = tt_GetDad(tt_t2t); + tt_MovDomNode(tt_t2t, tt_t2tDad, tt_aElt[6]); + css.display = "block"; + css.position = "static"; + css.left = css.top = css.marginLeft = css.marginTop = "0px"; +} +function tt_UnEl2Tip() +{ + // Restore positioning and display + var css = tt_t2t.style; + + css.display = tt_t2t.t_cd; + tt_MovDomNode(tt_t2t, tt_GetDad(tt_t2t), tt_t2tDad); + css.position = tt_t2t.t_cp; + css.left = tt_t2t.t_cl; + css.top = tt_t2t.t_ct; + tt_t2tDad = null; +} +function tt_OverInit() +{ + if(window.event) + tt_over = window.event.target || window.event.srcElement; + else + tt_over = tt_ovr_; + tt_DeAlt(tt_over); + tt_OpDeHref(tt_over); +} +function tt_ShowInit() +{ + tt_tShow.Timer("tt_Show()", tt_aV[DELAY], true); + if(tt_aV[CLICKCLOSE] || tt_aV[CLICKSTICKY]) + tt_AddEvtFnc(document, "mouseup", tt_OnLClick); +} +function tt_Show() +{ + var css = tt_aElt[0].style; + + // Override the z-index of the topmost wz_dragdrop.js D&D item + css.zIndex = Math.max((window.dd && dd.z) ? (dd.z + 2) : 0, 1010); + if(tt_aV[STICKY] || !tt_aV[FOLLOWMOUSE]) + tt_iState &= ~0x4; + if(tt_aV[EXCLUSIVE]) + tt_iState |= 0x8; + if(tt_aV[DURATION] > 0) + tt_tDurt.Timer("tt_HideInit()", tt_aV[DURATION], true); + tt_ExtCallFncs(0, "Show") + css.visibility = "visible"; + tt_iState |= 0x2; + if(tt_aV[FADEIN]) + tt_Fade(0, 0, tt_aV[OPACITY], Math.round(tt_aV[FADEIN] / tt_aV[FADEINTERVAL])); + tt_ShowIfrm(); +} +function tt_ShowIfrm() +{ + if(tt_ie56) + { + var ifrm = tt_aElt[tt_aElt.length - 1]; + if(ifrm) + { + var css = ifrm.style; + css.zIndex = tt_aElt[0].style.zIndex - 1; + css.display = "block"; + } + } +} +function tt_Move(e) +{ + if(e) + tt_ovr_ = e.target || e.srcElement; + e = e || window.event; + if(e) + { + tt_musX = tt_GetEvtX(e); + tt_musY = tt_GetEvtY(e); + } + if(tt_iState & 0x4) + { + // Prevent jam of mousemove events + if(!tt_op && !tt_ie) + { + if(tt_bWait) + return; + tt_bWait = true; + tt_tWaitMov.Timer("tt_bWait = false;", 1, true); + } + if(tt_aV[FIX]) + { + tt_iState &= ~0x4; + tt_PosFix(); + } + else if(!tt_ExtCallFncs(e, "MoveBefore")) + tt_SetTipPos(tt_Pos(0), tt_Pos(1)); + tt_ExtCallFncs([tt_musX, tt_musY], "MoveAfter") + } +} +function tt_Pos(iDim) +{ + var iX, bJmpMod, cmdAlt, cmdOff, cx, iMax, iScrl, iMus, bJmp; + + // Map values according to dimension to calculate + if(iDim) + { + bJmpMod = tt_aV[JUMPVERT]; + cmdAlt = ABOVE; + cmdOff = OFFSETY; + cx = tt_h; + iMax = tt_maxPosY; + iScrl = tt_GetScrollY(); + iMus = tt_musY; + bJmp = tt_bJmpVert; + } + else + { + bJmpMod = tt_aV[JUMPHORZ]; + cmdAlt = LEFT; + cmdOff = OFFSETX; + cx = tt_w; + iMax = tt_maxPosX; + iScrl = tt_GetScrollX(); + iMus = tt_musX; + bJmp = tt_bJmpHorz; + } + if(bJmpMod) + { + if(tt_aV[cmdAlt] && (!bJmp || tt_CalcPosAlt(iDim) >= iScrl + 16)) + iX = tt_PosAlt(iDim); + else if(!tt_aV[cmdAlt] && bJmp && tt_CalcPosDef(iDim) > iMax - 16) + iX = tt_PosAlt(iDim); + else + iX = tt_PosDef(iDim); + } + else + { + iX = iMus; + if(tt_aV[cmdAlt]) + iX -= cx + tt_aV[cmdOff] - (tt_aV[SHADOW] ? tt_aV[SHADOWWIDTH] : 0); + else + iX += tt_aV[cmdOff]; + } + // Prevent tip from extending past clientarea boundary + if(iX > iMax) + iX = bJmpMod ? tt_PosAlt(iDim) : iMax; + // In case of insufficient space on both sides, ensure the left/upper part + // of the tip be visible + if(iX < iScrl) + iX = bJmpMod ? tt_PosDef(iDim) : iScrl; + return iX; +} +function tt_PosDef(iDim) +{ + if(iDim) + tt_bJmpVert = tt_aV[ABOVE]; + else + tt_bJmpHorz = tt_aV[LEFT]; + return tt_CalcPosDef(iDim); +} +function tt_PosAlt(iDim) +{ + if(iDim) + tt_bJmpVert = !tt_aV[ABOVE]; + else + tt_bJmpHorz = !tt_aV[LEFT]; + return tt_CalcPosAlt(iDim); +} +function tt_CalcPosDef(iDim) +{ + return iDim ? (tt_musY + tt_aV[OFFSETY]) : (tt_musX + tt_aV[OFFSETX]); +} +function tt_CalcPosAlt(iDim) +{ + var cmdOff = iDim ? OFFSETY : OFFSETX; + var dx = tt_aV[cmdOff] - (tt_aV[SHADOW] ? tt_aV[SHADOWWIDTH] : 0); + if(tt_aV[cmdOff] > 0 && dx <= 0) + dx = 1; + return((iDim ? (tt_musY - tt_h) : (tt_musX - tt_w)) - dx); +} +function tt_PosFix() +{ + var iX, iY; + + if(typeof(tt_aV[FIX][0]) == "number") + { + iX = tt_aV[FIX][0]; + iY = tt_aV[FIX][1]; + } + else + { + if(typeof(tt_aV[FIX][0]) == "string") + el = tt_GetElt(tt_aV[FIX][0]); + // First slot in array is direct reference to HTML element + else + el = tt_aV[FIX][0]; + iX = tt_aV[FIX][1]; + iY = tt_aV[FIX][2]; + // By default, vert pos is related to bottom edge of HTML element + if(!tt_aV[ABOVE] && el) + iY += tt_GetDivH(el); + for(; el; el = el.offsetParent) + { + iX += el.offsetLeft || 0; + iY += el.offsetTop || 0; + } + } + // For a fixed tip positioned above the mouse, use the bottom edge as anchor + // (recommended by Christophe Rebeschini, 31.1.2008) + if(tt_aV[ABOVE]) + iY -= tt_h; + tt_SetTipPos(iX, iY); +} +function tt_Fade(a, now, z, n) +{ + if(n) + { + now += Math.round((z - now) / n); + if((z > a) ? (now >= z) : (now <= z)) + now = z; + else + tt_tFade.Timer( + "tt_Fade(" + + a + "," + now + "," + z + "," + (n - 1) + + ")", + tt_aV[FADEINTERVAL], + true + ); + } + now ? tt_SetTipOpa(now) : tt_Hide(); +} +function tt_SetTipOpa(opa) +{ + // To circumvent the opacity nesting flaws of IE, we set the opacity + // for each sub-DIV separately, rather than for the container DIV. + tt_SetOpa(tt_aElt[5], opa); + if(tt_aElt[1]) + tt_SetOpa(tt_aElt[1], opa); + if(tt_aV[SHADOW]) + { + opa = Math.round(opa * 0.8); + tt_SetOpa(tt_aElt[7], opa); + tt_SetOpa(tt_aElt[8], opa); + } +} +function tt_OnCloseBtnOver(iOver) +{ + var css = tt_aElt[4].style; + + iOver <<= 1; + css.background = tt_aV[CLOSEBTNCOLORS][iOver]; + css.color = tt_aV[CLOSEBTNCOLORS][iOver + 1]; +} +function tt_OnLClick(e) +{ + // Ignore right-clicks + e = e || window.event; + if(!((e.button && e.button & 2) || (e.which && e.which == 3))) + { + if(tt_aV[CLICKSTICKY] && (tt_iState & 0x4)) + { + tt_aV[STICKY] = true; + tt_iState &= ~0x4; + } + else if(tt_aV[CLICKCLOSE]) + tt_HideInit(); + } +} +function tt_Int(x) +{ + var y; + + return(isNaN(y = parseInt(x)) ? 0 : y); +} +Number.prototype.Timer = function(s, iT, bUrge) +{ + if(!this.value || bUrge) + this.value = window.setTimeout(s, iT); +} +Number.prototype.EndTimer = function() +{ + if(this.value) + { + window.clearTimeout(this.value); + this.value = 0; + } +} +function tt_GetWndCliSiz(s) +{ + var db, y = window["inner" + s], sC = "client" + s, sN = "number"; + if(typeof y == sN) + { + var y2; + return( + // Gecko or Opera with scrollbar + // ... quirks mode + ((db = document.body) && typeof(y2 = db[sC]) == sN && y2 && y2 <= y) ? y2 + // ... strict mode + : ((db = document.documentElement) && typeof(y2 = db[sC]) == sN && y2 && y2 <= y) ? y2 + // No scrollbar, or clientarea size == 0, or other browser (KHTML etc.) + : y + ); + } + // IE + return( + // document.documentElement.client+s functional, returns > 0 + ((db = document.documentElement) && (y = db[sC])) ? y + // ... not functional, in which case document.body.client+s + // is the clientarea size, fortunately + : document.body[sC] + ); +} +function tt_SetOpa(el, opa) +{ + var css = el.style; + + tt_opa = opa; + if(tt_flagOpa == 1) + { + if(opa < 100) + { + // Hacks for bugs of IE: + // 1.) Once a CSS filter has been applied, fonts are no longer + // anti-aliased, so we store the previous 'non-filter' to be + // able to restore it + if(typeof(el.filtNo) == tt_u) + el.filtNo = css.filter; + // 2.) A DIV cannot be made visible in a single step if an + // opacity < 100 has been applied while the DIV was hidden + var bVis = css.visibility != "hidden"; + // 3.) In IE6, applying an opacity < 100 has no effect if the + // element has no layout (position, size, zoom, ...) + css.zoom = "100%"; + if(!bVis) + css.visibility = "visible"; + css.filter = "alpha(opacity=" + opa + ")"; + if(!bVis) + css.visibility = "hidden"; + } + else if(typeof(el.filtNo) != tt_u) + // Restore 'non-filter' + css.filter = el.filtNo; + } + else + { + opa /= 100.0; + switch(tt_flagOpa) + { + case 2: + css.KhtmlOpacity = opa; break; + case 3: + css.KHTMLOpacity = opa; break; + case 4: + css.MozOpacity = opa; break; + case 5: + css.opacity = opa; break; + } + } +} +function tt_Err(sErr, bIfDebug) +{ + if(tt_Debug || !bIfDebug) + alert("Tooltip Script Error Message:\n\n" + sErr); +} + +//============ EXTENSION (PLUGIN) MANAGER ===============// +function tt_ExtCmdEnum() +{ + var s; + + // Add new command(s) to the commands enum + for(var i in config) + { + s = "window." + i.toString().toUpperCase(); + if(eval("typeof(" + s + ") == tt_u")) + { + eval(s + " = " + tt_aV.length); + tt_aV[tt_aV.length] = null; + } + } +} +function tt_ExtCallFncs(arg, sFnc) +{ + var b = false; + for(var i = tt_aExt.length; i;) + {--i; + var fnc = tt_aExt[i]["On" + sFnc]; + // Call the method the extension has defined for this event + if(fnc && fnc(arg)) + b = true; + } + return b; +} + +tt_Init(); diff --git a/webapps/totsys/common/web/documents/form_content_modify/form_content_modify.jsp b/webapps/totsys/common/web/documents/form_content_modify/form_content_modify.jsp new file mode 100644 index 0000000..fd70a3f --- /dev/null +++ b/webapps/totsys/common/web/documents/form_content_modify/form_content_modify.jsp @@ -0,0 +1,295 @@ +<%@ page contentType="text/html; charset=utf-8" + import="java.net.URLEncoder" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.lang.Encoder" + import="org.apache.commons.lang.StringEscapeUtils" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.beans.entity.TotTable"%> +<%@page import="kr.co.kihyun.beans.entity.TotDoc"%> +<%@page import="kr.co.kihyun.beans.entity.TotDocProcess"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + /********** get Parameter *************/ + Long docID = MLong.parseLong(request.getParameter("docID"),null); + String gubun = clearXSS(Encoder.toJava(request.getParameter("gubun")),""); + + //String docName = clearXSS(Encoder.toJava(request.getParameter("docName")),""); + String strPage = clearXSS(request.getParameter("strPage"),""); + String findOption = clearXSS(request.getParameter("findOption"),""); + String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")),""); + String url = "form"; + + /*********** doc value *****************/ + String docForm = ""; + String docName = ""; + + if(docID != null){ + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + docForm = totDoc.getForm(); + docForm = TagFilter.convertSingle(docForm); + docForm = StringConverter.toOneLine(docForm); + docName = totDoc.getName(); + + } +%> + + + + +<%=Moumi.getTitle()%> + + + + + + + + + + + + +
    + + + + +
    +
    + + + + +
    +
    + + + <%-- + + + +--%> + + + + + + + +
    + + + + <%if(sysAuth == Moumi.TOTPER){%> + + <%}%> + + +
    + class="kecttep_button_td" <%}%>> + <%= Moumi.getMessageBundle().getString("moumi.message.button_small.docDel") %> +
    +
    + + + + +
    + + + + +
    +
    +
    + + + + <%-- + + + + --%> + + + + + +
     
    + +
    +
    +
    + +
    +
    + + +<% + }catch(Exception ex){ + //38.޼ (getMessage)_CWE-209 : Update by YOUNGJUN,CHO + //out.println(ex); + ex.printStackTrace(); + //out.println("

    Can't contact servlet runner



    Message : "+ex.getMessage()+""); + //out.println(""); + //================================================ + }finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); + } +%> diff --git a/webapps/totsys/common/web/documents/form_content_modify/form_content_modify_2.jsp b/webapps/totsys/common/web/documents/form_content_modify/form_content_modify_2.jsp new file mode 100644 index 0000000..4838ab4 --- /dev/null +++ b/webapps/totsys/common/web/documents/form_content_modify/form_content_modify_2.jsp @@ -0,0 +1,470 @@ +<%@page import="org.apache.commons.lang.StringUtils"%> +<%@page import="java.sql.SQLException"%> +<%@page import="java.sql.ResultSet"%> +<%@page import="java.util.ArrayList"%> +<%@page import="kr.co.kihyun.db.CommonDBManager"%> +<%@ page contentType="text/html;" + import="java.net.URLEncoder" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.lang.Encoder" + import="org.apache.commons.lang.StringEscapeUtils" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.beans.entity.TotTable"%> +<%@page import="kr.co.kihyun.beans.entity.TotDoc"%> +<%@page import="kr.co.kihyun.beans.entity.TotDocProcess"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); + +try{ + /********** session내의 userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + /********** get Parameter *************/ + Long docID = MLong.parseLong(request.getParameter("docID"),null); + String gubun = clearXSS(Encoder.toJava(request.getParameter("gubun")),""); + + //String docName = clearXSS(Encoder.toJava(request.getParameter("docName")),""); + String strPage = clearXSS(request.getParameter("strPage"),""); + String findOption = clearXSS(request.getParameter("findOption"),""); + String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")),""); + String url = "form"; + + /*********** doc value *****************/ + String docForm = ""; + String docName = ""; + if(docID != null){ + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + docForm = totDoc.getForm(); + docForm = TagFilter.convertSingle(docForm); + docForm = StringConverter.toOneLine(docForm); + docName = totDoc.getName(); + } + + //수정불가능 인지 + //연계서식까지 같이 수정 + boolean isRep=false; + boolean hasDone=false; + CommonDBManager db=new CommonDBManager(); + ResultSet rs = null; + String sql="select REP_ID from MOUMI_TOT_DOC where id=?"; + ArrayList docids=new ArrayList(); + docids.add(docID); + try { + rs = db.execQuery(sql, docID); + if(rs.next()){ + String rep_id=rs.getString(1); + if(rep_id!=null){ + isRep=true; + } + } + rs.close(); + db.pstmt.close(); + + + sql="select ID from MOUMI_TOT_DOC where REP_ID=?"; + rs= db.execQuery(sql, docID); + while (rs.next()) { + Long did=rs.getLong(1); + if(!docids.contains(did))docids.add(did); + } + rs.close(); + db.pstmt.close(); + + + } catch (SQLException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } finally{ + rs.close(); + db.execClose(); + } +%> + + + + + +<%=Moumi.getTitle()%> + + + + + + + + + + + + +
    + + +
    +
    + + + + +
    +
    + + + + + +
    + + + + +
    + + + + +
    + +
    +
    +
    + + + + + +
    + + 구조변경 + + + + 다음단계 + + +
    +
    +
    +
    + +
    + + + + + +
    +
    + + +<% + }catch(Exception ex){ + //38.오류메세지를 통한 정보 노출(getMessage)_CWE-209 : Update by YOUNGJUN,CHO + //out.println(ex); + ex.printStackTrace(); + //out.println("

    Can't contact servlet runner



    Message : "+ex.getMessage()+""); + //out.println(""); + //================================================ + }finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); + } +%> diff --git a/webapps/totsys/common/web/documents/form_content_modify/form_content_modify_2.jsp.202209 b/webapps/totsys/common/web/documents/form_content_modify/form_content_modify_2.jsp.202209 new file mode 100644 index 0000000..daeba22 --- /dev/null +++ b/webapps/totsys/common/web/documents/form_content_modify/form_content_modify_2.jsp.202209 @@ -0,0 +1,340 @@ +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.lang.Encoder" + import="org.apache.commons.lang.StringEscapeUtils" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.beans.entity.TotTable"%> +<%@page import="kr.co.kihyun.beans.entity.TotDoc"%> +<%@page import="kr.co.kihyun.beans.entity.TotDocProcess"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + /********** get Parameter *************/ + Long docID = MLong.parseLong(request.getParameter("docID"),null); + String gubun = clearXSS(Encoder.toJava(request.getParameter("gubun")),""); + + //String docName = clearXSS(Encoder.toJava(request.getParameter("docName")),""); + String strPage = clearXSS(request.getParameter("strPage"),""); + String findOption = clearXSS(request.getParameter("findOption"),""); + String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")),""); + String url = "form"; + + /*********** doc value *****************/ + String docForm = ""; + String docName = ""; + if(docID != null){ + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + docForm = totDoc.getForm(); + docForm = TagFilter.convertSingle(docForm); + docForm = StringConverter.toOneLine(docForm); + docName = totDoc.getName(); + } +%> + + + +<%=Moumi.getTitle()%> +<%-- + + + + + +--%> + + + + + + + + + +
    + + +
    +
    + + + + +
    +
    + + + + + +
    + + + + +
    + + + + +
    +
    +
    + + + + + + + +
    + + ܰ + +  
    +
    +
    +
    + +
    + + + +
    +
    + + +<% + }catch(Exception ex){ + //38.޼ (getMessage)_CWE-209 : Update by YOUNGJUN,CHO + //out.println(ex); + ex.printStackTrace(); + //out.println("

    Can't contact servlet runner



    Message : "+ex.getMessage()+""); + //out.println(""); + //================================================ + }finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); + } +%> diff --git a/webapps/totsys/common/web/documents/form_content_modify/images/bt_cancel3.gif b/webapps/totsys/common/web/documents/form_content_modify/images/bt_cancel3.gif new file mode 100644 index 0000000..37a7cd7 Binary files /dev/null and b/webapps/totsys/common/web/documents/form_content_modify/images/bt_cancel3.gif differ diff --git a/webapps/totsys/common/web/documents/form_content_modify/images/bt_enter.gif b/webapps/totsys/common/web/documents/form_content_modify/images/bt_enter.gif new file mode 100644 index 0000000..2ad918b Binary files /dev/null and b/webapps/totsys/common/web/documents/form_content_modify/images/bt_enter.gif differ diff --git a/webapps/totsys/common/web/documents/form_content_modify/images/popupt_bottom_center.gif b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_bottom_center.gif new file mode 100644 index 0000000..111862c Binary files /dev/null and b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_bottom_center.gif differ diff --git a/webapps/totsys/common/web/documents/form_content_modify/images/popupt_bottom_left.gif b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_bottom_left.gif new file mode 100644 index 0000000..81eda75 Binary files /dev/null and b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_bottom_left.gif differ diff --git a/webapps/totsys/common/web/documents/form_content_modify/images/popupt_bottom_right.gif b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_bottom_right.gif new file mode 100644 index 0000000..98f7c24 Binary files /dev/null and b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_bottom_right.gif differ diff --git a/webapps/totsys/common/web/documents/form_content_modify/images/popupt_center_left.gif b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_center_left.gif new file mode 100644 index 0000000..14d6713 Binary files /dev/null and b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_center_left.gif differ diff --git a/webapps/totsys/common/web/documents/form_content_modify/images/popupt_center_right.gif b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_center_right.gif new file mode 100644 index 0000000..6127f52 Binary files /dev/null and b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_center_right.gif differ diff --git a/webapps/totsys/common/web/documents/form_content_modify/images/popupt_top_center.gif b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_top_center.gif new file mode 100644 index 0000000..3c5a1d8 Binary files /dev/null and b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_top_center.gif differ diff --git a/webapps/totsys/common/web/documents/form_content_modify/images/popupt_top_left.gif b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_top_left.gif new file mode 100644 index 0000000..8afcf79 Binary files /dev/null and b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_top_left.gif differ diff --git a/webapps/totsys/common/web/documents/form_content_modify/images/popupt_top_right.gif b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_top_right.gif new file mode 100644 index 0000000..315f857 Binary files /dev/null and b/webapps/totsys/common/web/documents/form_content_modify/images/popupt_top_right.gif differ diff --git a/webapps/totsys/common/web/documents/form_content_modify/popup_form_content_modify.jsp b/webapps/totsys/common/web/documents/form_content_modify/popup_form_content_modify.jsp new file mode 100644 index 0000000..a59f9b4 --- /dev/null +++ b/webapps/totsys/common/web/documents/form_content_modify/popup_form_content_modify.jsp @@ -0,0 +1,242 @@ + +<% +/************************************************************@@ + * Program Name : popup_form_content_modify.jsp + * Description : /common/web/documents/form_content_modify/ (ؽƮ) + * Author : + * Create Date : 2004-12-13 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.lang.Encoder" + import="org.apache.commons.lang.StringEscapeUtils" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc"%> +<%@ page import="java.net.URLEncoder"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); + +try{ + /********** get Parameter *************/ + Long docID = MLong.parseLong(MString.checkNull(request.getParameter("docID")),null); + String gubun = clearXSS(Encoder.toJava(request.getParameter("gubun")),""); + + /*********** doc value *****************/ + String docForm = ""; + if(docID != null){ + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + docForm = totDoc.getForm(); + docForm = TagFilter.convertSingle(docForm); + docForm = StringConverter.toOneLine(docForm); + } + +%> + + +<%=Moumi.getTitle()%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
      + + + + + + + + + + +
    + + + + +
    + + + + +

    + + + + + + + + + + +
       Ʒ + ij(ؽƮ) ּ.
    +
    +
    + + + + + + + +
     
    +
    +
    +
     
     
    +
    + + +<% +}catch(Exception ex){ + //38.޼ (getMessage)_CWE-209 : Update by YOUNGJUN,CHO + //out.println(ex); + ex.printStackTrace(); + //out.println("

    Can't contact servlet runner



    Message : "+ex.getMessage()+""); + //out.println(""); + //================================================ +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/totsys/common/web/documents/form_content_modify/sysadm_form_content_modify.jsp b/webapps/totsys/common/web/documents/form_content_modify/sysadm_form_content_modify.jsp new file mode 100644 index 0000000..391eb1d --- /dev/null +++ b/webapps/totsys/common/web/documents/form_content_modify/sysadm_form_content_modify.jsp @@ -0,0 +1,258 @@ +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="org.apache.commons.lang.StringEscapeUtils" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.beans.entity.TotDocProcess"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); + +try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + + /********** get Parameter *************/ + Long docID = MLong.parseLong(request.getParameter("docID"),null); + String gubun = clearXSS(Encoder.toJava(request.getParameter("gubun")),""); + String strPage = clearXSS(request.getParameter("strPage"),""); + String findOption = clearXSS(request.getParameter("findOption"),""); + String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")),""); + String url = "mmform"; + + /*********** doc value *****************/ + String docForm = ""; + if(docID != null){ + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + docForm = totDoc.getForm(); + docForm = TagFilter.convertSingle(docForm); + docForm = StringConverter.toOneLine(docForm); + } + +%> + + +<%=Moumi.getTitle()%> + + + + + + + + + + + + +
    +
    + + +
    +
    + + +
    +
    + + + + + + + + +
    + + + + +
    <%= Moumi.getMessageBundle().getString("moumi.message.button.formRemove") %> +
    +
    + + + + +
    + + + + +
    + + + + +
    +
    +
    + + + + + + + +
     
    +
    +
    +
    +
    +
    + + +<% +}catch(Exception ex){ + //38.޼ (getMessage)_CWE-209 : Update by YOUNGJUN,CHO + //out.println(ex); + ex.printStackTrace(); + //out.println("

    Can't contact servlet runner



    Message : "+ex.getMessage()+""); + //out.println(""); + //================================================ +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/totsys/common/web/documents/report/report_view.jsp b/webapps/totsys/common/web/documents/report/report_view.jsp new file mode 100644 index 0000000..5aa3ce0 --- /dev/null +++ b/webapps/totsys/common/web/documents/report/report_view.jsp @@ -0,0 +1,187 @@ +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" import="java.net.URLDecoder" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.text.html.HtmlUtil" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.user.UserView" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.report.ReportView" + import="kr.co.kihyun.beans.totsys.report.ReportViewManager" + import="kr.co.kihyun.text.hml.Hwp" + import="kr.co.kihyun.text.html.HtmlUtil" + import="kr.co.kihyun.beans.totsys.report.tots.ReportsViewer" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.beans.totsys.doc.table.Table" + import="kr.co.kihyun.beans.totsys.doc.table.item.Item" + import="kr.co.kihyun.text.excel.Excel" import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.lang.MLong" import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*"%> +<%@page import="java.util.List"%> +<%@ page import="java.util.Map.Entry"%> +<%@page import="javax.jdo.Query"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% + Logger LOG = LoggerFactory.getLogger(this.getClass()); + + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + /********* Parameter *********/ + Long reportID = MLong.parseLong(request.getParameter("reportID"), null); + TotReport totReport = pm.getObjectById(TotReport.class, reportID); + + /********* report *********/ + String docName = totReport.getTotDoc().getName(); + + // TODO: extract method. + String report = null; + if (totReport.getSlaveTotDoc() == null) + report = TotReportUtil.toHTML(totReport); + else { + TotDoc slaveDoc = totReport.getSlaveTotDoc(); + if (!slaveDoc.getCompReports(pm).isEmpty()) + report = TotReportUtil.toHTML(totReport.getTotDoc(), slaveDoc.getCompReports(pm)); + } + + /* + tx.begin(); + LOG.debug("HttpSSOLogin.getLoginID(request) != totReport.getUser(pm).getId() : {}\n" + + "HttpSSOLogin.getLoginID(request) != totReport.getTotDoc().getUser(pm).getId() : {}\n" + + "HttpSSOLogin.getSysAuth(request) != SysAuth.SYSADM.ordinal() : {}", + new Object[] { + HttpSSOLogin.getLoginID(request) != totReport.getUser(pm).getId(), + HttpSSOLogin.getLoginID(request) != totReport.getTotDoc().getUser(pm).getId(), + HttpSSOLogin.getSysAuth(request) != SysAuth.SYSADM.ordinal() + }); + if (totReport.getProcess() != TotReportProcess.COMP + && HttpSSOLogin.getLoginID(request) != totReport.getUser(pm).getId() + && HttpSSOLogin.getLoginID(request) != totReport.getTotDoc().getUser(pm).getId() + && !(HttpSSOLogin.getDeptID(request) == totReport.getTotDoc().getDept(pm).getId() + && totReport.getTotDoc().getAccessAuth() == AccessAuth.DEPT) + && totReport.getTotDoc().getAccessAuth() != AccessAuth.ALL + && HttpSSOLogin.getSysAuth(request) != SysAuth.SYSADM.ordinal()) { + response.sendError(response.SC_FORBIDDEN); + } + tx.rollback(); + * */ + + if (report == null) { + out.println(ServletUtil.alert(Moumi.getMessageBundle().getString("moumi.message.popup.notReport"))); + out.println(ServletUtil.getJavaScript("history.go(-1);")); + return; + } + /********* report view *******/ + String note = MString.checkNull(totReport.getNote()); + String realFileName = ""; + String viewFileName = ""; + for (String fileName : totReport.getAttachments().keySet()) { + viewFileName += fileName + ";"; + realFileName += fileName + ";"; + } + Long downDocID = totReport.getSlaveTotDoc() == null ? null : totReport.getSlaveTotDoc().getId(); + + String[] realFileNameList = realFileName.split(";"); + String[] viewFileNameList = viewFileName.split(";"); + + // + String memo = MString.checkNull(totReport.getRecentHistory() == null ? null : totReport.getRecentHistory().getMemo()); + + String url = clearXSS(request.getParameter("url"),""); + + if(url == null){ url = ""; } + + String usrFilenames = ""; + String svrFilenames = ""; + int visit = 0; + + Board totperComment = totReport.getTotDoc().getBoard(); + + if(totperComment != null){ +// tx.begin(); + for (Entry> entry : totperComment.getAttachments().entrySet()) { + usrFilenames += entry.getKey() + ";"; + svrFilenames += entry.getKey() + ";"; + } +// visit = totperComment.getVisit(); +// totperComment.setVisit(visit+1); +// pm.makePersistent(totperComment); +// tx.commit(); + } + + String[] usrFilenameList = usrFilenames.split(";"); + String[] svrFilenameList = svrFilenames.split(";"); +%> + + + + + + + + + + + + + + <% + tx.begin(); + if(!totReport.getHistories().isEmpty()){%> + + + + + <%}else{%> + + + + <%} + tx.rollback(); + %> + + + + + +
    + + + +
    + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("alert('"+Moumi.getMessageBundle().getString("moumi.message.popup.requestAdmin")+"');")); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/totsys/totper/main.jsp';")); + } finally { + if(tx.isActive()) + tx.rollback(); + pm.close(); + } +%> diff --git a/webapps/totsys/common/web/documents/report/report_view.jsp_org b/webapps/totsys/common/web/documents/report/report_view.jsp_org new file mode 100644 index 0000000..093b0c4 --- /dev/null +++ b/webapps/totsys/common/web/documents/report/report_view.jsp_org @@ -0,0 +1,187 @@ +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" import="java.net.URLDecoder" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.text.html.HtmlUtil" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.user.UserView" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.report.ReportView" + import="kr.co.kihyun.beans.totsys.report.ReportViewManager" + import="kr.co.kihyun.text.hml.Hwp" + import="kr.co.kihyun.text.html.HtmlUtil" + import="kr.co.kihyun.beans.totsys.report.tots.ReportsViewer" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.beans.totsys.doc.table.Table" + import="kr.co.kihyun.beans.totsys.doc.table.item.Item" + import="kr.co.kihyun.text.excel.Excel" import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.lang.MLong" import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*"%> +<%@page import="java.util.List"%> +<%@ page import="java.util.Map.Entry"%> +<%@page import="javax.jdo.Query"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% + Logger LOG = LoggerFactory.getLogger(this.getClass()); + + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + /********* Parameter *********/ + Long reportID = MLong.parseLong(request.getParameter("reportID"), null); + TotReport totReport = pm.getObjectById(TotReport.class, reportID); + + /********* report *********/ + String docName = totReport.getTotDoc().getName(); + + // TODO: extract method. + String report = null; + if (totReport.getSlaveTotDoc() == null) + report = TotReportUtil.toHTML(totReport); + else { + TotDoc slaveDoc = totReport.getSlaveTotDoc(); + if (!slaveDoc.getCompReports(pm).isEmpty()) + report = TotReportUtil.toHTML(totReport.getTotDoc(), slaveDoc.getCompReports(pm)); + } + + /* + tx.begin(); + LOG.debug("HttpSSOLogin.getLoginID(request) != totReport.getUser(pm).getId() : {}\n" + + "HttpSSOLogin.getLoginID(request) != totReport.getTotDoc().getUser(pm).getId() : {}\n" + + "HttpSSOLogin.getSysAuth(request) != SysAuth.SYSADM.ordinal() : {}", + new Object[] { + HttpSSOLogin.getLoginID(request) != totReport.getUser(pm).getId(), + HttpSSOLogin.getLoginID(request) != totReport.getTotDoc().getUser(pm).getId(), + HttpSSOLogin.getSysAuth(request) != SysAuth.SYSADM.ordinal() + }); + if (totReport.getProcess() != TotReportProcess.COMP + && HttpSSOLogin.getLoginID(request) != totReport.getUser(pm).getId() + && HttpSSOLogin.getLoginID(request) != totReport.getTotDoc().getUser(pm).getId() + && !(HttpSSOLogin.getDeptID(request) == totReport.getTotDoc().getDept(pm).getId() + && totReport.getTotDoc().getAccessAuth() == AccessAuth.DEPT) + && totReport.getTotDoc().getAccessAuth() != AccessAuth.ALL + && HttpSSOLogin.getSysAuth(request) != SysAuth.SYSADM.ordinal()) { + response.sendError(response.SC_FORBIDDEN); + } + tx.rollback(); + * */ + + if (report == null) { + out.println(ServletUtil.alert(Moumi.getMessageBundle().getString("moumi.message.popup.notReport"))); + out.println(ServletUtil.getJavaScript("history.go(-1);")); + return; + } + /********* report view *******/ + String note = MString.checkNull(totReport.getNote()); + String realFileName = ""; + String viewFileName = ""; + for (String fileName : totReport.getAttachments().keySet()) { + viewFileName += fileName + ";"; + realFileName += fileName + ";"; + } + Long downDocID = totReport.getSlaveTotDoc() == null ? null : totReport.getSlaveTotDoc().getId(); + + String[] realFileNameList = realFileName.split(";"); + String[] viewFileNameList = viewFileName.split(";"); + + // + String memo = MString.checkNull(totReport.getRecentHistory() == null ? null : totReport.getRecentHistory().getMemo()); + + String url = clearXSS(request.getParameter("url"),""); + + if(url == null){ url = ""; } + + String usrFilenames = ""; + String svrFilenames = ""; + int visit = 0; + + Board totperComment = totReport.getTotDoc().getBoard(); + + if(totperComment != null){ + tx.begin(); + for (Entry> entry : totperComment.getAttachments().entrySet()) { + usrFilenames += entry.getKey() + ";"; + svrFilenames += entry.getKey() + ";"; + } + visit = totperComment.getVisit(); + totperComment.setVisit(visit+1); + pm.makePersistent(totperComment); + tx.commit(); + } + + String[] usrFilenameList = usrFilenames.split(";"); + String[] svrFilenameList = svrFilenames.split(";"); +%> + + + + + + + + + + + + + + <% + tx.begin(); + if(!totReport.getHistories().isEmpty()){%> + + + + + <%}else{%> + + + + <%} + tx.rollback(); + %> + + + + + +
    + + + +
    + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("alert('"+Moumi.getMessageBundle().getString("moumi.message.popup.requestAdmin")+"');")); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/totsys/totper/main.jsp';")); + } finally { + if(tx.isActive()) + tx.rollback(); + pm.close(); + } +%> diff --git a/webapps/totsys/common/web/documents/tot_doc/images/accepter.gif b/webapps/totsys/common/web/documents/tot_doc/images/accepter.gif new file mode 100644 index 0000000..bc76257 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/accepter.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/bt_cal.gif b/webapps/totsys/common/web/documents/tot_doc/images/bt_cal.gif new file mode 100644 index 0000000..aac7783 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/bt_cal.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/bt_cancel3.gif b/webapps/totsys/common/web/documents/tot_doc/images/bt_cancel3.gif new file mode 100644 index 0000000..37a7cd7 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/bt_cancel3.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/bt_close.gif b/webapps/totsys/common/web/documents/tot_doc/images/bt_close.gif new file mode 100644 index 0000000..8aeb90d Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/bt_close.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/bt_doc_list.gif b/webapps/totsys/common/web/documents/tot_doc/images/bt_doc_list.gif new file mode 100644 index 0000000..16ce3e9 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/bt_doc_list.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/bt_enter.gif b/webapps/totsys/common/web/documents/tot_doc/images/bt_enter.gif new file mode 100644 index 0000000..2ad918b Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/bt_enter.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/bt_logout.jpg b/webapps/totsys/common/web/documents/tot_doc/images/bt_logout.jpg new file mode 100644 index 0000000..2f82ce2 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/bt_logout.jpg differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/bt_modifyInfo.jpg b/webapps/totsys/common/web/documents/tot_doc/images/bt_modifyInfo.jpg new file mode 100644 index 0000000..b67ddb7 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/bt_modifyInfo.jpg differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/damping_bottom.gif b/webapps/totsys/common/web/documents/tot_doc/images/damping_bottom.gif new file mode 100644 index 0000000..4863e82 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/damping_bottom.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/damping_top.gif b/webapps/totsys/common/web/documents/tot_doc/images/damping_top.gif new file mode 100644 index 0000000..2d84dbd Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/damping_top.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/innerback.gif b/webapps/totsys/common/web/documents/tot_doc/images/innerback.gif new file mode 100644 index 0000000..668609f Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/innerback.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/login_bottom.jpg b/webapps/totsys/common/web/documents/tot_doc/images/login_bottom.jpg new file mode 100644 index 0000000..dddb3ec Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/login_bottom.jpg differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/login_middle.jpg b/webapps/totsys/common/web/documents/tot_doc/images/login_middle.jpg new file mode 100644 index 0000000..048c913 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/login_middle.jpg differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/login_top.jpg b/webapps/totsys/common/web/documents/tot_doc/images/login_top.jpg new file mode 100644 index 0000000..349b92e Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/login_top.jpg differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/name_sun.jpg b/webapps/totsys/common/web/documents/tot_doc/images/name_sun.jpg new file mode 100644 index 0000000..b5e7fad Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/name_sun.jpg differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/popupt_bottom_center.gif b/webapps/totsys/common/web/documents/tot_doc/images/popupt_bottom_center.gif new file mode 100644 index 0000000..111862c Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/popupt_bottom_center.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/popupt_bottom_left.gif b/webapps/totsys/common/web/documents/tot_doc/images/popupt_bottom_left.gif new file mode 100644 index 0000000..81eda75 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/popupt_bottom_left.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/popupt_bottom_right.gif b/webapps/totsys/common/web/documents/tot_doc/images/popupt_bottom_right.gif new file mode 100644 index 0000000..98f7c24 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/popupt_bottom_right.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/popupt_center_left.gif b/webapps/totsys/common/web/documents/tot_doc/images/popupt_center_left.gif new file mode 100644 index 0000000..14d6713 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/popupt_center_left.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/popupt_center_right.gif b/webapps/totsys/common/web/documents/tot_doc/images/popupt_center_right.gif new file mode 100644 index 0000000..6127f52 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/popupt_center_right.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/popupt_top_center.gif b/webapps/totsys/common/web/documents/tot_doc/images/popupt_top_center.gif new file mode 100644 index 0000000..3c5a1d8 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/popupt_top_center.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/popupt_top_left.gif b/webapps/totsys/common/web/documents/tot_doc/images/popupt_top_left.gif new file mode 100644 index 0000000..8afcf79 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/popupt_top_left.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/popupt_top_right.gif b/webapps/totsys/common/web/documents/tot_doc/images/popupt_top_right.gif new file mode 100644 index 0000000..315f857 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/popupt_top_right.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/recoger.gif b/webapps/totsys/common/web/documents/tot_doc/images/recoger.gif new file mode 100644 index 0000000..7c476dc Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/recoger.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/images/texter.gif b/webapps/totsys/common/web/documents/tot_doc/images/texter.gif new file mode 100644 index 0000000..b052247 Binary files /dev/null and b/webapps/totsys/common/web/documents/tot_doc/images/texter.gif differ diff --git a/webapps/totsys/common/web/documents/tot_doc/inform_preview.jsp b/webapps/totsys/common/web/documents/tot_doc/inform_preview.jsp new file mode 100644 index 0000000..fa1dd21 --- /dev/null +++ b/webapps/totsys/common/web/documents/tot_doc/inform_preview.jsp @@ -0,0 +1,413 @@ + +<% +/************************************************************@@ + * Program Name : popup_inform_preview.jsp + * Description : 蹮 (ϰ, 濡 + * Author : + * Create Date : 2004.10.11 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" import="java.net.URLDecoder" + import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.moumi.doc.MDocPreview" + import="kr.co.kihyun.moumi.doc.table.item.MItem" + import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList" + import="kr.co.kihyun.moumi.Moumi" + import="javax.jdo.Transaction" + import="kr.co.kihyun.text.html.CallbackHandler"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + int defItemSize = MInteger.parseInt(MString.checkNull(request.getParameter("defItemSize"))); + + Long docID = MLong.parseLong(request.getParameter("docID"),null); + String choice = clearXSS(request.getParameter("choice"),""); + String deptIDs = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("deptIDs")), "UTF-8"),""); + String deptNames = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("deptNames")), "UTF-8"),""); + String deptTypes = clearXSS(request.getParameter("deptTypes"),""); + String userIDs = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("userIDs")), "UTF-8"),""); + String userNames = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("userNames")), "UTF-8"),""); + String docName = clearXSS(Encoder.toJava(request.getParameter("docName")),""); + String handyName = clearXSS(Encoder.toJava(request.getParameter("handyName")),""); + String stDate = clearXSS(request.getParameter("stDate"),""); + String edDate = clearXSS(request.getParameter("edDate"),""); + String accAuth = clearXSS(request.getParameter("accAuth"),""); + String totRange = clearXSS(request.getParameter("totRange"),""); + Long repDocID = MLong.parseLong(request.getParameter("repDocID"),null); + String docGroupID = clearXSS(request.getParameter("docGroupID"),""); + String isFromFormBox = clearXSS(request.getParameter("isFromFormBox"),""); + String tableCount = clearXSS(request.getParameter("tableCount"),""); + String isDynaTable = clearXSS(request.getParameter("isDynaTable"),""); + String mode = clearXSS(request.getParameter("mode"),""); + String tableDefines = clearXSS(request.getParameter("tableDefines"),""); + String itemNames = clearXSS(Encoder.toJava(request.getParameter("itemNames")),""); + String tableNums = clearXSS(Encoder.toJava(request.getParameter("tableNums")),""); + String colNums = clearXSS(Encoder.toJava(request.getParameter("colNums")),""); + String rowNums = clearXSS(Encoder.toJava(request.getParameter("rowNums")),""); + String itemSizes = clearXSS(Encoder.toJava(request.getParameter("itemSizes")),""); + String itemDescs = clearXSS(Encoder.toJava(request.getParameter("itemDescs")),""); + String itemExprs = clearXSS(Encoder.toJava(request.getParameter("itemExprs")),""); + String itemTypes = clearXSS(Encoder.toJava(request.getParameter("itemTypes")),""); + //String docForm = clearXSS(request.getParameter("docForm"),""); + + String tableType = clearXSS(request.getParameter("tableType"),""); + String tableTypes = clearXSS(request.getParameter("tableTypes"),""); + + if(defItemSize < 1 ) defItemSize = 10; + + /************ doc values ************/ + TotDoc totDoc = docID == null ? null : pm.getObjectById(TotDoc.class, docID); + String docForm = ""; + + /************* item values ***********/ + StringBuffer itemNamesBuf = new StringBuffer(); + StringBuffer itemSizesBuf = new StringBuffer(); + StringBuffer itemDescsBuf = new StringBuffer(); + StringBuffer itemExprsBuf = new StringBuffer(); + StringBuffer itemTypesBuf = new StringBuffer(); + + + if(mode != null && mode.equals("regist")){ + docForm = (String)session.getAttribute("docForm"); + }else if(mode != null && mode.equals("modify")){ + docForm = totDoc.getForm(); + }else if(mode != null && mode.equals("preview")){ + docForm = totDoc.getForm(); + docName = totDoc.getName(); + if(totDoc.getTotTables().iterator().hasNext()) + defItemSize = totDoc.getTotTables().iterator().next().getItemSize(); + + /********** Item values **********/ + ItemList itemList = new ItemList(); + //v2. 13.SQL : itemList.executeQuery() prepare SQL Ǿ ִ. + itemList.executeQuery(docID); + //================= + int itemCount = itemList.getCount(); + String[] itemNameList = itemList.getNameList(); + String[] itemDescList = itemList.getDescList(); + String[] itemExprList = itemList.getExprList(); + int[] itemTypeList = itemList.getTypeList(); + int[] itemNumList = itemList.getNumList(); + int[] itemSizeList = itemList.getSizeList(); + int[] tableNumList = itemList.getTableNumList(); + int[] colNumList = itemList.getFieldNumList(); + int[] rowNumList = itemList.getRecordNumList(); + int[] itemBNWList = itemList.getBNWList(); + String[] itemTypeNameList = itemList.getTypeNameList(); + + for(int i=0; i + + +<%=Moumi.getTitle()%> + + + + + + + + + + + + + +
    + + + +
    + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + <%= docForm %> +
    + + + + + + <%if ( changeAllScript.length() > 0 ) {%> + + <%}%> + + <%//}%> + +
      
    +
    +
    +
    +
    + + +<% +}catch(Exception ex){ + ex.printStackTrace();%> + +<% +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/totsys/common/web/documents/tot_doc/inform_preview_form.jsp b/webapps/totsys/common/web/documents/tot_doc/inform_preview_form.jsp new file mode 100644 index 0000000..eeecb48 --- /dev/null +++ b/webapps/totsys/common/web/documents/tot_doc/inform_preview_form.jsp @@ -0,0 +1,393 @@ + +<% +/************************************************************@@ + * Program Name : popup_inform_preview.jsp + * Description : 蹮 (ϰ, 濡 + * Author : ũ + * Create Date : 2010.11.25 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" import="java.net.URLDecoder" + import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.moumi.doc.MDocPreview" + import="kr.co.kihyun.moumi.doc.table.item.MItem" + import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList" + import="kr.co.kihyun.moumi.Moumi" + import="javax.jdo.Transaction" + import="kr.co.kihyun.text.html.CallbackHandler"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + int defItemSize = MInteger.parseInt(MString.checkNull(request.getParameter("defItemSize"))); + + Long docID = MLong.parseLong(request.getParameter("docID"),null); + String choice = clearXSS(request.getParameter("choice"),""); + String deptIDs = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("deptIDs"))),""); + String deptNames = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("deptNames"))),""); + String userIDs = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("userIDs"))),""); + String userNames = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("userNames"))),""); + String docName = clearXSS(Encoder.toJava(request.getParameter("docName")),""); + String stDate = clearXSS(request.getParameter("stDate"),""); + String edDate = clearXSS(request.getParameter("edDate"),""); + String accAuth = clearXSS(request.getParameter("accAuth"),""); + Long repDocID = MLong.parseLong(request.getParameter("repDocID"),null); + String docGroupID = clearXSS(request.getParameter("docGroupID"),""); + String isFromFormBox = clearXSS(request.getParameter("isFromFormBox"),""); + String tableCount = clearXSS(request.getParameter("tableCount"),""); + String isDynaTable = clearXSS(request.getParameter("isDynaTable"),""); + String mode = clearXSS(request.getParameter("mode"),""); + String tableDefines = clearXSS(request.getParameter("tableDefines"),""); + String itemNames = clearXSS(Encoder.toJava(request.getParameter("itemNames")),""); + String tableNums = clearXSS(Encoder.toJava(request.getParameter("tableNums")),""); + String colNums = clearXSS(Encoder.toJava(request.getParameter("colNums")),""); + String rowNums = clearXSS(Encoder.toJava(request.getParameter("rowNums")),""); + String itemSizes = clearXSS(Encoder.toJava(request.getParameter("itemSizes")),""); + String itemDescs = clearXSS(Encoder.toJava(request.getParameter("itemDescs")),""); + String itemExprs = clearXSS(Encoder.toJava(request.getParameter("itemExprs")),""); + String itemTypes = clearXSS(Encoder.toJava(request.getParameter("itemTypes")),""); + //String docForm = clearXSS(request.getParameter("docForm"),""); + + String tableType = clearXSS(request.getParameter("tableType"),""); + String tableTypes = clearXSS(request.getParameter("tableTypes"),""); + + if(defItemSize < 1 ) defItemSize = 10; + + /************ doc values ************/ + TotDoc totDoc = docID == null ? null : pm.getObjectById(TotDoc.class, docID); + String docForm = ""; + + /************* item values ***********/ + StringBuffer itemNamesBuf = new StringBuffer(); + StringBuffer itemSizesBuf = new StringBuffer(); + StringBuffer itemDescsBuf = new StringBuffer(); + StringBuffer itemExprsBuf = new StringBuffer(); + StringBuffer itemTypesBuf = new StringBuffer(); + + if(mode != null && mode.equals("regist")){ + docForm = (String)session.getAttribute("docForm"); + }else if(mode != null && mode.equals("modify")){ + docForm = totDoc.getForm(); + }else if(mode != null && mode.equals("preview")){ + docForm = totDoc.getForm(); + docName = totDoc.getName(); + if(totDoc.getTotTables().iterator().hasNext()) + defItemSize = totDoc.getTotTables().iterator().next().getItemSize(); + + /********** Item values **********/ + ItemList itemList = new ItemList(); + //v2. 13.SQL : itemList.executeQuery() prepare SQL Ǿ ִ. + itemList.executeQuery(docID); + //================= + int itemCount = itemList.getCount(); + String[] itemNameList = itemList.getNameList(); + String[] itemDescList = itemList.getDescList(); + String[] itemExprList = itemList.getExprList(); + int[] itemTypeList = itemList.getTypeList(); + int[] itemNumList = itemList.getNumList(); + int[] itemSizeList = itemList.getSizeList(); + int[] tableNumList = itemList.getTableNumList(); + int[] colNumList = itemList.getFieldNumList(); + int[] rowNumList = itemList.getRecordNumList(); + int[] itemBNWList = itemList.getBNWList(); + String[] itemTypeNameList = itemList.getTypeNameList(); + + for(int i=0; i + + +<%=Moumi.getTitle()%> + + + + + + + + + + + + +
    + + + +
    + + + + + + + +
    + + + + +
    + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    ; overflow-x: auto;"> + + <%= docForm %> +
    +
    + + + + + + <%if ( changeAllScript.length() > 0 ) {%> + + <%}%> + + <%//}%> + +
      
    +
    +
    +
    +
    + + +<% +}catch(Exception ex){ + ex.printStackTrace();%> + +<% +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/totsys/common/web/documents/tot_doc/left_top_info.jsp b/webapps/totsys/common/web/documents/tot_doc/left_top_info.jsp new file mode 100644 index 0000000..e69de29 diff --git a/webapps/totsys/common/web/documents/tot_doc/modify_inform_preview.jsp b/webapps/totsys/common/web/documents/tot_doc/modify_inform_preview.jsp new file mode 100644 index 0000000..1401045 --- /dev/null +++ b/webapps/totsys/common/web/documents/tot_doc/modify_inform_preview.jsp @@ -0,0 +1,546 @@ + +<% +/************************************************************@@ + * Program Name : popup_inform_preview.jsp + * Description : 蹮 (ϰ, 濡 + * Author : ũ + * Create Date : 2010.11.25 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" import="java.net.URLDecoder" + import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.moumi.doc.MDocPreview" + import="kr.co.kihyun.moumi.doc.table.item.MItem" + import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList" + import="kr.co.kihyun.moumi.Moumi" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.text.html.CallbackHandler" import="java.util.*"%> +<%@page import="kr.co.kihyun.beans.entity.TotReport"%> +<%@page import="kr.co.kihyun.beans.entity.TotReportProcess"%> +<%@page import="kr.co.kihyun.beans.entity.TotDoc"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + String dpID = HttpSSOLogin.getDeptID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + + int defItemSize = MInteger.parseInt(MString.checkNull(request.getParameter("defItemSize"))); + + Long docID = MLong.parseLong(request.getParameter("docID"),null); + String choice = clearXSS(request.getParameter("choice"),""); + String deptIDs = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("deptIDs"))),""); + String deptNames = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("deptNames"))),""); + String userIDs = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("userIDs"))),""); + String userNames = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("userNames"))),""); + + String docName = clearXSS(Encoder.toJava(request.getParameter("docName")),""); + String stDate = clearXSS(request.getParameter("stDate"),""); + String edDate = clearXSS(request.getParameter("edDate"),""); + String accAuth = clearXSS(request.getParameter("accAuth"),""); + Long repDocID = MLong.parseLong(request.getParameter("repDocID"),null); + String docGroupID = clearXSS(request.getParameter("docGroupID"),""); + String isFromFormBox = clearXSS(request.getParameter("isFromFormBox"),""); + String tableCount = clearXSS(request.getParameter("tableCount"),""); + String isDynaTable = clearXSS(request.getParameter("isDynaTable"),""); + String mode = clearXSS(request.getParameter("mode"),""); + String tableDefines = clearXSS(request.getParameter("tableDefines"),""); + String itemNames = clearXSS(Encoder.toJava(request.getParameter("itemNames")),""); + String tableNums = clearXSS(Encoder.toJava(request.getParameter("tableNums")),""); + String colNums = clearXSS(Encoder.toJava(request.getParameter("colNums")),""); + String rowNums = clearXSS(Encoder.toJava(request.getParameter("rowNums")),""); + String itemSizes = clearXSS(Encoder.toJava(request.getParameter("itemSizes")),""); + String itemDescs = clearXSS(Encoder.toJava(request.getParameter("itemDescs")),""); + String itemExprs = clearXSS(Encoder.toJava(request.getParameter("itemExprs")),""); + String itemTypes = clearXSS(Encoder.toJava(request.getParameter("itemTypes")),""); + //String docForm = clearXSS(request.getParameter("docForm"),""); + + String tableType = clearXSS(request.getParameter("tableType"),""); + String tableTypes = clearXSS(request.getParameter("tableTypes"),""); + + // ȭ + String strPage = clearXSS(request.getParameter("strPage"),""); + String findOption = clearXSS(request.getParameter("findOption"),""); + String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")),""); + String url = "form"; + + if(defItemSize < 1 ) defItemSize = 10; + + /************ doc values ************/ + TotDoc totDoc = docID == null ? null : pm.getObjectById(TotDoc.class, docID); + String docForm = ""; + + /************* item values ***********/ + StringBuffer itemNamesBuf = new StringBuffer(); + StringBuffer itemSizesBuf = new StringBuffer(); + StringBuffer itemDescsBuf = new StringBuffer(); + StringBuffer itemExprsBuf = new StringBuffer(); + StringBuffer itemTypesBuf = new StringBuffer(); + StringBuilder insertInputCellName = new StringBuilder(); + + if(mode != null && mode.equals("regist")){ + docForm = (String)session.getAttribute("docForm"); + }else if(mode != null && mode.equals("modify")){ + docForm = totDoc.getForm(); + }else if(mode != null && mode.equals("preview")){ + docForm = totDoc.getForm(); + docName = totDoc.getName(); + if(totDoc.getTotTables().iterator().hasNext()) + defItemSize = totDoc.getTotTables().iterator().next().getItemSize(); + + /********** Item values **********/ + ItemList itemList = new ItemList(); + //v2. 13.SQL : itemList.executeQuery() prepare SQL Ǿ ִ. + itemList.executeQuery(docID); + //================= + int itemCount = itemList.getCount(); + String[] itemNameList = itemList.getNameList(); + String[] itemDescList = itemList.getDescList(); + String[] itemExprList = itemList.getExprList(); + int[] itemTypeList = itemList.getTypeList(); + int[] itemNumList = itemList.getNumList(); + int[] itemSizeList = itemList.getSizeList(); + int[] tableNumList = itemList.getTableNumList(); + int[] colNumList = itemList.getFieldNumList(); + int[] rowNumList = itemList.getRecordNumList(); + int[] itemBNWList = itemList.getBNWList(); + String[] itemTypeNameList = itemList.getTypeNameList(); + + //dform.itemNames.value = dform.itemNames.value + i + ':' + itemNameList[i] + 'MItem.LIST_DELIM'; + + for(int i=0; i + + +<%@page import="kr.co.kihyun.beans.entity.TotDocType"%> + +<%=Moumi.getTitle()%> + + + + + + + + + + + + + + + + + +
    + + + +
    + + +
    + + +
    + + + +
    +
    + + + + +
    + + + <%if(sysAuth == Moumi.TOTPER){%> + + + <%}else{%> + + + <%}%> + +
    <%= Moumi.getMessageBundle().getString("moumi.message.button_small.docReprss") %> + <%= Moumi.getMessageBundle().getString("moumi.message.button_small.docDel") %> + + <%= Moumi.getMessageBundle().getString("moumi.message.button_small.formModify") %> + + <%= Moumi.getMessageBundle().getString("moumi.message.button_small.formPreferenceModify") %> +
    +
    + + + + + + + + + + +
    +
    ; overflow-x: auto;"> + <%= docForm %>
    +
    + + + <%if(sysAuth == Moumi.SYSADM){%> + + <%}else{%> + + <%}%> + + <%if ( changeAllScript.length() > 0 ) {%> + + <%}%> + + <%//}%> + +
      
    +
    +
    +
    + + +<% +}catch(Exception ex){ + ex.printStackTrace();%> + +<% +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/totsys/common/web/documents/tot_doc/popup_copy_form.jsp b/webapps/totsys/common/web/documents/tot_doc/popup_copy_form.jsp new file mode 100644 index 0000000..88ebd76 --- /dev/null +++ b/webapps/totsys/common/web/documents/tot_doc/popup_copy_form.jsp @@ -0,0 +1,224 @@ + +<% +/************************************************************@@ + * Program Name : popup_copy_form.jsp + * Description : //// ÷ + * Author : + * Create Date : 2004-11-05 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.lang.StringConverter" + import="kr.co.kihyun.moumi.Moumi" import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc"%> +<%@ page import="java.net.URLEncoder"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + /********** get Parameter *************/ + Long reuseDocID = MLong.parseLong(request.getParameter("reuseDocID"),null); + + /*********** doc value *****************/ + String repDocForm = ""; + if(reuseDocID != null){ + TotDoc totDoc = pm.getObjectById(TotDoc.class, reuseDocID); + repDocForm = totDoc.getForm(); + repDocForm = TagFilter.convertSingle(repDocForm); + repDocForm = StringConverter.toOneLine(repDocForm); + } +%> + + +<%=Moumi.getTitle()%> + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
      + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + +

    + + + + + + + + + + +
      [ ǥ + ֱâ ]
    +
    + +
    +
    +
    + + + + + + + +
     
    + +
    +
    +
     
     
    + + +<% +}catch(Exception ex){ + //38.޼ (getMessage)_CWE-209 : Update by YOUNGJUN,CHO + //out.println(ex); + ex.printStackTrace(); + //out.println("

    Can't contact servlet runner



    Message : "+ex.getMessage()+""); + //out.println(""); + //================================================ +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/totsys/common/web/documents/tot_doc/popup_del_preview.jsp b/webapps/totsys/common/web/documents/tot_doc/popup_del_preview.jsp new file mode 100644 index 0000000..4bcbe1d --- /dev/null +++ b/webapps/totsys/common/web/documents/tot_doc/popup_del_preview.jsp @@ -0,0 +1,379 @@ + +<%@page import="kr.co.kihyun.beans.tosys.etc1.TotsysEtc"%> +<% +/************************************************************@@ + * Program Name : popup_inform_preview.jsp + * Description : 蹮 ̸(ϰ, 濡 + * Author : ũ + * Create Date : 2010.11.25 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" import="java.net.URLDecoder" + import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.text.html.TagFilter" import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.moumi.doc.MDocPreview" + import="kr.co.kihyun.moumi.doc.table.item.MItem" + import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList" + import="kr.co.kihyun.moumi.Moumi" + import="javax.jdo.Transaction"import="java.util.*"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + /*********** parameter value ***********/ + Long docID = MLong.parseLong(request.getParameter("docID"),null); + String docName = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("docName")), "UTF-8"),""); + String acceptanceLimitStrategy = clearXSS(request.getParameter("acceptanceLimitStrategy"),LimitByDeadlineStrategy.class.getSimpleName().toString()); + String usrFilenames = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("usrFilenames")), "UTF-8"),""); + String svrFilenames = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("svrFilenames")), "UTF-8"),""); + String itemNames = Encoder.toJava(clearXSS(MString.checkNull(request.getParameter("itemNames")),"")); + String itemSizes = Encoder.toJava(clearXSS(MString.checkNull(request.getParameter("itemSizes")),"")); + String itemDescs = Encoder.toJava(clearXSS(MString.checkNull(request.getParameter("itemDescs")),"")); + + String itemExprs = Encoder.toJava(clearXSS(MString.checkNull(request.getParameter("itemExprs")),"")); + String itemTypes = Encoder.toJava(clearXSS(MString.checkNull(request.getParameter("itemTypes")),"")); + int defItemSize = MInteger.parseInt(MString.checkNull(request.getParameter("defItemSize"))); + String mode = clearXSS(MString.checkNull(request.getParameter("mode")),""); + String callType = MString.checkNull(request.getParameter("callType")); + + if(defItemSize < 1 ) defItemSize = 10; + + /************ doc values ************/ + TotDoc totDoc = docID == null ? null : pm.getObjectById(TotDoc.class, docID); + String docForm = ""; + + /************* item values ***********/ + StringBuffer itemNamesBuf = new StringBuffer(); + StringBuffer itemSizesBuf = new StringBuffer(); + StringBuffer itemDescsBuf = new StringBuffer(); + StringBuffer itemExprsBuf = new StringBuffer(); + StringBuffer itemTypesBuf = new StringBuffer(); + StringBuilder insertInputCellName = new StringBuilder(); + + if(mode != null && mode.equals("regist")){ + docForm = (String)session.getAttribute("docForm"); + + }else if(mode != null && mode.equals("modify")){ + docForm = totDoc.getForm(); + }else if(mode != null && mode.equals("preview")) + { + docForm = totDoc.getForm(); + docName = totDoc.getName(); + if(totDoc.getTotTables().iterator().hasNext()) + defItemSize = totDoc.getTotTables().iterator().next().getItemSize(); + + /********** Item values **********/ + ItemList itemList = new ItemList(); + //v2. 13.SQL : itemList.executeQuery() prepare SQL Ǿ ִ. + itemList.executeQuery(docID); + //================= + int itemCount = itemList.getCount(); + String[] itemNameList = itemList.getNameList(); + String[] itemDescList = itemList.getDescList(); + String[] itemExprList = itemList.getExprList(); + int[] itemTypeList = itemList.getTypeList(); + int[] itemNumList = itemList.getNumList(); + int[] itemSizeList = itemList.getSizeList(); + int[] tableNumList = itemList.getTableNumList(); + int[] colNumList = itemList.getFieldNumList(); + int[] rowNumList = itemList.getRecordNumList(); + int[] itemBNWList = itemList.getBNWList(); + String[] itemTypeNameList = itemList.getTypeNameList(); + //dform.itemNames.value = dform.itemNames.value + i + ':' + itemNameList[i] + 'MItem.LIST_DELIM'; + + for(int i=0; i + + +׽Ʈ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
      + + + + +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    +
    ; overflow-x: auto; overflow-y: visible;"> + + <%= docForm %> +
    +
    + <%if ( changeAllScript.length() > 0 ) {%> <%}%> + <%if("regbox1step".equals(callType)){%> + <%}%> +
    + + + + + <%//}%> + +
    +
    +
    +
    +
     
     
    + + +<% +} +catch(Exception ex) +{ + + ex.printStackTrace(); + %> + +<% +} +finally +{ + if(tx.isActive()) + tx.rollback(); + pm.close(); + + +} +%> diff --git a/webapps/totsys/common/web/documents/tot_doc/popup_doc_report_transfer.jsp b/webapps/totsys/common/web/documents/tot_doc/popup_doc_report_transfer.jsp new file mode 100644 index 0000000..aedff24 --- /dev/null +++ b/webapps/totsys/common/web/documents/tot_doc/popup_doc_report_transfer.jsp @@ -0,0 +1,605 @@ +<% /** + * ********************************************************** + * @@ Program Name : popup_doc_report_list.jsp + * @@ Description : λ̵ ϰ + * @@ Author : KWON,HAN + * @@ Create Date : 2014.09.22 + * @@ History : + * @@*********************************************************** + */ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="java.util.Date" + import="java.util.List" + import="java.util.Map" + import="java.util.HashMap" + import="java.text.SimpleDateFormat" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.moumi.Moumi" + import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.service.vo.TotDocReportVO" + import="kr.co.kihyun.service.TotDocReportService" + import="kr.co.kihyun.beans.user.MultiCheck"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + Logger LOG = LoggerFactory.getLogger(this.getClass()); + + /** + * ******** session userId ********* + */ + String usID = HttpSSOLogin.getLoginID(request); + String dpID = HttpSSOLogin.getDeptID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + + /** + * **** Parameter ***** + */ + String docType = clearXSS(request.getParameter("docType"), null); + String exeType = clearXSS(request.getParameter("exeType"), null); + String findOption = clearXSS(request.getParameter("findOption"), null); + String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")), null); + if("".equals(findOption) || "all".equals(findOption)) { + findWord = ""; + } + String procMode = MString.checkNull(request.getParameter("proc_mode")); + + int wordLengthLimit = 18; //ڿ Ŭ ¥ + int count = 0; + + tx.begin(); + + //˻Ķ ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Map params = new HashMap(); + params.put("userId", usID); + params.put("deptId", dpID); + params.put("findOption", findOption); + params.put("filterValue", findWord); + + TotDocReportService docReport = new TotDocReportService(pm); + + //˻ ڵ尹ȸ + docReport.createDocReportListSearchQuery(params, docType, exeType); + + List list = null; + + //ϴ ڵ尡 ϸ ȸ + list = docReport.executeQuery(TotDocReportVO.class); + + count = list.size(); + + tx.rollback(); + + //ó ȭ ȣ ̰ ˻ Ͱ ٸ λ̵ ̰θ 'N' Ѵ. + if (MString.isNull(procMode)) { + if(count <= 0) { + tx.begin(); + + MultiCheck mc = new MultiCheck(); + + int tmpCount = mc.updateModYnOfMuser(usID, "N"); + if(tmpCount != 1) { + %> + + <% + tx.rollback(); + } else { + tx.commit(); + } + } + } + + Date nowDate = new Date(); + String paramTitle = URLEncoder.encode(""+MoumiConfig.getMessageBundle().getString("moumi.message.totsys.sysadm.user.user_view_jsp.mod_yn")+"","UTF-8"); //λ̵ ڷ̰ +%> + + + <%=MoumiConfig.getMessageBundle().getString("moumi.message.totsys.sysadm.user.user_view_jsp.mod_yn")%> + + + + + + + + + + + + + +
    + + + + + + + + + +
    + + + + + + + + + <%@ include file="/totsys/common/inc/buttom/buttom.jsp"%> + +
    + + + + + + + + + + + + + + + + + + <%if (count > 0) {%> + + + + <%} else {%> + + + + <%}%> + + + + + +
    + + + + + + + + +
    +
    + +   <%=Moumi.getMessageBundle().getString("moumi.message.doc")%>  + +   <%=Moumi.getMessageBundle().getString("moumi.message.tot_report.status")%>  + +   <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.search")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_report.section")%>  + + + + + + + +
    +
    + + <%=Moumi.getMessageBundle().getString(" /> +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + <% + int index = 0; //迭 Ű + + for (int i = 0; i < count; i++) { + index = i + 1; + TotDocReportVO docReportVO = (TotDocReportVO) list.get(i); + + String docName = docReportVO.getName(); + String userId = MString.checkNull(docReportVO.getUserId()); + %> + + + + + + + + + + + + + + + + + + + <% + String sDocReportType = docReportVO.getDocReportType(); + String tmpMoumiAcptLimitStrategy = Integer.toString(docReportVO.getSubmitLimitCnt()); + String tmp2 = null; + String tstr = " "; + if("R".equals(sDocReportType)) { tstr = ""; } + String tcnt; + + tcnt = "(" + Integer.toString(docReportVO.getSubmitLimitCnt()) + " )"; + if (tmpMoumiAcptLimitStrategy.equals("0")) { + tmp2 = new SimpleDateFormat("yyyy-MM-dd HH").format(docReportVO.getEndDate()); + tcnt = ""; + } else { + tmp2 = Moumi.getMessageBundle().getString("moumi.message.tot_doc.endBySubmitTotal"); + tstr = ""; + } + if("D".equals(sDocReportType)) { + if (tmp2.contains("9999-12-30")) { tmp2 = Moumi.getMessageBundle().getString("moumi.message.tot_doc.docGethering"); } + if (tmp2.equals(Moumi.getMessageBundle().getString("moumi.message.tot_doc.docGethering"))) { tstr = ""; } + } else if("R".equals(sDocReportType)) { + if("2.1.RETURN".equals(docReportVO.getDocReportSatus())) { + if(tmp2.contains("9999-12-30")) tmp2=Moumi.getMessageBundle().getString("moumi.message.tot_doc.endManually"); + if(tmp2.equals(Moumi.getMessageBundle().getString("moumi.message.tot_doc.endManually"))) tstr = ""; + } else if("2.2.TEMP".equals(docReportVO.getDocReportSatus())) { + if(tmp2.contains("9999-12-30")) tmp2=Moumi.getMessageBundle().getString("moumi.message.tot_doc.docGethering"); + if(tmp2.equals(Moumi.getMessageBundle().getString("moumi.message.tot_doc.docGethering"))) tstr = ""; + } else if("2.3.COMP".equals(docReportVO.getDocReportSatus())) { + if(tmp2.contains("9999-12-30")) tmp2=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.endManually"); + if(tmp2.equals(MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.endManually"))) tstr = ""; + } + } + %> + + + + + <% + } //for + %> + +
    No. + + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.doc")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_report.status")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_report.section")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.executionCode")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.doc")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.name")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.request")%><%=Moumi.getMessageBundle().getString("moumi.message.totsys.sysadm.part.part_list_jsp")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.request")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.compSnd")%>/<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.all")%>(<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.noteRecall")%>) +
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_report.submit")%><%=Moumi.getMessageBundle().getString("moumi.message.totsys.sysadm.part.part_list_jsp")%> +
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.person")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.startDate")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.endMethod")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.remark")%>
    <%=index%> + <% if (docReportVO.getUserId() == null || !docReportVO.getUserId().equals(usID)) {%>disabled<%} %> /> + + + <% + if ("D".equals(docReportVO.getDocReportType())) {%> + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.tot_doc")%> + <%} else if ("R".equals(docReportVO.getDocReportType())) {%> + <%=Moumi.getMessageBundle().getString("moumi.message.menu.submit")%> + <%} else {%> + <%=docReportVO.getDocReportType()%> + <%}%> + + <% + if ("1.1.PRSS".equals(docReportVO.getDocReportSatus())) {%> + <%=Moumi.getMessageBundle().getString("moumi.message.menu.prss")%> + <%} else if ("1.2.REG".equals(docReportVO.getDocReportSatus())) {%> + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.reg")%> + <%} else if ("1.3.END".equals(docReportVO.getDocReportSatus())) {%> + <%=Moumi.getMessageBundle().getString("moumi.message.menu.end")%> + <%} else if ("2.1.RETURN".equals(docReportVO.getDocReportSatus())) {%> + <%=Moumi.getMessageBundle().getString("moumi.message.totsys.repoper.mydocbox.returnbox.report_list_jsp")%> + <%} else if ("2.2.TEMP".equals(docReportVO.getDocReportSatus())) {%> + <%=Moumi.getMessageBundle().getString("moumi.message.tot_report.process.temp")%> + <%} else if ("2.3.COMP".equals(docReportVO.getDocReportSatus())) {%> + <%=Moumi.getMessageBundle().getString("moumi.message.menu.mySubmit")%> + <%} else {%> + <%= docReportVO.getDocReportSatus() %> + <%}%> + + <% + if (docReportVO.isPeriodicalDoc() && docReportVO.isDocCollection()) {%> + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.create.periodical") + "/" + Moumi.getMessageBundle().getString("moumi.message.tot_doc.collection")%> + <%} else if (docReportVO.isPeriodicalDoc() && !docReportVO.isDocCollection()) { %> + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.create.periodical") + "/" + Moumi.getMessageBundle().getString("moumi.message.tot_doc.file")%> + <%} else if (!docReportVO.isPeriodicalDoc() && docReportVO.isDocCollection()) { %> + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.create.random") + "/" + Moumi.getMessageBundle().getString("moumi.message.tot_doc.collection")%> + <%} else if (!docReportVO.isPeriodicalDoc() && !docReportVO.isDocCollection()) { %> + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.create.random") + "/" + Moumi.getMessageBundle().getString("moumi.message.tot_doc.file")%> + <%}%> + <%= docReportVO.getExecCode() %> style="color: red;"<%}%> ><%= MString.getEllipsis(docReportVO.getName(), wordLengthLimit) %><%= MString.checkNull(docReportVO.getDeptName()) %> <%= docReportVO.getOwnerName() %> <%= docReportVO.getReportDeptName() %><%= docReportVO.getReportUserName() %> <%= new SimpleDateFormat("yyyy-MM-dd").format(docReportVO.getStartDate()) %> style="color: red;" <%}%>> + <% + out.write(tmp2 + tstr + tcnt); + %> + + + <% + if("D".equals(sDocReportType)) { + if (docReportVO.getRepId() != null && docReportVO.getRepId() != 0) { + out.print(Moumi.getMessageBundle().getString("moumi.message.tot_doc.subDoc")); //ڷ + } + } else if("R".equals(sDocReportType)) { + // /tempbox/report_list.jsp + if("2.1.RETURN".equals(docReportVO.getDocReportSatus())) { + if(docReportVO.getDownDocId() == 0) { + if(docReportVO.getReportPrss() == 3) { + out.print(Moumi.getMessageBundle().getString("moumi.message.tot_report.returnStatus")); //Է¿û + } + } else { + if(docReportVO.getReportPrss() == 3) { + out.print(Moumi.getMessageBundle().getString("moumi.message.tot_report.returnStatus")); //Է¿û + } + } + + // /endbox/report_list.jsp + } else if("2.2.TEMP".equals(docReportVO.getDocReportSatus())) { + if(docReportVO.getReportPrss() == 4) { + if((docReportVO.getEndDate().getTime() < nowDate.getTime()) && (docReportVO.getReportPrss() == 2 || docReportVO.getReportPrss() != 2)) { + out.print(Moumi.getMessageBundle().getString("moumi.message.menu.end")); // + } else { + out.print(Moumi.getMessageBundle().getString("moumi.message.menu.prss")); // + } + } else { + out.print(Moumi.getMessageBundle().getString("moumi.message.tot_report.recogWaitDuring")); // + } + if(docReportVO.getDownDocId() != 0) { + out.print("
    [" + Moumi.getMessageBundle().getString("moumi.message.tot_doc.subDoc") + "]"); //ڷ + } + + // /endbox/report_list.jsp + } else if("2.3.COMP".equals(docReportVO.getDocReportSatus())) { + if(docReportVO.getAppro() == 1) { + out.println(MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.approOpenData")); //ڷ + } else if(docReportVO.getReportPrss() == 12) { + out.println(MoumiConfig.getMessageBundle().getString("moumi.message.button.not")); //ش + } + } + } + %>  +
    +
    +
    +
    + + +
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.notDoc")%>
    +
    + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> + diff --git a/webapps/totsys/common/web/documents/tot_doc/popup_inform_preview.jsp b/webapps/totsys/common/web/documents/tot_doc/popup_inform_preview.jsp new file mode 100644 index 0000000..f0ee9df --- /dev/null +++ b/webapps/totsys/common/web/documents/tot_doc/popup_inform_preview.jsp @@ -0,0 +1,416 @@ +<%@page import="kr.co.kihyun.beans.tosys.etc1.TotsysEtc"%> +<% /** + * **********************************************************@@ Program Name + * : popup_inform_preview.jsp Description : 蹮 ̸(ϰ, 濡 Author + * : ũ Create Date : 2010.11.25 History : + * @@*********************************************************** + */ +%> +<%@ page contentType="text/html; charset=UTF-8" + import="java.net.URLEncoder" + import="java.net.URLDecoder" + import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.moumi.doc.MDocPreview" + import="kr.co.kihyun.moumi.doc.table.item.MItem" + import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList" + import="kr.co.kihyun.moumi.Moumi" + import="javax.jdo.Transaction" + import="java.util.*"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + /** + * ********* parameter value ********** + */ + Long docID = MLong.parseLong(request.getParameter("docID"), null); + String docName = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("docName")), "UTF-8"), ""); + String acceptanceLimitStrategy = clearXSS(request.getParameter("acceptanceLimitStrategy"), LimitByDeadlineStrategy.class.getSimpleName().toString()); + String usrFilenames = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("usrFilenames")), "UTF-8"), ""); + String svrFilenames = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("svrFilenames")), "UTF-8"), ""); + String itemNames = Encoder.toJava(clearXSS(MString.checkNull(request.getParameter("itemNames")), "")); + String itemSizes = Encoder.toJava(clearXSS(MString.checkNull(request.getParameter("itemSizes")), "")); + String itemDescs = Encoder.toJava(clearXSS(MString.checkNull(request.getParameter("itemDescs")), "")); + + String itemExprs = Encoder.toJava(clearXSS(MString.checkNull(request.getParameter("itemExprs")), "")); + String itemTypes = Encoder.toJava(clearXSS(MString.checkNull(request.getParameter("itemTypes")), "")); + int defItemSize = MInteger.parseInt(MString.checkNull(request.getParameter("defItemSize"))); + String mode = clearXSS(MString.checkNull(request.getParameter("mode")), ""); + String callType = MString.checkNull(request.getParameter("callType")); + + if (defItemSize < 1) { + defItemSize = 10; + } + + /** + * ********** doc values *********** + */ + TotDoc totDoc = docID == null ? null : pm.getObjectById(TotDoc.class, docID); + String docForm = ""; + + /** + * *********** item values ********** + */ + StringBuffer itemNamesBuf = new StringBuffer(); + StringBuffer itemSizesBuf = new StringBuffer(); + StringBuffer itemDescsBuf = new StringBuffer(); + StringBuffer itemExprsBuf = new StringBuffer(); + StringBuffer itemTypesBuf = new StringBuffer(); + StringBuilder insertInputCellName = new StringBuilder(); + + if (mode != null && mode.equals("regist")) { + docForm = (String) session.getAttribute("docForm"); + + } else if (mode != null && mode.equals("modify")) { + docForm = totDoc.getForm(); + } else if (mode != null && mode.equals("preview")) { + docForm = totDoc.getForm(); + docName = totDoc.getName(); + if (totDoc.getTotTables().iterator().hasNext()) { + defItemSize = totDoc.getTotTables().iterator().next().getItemSize(); + } + + /** + * ******** Item values ********* + */ + ItemList itemList = new ItemList(); + //v2. 13.SQL : itemList.executeQuery() prepare SQL Ǿ ִ. + itemList.executeQuery(docID); + //================= + int itemCount = itemList.getCount(); + String[] itemNameList = itemList.getNameList(); + String[] itemDescList = itemList.getDescList(); + String[] itemExprList = itemList.getExprList(); + int[] itemTypeList = itemList.getTypeList(); + int[] itemNumList = itemList.getNumList(); + int[] itemSizeList = itemList.getSizeList(); + int[] tableNumList = itemList.getTableNumList(); + int[] colNumList = itemList.getFieldNumList(); + int[] rowNumList = itemList.getRecordNumList(); + int[] itemBNWList = itemList.getBNWList(); + String[] itemTypeNameList = itemList.getTypeNameList(); + //dform.itemNames.value = dform.itemNames.value + i + ':' + itemNameList[i] + 'MItem.LIST_DELIM'; + + for (int i = 0; i < itemCount; i++) { + if (insertInputCellName.toString().length() == 0) { + if ("empty".equals(itemDescList[i].trim())) { + insertInputCellName.append(itemNameList[i]); + } + } else { + if ("empty".equals(itemDescList[i].trim())) { + insertInputCellName.append("," + itemNameList[i]); + } + } + itemNamesBuf.append(i + ":" + itemNameList[i] + MItem.LIST_DELIM); + itemSizesBuf.append(i + ":" + itemSizeList[i] + MItem.LIST_DELIM); + itemDescsBuf.append(i + ":" + itemDescList[i] + MItem.LIST_DELIM); + itemExprsBuf.append(i + ":" + itemExprList[i] + MItem.LIST_DELIM); + itemTypesBuf.append(i + ":" + MItem.getTypeName(itemTypeList[i]) + MItem.LIST_DELIM); + } + + itemNames = itemNamesBuf.toString(); + itemSizes = itemSizesBuf.toString(); + + itemDescs = itemDescsBuf.toString(); + + itemExprs = itemExprsBuf.toString(); + itemTypes = itemTypesBuf.toString(); + } + + /** + * ********* preview docForm ȯ ********** + */ + String putValScript = ""; + String changeAllScript = ""; + String docBodyForm = ""; + String docTitleForm = ""; + String inputForm = ""; + + MDocPreview docPreView = new MDocPreview(); + + docPreView.convert(docForm, itemNames, itemSizes, itemExprs, itemTypes, itemDescs, defItemSize); + + docForm = docPreView.getInputForm(); + putValScript = docPreView.getPutValScript(); + + changeAllScript = docPreView.getChangeAllScript(); + changeAllScript = changeAllScript.replaceAll("[$]", "."); + + inputForm = docPreView.getInputForm(); + /* + if(mode != null && !mode.equals("preview")){ + StringTokenizer stkNames = new StringTokenizer(itemNames,(MItem.LIST_DELIM)); + StringTokenizer stkDesc = new StringTokenizer(itemDescs,(MItem.LIST_DELIM)); + + int itemCount = stkNames.countTokens(); + String strTmp; + String[] itemNameListScript = new String[itemCount]; + String[] itemDescListScript = new String[itemCount]; + + for (int i=0; i < itemCount; i++) { + strTmp = stkNames.nextToken(); + itemNameListScript[i] = strTmp.substring(strTmp.indexOf(":")+1, strTmp.length()).trim(); + + strTmp = stkDesc.nextToken(); + itemDescListScript[i] = strTmp.substring(strTmp.indexOf(":")+1, strTmp.length()).trim(); + + if("empty".equals(itemDescListScript[i].trim())){ + if(insertInputCellName.toString().length() == 0) + insertInputCellName.append(itemNameListScript[i]); + else + insertInputCellName.append(","+itemNameListScript[i]); + } + } + } + */ + if (mode != null && !mode.equals("preview")) { + String[] stkNames = TotsysEtc.getDeliToArr(itemNames, "!@!"); + String[] stkDesc = TotsysEtc.getDeliToArr(itemDescs, "!@!"); + int itemCount = stkNames.length; + String strTmp; + String[] itemNameListScript = new String[itemCount]; + String[] itemDescListScript = new String[itemCount]; + for (int i = 0; i < itemCount; i++) { + strTmp = stkNames[i]; + itemNameListScript[i] = strTmp.substring(strTmp.indexOf(":") + 1, strTmp.length()).trim(); + strTmp = stkDesc[i]; + itemDescListScript[i] = strTmp.substring(strTmp.indexOf(":") + 1, strTmp.length()).trim(); + if ("empty".equals(itemDescListScript[i].trim())) { + if (insertInputCellName.toString().length() == 0) { + insertInputCellName.append(itemNameListScript[i]); + } else { + insertInputCellName.append("," + itemNameListScript[i]); + } + } + } + } +%> + + + + ׽Ʈ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
      + + + + +
    + + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + +
    +
    ; "> + + <%= docForm%> + +
    +
    + <%if (changeAllScript.length() > 0) {%> + + board + + <%}%> + board + + board + + <%if ("regbox1step".equals(callType)) {%> + board + <%}%> +
    +
    +
    +
    +
     
     
    + + +<% +} catch (Exception ex) { + + ex.printStackTrace(); +%> + +<% + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + + } +%> diff --git a/webapps/totsys/common/web/documents/tot_doc/popup_inform_preview2.jsp b/webapps/totsys/common/web/documents/tot_doc/popup_inform_preview2.jsp new file mode 100644 index 0000000..2047cf6 --- /dev/null +++ b/webapps/totsys/common/web/documents/tot_doc/popup_inform_preview2.jsp @@ -0,0 +1,224 @@ + +<%@page import="kr.co.kihyun.beans.tosys.etc1.TotsysEtc"%> +<% +/************************************************************@@ + * Program Name : popup_inform_preview.jsp + * Description : 蹮 ̸(ϰ, 濡 + * Author : ũ + * Create Date : 2010.11.25 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" import="java.net.URLDecoder" + import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.text.html.TagFilter" import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.moumi.doc.MDocPreview" + +import="javax.jdo.Transaction" + import="kr.co.kihyun.moumi.doc.table.item.MItem" + import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList" + import="kr.co.kihyun.moumi.Moumi" import="java.util.*"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + /*********** parameter value ***********/ + Long docID = MLong.parseLong(request.getParameter("docID"),null); + String docName = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("docName")), "UTF-8"),""); + String acceptanceLimitStrategy = clearXSS(request.getParameter("acceptanceLimitStrategy"),LimitByDeadlineStrategy.class.getSimpleName().toString()); + String usrFilenames = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("usrFilenames")), "UTF-8"),""); + String svrFilenames = clearXSS(URLDecoder.decode(MString.checkNull(request.getParameter("svrFilenames")), "UTF-8"),""); + String itemNames = Encoder.toJava(clearXSS(MString.checkNull(request.getParameter("itemNames")),"")); + String itemSizes = Encoder.toJava(clearXSS(MString.checkNull(request.getParameter("itemSizes")),"")); + String itemDescs = Encoder.toJava(clearXSS(MString.checkNull(request.getParameter("itemDescs")),"")); + String itemExprs = Encoder.toJava(clearXSS(MString.checkNull(request.getParameter("itemExprs")),"")); + String itemTypes = Encoder.toJava(clearXSS(MString.checkNull(request.getParameter("itemTypes")),"")); + int defItemSize = MInteger.parseInt(MString.checkNull(request.getParameter("defItemSize"))); + String mode = clearXSS(MString.checkNull(request.getParameter("mode")),""); + String callType = MString.checkNull(request.getParameter("callType")); + + if(defItemSize < 1 ) defItemSize = 10; + + /************ doc values ************/ + TotDoc totDoc = docID == null ? null : pm.getObjectById(TotDoc.class, docID); + String docForm = ""; + + /************* item values ***********/ + StringBuffer itemNamesBuf = new StringBuffer(); + StringBuffer itemSizesBuf = new StringBuffer(); + StringBuffer itemDescsBuf = new StringBuffer(); + StringBuffer itemExprsBuf = new StringBuffer(); + StringBuffer itemTypesBuf = new StringBuffer(); + StringBuilder insertInputCellName = new StringBuilder(); + + if(mode != null && mode.equals("regist")){ + docForm = (String)session.getAttribute("docForm"); + }else if(mode != null && mode.equals("modify")){ + docForm = totDoc.getForm(); + }else if(mode != null && mode.equals("preview")) + { + docForm = totDoc.getForm(); + docName = totDoc.getName(); + if(totDoc.getTotTables().iterator().hasNext()) + defItemSize = totDoc.getTotTables().iterator().next().getItemSize(); + + /********** Item values **********/ + ItemList itemList = new ItemList(); + //v2. 13.SQL : itemList.executeQuery() prepare SQL Ǿ ִ. + itemList.executeQuery(docID); + //================= + int itemCount = itemList.getCount(); + String[] itemNameList = itemList.getNameList(); + String[] itemDescList = itemList.getDescList(); + String[] itemExprList = itemList.getExprList(); + int[] itemTypeList = itemList.getTypeList(); + int[] itemNumList = itemList.getNumList(); + int[] itemSizeList = itemList.getSizeList(); + int[] tableNumList = itemList.getTableNumList(); + int[] colNumList = itemList.getFieldNumList(); + int[] rowNumList = itemList.getRecordNumList(); + int[] itemBNWList = itemList.getBNWList(); + String[] itemTypeNameList = itemList.getTypeNameList(); + //dform.itemNames.value = dform.itemNames.value + i + ':' + itemNameList[i] + 'MItem.LIST_DELIM'; + + for(int i=0; i + + + + + + + +<% +} +catch(Exception ex) +{ + %> + +<% +} +finally +{ + if(tx.isActive()) +tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/totsys/common/web/documents/tot_doc/popup_modify.jsp b/webapps/totsys/common/web/documents/tot_doc/popup_modify.jsp new file mode 100644 index 0000000..0484110 --- /dev/null +++ b/webapps/totsys/common/web/documents/tot_doc/popup_modify.jsp @@ -0,0 +1,146 @@ + +<% +/************************************************************@@ + * Program Name : popup_inform_preview.jsp + * Description : 蹮 ̸(ϰ, 濡 + * Author : + * Create Date : 2004.10.11 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="kr.co.kihyun.text.html.ServletUtil" + import="java.net.URLDecoder" import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.beans.entity.*" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" +%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + + /*********** parameter value ***********/ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + + String docUserID = ""; + Long docID = MLong.parseLong(request.getParameter("docID"), null); + String modify = MString.checkNull(request.getParameter("modify")); + String docName = Encoder.toJava(MString.checkNull(request.getParameter("docName"))); + + int accAuth = MInteger.parseInt(request.getParameter("accAuth"), 0); + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + + if(modify.equals("modify")){ + tx.begin(); + + if(sysAuth == MoumiConfig.TOTPER && !usID.equals(totDoc.getUser(pm).getId())){ + out.println(ServletUtil.alert(" ֽ̿ñ ٶϴ.")); + out.println(ServletUtil.getJavaScript("parent.opener.window.location.reload();")); + out.println(ServletUtil.getJavaScript("self.close();")); + return; + } + + totDoc.setName(docName); + totDoc.setAccessAuth(AccessAuth.asAccessAuth(accAuth)); + pm.makePersistent(totDoc); + + tx.commit(); + + out.println(ServletUtil.getJavaScript("parent.opener.window.location.reload();")); + out.println(ServletUtil.getJavaScript("self.close();")); + } + docName = totDoc.getName(); + accAuth = totDoc.getAccessAuth().ordinal(); + docUserID = totDoc.getUser(pm).getId(); +%> + + + +<%=TotDocProcess.FORM%>׽Ʈ + + + + + + + + + + + + + + + + + + + + + + + + + +
    <%=MoumiConfig.getMessageBundle().getString("moumi.message.doc")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.doc")%> + <%if(accAuth == 0){%> + <%}else if(accAuth == 1){%> + <%}%> +
    + + + + + + + <%if(usID.equals(docUserID) || sysAuth == MoumiConfig.SYSADM){ %> + + + <%}%> + + +
    + + +<% +} catch (Exception ex) { + ex.printStackTrace(); + ex.printStackTrace(); + out.println(ServletUtil.alert(" Ǿϴ.")); +} finally { + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/totsys/common/web/documents/tot_doc/sysadm_modify_inform_preview.jsp b/webapps/totsys/common/web/documents/tot_doc/sysadm_modify_inform_preview.jsp new file mode 100644 index 0000000..5026522 --- /dev/null +++ b/webapps/totsys/common/web/documents/tot_doc/sysadm_modify_inform_preview.jsp @@ -0,0 +1,424 @@ + +<% +/************************************************************@@ + * Program Name : popup_inform_preview.jsp + * Description : 蹮 (ϰ, 濡 + * Author : + * Create Date : 2004.10.11 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" import="java.net.URLDecoder" + import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.TotDoc" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.text.html.TagFilter" + import="kr.co.kihyun.moumi.doc.MDocPreview" + import="kr.co.kihyun.moumi.doc.table.item.MItem" + import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList" + import="kr.co.kihyun.moumi.Moumi" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.text.html.CallbackHandler"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + + String strPage = clearXSS(request.getParameter("strPage"),""); + String findOption = clearXSS(request.getParameter("findOption"),""); + String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")),""); + String url = "mmform"; + + int defItemSize = MInteger.parseInt(MString.checkNull(request.getParameter("defItemSize"))); + + Long docID = MLong.parseLong(request.getParameter("docID"),null); + String choice = clearXSS(request.getParameter("choice"),""); + String deptIDs = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("deptIDs"))),""); + String deptNames = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("deptNames"))),""); + String userIDs = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("userIDs"))),""); + String userNames = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("userNames"))),""); + + String docName = clearXSS(Encoder.toJava(request.getParameter("docName")),""); + String stDate = clearXSS(request.getParameter("stDate"),""); + String edDate = clearXSS(request.getParameter("edDate"),""); + String accAuth = clearXSS(request.getParameter("accAuth"),""); + Long repDocID = MLong.parseLong(request.getParameter("repDocID"),null); + String docGroupID = clearXSS(request.getParameter("docGroupID"),""); + String isFromFormBox = clearXSS(request.getParameter("isFromFormBox"),""); + String tableCount = clearXSS(request.getParameter("tableCount"),""); + String isDynaTable = clearXSS(request.getParameter("isDynaTable"),""); + String mode = clearXSS(request.getParameter("mode"),""); + String tableDefines = clearXSS(request.getParameter("tableDefines"),""); + String itemNames = clearXSS(Encoder.toJava(request.getParameter("itemNames")),""); + String tableNums = clearXSS(Encoder.toJava(request.getParameter("tableNums")),""); + String colNums = clearXSS(Encoder.toJava(request.getParameter("colNums")),""); + String rowNums = clearXSS(Encoder.toJava(request.getParameter("rowNums")),""); + String itemSizes = clearXSS(Encoder.toJava(request.getParameter("itemSizes")),""); + String itemDescs = clearXSS(Encoder.toJava(request.getParameter("itemDescs")),""); + String itemExprs = clearXSS(Encoder.toJava(request.getParameter("itemExprs")),""); + String itemTypes = clearXSS(Encoder.toJava(request.getParameter("itemTypes")),""); + //String docForm = clearXSS(request.getParameter("docForm"),""); + + String tableType = clearXSS(request.getParameter("tableType"),""); + String tableTypes = clearXSS(request.getParameter("tableTypes"),""); + + if(defItemSize < 1 ) defItemSize = 10; + + /************ doc values ************/ + TotDoc totDoc = docID == null ? null : pm.getObjectById(TotDoc.class, docID); + String docForm = ""; + + /************* item values ***********/ + StringBuffer itemNamesBuf = new StringBuffer(); + StringBuffer itemSizesBuf = new StringBuffer(); + StringBuffer itemDescsBuf = new StringBuffer(); + StringBuffer itemExprsBuf = new StringBuffer(); + StringBuffer itemTypesBuf = new StringBuffer(); + + if(mode != null && mode.equals("regist")){ + docForm = (String)session.getAttribute("docForm"); + }else if(mode != null && mode.equals("modify")){ + docForm = totDoc.getForm(); + }else if(mode != null && mode.equals("preview")){ + docForm = totDoc.getForm(); + docName = totDoc.getName(); + if(totDoc.getTotTables().iterator().hasNext()) + defItemSize = totDoc.getTotTables().iterator().next().getItemSize(); + + /********** Item values **********/ + ItemList itemList = new ItemList(); + //v2. 13.SQL : itemList.executeQuery() prepare SQL Ǿ ִ. + itemList.executeQuery(docID); + //================ + int itemCount = itemList.getCount(); + String[] itemNameList = itemList.getNameList(); + String[] itemDescList = itemList.getDescList(); + String[] itemExprList = itemList.getExprList(); + int[] itemTypeList = itemList.getTypeList(); + int[] itemNumList = itemList.getNumList(); + int[] itemSizeList = itemList.getSizeList(); + int[] tableNumList = itemList.getTableNumList(); + int[] colNumList = itemList.getFieldNumList(); + int[] rowNumList = itemList.getRecordNumList(); + int[] itemBNWList = itemList.getBNWList(); + String[] itemTypeNameList = itemList.getTypeNameList(); + + for(int i=0; i + + +<%=Moumi.getTitle()%> + + + + + + + + + + + + + + + + + + +
    + + +
    +
    + + + +
    + +
    + + +
    + + + + +
    +
    + + + + +
    +
    + + + + + +
    + + + + +
    <%= Moumi.getMessageBundle().getString("moumi.message.button.formRemove") %> +
    +
    + + + + + + + + + + + + + + + + +
    + <%= docForm %> +
    + + + + + + <%if ( changeAllScript.length() > 0 ) {%> + + + <%}%> + + <%//}%> + +
      
    +
    +
    +
    + + +<% +}catch(Exception ex){ + ex.printStackTrace();%> + +<% +}finally{ + if(tx.isActive()) + tx.rollback(); + pm.close(); +} +%> diff --git a/webapps/totsys/common/web/note/images/bt_cancel3.gif b/webapps/totsys/common/web/note/images/bt_cancel3.gif new file mode 100644 index 0000000..37a7cd7 Binary files /dev/null and b/webapps/totsys/common/web/note/images/bt_cancel3.gif differ diff --git a/webapps/totsys/common/web/note/images/bt_enter.gif b/webapps/totsys/common/web/note/images/bt_enter.gif new file mode 100644 index 0000000..2ad918b Binary files /dev/null and b/webapps/totsys/common/web/note/images/bt_enter.gif differ diff --git a/webapps/totsys/common/web/note/images/manpopimg.jpg b/webapps/totsys/common/web/note/images/manpopimg.jpg new file mode 100644 index 0000000..affaf7f Binary files /dev/null and b/webapps/totsys/common/web/note/images/manpopimg.jpg differ diff --git a/webapps/totsys/common/web/note/images/popupt_bottom_center.gif b/webapps/totsys/common/web/note/images/popupt_bottom_center.gif new file mode 100644 index 0000000..111862c Binary files /dev/null and b/webapps/totsys/common/web/note/images/popupt_bottom_center.gif differ diff --git a/webapps/totsys/common/web/note/images/popupt_bottom_left.gif b/webapps/totsys/common/web/note/images/popupt_bottom_left.gif new file mode 100644 index 0000000..81eda75 Binary files /dev/null and b/webapps/totsys/common/web/note/images/popupt_bottom_left.gif differ diff --git a/webapps/totsys/common/web/note/images/popupt_bottom_right.gif b/webapps/totsys/common/web/note/images/popupt_bottom_right.gif new file mode 100644 index 0000000..98f7c24 Binary files /dev/null and b/webapps/totsys/common/web/note/images/popupt_bottom_right.gif differ diff --git a/webapps/totsys/common/web/note/images/popupt_center_left.gif b/webapps/totsys/common/web/note/images/popupt_center_left.gif new file mode 100644 index 0000000..14d6713 Binary files /dev/null and b/webapps/totsys/common/web/note/images/popupt_center_left.gif differ diff --git a/webapps/totsys/common/web/note/images/popupt_center_right.gif b/webapps/totsys/common/web/note/images/popupt_center_right.gif new file mode 100644 index 0000000..6127f52 Binary files /dev/null and b/webapps/totsys/common/web/note/images/popupt_center_right.gif differ diff --git a/webapps/totsys/common/web/note/images/popupt_top_center.gif b/webapps/totsys/common/web/note/images/popupt_top_center.gif new file mode 100644 index 0000000..3c5a1d8 Binary files /dev/null and b/webapps/totsys/common/web/note/images/popupt_top_center.gif differ diff --git a/webapps/totsys/common/web/note/images/popupt_top_left.gif b/webapps/totsys/common/web/note/images/popupt_top_left.gif new file mode 100644 index 0000000..8afcf79 Binary files /dev/null and b/webapps/totsys/common/web/note/images/popupt_top_left.gif differ diff --git a/webapps/totsys/common/web/note/images/popupt_top_right.gif b/webapps/totsys/common/web/note/images/popupt_top_right.gif new file mode 100644 index 0000000..315f857 Binary files /dev/null and b/webapps/totsys/common/web/note/images/popupt_top_right.gif differ diff --git a/webapps/totsys/common/web/note/images/s_write_contents.gif b/webapps/totsys/common/web/note/images/s_write_contents.gif new file mode 100644 index 0000000..f1720a1 Binary files /dev/null and b/webapps/totsys/common/web/note/images/s_write_contents.gif differ diff --git a/webapps/totsys/common/web/note/images/s_write_info.gif b/webapps/totsys/common/web/note/images/s_write_info.gif new file mode 100644 index 0000000..557bcaf Binary files /dev/null and b/webapps/totsys/common/web/note/images/s_write_info.gif differ diff --git a/webapps/totsys/common/web/note/images/title1.gif b/webapps/totsys/common/web/note/images/title1.gif new file mode 100644 index 0000000..d40dab0 Binary files /dev/null and b/webapps/totsys/common/web/note/images/title1.gif differ diff --git a/webapps/totsys/common/web/note/images/title2.gif b/webapps/totsys/common/web/note/images/title2.gif new file mode 100644 index 0000000..6f14338 Binary files /dev/null and b/webapps/totsys/common/web/note/images/title2.gif differ diff --git a/webapps/totsys/common/web/note/images/titlebg.gif b/webapps/totsys/common/web/note/images/titlebg.gif new file mode 100644 index 0000000..899b7e3 Binary files /dev/null and b/webapps/totsys/common/web/note/images/titlebg.gif differ diff --git a/webapps/totsys/common/web/note/popup_doc_history.jsp b/webapps/totsys/common/web/note/popup_doc_history.jsp new file mode 100644 index 0000000..8efd045 --- /dev/null +++ b/webapps/totsys/common/web/note/popup_doc_history.jsp @@ -0,0 +1,127 @@ + +<% +/************************************************************@@ + * Program Name : popup_content_write.jsp + * Description : ///ӽú/ӽú + * Author : ũ + * Create Date : 2010-11-27 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr"%> +<%@ page import="kr.co.kihyun.beans.user.HttpSSOLogin"%> +<%@ page import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong" import="java.util.List" + import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.entity.util.*"%> +<%@ page import="kr.co.kihyun.util.MUtil"%> +<%@ page import="kr.co.kihyun.moumi.Moumi"%> + + + + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +try{ + Long reportID = MLong.parseLong(request.getParameter("reportID"), null); + TotReport totReport = pm.getObjectById(TotReport.class, reportID); + + List memoList = totReport.getHistories(); +%> + + +<%=Moumi.getTitle()%> + + + + + + + + + + + + + + + + + + + + + + + +
     
      + + + + + + + +
    + + + + + + +
     <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.subDoc")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.document")%> + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.modify")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.content")%> 
    +
    + + + <%for(int i=0; i + + + + + + + + <%}%> + +
    <%=i+1%> + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sequence")%> + : <%= memoList.get(i).getMemo() %> +
    +
    +
    + + + + + +
    +
     
     
    + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ + pm.close(); +} +%> \ No newline at end of file diff --git a/webapps/totsys/common/web/note/popup_manual.jsp b/webapps/totsys/common/web/note/popup_manual.jsp new file mode 100644 index 0000000..bddc900 --- /dev/null +++ b/webapps/totsys/common/web/note/popup_manual.jsp @@ -0,0 +1,206 @@ + +<% +/************************************************************@@ + * Program Name : popup_content_write.jsp + * Description : ///ӽú/ӽú + * Author : ũ + * Create Date : 2010-11-25 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr"%> +<%@ page import="kr.co.kihyun.beans.user.HttpSSOLogin"%> +<%@ page import="kr.co.kihyun.lang.MString"%> +<%@ page import="kr.co.kihyun.util.MUtil"%> +<%@ page import="kr.co.kihyun.moumi.Moumi"%> + + + + + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + + /********** get parameter ***********/ + Long docID = null; + String note = ""; +%> + + + ǻ + + + + + + + + + + + + + + + + + + + + + + + +
     
      + + + + + + + + + + + +
    + + + + + + +
     <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.attention")%> 
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.contentWriteAttention")%> +
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.contentWriteAttentionNo1")%>
    + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.contentWriteAttentionNo2")%>
    + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.contentWriteAttentionNo3")%>
    + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.contentWriteAttentionNo4")%>
    +      => <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.contentWriteAttentionNo5")%> +
    + + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.contentWriteAttentionNo6")%>
    + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.contentWriteAttentionNo7")%>
    + +
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.modificationAttention")%>
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.modificationAttentionNo1")%>
    + +
    + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.modificationAttentionNo2")%> +
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.comboBox")%>
    - <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.comboBoxNo1")%> +
    +
    +
    + +
    + + + + + +
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.notWindow")%> +
    +
    +
     
     
    + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +} +%> \ No newline at end of file diff --git a/webapps/totsys/common/web/note/popup_note.jsp b/webapps/totsys/common/web/note/popup_note.jsp new file mode 100644 index 0000000..4560392 --- /dev/null +++ b/webapps/totsys/common/web/note/popup_note.jsp @@ -0,0 +1,209 @@ + +<% +/************************************************************@@ + * Program Name : popup_content_write.jsp + * Description : ///ӽú/ӽú + * Author : + * Create Date : 2004-11-09 + * History : +@@************************************************************/ +%> +<%@ page contentType="text/html; charset=euc-kr"%> +<%@ page import="kr.co.kihyun.beans.user.HttpSSOLogin"%> +<%@ page import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong"%> +<%@ page import="kr.co.kihyun.util.MUtil"%> +<%@ page import="kr.co.kihyun.moumi.Moumi"%> + + + + + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% +try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + + /******* *********/ + String deptID = ""; + String deptName = ""; + String userName = ""; + String phone = ""; + String email = ""; + + userView.executeQuery(usID); + deptID = userView.getDeptID(); + deptName = userView.getDeptName(); + userName = userView.getName(); + phone = userView.getPhone(); + email = userView.getEmail(); + + /********** get parameter ***********/ + Long docID = MLong.parseLong(request.getParameter("docID"),null); + + /********* report view *******/ + String note = ""; +%> + + +<%=Moumi.getTitle()%> + + + + + + + + + + + + + + + + + + + + + + +
     
      + + + + + + + + + + + + + + + +
    + + + + + + +
     ǰ 
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
      ۼڸ<%= userName %>   ۼ ID<%= usID %> 
      /μ<%= deptName %>   ȭȣ<%= phone %> 
      E-MAIL<%= email %>   Ÿ 
    +
     
    +
    +
    +
    + + + + + + + +
     
    +
     
     
    + + +<% +}catch(Exception ex){ + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +} +%> \ No newline at end of file diff --git a/webapps/totsys/common/web/note/popup_note_confirm.jsp b/webapps/totsys/common/web/note/popup_note_confirm.jsp new file mode 100644 index 0000000..d058581 --- /dev/null +++ b/webapps/totsys/common/web/note/popup_note_confirm.jsp @@ -0,0 +1,284 @@ +<%@page import="java.util.ArrayList"%> +<% /** + * **********************************************************@@ Program Name + * : popup_inform_preview.jsp Description : 蹮 ̸(ϰ, 濡 Author + * : ũ Create Date : 2010.11.25 History : + * @@*********************************************************** + */ +%> +<%@ page contentType="text/html; charset=euc-kr" import="java.util.Date" + import="java.util.List" + import="java.text.SimpleDateFormat" + import="java.net.URLEncoder" + import="java.sql.Clob" + import="java.sql.Blob" + import="java.net.URLDecoder" + import="kr.co.kihyun.service.*" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.util.MDate" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.moumi.MoumiConfig" + import="kr.co.kihyun.moumi.doc.MDoc" import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.moumi.report.MReport" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.totsys.report.Report" + import="kr.co.kihyun.beans.totsys.doc.Doc" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*" + import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" + import="javax.jdo.Query" + %> +<%@page import="java.net.URLDecoder"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + + try { + request.setCharacterEncoding("euc-kr"); + Logger LOG = LoggerFactory.getLogger(this.getClass()); + /** + * ******** session userId ********* + */ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + String dpID = HttpSSOLogin.getDeptID(request); + String docType = clearXSS(request.getParameter("docType"), null); + + String docID = clearXSS(request.getParameter("docID"), null); + String id = clearXSS(request.getParameter("id"), ""); + String user_id = clearXSS(request.getParameter("user_id"), ""); + String procMode = clearXSS(request.getParameter("proc_mode"), ""); + + String getNote = null; + + if (MString.isNull(procMode)) { + + int getCount; + + NoteData notedata = new NoteData(); + notedata.getNoteReson(docID, id, user_id); + getCount = notedata.getCount(); + getNote = clearXSS(notedata.getNote(),""); + + String reportID = docID; + +%> + + + ڷȸ + + + + + + + + + + + + +
    + + + +
    + +
    + + + + + + + + + + + + + + + + + + + +
     
      + + + + +
    + + + + + + + + + + + +
    + + + + + + +
     ڷȸû  
    +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + +   + + + +   + + + +
    +
    +
    +
     
     
    + + + +<% }else{ + String comment = clearXSS(Encoder.toJava(request.getParameter("comment")), null); + Long reportId = new Long(id); + + tx.begin(); + TotReport report = pm.getObjectById(TotReport.class, reportId); + TotDoc totDoc = report.getTotDoc(); + TotReportService reportService = new TotReportService(pm); + + TotReportProcess prss = null; + + if(procMode.equals("acceptNote")){ // Ȯιư Ŭ - ȸû + prss = TotReportProcess.RETURN; // 3.Է¿û + }else{ // ݷư Ŭ - ȸû ݷ(Ϸ· ) + prss = TotReportProcess.COMP; // 6.Ϸ + } + + reportService.procRecallReport(reportId, prss, comment); + tx.commit(); +%> + + + + + +<% + } + } catch (Exception ex) { + ex.printStackTrace(); +// out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> \ No newline at end of file diff --git a/webapps/totsys/common/web/note/popup_recall_note.jsp b/webapps/totsys/common/web/note/popup_recall_note.jsp new file mode 100644 index 0000000..78f893c --- /dev/null +++ b/webapps/totsys/common/web/note/popup_recall_note.jsp @@ -0,0 +1,283 @@ +<%@page import="kr.co.kihyun.text.html.ServletUtil"%> +<%@page import="kr.co.kihyun.moumi.MoumiConfig"%> +<%@page import="kr.co.kihyun.beans.batch.UpdateNote"%> +<% /** + * **********************************************************@@ Program Name + * : popup_recall_note.jsp Description : ///ӽú/ӽú Author : + * Create Date : 2004-11-09 History : + * @@*********************************************************** + */ +%> +<%@ page contentType="text/html; charset=euc-kr"%> +<%@ page import="kr.co.kihyun.beans.user.HttpSSOLogin"%> +<%@ page import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MLong"%> +<%@ page import="kr.co.kihyun.util.MUtil"%> +<%@ page import="kr.co.kihyun.moumi.Moumi" + import="javax.jdo.PersistenceManager" + import="kr.co.kihyun.beans.entity.util.*" + import="javax.jdo.Transaction" import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.service.*" import="kr.co.kihyun.service.vo.*" + import="kr.co.kihyun.lang.Encoder" + %> + + + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + /** + * ******** session userId ********* + */ + String usID = HttpSSOLogin.getLoginID(request); + + /** + * ***** ******** + */ + String deptID = ""; + String deptName = ""; + String userName = ""; + String phone = ""; + String email = ""; + String docIdNum = ""; + + /** + * ******** get parameter ********** + */ + Long docID = MLong.parseLong(request.getParameter("docID"), null); + String reportID = request.getParameter("reportID"); + String reportType = request.getParameter("reportType"); + String procMode = request.getParameter("proc_mode"); + + if (MString.isNull(procMode)) { + + /** + * ******* report view ****** + */ + userView.executeQuery(usID); + deptID = userView.getDeptID(); + deptName = userView.getDeptName(); + userName = userView.getName(); + phone = userView.getPhone(); + email = userView.getEmail(); + + String note = ""; + userView.getNoteReson(reportID); + note = userView.getNote(); + docIdNum = userView.getDocId(); + + Long docId = new Long(docIdNum); + TotDocService docService = new TotDocService(pm); + + if (!docService.chkIfPossibleForReturn(docId)) { +%> + +<% + out.println(ServletUtil.alert(MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.noteAlert"))); +%> + +<% + } +%> + + + <%=Moumi.getTitle()%> + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
     
      + + + + + + + + + + + + +
    + + + + + + +
     ڷȸû  
    +
    + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + +
      ۼڸ<%= userName%>   ۼ ID<%= usID%> 
      /μ<%= deptName%>   ȭȣ<%= phone%> 
      E-MAIL<%= email%>   Ÿ 
    +
     
    + > +
    +
    +
    + + + + + + + +
    + + + +   + + + +
    +
     
     
    +
    + + +<% +} else { + String comment = clearXSS(Encoder.toJava(request.getParameter("comment")), null); + Long reportId = new Long(reportID); + + tx.begin(); + TotReport report = pm.getObjectById(TotReport.class, reportId); + TotDoc totDoc = report.getTotDoc(); + TotReportService reportService = new TotReportService(pm); + String autoRtnYn = totDoc.getAutoRtnYn(); + String modeMessage = MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.noteRecall"); + TotReportProcess prss = TotReportProcess.NOTE; //14.ȸû + if (autoRtnYn.equals("Y")) { + prss = TotReportProcess.RETURN; //3.Է¿û + //modeMessage = MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.process.return"); + modeMessage = MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.return.auto") + modeMessage; + } + reportService.procRecallReport(reportId, prss, comment); + tx.commit(); +%> + + + + + +<% + } + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } +%> \ No newline at end of file diff --git a/webapps/totsys/common/web/note/popup_totper_info.jsp b/webapps/totsys/common/web/note/popup_totper_info.jsp new file mode 100644 index 0000000..19c8426 --- /dev/null +++ b/webapps/totsys/common/web/note/popup_totper_info.jsp @@ -0,0 +1,190 @@ + +<% /** + * **********************************************************@@ Program Name + * : popup_content_write.jsp Description : ///ӽú/ӽú Author : + * ũ Create Date : 2010-11-27 History : + * @@*********************************************************** + */ +%> +<%@ page contentType="text/html; charset=euc-kr"%> +<%@ page import="java.net.URLEncoder"%> +<%@ page import="javax.jdo.PersistenceManager"%> +<%@ page import="javax.jdo.Transaction"%> + +<%@ page import="kr.co.kihyun.beans.user.HttpSSOLogin"%> +<%@ page import="kr.co.kihyun.lang.MString"%> +<%@ page import="kr.co.kihyun.util.MUtil"%> +<%@ page import="kr.co.kihyun.moumi.Moumi"%> +<%@ page import="kr.co.kihyun.text.html.TagFilter"%> +<%@ page import="kr.co.kihyun.beans.entity.Category"%> +<%@ page import="kr.co.kihyun.beans.entity.Board"%> +<%@ page import="kr.co.kihyun.beans.entity.util.*"%> +<%@ page import="kr.co.kihyun.beans.entity.TotDoc"%> +<%@ page import="java.util.Map.Entry"%> +<%@ page import="java.util.List"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + Long docID = MLong.parseLong(request.getParameter("docID")); + String boardGroupID = Category.ID_TOT_DOC_COMMENT; + String url = clearXSS(request.getParameter("url"), ""); + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + + if (url == null) { + url = ""; + } + + String boardTitle = ""; + String boardContents = ""; + String usrFilenames = ""; + String svrFilenames = ""; + int visit = 0; + + Board totperComment = totDoc.getBoard(); + + if (totperComment != null) { +// tx.begin(); + boardTitle = totperComment.getTitle(); + boardContents = TagFilter.convertSpace(totperComment.getContents()); + + for (Entry> entry : totperComment.getAttachments().entrySet()) { + usrFilenames += entry.getKey() + ";"; + svrFilenames += entry.getKey() + ";"; + } +// visit = totperComment.getVisit(); +// totperComment.setVisit(visit + 1); +// pm.makePersistent(totperComment); +// tx.commit(); + } + + String[] usrFilenameList = usrFilenames.split(";"); + String[] svrFilenameList = svrFilenames.split(";"); +%> +<%@page import="kr.co.kihyun.lang.MLong"%> + + ڷԷ½ ۼ + + + + + + + + + + + + + + + + + + + + + + + + +
    + +   + +
      + + + + + + + + + + + + +
    + + + + + + +
     <%= Moumi.getMessageBundle().getString("moumi.message.tot_report.make")%><%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.trick")%> + <%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.and")%> + <%= Moumi.getMessageBundle().getString("moumi.message.button_small.totperInfo")%> 
    +
    + + + + + + + +
    + + + + + + + + + + + +
    + +
    +
    +
    +
    +<% int i = 0; + + for (i = 0; i < svrFilenameList.length; i++) { + if (svrFilenameList[i] != null && !svrFilenameList[i].equals("")) { +%> + + +<%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.add")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.file")%> + <%= (i + 1)%> +    + &fileName=<%=URLEncoder.encode(svrFilenameList[i], "UTF-8")%>&docID=<%=docID%>" target="hiddenIframe"> + <%= usrFilenameList[i]%> +
    + +<% } + } +%> + +
    + + + + + +
    + + + +
    +
     
     
    + + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } +%> \ No newline at end of file diff --git a/webapps/totsys/common/web/note/popup_totper_info.jsp_org b/webapps/totsys/common/web/note/popup_totper_info.jsp_org new file mode 100644 index 0000000..38141aa --- /dev/null +++ b/webapps/totsys/common/web/note/popup_totper_info.jsp_org @@ -0,0 +1,190 @@ + +<% /** + * **********************************************************@@ Program Name + * : popup_content_write.jsp Description : ///ӽú/ӽú Author : + * ũ Create Date : 2010-11-27 History : + * @@*********************************************************** + */ +%> +<%@ page contentType="text/html; charset=euc-kr"%> +<%@ page import="java.net.URLEncoder"%> +<%@ page import="javax.jdo.PersistenceManager"%> +<%@ page import="javax.jdo.Transaction"%> + +<%@ page import="kr.co.kihyun.beans.user.HttpSSOLogin"%> +<%@ page import="kr.co.kihyun.lang.MString"%> +<%@ page import="kr.co.kihyun.util.MUtil"%> +<%@ page import="kr.co.kihyun.moumi.Moumi"%> +<%@ page import="kr.co.kihyun.text.html.TagFilter"%> +<%@ page import="kr.co.kihyun.beans.entity.Category"%> +<%@ page import="kr.co.kihyun.beans.entity.Board"%> +<%@ page import="kr.co.kihyun.beans.entity.util.*"%> +<%@ page import="kr.co.kihyun.beans.entity.TotDoc"%> +<%@ page import="java.util.Map.Entry"%> +<%@ page import="java.util.List"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + try { + Long docID = MLong.parseLong(request.getParameter("docID")); + String boardGroupID = Category.ID_TOT_DOC_COMMENT; + String url = clearXSS(request.getParameter("url"), ""); + TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); + + if (url == null) { + url = ""; + } + + String boardTitle = ""; + String boardContents = ""; + String usrFilenames = ""; + String svrFilenames = ""; + int visit = 0; + + Board totperComment = totDoc.getBoard(); + + if (totperComment != null) { + tx.begin(); + boardTitle = totperComment.getTitle(); + boardContents = TagFilter.convertSpace(totperComment.getContents()); + + for (Entry> entry : totperComment.getAttachments().entrySet()) { + usrFilenames += entry.getKey() + ";"; + svrFilenames += entry.getKey() + ";"; + } + visit = totperComment.getVisit(); + totperComment.setVisit(visit + 1); + pm.makePersistent(totperComment); + tx.commit(); + } + + String[] usrFilenameList = usrFilenames.split(";"); + String[] svrFilenameList = svrFilenames.split(";"); +%> +<%@page import="kr.co.kihyun.lang.MLong"%> + + ڷԷ½ ۼ + + + + + + + + + + + + + + + + + + + + + + + + +
    + +   + +
      + + + + + + + + + + + + +
    + + + + + + +
     <%= Moumi.getMessageBundle().getString("moumi.message.tot_report.make")%><%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.trick")%> + <%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.and")%> + <%= Moumi.getMessageBundle().getString("moumi.message.button_small.totperInfo")%> 
    +
    + + + + + + + +
    + + + + + + + + + + + +
    + +
    +
    +
    +
    +<% int i = 0; + + for (i = 0; i < svrFilenameList.length; i++) { + if (svrFilenameList[i] != null && !svrFilenameList[i].equals("")) { +%> + + +<%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.add")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.file")%> + <%= (i + 1)%> +    + &fileName=<%=URLEncoder.encode(svrFilenameList[i], "UTF-8")%>&docID=<%=docID%>" target="hiddenIframe"> + <%= usrFilenameList[i]%> +
    + +<% } + } +%> + +
    + + + + + +
    + + + +
    +
     
     
    + + + +<% + } catch (Exception ex) { + ex.printStackTrace(); + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); + } +%> \ No newline at end of file diff --git a/webapps/totsys/common/web/report_dept/approve_user_select.jsp b/webapps/totsys/common/web/report_dept/approve_user_select.jsp new file mode 100644 index 0000000..796539b --- /dev/null +++ b/webapps/totsys/common/web/report_dept/approve_user_select.jsp @@ -0,0 +1,577 @@ +<%@ page contentType="text/html; charset=euc-kr" + import="java.net.URLEncoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.text.html.ServletUtil" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.lang.MLong" + import="javax.jdo.PersistenceManager" + import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.util.*" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.lang.Encoder"%> +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> +<% + String deptIDs = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("deptIDs"))),""); + String deptTypes = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("deptTypes"))),""); + String formName = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("formName"))),""); + Long reportID = MLong.parseLong(request.getParameter("reportID")); + Long docReportID = MLong.parseLong(request.getParameter("reportID")); + String reportType = clearXSS(request.getParameter("reportType"),null); + Long repoadminID = MLong.parseLong(request.getParameter("repoadminID")); +%> + + + + + + + + + + + + + + + + + +
    + + + + + + +
    + +
    + + +
    ()
    + + + + + + + + + + + + + + + +
    + + + + + + +
     <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.deptMap")%> ()
    +
    + + + + +
    + +
    + + + + + +
    + +
    + + + + + +
    + + + + + + + + + + + + +
    +
    + + + + +
    +
    + + + + + + + + + + + + + + +
     
       + + + +       
     
    + + + + + + + +
    + + + + + +
    + + + + + + + + + +
    +
    +
    + + diff --git a/webapps/totsys/common/web/report_dept/dept_list_subReg.jsp b/webapps/totsys/common/web/report_dept/dept_list_subReg.jsp new file mode 100644 index 0000000..e69de29 diff --git a/webapps/totsys/common/web/report_dept/edit_dept_list.jsp b/webapps/totsys/common/web/report_dept/edit_dept_list.jsp new file mode 100644 index 0000000..46fee6f --- /dev/null +++ b/webapps/totsys/common/web/report_dept/edit_dept_list.jsp @@ -0,0 +1,568 @@ +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.lang.MString" import="java.net.URLDecoder" + import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.beans.totsys.report.ReportList" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.moumi.report.MReport"%> +<%@page import="kr.co.kihyun.beans.entity.Repoadm"%> +<%@page import="javax.jdo.PersistenceManager"%> +<%@page import="javax.jdo.Transaction"%> +<%@page import="kr.co.kihyun.beans.entity.util.*"%> +<%@page import="kr.co.kihyun.beans.entity.TotReport"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% + Long docID = MLong.parseLong(request.getParameter("docID"),null); + Long reportID = MLong.parseLong(request.getParameter("reportID"),null); + String usedType = MString.checkNull(request.getParameter("usedType")); + String totCount = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("totCount"))),""); + + int deptCount=0; + String deptIDs = ""; + String deptNames=""; + String deptTypes=""; + Integer[] docTypeList = null; + String[] deptIDList = null; + String[] userIDList = null; + String[] deptNameList = null; + + if(!"RECOG".equals(usedType)){ + ReportList reportList = new ReportList(); + //v2. 13.SQL : JDO̹Ƿ ذå prepare SQL + reportList.executeQuery(docID, MReport.ALL); + //================= + deptCount = reportList.getCount(); + + User user = new User(); + + if(deptCount>0){ + deptIDList = new String [deptCount]; + deptNameList = new String [deptCount]; + + deptIDList = reportList.getDeptIDList(); + userIDList = reportList.getUserIDList(); + deptNameList = reportList.getDeptNameList(); + + docTypeList = reportList.getDocTypeList(); + + if(docTypeList[0] == 1){ + deptIDs = userIDList[0]+"/"+deptIDList[0]; + deptNames = user.getName(userIDList[0]); + deptTypes = "user"; + }else{ + deptIDs = deptIDList[0]; + deptNames = deptNameList[0]; + deptTypes = "dept"; + } + + for(int d=1; d + + + + +μ + + + + + + + + onload="setDepts();" <%}%>> + +
    +
    + +
    +
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
     <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.deptMap")%> <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.submitDept")%>
    +
    <%if(!"RECOG".equals(usedType)){%> + + + + +
    + <%}%> + + + + +
    + <%if(!"RECOG".equals(usedType)){%> <%}else{%> <%}%> +
    +
    + + + + + + + + + + + <%if(!"RECOG".equals(usedType)){%> + + + + <%}%> +
    +
    + + + + +
    +
    + + + + + + + + + +
    + + + + + +
    + +
    +
    + + + diff --git a/webapps/totsys/common/web/report_dept/edit_dept_list2.jsp b/webapps/totsys/common/web/report_dept/edit_dept_list2.jsp new file mode 100644 index 0000000..1a5e9ca --- /dev/null +++ b/webapps/totsys/common/web/report_dept/edit_dept_list2.jsp @@ -0,0 +1,695 @@ + +<% + /* + * *********************************************************** + * @@ Program Name : edit_dept_list2.jsp + * @@ Description : + * @@ Author : + * @@ Create Date : + * @@ History : 2014.09.18 Update by KWON,HAN + * ********************************************************** + */ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.lang.MString" + import="java.net.URLDecoder" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.moumi.Moumi" + import="kr.co.kihyun.beans.totsys.report.ReportList" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.user.User" + import="kr.co.kihyun.moumi.report.MReport"%> +<%@page import="kr.co.kihyun.beans.entity.Repoadm"%> +<%@page import="javax.jdo.PersistenceManager"%> +<%@page import="kr.co.kihyun.beans.user.HttpSSOLogin"%> +<%@page import="javax.jdo.Transaction"%> +<%@page import="kr.co.kihyun.beans.entity.util.*"%> +<%@page import="kr.co.kihyun.beans.entity.TotReport"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% Long docID = MLong.parseLong(request.getParameter("docID"), null); + Long reportID = MLong.parseLong(request.getParameter("reportID"), null); + String usedType = MString.checkNull(request.getParameter("usedType")); + String totCount = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("totCount"))), ""); + int sysAuth = HttpSSOLogin.getSysAuth(request); + + int deptCount = 0; + String deptIDs = ""; + String deptNames = ""; + String deptTypes = ""; + Integer[] docTypeList = null; + String[] deptIDList = null; + String[] userIDList = null; + String[] deptNameList = null; + String[] organNameList = null; + String[] upperNameList = null; + String sAutoExpanded = "N"; + + if (!"RECOG".equals(usedType)) { + ReportList reportList = new ReportList(); + //v2. 13.SQL : JDO̹Ƿ ذå prepare SQL + reportList.executeQuery(docID, MReport.ALL); + //================= + deptCount = reportList.getCount(); + + User user = new User(); + + if (deptCount > 0) { + deptIDList = new String[deptCount]; + deptNameList = new String[deptCount]; + organNameList = new String[deptCount]; + upperNameList = new String[deptCount]; + + deptIDList = reportList.getDeptIDList(); + userIDList = reportList.getUserIDList(); + deptNameList = reportList.getDeptNameList(); + organNameList = reportList.getOrganNameOfUpperDept(); + upperNameList = reportList.getUpperNameList(); + + docTypeList = reportList.getDocTypeList(); + + if (docTypeList[0] == 1) { + deptIDs = userIDList[0] + "/" + deptIDList[0]; + deptNames = user.getName(userIDList[0]); + deptTypes = "user"; + } else { + deptIDs = deptIDList[0]; + //deptNames = deptNameList[0]; +// Dept dept = new Dept(); +// deptNames = dept.getOrganNameOfUpperDept(deptIDList[0]) + "|" + dept.getUpperDeptName(deptIDList[0]) + "|" + dept.getName(deptIDList[0]); + deptNames = organNameList[0] + "|" + MString.checkNull(upperNameList[0]) + "|" + deptNameList[0]; + deptTypes = "dept"; + } + + for (int d = 1; d < deptCount; d++) { + if (docTypeList[d] == 1) { + deptIDs = deptIDs + "," + userIDList[d] + "/" + deptIDList[d]; + deptNames = deptNames + "," + user.getName(userIDList[d]); + deptTypes = deptTypes + "," + "user"; + } else { + deptIDs = deptIDs + "," + deptIDList[d]; + //deptNames = deptNames + "," + deptNameList[d]; +// Dept dept = new Dept(); +// deptNames = deptNames + "," + dept.getOrganNameOfUpperDept(deptIDList[d]) + "|" + dept.getUpperDeptName(deptIDList[d]) + "|" + dept.getName(deptIDList[d]); + deptNames = deptNames + "," + organNameList[d] + "|" + MString.checkNull(upperNameList[d]) + "|" + deptNameList[d]; + deptTypes = deptTypes + "," + "dept"; + } + } + } + } else { + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + TotReport totReport = null; + try { + tx.begin(); + + totReport = (TotReport) pm.getObjectById(TotReport.class, reportID); + for (int i = 0; i < totReport.getRepoadms().size(); i++) { + if (i == 0) { + deptIDs = totReport.getRepoadms().get(i).getRecogUser(pm).getId() + "/" + totReport.getRepoadms().get(i).getRecogUser(pm).getUpperDept(pm).getId(); + //deptNames = totReport.getRepoadms().get(i).getRecogUser(pm).getUpperDept(pm).getName() + "-" + totReport.getRepoadms().get(i).getRecogUser(pm).getName(); + deptNames = totReport.getRepoadms().get(i).getRecogUser(pm).getUpperDept(pm).getName() + "|" + totReport.getRepoadms().get(i).getRecogUser(pm).getName(); + deptTypes = "user"; + } else { + deptIDs = deptIDs + "," + totReport.getRepoadms().get(i).getRecogUser(pm).getId() + "/" + totReport.getRepoadms().get(i).getRecogUser(pm).getUpperDept(pm).getId(); + //deptNames = deptNames + "," + totReport.getRepoadms().get(i).getRecogUser(pm).getUpperDept(pm).getName() + "-" + totReport.getRepoadms().get(i).getRecogUser(pm).getName(); + deptNames = deptNames + "," + totReport.getRepoadms().get(i).getRecogUser(pm).getUpperDept(pm).getName() + "|" + totReport.getRepoadms().get(i).getRecogUser(pm).getName(); + deptTypes = deptTypes + "," + "user"; + } + } + + tx.rollback(); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (tx.isActive()) { + tx.rollback(); + } + pm.close(); + } + } +%> + + + + + + + + + + μ + + + + + + + + onload="setDepts();" <%}%>> +
    + + + + + +
    +
    + + + + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + +
    + + + + + + +
     <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.deptMap")%> +  (μ) +
    +
    + + <%if (!"RECOG".equals(usedType)) {%> + + + + +
    + <%}%> + + + + +
    + <%if(sysAuth==9){%> + + <%}else{%> + + <%}%> +
    +
    + + + + + + + + + + + <%if (!"RECOG".equals(usedType)) {%> + + + <%}%> +
    +
    + + + + +
    +
    + + + + + + + + + + +<%-- + +--%> + + +
     
              +   ڵħ> +
     
    + + + + + + + +
    + + + + + +
    +
    + + diff --git a/webapps/totsys/common/web/report_dept/group_dept_list.jsp b/webapps/totsys/common/web/report_dept/group_dept_list.jsp new file mode 100644 index 0000000..3cfad57 --- /dev/null +++ b/webapps/totsys/common/web/report_dept/group_dept_list.jsp @@ -0,0 +1,629 @@ + +<% +/************************************************************@@ + * Program Name : group_dept_list.jsp + * Description : ׷캯 + * Author : ũ + * Create Date : 2010-11-27 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.MLong" import="kr.co.kihyun.moumi.Moumi" + import="java.net.URLDecoder" import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.beans.user.UserGroup" + import="kr.co.kihyun.beans.user.UserGroupList" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.user.User"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + + /****** Parameter ******/ + String groupID = request.getParameter("groupID"); + //28.ũνƮ ũƮ(Reflected)_CWE-80 : Add by KWON,HAN + if (groupID !=null) { + groupID = groupID.replaceAll("<","<"); + groupID = groupID.replaceAll(">",">"); + } + //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + String groupName = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("groupName"))),""); + + + //LJH + //String groupName=clearXSS(URLDecoder.decode(request.getParameter("groupName"), "UTF-8"),""); + + + + /****** ش ׷ μ ******/ + String deptIDs = ""; + String deptNames = ""; + String userIDs = ""; + String userNames = ""; + String deptTypes = ""; + String validTypes = ""; + + //μƮ + UserGroup ugroup = new UserGroup(); + String[] idList = ugroup.getDeptID(groupID); + String[] nameList = ugroup.getDeptName(groupID); + + String dTypes = ""; + if(idList != null){ + for(int i=0; i < idList.length; i++){ + if( i == 0 ){ + deptIDs = deptIDs + idList[i]; + //deptNames = deptNames + nameList[i]; + deptNames = deptNames + new Dept().getPartName(idList[i])+"-"+new Dept().getUpperDeptName(idList[i])+"-"+new Dept().getName(idList[i]); + dTypes = "dept"; + validTypes = "1"+"@@@@"+idList[i]; + }else{ + deptIDs = deptIDs + "," + idList[i] ; + //deptNames = deptNames + "," + nameList[i] ; + deptNames = deptNames + "," + new Dept().getPartName(idList[i])+"-"+new Dept().getUpperDeptName(idList[i])+"-"+new Dept().getName(idList[i]); + dTypes = dTypes + ",dept"; + validTypes = validTypes+","+"1"+"@@@@"+idList[i]; + } + } + } + + //θƮ + ugroup.userSetting(groupID); + String[] userUserID = ugroup.getUserUserID(); + String[] userUserName = ugroup.getUserUserName(); + String[] userDeptID = ugroup.getUserDeptID(); + String uTypes = ""; + + if(userUserID != null){ + for(int i=0; i + + + + +μ + + + + + + + + +
    + + +
    + + + + + +
    + + + +
    + + + + + + + + + + + + + + + + + +
    + + + + + + +
     <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.deptMap")%> <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.submitDept")%>
    + + + + + +
    + + + + + +
    + + + + + + + + + + + + +
    +
    + + + +
    + + + + + + + + + +
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.group")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.name")%> + : + +   
    +
    + + + + + + + + + +
    + + + + + +
    +
    + + +
    + diff --git a/webapps/totsys/common/web/report_dept/group_dept_list2.jsp b/webapps/totsys/common/web/report_dept/group_dept_list2.jsp new file mode 100644 index 0000000..0f58ac1 --- /dev/null +++ b/webapps/totsys/common/web/report_dept/group_dept_list2.jsp @@ -0,0 +1,755 @@ + +<% /** + * ********************************************************** + * @@ Program Name : group_dept_list.jsp + * @@ Description : ׷캯 + * @@ Author : ũ + * @@ Create Date : 2010-11-27 + * @@ History : 2014.09.18 Update by KWON,HAN + * @@*********************************************************** + */ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.lang.MInteger" + import="kr.co.kihyun.lang.MLong" + import="kr.co.kihyun.moumi.Moumi" + import="java.net.URLDecoder" + import="kr.co.kihyun.lang.Encoder" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.beans.user.UserGroup" + import="kr.co.kihyun.beans.user.UserGroupList" + import="kr.co.kihyun.beans.entity.util.*" + import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" + import="kr.co.kihyun.beans.entity.*" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.user.User"%> + +<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> + +<% /** + * ******** session userId ********* + */ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + + /** + * **** Parameter ***** + */ + String groupID = request.getParameter("groupID"); + //28.ũνƮ ũƮ(Reflected)_CWE-80 : Add by KWON,HAN + if (groupID !=null) { + groupID = groupID.replaceAll("<","<"); + groupID = groupID.replaceAll(">",">"); + } + //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + //String groupName = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("groupName"))),""); + + //LJH + String groupName = clearXSS(URLDecoder.decode(request.getParameter("groupName"), "UTF-8"), ""); + + PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); + Transaction tx = pm.currentTransaction(); + tx.begin(); + UserPart userPart = pm.getObjectById(UserPart.class, groupID); + groupName = userPart.getName(); + tx.rollback(); + + /** + * **** ش ׷ μ ***** + */ + String deptIDs = ""; + String deptNames = ""; + String userIDs = ""; + String userNames = ""; + String deptTypes = ""; + String validTypes = ""; + + //μƮ + UserGroup ugroup = new UserGroup(); + String[] idList = ugroup.getDeptID(groupID); + String[] nameList = ugroup.getDeptName(groupID); + String[] ogranNameList = ugroup.getOrganNameOfUpperDept(groupID); + String[] upperNameList = ugroup.getUpperDeptName(groupID); + + String dTypes = ""; + if (idList != null) { + for (int i = 0; i < idList.length; i++) { + if (i == 0) { + deptIDs = deptIDs + idList[i]; + //deptNames = deptNames + nameList[i]; + //deptNames = deptNames + new Dept().getPartName(idList[i]) + "-" + new Dept().getUpperDeptName(idList[i]) + "-" + new Dept().getName(idList[i]); + //deptNames = deptNames + new Dept().getOrganNameOfUpperDept(idList[i]) + "|" + new Dept().getUpperDeptName(idList[i]) + "|" + new Dept().getName(idList[i]); + deptNames = deptNames + ogranNameList[i] + "|" + MString.checkNull(upperNameList[i]) + "|" + nameList[i]; + dTypes = "dept"; + validTypes = "1" + "@@@@" + idList[i]; + } else { + deptIDs = deptIDs + "," + idList[i]; + //deptNames = deptNames + "," + nameList[i] ; + //deptNames = deptNames + "," + new Dept().getPartName(idList[i]) + "-" + new Dept().getUpperDeptName(idList[i]) + "-" + new Dept().getName(idList[i]); + //deptNames = deptNames + "," + new Dept().getOrganNameOfUpperDept(idList[i]) + "|" + new Dept().getUpperDeptName(idList[i]) + "|" + new Dept().getName(idList[i]); + deptNames = deptNames + "," + ogranNameList[i] + "|" + MString.checkNull(upperNameList[i]) + "|" + nameList[i]; + dTypes = dTypes + ",dept"; + validTypes = validTypes + "," + "1" + "@@@@" + idList[i]; + } + } + } + + //θƮ + ugroup.userSetting(groupID); + String[] userUserID = ugroup.getUserUserID(); + String[] userUserName = ugroup.getUserUserName(); + String[] userDeptID = ugroup.getUserDeptID(); + String uTypes = ""; + + if (userUserID != null) { + for (int i = 0; i < userUserID.length; i++) { + if (i == 0) { + userIDs = userUserID[i] + "/" + userDeptID[i]; + //userNames = userUserName[i]; + //userNames = new Dept().getPartName(userDeptID[i]) + "-" + new Dept().getUpperDeptName(userDeptID[i]) + "-" + new Dept().getName(userDeptID[i]) + "/" + new User().getName(userUserID[i]); + userNames = new Dept().getOrganNameOfUpperDept(userDeptID[i]) + "|" + new Dept().getUpperDeptName(userDeptID[i]) + "|" + new Dept().getName(userDeptID[i]) + "/" + new User().getName(userUserID[i]); + uTypes = "user"; + if (validTypes.length() == 0) { + validTypes = new UserGroupList().getVaild(groupID, userUserID[i]) + "/" + userUserID[i] + "/" + userDeptID[i]; + } else { + validTypes = validTypes + "," + new UserGroupList().getVaild(groupID, userUserID[i]) + "@@@@" + userUserID[i] + "/" + userDeptID[i]; + } + } else { + userIDs += "," + userUserID[i] + "/" + userDeptID[i]; + //userNames += ","+userUserName[i]; + //userNames += "," + new Dept().getPartName(userDeptID[i]) + "-" + new Dept().getUpperDeptName(userDeptID[i]) + "-" + new Dept().getName(userDeptID[i]) + "/" + new User().getName(userUserID[i]); + userNames += "," + new Dept().getOrganNameOfUpperDept(userDeptID[i]) + "|" + new Dept().getUpperDeptName(userDeptID[i]) + "|" + new Dept().getName(userDeptID[i]) + "/" + new User().getName(userUserID[i]); + uTypes = uTypes + ",user"; + validTypes = validTypes + "," + new UserGroupList().getVaild(groupID, userUserID[i]) + "@@@@" + userUserID[i] + "/" + userDeptID[i]; + } + } + } + + if (!deptIDs.equals("") && !userIDs.equals("")) { + deptIDs = deptIDs + "," + userIDs; + deptNames = deptNames + "," + userNames; + deptTypes = dTypes + "," + uTypes; + } else { + deptIDs = deptIDs + userIDs; + deptNames = deptNames + userNames; + deptTypes = dTypes + uTypes; + } + +%> + + + + + + + + + + + ׷ + + + + + + + + +
    + + + + + + + +
    + +
    + + + + + + + + + + + + + + + +
    + + + + + +
    <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.user")%><%=Moumi.getMessageBundle().getString("moumi.message.menu.groupSetting")%>
    + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
     <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.deptMap")%> (μ)
    +
    + + + + + +
    + + + + +
    + <%if(sysAuth==9){%> + + <%}else{%> + + <%}%> +
    +
    + + + + + + + + + + + +
    +
    + + + + +
    +
    + + + + + + + + + + +
    + <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.group")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.name")%> : + +   
    + + + + + + + + + + + +
    +     : +    +    +    +   
    +
    + + + +
    + + + + + + +
    + + + + + +
    +
    + +
    + + \ No newline at end of file diff --git a/webapps/totsys/common/web/report_dept/group_list.jsp b/webapps/totsys/common/web/report_dept/group_list.jsp new file mode 100644 index 0000000..0ee9a2c --- /dev/null +++ b/webapps/totsys/common/web/report_dept/group_list.jsp @@ -0,0 +1,206 @@ + +<% +/************************************************************@@ + * Program Name : group_list.jsp + * Description : ׷ + * Author : ũ + * Create Date : 2010-11-24 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.lang.MString" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.user.UserGroupList" + import="kr.co.kihyun.beans.user.UserGroup" + import="org.slf4j.Logger" + import="org.slf4j.LoggerFactory" + %> + +<% +Logger LOG = LoggerFactory.getLogger(this.getClass()); +try{ + /********** session userId **********/ + String usID = HttpSSOLogin.getLoginID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + + /************ GroupList **************/ + UserGroupList grouplist = new UserGroupList(); + + grouplist.executeQuery(usID,sysAuth); + + int groupCount = grouplist.getCount(); + + //LOG.debug("groupCount: {}", groupCount); + String[] usePartIDList = grouplist.getPartIDList(); + //LOG.debug("usePartIDList: {}", usePartIDList); + String[] useNameList = grouplist.getNameList(); + + //LOG.debug("useNameList {}", useNameList); + int[] usePartCountList = new int[groupCount]; + String[] useDescList = grouplist.getDescList(); + //LOG.debug("useDescList {}", useDescList); + +// Dept dept = new Dept(); + + StringBuffer stringTree = new StringBuffer(); + + stringTree.append("
      "); + +/* + for(int p=0; p0){ + stringTree.append("
    •  "+useNameList[p]+"
    • "); + }else{ + stringTree.append("
    •  "+useNameList[p]+"
    • "); + } + } +*/ + + for(int p=0; p "+useNameList[p]//+" {"+MString.checkNull(useDescList[p])+"}" + +" ("+usePartCountList[p]+")"); // {} + if(new UserGroupList().getUserUserEffectiveness(usePartIDList[p]) == true) + stringTree.append(" [") + .append(Moumi.getMessageBundle().getString("moumi.message.tot_doc.modification")).append("]"); + else + stringTree.append(""); + } + stringTree.append("
    "); + + +%> + + + + + + + + + + + + + + + + + + + + + + + + +
    <%=stringTree.toString()%>
    + + +<% +}catch(Exception ex){ex.printStackTrace(); + + out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';")); +}finally{ +} +%> diff --git a/webapps/totsys/common/web/report_dept/iframe/_json_data.json b/webapps/totsys/common/web/report_dept/iframe/_json_data.json new file mode 100644 index 0000000..615a6a2 --- /dev/null +++ b/webapps/totsys/common/web/report_dept/iframe/_json_data.json @@ -0,0 +1,4 @@ +[ + { "data" : "A node", "children" : [ { "data" : "Only child", "state" : "closed" } ], "state" : "open" }, + "Ajax node" +] \ No newline at end of file diff --git a/webapps/totsys/common/web/report_dept/iframe/dept_list.html b/webapps/totsys/common/web/report_dept/iframe/dept_list.html new file mode 100644 index 0000000..5ad48e9 --- /dev/null +++ b/webapps/totsys/common/web/report_dept/iframe/dept_list.html @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/webapps/totsys/common/web/report_dept/iframe/dept_list.jsp b/webapps/totsys/common/web/report_dept/iframe/dept_list.jsp new file mode 100644 index 0000000..78b3ed1 --- /dev/null +++ b/webapps/totsys/common/web/report_dept/iframe/dept_list.jsp @@ -0,0 +1,296 @@ + +<% +/************************************************************@@ + * Program Name : dept_list.jsp + * Description : μ + * Author : ȯ + * Create Date : 2009-03-06 + * History : +@@************************************************************/ +%> + +<%@ page contentType="text/html; charset=euc-kr" + import="kr.co.kihyun.beans.user.HttpSSOLogin" + import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.beans.user.Part" + import="kr.co.kihyun.beans.user.Dept" + import="kr.co.kihyun.beans.user.DeptList"%> +<%@page import="javax.jdo.PersistenceManager"%> +<%@page import="javax.jdo.Transaction"%> +<%@page import="kr.co.kihyun.beans.entity.util.*"%> +<%@page import="kr.co.kihyun.beans.entity.MDept"%> +<%@page import="kr.co.kihyun.beans.entity.MUser"%> +<%@page import="java.util.List"%> +<%@page import="javax.jdo.Query"%> +<%@page import="kr.co.kihyun.lang.MString"%> + +<% +PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); +Transaction tx = pm.currentTransaction(); +try{ + /********** session userId **********/ + String ptID = HttpSSOLogin.getOrganID(request); + String dtID = HttpSSOLogin.getDeptID(request); + int sysAuth = HttpSSOLogin.getSysAuth(request); + MDept mDept = null; + Query q = null; + List mUsers = null; + + /************ PartList **************/ + int partCount; + String partID=ptID; + String partName=""; + String partUpperDept=""; + String partOrgan=""; + boolean partSelType=false; + + Dept dept = new Dept(); + Part part = new Part(); + + tx.begin(); + + if(Moumi.TOTADM == sysAuth || Moumi.TOTPER == sysAuth || Moumi.SYSADM == sysAuth){ + partName=part.getName(ptID); + partUpperDept=part.getUpperDept(ptID); + partOrgan=part.getOrgan(ptID); + partSelType=part.getSelType(ptID); + } + + tx.rollback(); + + DeptList deptList = new DeptList(); + deptList.depthIDList(dtID, ptID); + + String[] depthIDList = deptList.getIDList(); + + int depthCount = depthIDList.length; + + StringBuffer stringTree = new StringBuffer(); + + stringTree.append("
      "); + + if(partSelType){ + stringTree.append("
    •  "+partName+"
    • "); + }else{ + stringTree.append("
    •  "+partName+"
    • "); + } + + stringTree.append("
    "); + + String tree = stringTree.toString(); + + if(depthCount>0){ + int dp=0; + + StringBuffer subTree = null; + String[] inDept = new String[depthCount]; + + for(int dpt=depthCount; dpt>0; dpt--){ + int deptCount; + String[] deptIDList; + String[] deptNameList; + String[] deptOrganList; + boolean[] deptSelTypeList; + + int userCount; + + deptList.lowIDList(depthIDList[dpt-1]); + + deptCount = deptList.getCount(); + deptIDList = deptList.getIDList(); + deptNameList = deptList.getNameList(); + deptOrganList = deptList.getOrganList(); + deptSelTypeList = deptList.getSelTypeList(); + + tx.begin(); + + mDept = pm.getObjectById(MDept.class, depthIDList[dpt-1]); + q = pm.newQuery(MUser.class); + q.setFilter("isDeleted == false && mDept == dept"); + q.declareParameters("String dept"); + mUsers = (List) q.execute(mDept.getId()); + userCount = mUsers.size(); + + subTree = new StringBuffer(); + + String dtName = dept.getName(depthIDList[dpt-1]); + String ptName = part.getName(dept.getPartID(depthIDList[dpt-1])); + + if(deptCount>0 || userCount>0){ + subTree.append("
      "); + + for(int u=0; u "+mUsers.get(u).getName(pm)+" "+MString.checkNull(mUsers.get(u).getDutyName())+""); + } + + for(int d=0; d  "+deptNameList[d]+""); + }else{ + subTree.append("
    •   "+deptNameList[d]+"
    • "); + } + } + subTree.append("
    "); + }else{ + subTree.append(""); + } + + tx.rollback(); + + inDept[dp++] = subTree.toString(); + } + + for(int dpt=0; dpt